@asumano/worklip-typeorm-db 1.1.70 → 1.1.71
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.
|
@@ -86,7 +86,7 @@ __decorate([
|
|
|
86
86
|
default: 1,
|
|
87
87
|
type: "int",
|
|
88
88
|
width: 1,
|
|
89
|
-
comment: "Estado en el que se queda el log:\r\n1: Enviado.\r\n2: Entregado.\r\n3: Abierto.\r\n4: Error.",
|
|
89
|
+
comment: "Estado en el que se queda el log:\r\n1: Enviado.\r\n2: Entregado.\r\n3: Abierto.\r\n4: Error.\r\n5: Rebotado.\r\n6: Queja.",
|
|
90
90
|
}),
|
|
91
91
|
__metadata("design:type", Number)
|
|
92
92
|
], EmailLog.prototype, "status", void 0);
|
|
@@ -113,4 +113,9 @@ exports.EmailLog = EmailLog = __decorate([
|
|
|
113
113
|
name: "email_log",
|
|
114
114
|
}),
|
|
115
115
|
(0, typeorm_1.Index)("IDX_email_log_company_created", ["company", "created"])
|
|
116
|
+
// DOC: Cada evento de SES llega identificado solo por el MessageId, así que casarlo con su
|
|
117
|
+
// fila es una búsqueda por esta columna. Sin índice sería un recorrido completo de la tabla,
|
|
118
|
+
// que crece ~60.000 filas al mes.
|
|
119
|
+
,
|
|
120
|
+
(0, typeorm_1.Index)("IDX_email_log_provider_message_id", ["provider_message_id"])
|
|
116
121
|
], EmailLog);
|
|
@@ -0,0 +1,104 @@
|
|
|
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.EmailSuppression = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
// DOC: Direcciones a las que NO se les puede volver a escribir, alimentada por los eventos
|
|
15
|
+
// de rebote y queja que SES publica en SNS. Espejo local de la lista de supresión de la
|
|
16
|
+
// cuenta de SES: la de AWS es la autoritativa, esta permite el chequeo antes de enviar y
|
|
17
|
+
// poder decirle al taller "este correo está mal, corríjalo".
|
|
18
|
+
//
|
|
19
|
+
// A propósito NO tiene `company` ni `client`: el evento de SES solo trae la DIRECCIÓN, y la
|
|
20
|
+
// misma puede estar en varios clientes de varias empresas (o no ser de ningún cliente, como
|
|
21
|
+
// las que el asesor escribe a mano al compartir el informe). Es global por diseño.
|
|
22
|
+
let EmailSuppression = class EmailSuppression {
|
|
23
|
+
};
|
|
24
|
+
exports.EmailSuppression = EmailSuppression;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
27
|
+
type: "int",
|
|
28
|
+
comment: "ID único de cada registro.",
|
|
29
|
+
}),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], EmailSuppression.prototype, "id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Index)("UQ_email_suppression_email", { unique: true }),
|
|
34
|
+
(0, typeorm_1.Column)({
|
|
35
|
+
length: 255,
|
|
36
|
+
type: "varchar",
|
|
37
|
+
comment: "Dirección suprimida, en minúsculas.",
|
|
38
|
+
}),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], EmailSuppression.prototype, "email", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
type: "int",
|
|
44
|
+
comment: "Motivo por el que se suprimió:\r\n1: Rebote permanente.\r\n2: Queja (marcada como spam).",
|
|
45
|
+
}),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], EmailSuppression.prototype, "event_type", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({
|
|
50
|
+
type: "text",
|
|
51
|
+
nullable: true,
|
|
52
|
+
default: null,
|
|
53
|
+
comment: "Diagnóstico que devolvió SES (subtipo, código SMTP y texto del servidor).",
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], EmailSuppression.prototype, "reason", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({
|
|
59
|
+
length: 255,
|
|
60
|
+
type: "varchar",
|
|
61
|
+
nullable: true,
|
|
62
|
+
default: null,
|
|
63
|
+
comment: "MessageId de SES del correo que provocó la supresión.",
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], EmailSuppression.prototype, "provider_message_id", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
type: "datetime",
|
|
70
|
+
comment: "Primera vez que se recibió un evento para esta dirección.",
|
|
71
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
72
|
+
}),
|
|
73
|
+
__metadata("design:type", Date)
|
|
74
|
+
], EmailSuppression.prototype, "first_seen", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({
|
|
77
|
+
type: "datetime",
|
|
78
|
+
comment: "Última vez que se recibió un evento para esta dirección.",
|
|
79
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
80
|
+
}),
|
|
81
|
+
__metadata("design:type", Date)
|
|
82
|
+
], EmailSuppression.prototype, "last_seen", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({
|
|
85
|
+
type: "int",
|
|
86
|
+
default: 1,
|
|
87
|
+
comment: "Cuántos eventos se han recibido para esta dirección.",
|
|
88
|
+
}),
|
|
89
|
+
__metadata("design:type", Number)
|
|
90
|
+
], EmailSuppression.prototype, "event_count", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({
|
|
93
|
+
type: "datetime",
|
|
94
|
+
comment: "Fecha de creación del registro.",
|
|
95
|
+
default: () => "CURRENT_TIMESTAMP",
|
|
96
|
+
}),
|
|
97
|
+
__metadata("design:type", Date)
|
|
98
|
+
], EmailSuppression.prototype, "created", void 0);
|
|
99
|
+
exports.EmailSuppression = EmailSuppression = __decorate([
|
|
100
|
+
(0, typeorm_1.Entity)({
|
|
101
|
+
comment: "Direcciones de correo suprimidas por rebote permanente o queja, según los eventos de Amazon SES.",
|
|
102
|
+
name: "email_suppression",
|
|
103
|
+
})
|
|
104
|
+
], EmailSuppression);
|
package/dist/entities.index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export { MediaFile } from "./entities/MediaFile";
|
|
|
43
43
|
export { ServiceOrderApproval } from "./entities/ServiceOrderApproval";
|
|
44
44
|
export { WhatsappLog } from "./entities/WhatsappLog";
|
|
45
45
|
export { EmailLog } from "./entities/EmailLog";
|
|
46
|
+
export { EmailSuppression } from "./entities/EmailSuppression";
|
|
46
47
|
export { BillingInvoice } from "./entities/BillingInvoice";
|
|
47
48
|
export { PaymentTransaction } from "./entities/PaymentTransaction";
|
|
48
49
|
export { SubscriptionAddonTemplate } from "./entities/SubscriptionAddonTemplate";
|
package/dist/entities.index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.GlobalTemplateSectionItems = exports.GlobalTemplateSections = exports.GlobalTemplates = exports.SubscriptionAddonTemplates = exports.SubscriptionPlans = exports.Masters = exports.Companies = exports.WorkshopsByAssociate = exports.Workshops = exports.TemplateSectionItems = exports.TemplateSections = exports.Templates = exports.Reminders = exports.Vehicles = exports.Clients = exports.ServicesOrder = void 0;
|
|
3
|
+
exports.UsageAlert = exports.SubscriptionAddonTemplate = exports.PaymentTransaction = exports.BillingInvoice = exports.EmailSuppression = exports.EmailLog = exports.WhatsappLog = exports.ServiceOrderApproval = exports.MediaFile = exports.BillingUsageSnapshot = exports.PaymentMethod = exports.SubscriptionAddon = exports.CompanySubscription = exports.SubscriptionPlan = exports.CountryHoliday = exports.CompanyVehicleType = exports.BrandVehicleType = exports.CompanyBrand = exports.VehicleType = exports.MasterSection = exports.MasterPermission = exports.MasterRole = exports.MasterPlatform = exports.MasterPasswordReset = exports.AssociatePasswordReset = exports.AssociateSection = exports.AssociatePermission = exports.AssociateRole = exports.AssociatePlatform = exports.Reminder = exports.ServiceOrderHistory = exports.ServiceOrder = exports.TemplateSectionItem = exports.TemplateSection = exports.Template = exports.Workshop = exports.GlobalTemplateSectionItem = exports.GlobalTemplateSection = exports.GlobalTemplate = exports.AssociateSession = exports.MasterSession = exports.Associate = exports.Client = exports.Master = exports.Vehicle = exports.Brand = exports.Company = exports.City = exports.Region = exports.Country = void 0;
|
|
4
|
+
exports.GlobalTemplateSectionItems = exports.GlobalTemplateSections = exports.GlobalTemplates = exports.SubscriptionAddonTemplates = exports.SubscriptionPlans = exports.Masters = exports.Companies = exports.WorkshopsByAssociate = exports.Workshops = exports.TemplateSectionItems = exports.TemplateSections = exports.Templates = exports.Reminders = exports.Vehicles = exports.Clients = exports.ServicesOrder = exports.Associates = void 0;
|
|
5
5
|
var Country_1 = require("./entities/Country");
|
|
6
6
|
Object.defineProperty(exports, "Country", { enumerable: true, get: function () { return Country_1.Country; } });
|
|
7
7
|
var Region_1 = require("./entities/Region");
|
|
@@ -92,6 +92,8 @@ var WhatsappLog_1 = require("./entities/WhatsappLog");
|
|
|
92
92
|
Object.defineProperty(exports, "WhatsappLog", { enumerable: true, get: function () { return WhatsappLog_1.WhatsappLog; } });
|
|
93
93
|
var EmailLog_1 = require("./entities/EmailLog");
|
|
94
94
|
Object.defineProperty(exports, "EmailLog", { enumerable: true, get: function () { return EmailLog_1.EmailLog; } });
|
|
95
|
+
var EmailSuppression_1 = require("./entities/EmailSuppression");
|
|
96
|
+
Object.defineProperty(exports, "EmailSuppression", { enumerable: true, get: function () { return EmailSuppression_1.EmailSuppression; } });
|
|
95
97
|
var BillingInvoice_1 = require("./entities/BillingInvoice");
|
|
96
98
|
Object.defineProperty(exports, "BillingInvoice", { enumerable: true, get: function () { return BillingInvoice_1.BillingInvoice; } });
|
|
97
99
|
var PaymentTransaction_1 = require("./entities/PaymentTransaction");
|