c2-desafiox 1.0.117 → 1.0.119
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.
|
@@ -1,46 +1,35 @@
|
|
|
1
1
|
import { Schema, Types } from "mongoose";
|
|
2
2
|
import { IAccount } from "./Account";
|
|
3
3
|
import { IAdminComunication } from "./AdminComunication";
|
|
4
|
-
import { IFile } from "./File";
|
|
5
|
-
import { IAdminTemplatePush } from "./AdminTemplatePush";
|
|
6
|
-
import { IAdminTemplateEmail } from "./AdminTemplateEmail";
|
|
7
4
|
export declare enum AdminEventComunicationStatus {
|
|
8
5
|
CREATED = "CREATED",
|
|
9
6
|
RUNNING = "RUNNING",
|
|
10
7
|
ERROR = "ERROR",
|
|
11
8
|
DONE = "DONE"
|
|
12
9
|
}
|
|
13
|
-
export declare enum
|
|
10
|
+
export declare enum AdminEventComunicationDeliveryStatus {
|
|
14
11
|
CREATED = "CREATED",
|
|
15
12
|
SENT = "SENT",
|
|
16
13
|
DELIVERED = "DELIVERED",
|
|
17
14
|
READ = "READ",
|
|
18
15
|
ERROR = "ERROR"
|
|
19
16
|
}
|
|
17
|
+
export declare enum AdminEventComunicationType {
|
|
18
|
+
PUSH = "PUSH",
|
|
19
|
+
EMAIL = "EMAIL",
|
|
20
|
+
IN_APP = "IN_APP",
|
|
21
|
+
SMS = "SMS",
|
|
22
|
+
WHATSAPP = "WHATSAPP",
|
|
23
|
+
TUTORIAL = "TUTORIAL"
|
|
24
|
+
}
|
|
20
25
|
export interface IAdminEventComunication {
|
|
21
26
|
_id: Types.ObjectId;
|
|
22
27
|
account: Types.ObjectId | IAccount;
|
|
23
28
|
comunication: Types.ObjectId | IAdminComunication;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
title: string;
|
|
28
|
-
body: string;
|
|
29
|
-
image?: IFile;
|
|
30
|
-
redirect?: string;
|
|
31
|
-
metadata?: Map<string, string>;
|
|
32
|
-
message?: string;
|
|
33
|
-
};
|
|
34
|
-
emailContent?: {
|
|
35
|
-
template: Types.ObjectId | IAdminTemplateEmail;
|
|
36
|
-
status: AdminEventComunicationMessageStatus;
|
|
37
|
-
subject: string;
|
|
38
|
-
bodyHtml: string;
|
|
39
|
-
addresses: string[];
|
|
40
|
-
message?: string;
|
|
41
|
-
};
|
|
29
|
+
content: any;
|
|
30
|
+
type: AdminEventComunicationType;
|
|
31
|
+
statusDelivery: AdminEventComunicationDeliveryStatus;
|
|
42
32
|
status: AdminEventComunicationStatus;
|
|
43
|
-
message?: string;
|
|
44
33
|
createdAtDateTime: Date;
|
|
45
34
|
updatedAtDateTime: Date;
|
|
46
35
|
}
|
|
@@ -50,6 +39,7 @@ export declare const AdminEventComunicationSchema: Schema<any, import("mongoose"
|
|
|
50
39
|
updatedAt: string;
|
|
51
40
|
};
|
|
52
41
|
}, {} & {
|
|
42
|
+
type: string;
|
|
53
43
|
account: {
|
|
54
44
|
prototype?: Types.ObjectId | null | undefined;
|
|
55
45
|
cacheHexString?: unknown;
|
|
@@ -69,47 +59,10 @@ export declare const AdminEventComunicationSchema: Schema<any, import("mongoose"
|
|
|
69
59
|
createFromBase64?: {} | null | undefined;
|
|
70
60
|
isValid?: {} | null | undefined;
|
|
71
61
|
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
status: string;
|
|
75
|
-
title: string;
|
|
76
|
-
body: string;
|
|
77
|
-
template: {
|
|
78
|
-
prototype?: Types.ObjectId | null | undefined;
|
|
79
|
-
cacheHexString?: unknown;
|
|
80
|
-
generate?: {} | null | undefined;
|
|
81
|
-
createFromTime?: {} | null | undefined;
|
|
82
|
-
createFromHexString?: {} | null | undefined;
|
|
83
|
-
createFromBase64?: {} | null | undefined;
|
|
84
|
-
isValid?: {} | null | undefined;
|
|
85
|
-
};
|
|
86
|
-
image?: ({} & {
|
|
87
|
-
contentType: string;
|
|
88
|
-
description: string;
|
|
89
|
-
format?: string | null | undefined;
|
|
90
|
-
url?: string | null | undefined;
|
|
91
|
-
}) | null | undefined;
|
|
92
|
-
message?: string | null | undefined;
|
|
93
|
-
redirect?: string | null | undefined;
|
|
94
|
-
metadata?: Map<string, string> | null | undefined;
|
|
95
|
-
} | null | undefined;
|
|
96
|
-
emailContent?: {
|
|
97
|
-
status: string;
|
|
98
|
-
subject: string;
|
|
99
|
-
bodyHtml: string;
|
|
100
|
-
template: {
|
|
101
|
-
prototype?: Types.ObjectId | null | undefined;
|
|
102
|
-
cacheHexString?: unknown;
|
|
103
|
-
generate?: {} | null | undefined;
|
|
104
|
-
createFromTime?: {} | null | undefined;
|
|
105
|
-
createFromHexString?: {} | null | undefined;
|
|
106
|
-
createFromBase64?: {} | null | undefined;
|
|
107
|
-
isValid?: {} | null | undefined;
|
|
108
|
-
};
|
|
109
|
-
addresses: string[];
|
|
110
|
-
message?: string | null | undefined;
|
|
111
|
-
} | null | undefined;
|
|
62
|
+
statusDelivery: string;
|
|
63
|
+
content: any;
|
|
112
64
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
65
|
+
type: string;
|
|
113
66
|
account: {
|
|
114
67
|
prototype?: Types.ObjectId | null | undefined;
|
|
115
68
|
cacheHexString?: unknown;
|
|
@@ -129,47 +82,10 @@ export declare const AdminEventComunicationSchema: Schema<any, import("mongoose"
|
|
|
129
82
|
createFromBase64?: {} | null | undefined;
|
|
130
83
|
isValid?: {} | null | undefined;
|
|
131
84
|
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
status: string;
|
|
135
|
-
title: string;
|
|
136
|
-
body: string;
|
|
137
|
-
template: {
|
|
138
|
-
prototype?: Types.ObjectId | null | undefined;
|
|
139
|
-
cacheHexString?: unknown;
|
|
140
|
-
generate?: {} | null | undefined;
|
|
141
|
-
createFromTime?: {} | null | undefined;
|
|
142
|
-
createFromHexString?: {} | null | undefined;
|
|
143
|
-
createFromBase64?: {} | null | undefined;
|
|
144
|
-
isValid?: {} | null | undefined;
|
|
145
|
-
};
|
|
146
|
-
image?: ({} & {
|
|
147
|
-
contentType: string;
|
|
148
|
-
description: string;
|
|
149
|
-
format?: string | null | undefined;
|
|
150
|
-
url?: string | null | undefined;
|
|
151
|
-
}) | null | undefined;
|
|
152
|
-
message?: string | null | undefined;
|
|
153
|
-
redirect?: string | null | undefined;
|
|
154
|
-
metadata?: Map<string, string> | null | undefined;
|
|
155
|
-
} | null | undefined;
|
|
156
|
-
emailContent?: {
|
|
157
|
-
status: string;
|
|
158
|
-
subject: string;
|
|
159
|
-
bodyHtml: string;
|
|
160
|
-
template: {
|
|
161
|
-
prototype?: Types.ObjectId | null | undefined;
|
|
162
|
-
cacheHexString?: unknown;
|
|
163
|
-
generate?: {} | null | undefined;
|
|
164
|
-
createFromTime?: {} | null | undefined;
|
|
165
|
-
createFromHexString?: {} | null | undefined;
|
|
166
|
-
createFromBase64?: {} | null | undefined;
|
|
167
|
-
isValid?: {} | null | undefined;
|
|
168
|
-
};
|
|
169
|
-
addresses: string[];
|
|
170
|
-
message?: string | null | undefined;
|
|
171
|
-
} | null | undefined;
|
|
85
|
+
statusDelivery: string;
|
|
86
|
+
content: any;
|
|
172
87
|
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
88
|
+
type: string;
|
|
173
89
|
account: {
|
|
174
90
|
prototype?: Types.ObjectId | null | undefined;
|
|
175
91
|
cacheHexString?: unknown;
|
|
@@ -189,46 +105,8 @@ export declare const AdminEventComunicationSchema: Schema<any, import("mongoose"
|
|
|
189
105
|
createFromBase64?: {} | null | undefined;
|
|
190
106
|
isValid?: {} | null | undefined;
|
|
191
107
|
};
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
status: string;
|
|
195
|
-
title: string;
|
|
196
|
-
body: string;
|
|
197
|
-
template: {
|
|
198
|
-
prototype?: Types.ObjectId | null | undefined;
|
|
199
|
-
cacheHexString?: unknown;
|
|
200
|
-
generate?: {} | null | undefined;
|
|
201
|
-
createFromTime?: {} | null | undefined;
|
|
202
|
-
createFromHexString?: {} | null | undefined;
|
|
203
|
-
createFromBase64?: {} | null | undefined;
|
|
204
|
-
isValid?: {} | null | undefined;
|
|
205
|
-
};
|
|
206
|
-
image?: ({} & {
|
|
207
|
-
contentType: string;
|
|
208
|
-
description: string;
|
|
209
|
-
format?: string | null | undefined;
|
|
210
|
-
url?: string | null | undefined;
|
|
211
|
-
}) | null | undefined;
|
|
212
|
-
message?: string | null | undefined;
|
|
213
|
-
redirect?: string | null | undefined;
|
|
214
|
-
metadata?: Map<string, string> | null | undefined;
|
|
215
|
-
} | null | undefined;
|
|
216
|
-
emailContent?: {
|
|
217
|
-
status: string;
|
|
218
|
-
subject: string;
|
|
219
|
-
bodyHtml: string;
|
|
220
|
-
template: {
|
|
221
|
-
prototype?: Types.ObjectId | null | undefined;
|
|
222
|
-
cacheHexString?: unknown;
|
|
223
|
-
generate?: {} | null | undefined;
|
|
224
|
-
createFromTime?: {} | null | undefined;
|
|
225
|
-
createFromHexString?: {} | null | undefined;
|
|
226
|
-
createFromBase64?: {} | null | undefined;
|
|
227
|
-
isValid?: {} | null | undefined;
|
|
228
|
-
};
|
|
229
|
-
addresses: string[];
|
|
230
|
-
message?: string | null | undefined;
|
|
231
|
-
} | null | undefined;
|
|
108
|
+
statusDelivery: string;
|
|
109
|
+
content: any;
|
|
232
110
|
}> & {
|
|
233
111
|
_id: Types.ObjectId;
|
|
234
112
|
} & {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdminEventComunicationSchema = exports.
|
|
3
|
+
exports.AdminEventComunicationSchema = exports.AdminEventComunicationType = exports.AdminEventComunicationDeliveryStatus = exports.AdminEventComunicationStatus = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
-
const File_1 = require("./File");
|
|
6
5
|
var AdminEventComunicationStatus;
|
|
7
6
|
(function (AdminEventComunicationStatus) {
|
|
8
7
|
AdminEventComunicationStatus["CREATED"] = "CREATED";
|
|
@@ -10,43 +9,30 @@ var AdminEventComunicationStatus;
|
|
|
10
9
|
AdminEventComunicationStatus["ERROR"] = "ERROR";
|
|
11
10
|
AdminEventComunicationStatus["DONE"] = "DONE";
|
|
12
11
|
})(AdminEventComunicationStatus || (exports.AdminEventComunicationStatus = AdminEventComunicationStatus = {}));
|
|
13
|
-
var
|
|
14
|
-
(function (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})(
|
|
12
|
+
var AdminEventComunicationDeliveryStatus;
|
|
13
|
+
(function (AdminEventComunicationDeliveryStatus) {
|
|
14
|
+
AdminEventComunicationDeliveryStatus["CREATED"] = "CREATED";
|
|
15
|
+
AdminEventComunicationDeliveryStatus["SENT"] = "SENT";
|
|
16
|
+
AdminEventComunicationDeliveryStatus["DELIVERED"] = "DELIVERED";
|
|
17
|
+
AdminEventComunicationDeliveryStatus["READ"] = "READ";
|
|
18
|
+
AdminEventComunicationDeliveryStatus["ERROR"] = "ERROR";
|
|
19
|
+
})(AdminEventComunicationDeliveryStatus || (exports.AdminEventComunicationDeliveryStatus = AdminEventComunicationDeliveryStatus = {}));
|
|
20
|
+
var AdminEventComunicationType;
|
|
21
|
+
(function (AdminEventComunicationType) {
|
|
22
|
+
AdminEventComunicationType["PUSH"] = "PUSH";
|
|
23
|
+
AdminEventComunicationType["EMAIL"] = "EMAIL";
|
|
24
|
+
AdminEventComunicationType["IN_APP"] = "IN_APP";
|
|
25
|
+
AdminEventComunicationType["SMS"] = "SMS";
|
|
26
|
+
AdminEventComunicationType["WHATSAPP"] = "WHATSAPP";
|
|
27
|
+
AdminEventComunicationType["TUTORIAL"] = "TUTORIAL";
|
|
28
|
+
})(AdminEventComunicationType || (exports.AdminEventComunicationType = AdminEventComunicationType = {}));
|
|
21
29
|
exports.AdminEventComunicationSchema = new mongoose_1.Schema({
|
|
22
30
|
account: { type: mongoose_1.Types.ObjectId, ref: "account", required: true },
|
|
23
31
|
comunication: { type: mongoose_1.Types.ObjectId, ref: "admin-comunication", required: true },
|
|
24
|
-
|
|
25
|
-
type: {
|
|
26
|
-
template: { type: mongoose_1.Types.ObjectId, ref: "admin-template-push", required: true },
|
|
27
|
-
status: { type: String, enum: AdminEventComunicationMessageStatus, required: true, default: AdminEventComunicationMessageStatus.CREATED },
|
|
28
|
-
title: { type: String, required: true },
|
|
29
|
-
body: { type: String, required: true },
|
|
30
|
-
image: { type: File_1.FileSchema, required: false },
|
|
31
|
-
redirect: { type: String, required: false },
|
|
32
|
-
metadata: { type: Map, of: String, required: false },
|
|
33
|
-
message: { type: String, required: false },
|
|
34
|
-
},
|
|
35
|
-
required: false
|
|
36
|
-
},
|
|
37
|
-
emailContent: {
|
|
38
|
-
type: {
|
|
39
|
-
template: { type: mongoose_1.Types.ObjectId, ref: "admin-template-email", required: true },
|
|
40
|
-
status: { type: String, enum: AdminEventComunicationMessageStatus, required: true, default: AdminEventComunicationMessageStatus.CREATED },
|
|
41
|
-
subject: { type: String, required: true },
|
|
42
|
-
bodyHtml: { type: String, required: true },
|
|
43
|
-
addresses: { type: [String], required: true },
|
|
44
|
-
message: { type: String, required: false },
|
|
45
|
-
},
|
|
46
|
-
required: false
|
|
47
|
-
},
|
|
32
|
+
type: { type: String, enum: AdminEventComunicationType, required: true },
|
|
48
33
|
status: { type: String, enum: AdminEventComunicationStatus, required: true, default: AdminEventComunicationStatus.CREATED },
|
|
49
|
-
|
|
34
|
+
statusDelivery: { type: String, enum: AdminEventComunicationDeliveryStatus, required: true, default: AdminEventComunicationDeliveryStatus.CREATED },
|
|
35
|
+
content: { type: mongoose_1.Schema.Types.Mixed, required: true },
|
|
50
36
|
}, {
|
|
51
37
|
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
52
38
|
});
|
package/package.json
CHANGED