easywork-common-lib 1.0.1339 → 1.0.1341
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/entities/import-job.entity.d.ts +36 -0
- package/dist/entities/import-job.entity.js +140 -0
- package/dist/entities/import-job.entity.js.map +1 -0
- package/dist/grpc/drive/drive.proto +339 -339
- package/dist/grpc/drive/leads.proto +114 -114
- package/dist/modules/authorization/services/resource-access-filter.service.js +21 -21
- package/package.json +55 -55
- package/dist/entities/subscriptions/payment-history.entity.d.ts +0 -24
- package/dist/entities/subscriptions/payment-history.entity.js +0 -124
- package/dist/entities/subscriptions/payment-history.entity.js.map +0 -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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { User } from "./user.entity";
|
|
2
|
+
export declare enum ImportJobStatus {
|
|
3
|
+
PENDING = "PENDING",
|
|
4
|
+
PROCESSING = "PROCESSING",
|
|
5
|
+
COMPLETED = "COMPLETED",
|
|
6
|
+
FAILED = "FAILED"
|
|
7
|
+
}
|
|
8
|
+
export declare enum ImportJobType {
|
|
9
|
+
LEAD = "lead",
|
|
10
|
+
CONTACT = "contact"
|
|
11
|
+
}
|
|
12
|
+
export interface ImportJobError {
|
|
13
|
+
index: number;
|
|
14
|
+
message: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class ImportJobEntity {
|
|
17
|
+
id: string;
|
|
18
|
+
userId: string;
|
|
19
|
+
user?: User;
|
|
20
|
+
status: ImportJobStatus;
|
|
21
|
+
type: ImportJobType;
|
|
22
|
+
progress: number;
|
|
23
|
+
totalItems: number;
|
|
24
|
+
processedItems: number;
|
|
25
|
+
createdItems: number;
|
|
26
|
+
updatedItems: number;
|
|
27
|
+
skippedItems: number;
|
|
28
|
+
errors: ImportJobError[];
|
|
29
|
+
strategy: string;
|
|
30
|
+
singularityParams: string[] | null;
|
|
31
|
+
contentHash: string | null;
|
|
32
|
+
startTime: Date;
|
|
33
|
+
endTime: Date | null;
|
|
34
|
+
message: string | null;
|
|
35
|
+
updatedAt: Date;
|
|
36
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
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.ImportJobEntity = exports.ImportJobType = exports.ImportJobStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const user_entity_1 = require("./user.entity");
|
|
15
|
+
var ImportJobStatus;
|
|
16
|
+
(function (ImportJobStatus) {
|
|
17
|
+
ImportJobStatus["PENDING"] = "PENDING";
|
|
18
|
+
ImportJobStatus["PROCESSING"] = "PROCESSING";
|
|
19
|
+
ImportJobStatus["COMPLETED"] = "COMPLETED";
|
|
20
|
+
ImportJobStatus["FAILED"] = "FAILED";
|
|
21
|
+
})(ImportJobStatus || (exports.ImportJobStatus = ImportJobStatus = {}));
|
|
22
|
+
var ImportJobType;
|
|
23
|
+
(function (ImportJobType) {
|
|
24
|
+
ImportJobType["LEAD"] = "lead";
|
|
25
|
+
ImportJobType["CONTACT"] = "contact";
|
|
26
|
+
})(ImportJobType || (exports.ImportJobType = ImportJobType = {}));
|
|
27
|
+
let ImportJobEntity = class ImportJobEntity {
|
|
28
|
+
id;
|
|
29
|
+
userId;
|
|
30
|
+
user;
|
|
31
|
+
status;
|
|
32
|
+
type;
|
|
33
|
+
progress;
|
|
34
|
+
totalItems;
|
|
35
|
+
processedItems;
|
|
36
|
+
createdItems;
|
|
37
|
+
updatedItems;
|
|
38
|
+
skippedItems;
|
|
39
|
+
errors;
|
|
40
|
+
strategy;
|
|
41
|
+
singularityParams;
|
|
42
|
+
contentHash;
|
|
43
|
+
startTime;
|
|
44
|
+
endTime;
|
|
45
|
+
message;
|
|
46
|
+
updatedAt;
|
|
47
|
+
};
|
|
48
|
+
exports.ImportJobEntity = ImportJobEntity;
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.PrimaryColumn)("uuid"),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], ImportJobEntity.prototype, "id", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)("uuid"),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], ImportJobEntity.prototype, "userId", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { onDelete: "CASCADE" }),
|
|
59
|
+
(0, typeorm_1.JoinColumn)({ name: "userId" }),
|
|
60
|
+
__metadata("design:type", user_entity_1.User)
|
|
61
|
+
], ImportJobEntity.prototype, "user", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({
|
|
64
|
+
type: "varchar",
|
|
65
|
+
length: 20,
|
|
66
|
+
default: ImportJobStatus.PENDING,
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], ImportJobEntity.prototype, "status", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({
|
|
72
|
+
type: "varchar",
|
|
73
|
+
length: 20,
|
|
74
|
+
}),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], ImportJobEntity.prototype, "type", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ type: "smallint", default: 0 }),
|
|
79
|
+
__metadata("design:type", Number)
|
|
80
|
+
], ImportJobEntity.prototype, "progress", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({ type: "int" }),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], ImportJobEntity.prototype, "totalItems", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({ type: "int", default: 0 }),
|
|
87
|
+
__metadata("design:type", Number)
|
|
88
|
+
], ImportJobEntity.prototype, "processedItems", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({ type: "int", default: 0 }),
|
|
91
|
+
__metadata("design:type", Number)
|
|
92
|
+
], ImportJobEntity.prototype, "createdItems", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ type: "int", default: 0 }),
|
|
95
|
+
__metadata("design:type", Number)
|
|
96
|
+
], ImportJobEntity.prototype, "updatedItems", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.Column)({ type: "int", default: 0 }),
|
|
99
|
+
__metadata("design:type", Number)
|
|
100
|
+
], ImportJobEntity.prototype, "skippedItems", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)({ type: "jsonb", default: [] }),
|
|
103
|
+
__metadata("design:type", Array)
|
|
104
|
+
], ImportJobEntity.prototype, "errors", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50 }),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], ImportJobEntity.prototype, "strategy", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.Column)({ type: "simple-array", nullable: true }),
|
|
111
|
+
__metadata("design:type", Array)
|
|
112
|
+
], ImportJobEntity.prototype, "singularityParams", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 64, nullable: true }),
|
|
115
|
+
__metadata("design:type", String)
|
|
116
|
+
], ImportJobEntity.prototype, "contentHash", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
119
|
+
__metadata("design:type", Date)
|
|
120
|
+
], ImportJobEntity.prototype, "startTime", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
123
|
+
__metadata("design:type", Date)
|
|
124
|
+
], ImportJobEntity.prototype, "endTime", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
127
|
+
__metadata("design:type", String)
|
|
128
|
+
], ImportJobEntity.prototype, "message", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
131
|
+
__metadata("design:type", Date)
|
|
132
|
+
], ImportJobEntity.prototype, "updatedAt", void 0);
|
|
133
|
+
exports.ImportJobEntity = ImportJobEntity = __decorate([
|
|
134
|
+
(0, typeorm_1.Entity)("import_jobs"),
|
|
135
|
+
(0, typeorm_1.Index)("idx_import_jobs_user_status", ["userId", "status"]),
|
|
136
|
+
(0, typeorm_1.Index)("idx_import_jobs_content_hash", ["contentHash"], {
|
|
137
|
+
where: `status IN ('PENDING', 'PROCESSING')`,
|
|
138
|
+
})
|
|
139
|
+
], ImportJobEntity);
|
|
140
|
+
//# sourceMappingURL=import-job.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-job.entity.js","sourceRoot":"","sources":["../../src/entities/import-job.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCASiB;AACjB,+CAAqC;AAIrC,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,4CAAyB,CAAA;IACzB,0CAAuB,CAAA;IACvB,oCAAiB,CAAA;AACnB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAKD,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,oCAAmB,CAAA;AACrB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAmBM,IAAM,eAAe,GAArB,MAAM,eAAe;IAE1B,EAAE,CAAS;IAGX,MAAM,CA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