c2-desafiox 1.0.119 → 1.0.121
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/models/AdminEventComunication.d.ts +4 -0
- package/dist/models/AdminEventComunication.js +1 -0
- package/dist/models/EventComunication.d.ts +118 -0
- package/dist/models/EventComunication.js +41 -0
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.js +1 -1
- package/package.json +1 -1
|
@@ -30,6 +30,7 @@ export interface IAdminEventComunication {
|
|
|
30
30
|
type: AdminEventComunicationType;
|
|
31
31
|
statusDelivery: AdminEventComunicationDeliveryStatus;
|
|
32
32
|
status: AdminEventComunicationStatus;
|
|
33
|
+
message?: string;
|
|
33
34
|
createdAtDateTime: Date;
|
|
34
35
|
updatedAtDateTime: Date;
|
|
35
36
|
}
|
|
@@ -61,6 +62,7 @@ export declare const AdminEventComunicationSchema: Schema<any, import("mongoose"
|
|
|
61
62
|
};
|
|
62
63
|
statusDelivery: string;
|
|
63
64
|
content: any;
|
|
65
|
+
message?: string | null | undefined;
|
|
64
66
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
65
67
|
type: string;
|
|
66
68
|
account: {
|
|
@@ -84,6 +86,7 @@ export declare const AdminEventComunicationSchema: Schema<any, import("mongoose"
|
|
|
84
86
|
};
|
|
85
87
|
statusDelivery: string;
|
|
86
88
|
content: any;
|
|
89
|
+
message?: string | null | undefined;
|
|
87
90
|
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
88
91
|
type: string;
|
|
89
92
|
account: {
|
|
@@ -107,6 +110,7 @@ export declare const AdminEventComunicationSchema: Schema<any, import("mongoose"
|
|
|
107
110
|
};
|
|
108
111
|
statusDelivery: string;
|
|
109
112
|
content: any;
|
|
113
|
+
message?: string | null | undefined;
|
|
110
114
|
}> & {
|
|
111
115
|
_id: Types.ObjectId;
|
|
112
116
|
} & {
|
|
@@ -33,6 +33,7 @@ exports.AdminEventComunicationSchema = new mongoose_1.Schema({
|
|
|
33
33
|
status: { type: String, enum: AdminEventComunicationStatus, required: true, default: AdminEventComunicationStatus.CREATED },
|
|
34
34
|
statusDelivery: { type: String, enum: AdminEventComunicationDeliveryStatus, required: true, default: AdminEventComunicationDeliveryStatus.CREATED },
|
|
35
35
|
content: { type: mongoose_1.Schema.Types.Mixed, required: true },
|
|
36
|
+
message: { type: String, required: false },
|
|
36
37
|
}, {
|
|
37
38
|
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
38
39
|
});
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { IAccount } from "./Account";
|
|
3
|
+
import { IAdminComunication } from "./AdminComunication";
|
|
4
|
+
export declare enum EventComunicationStatus {
|
|
5
|
+
CREATED = "CREATED",
|
|
6
|
+
RUNNING = "RUNNING",
|
|
7
|
+
ERROR = "ERROR",
|
|
8
|
+
DONE = "DONE"
|
|
9
|
+
}
|
|
10
|
+
export declare enum EventComunicationDeliveryStatus {
|
|
11
|
+
CREATED = "CREATED",
|
|
12
|
+
SENT = "SENT",
|
|
13
|
+
DELIVERED = "DELIVERED",
|
|
14
|
+
READ = "READ",
|
|
15
|
+
ERROR = "ERROR"
|
|
16
|
+
}
|
|
17
|
+
export declare enum EventComunicationType {
|
|
18
|
+
PUSH = "PUSH",
|
|
19
|
+
EMAIL = "EMAIL",
|
|
20
|
+
IN_APP = "IN_APP",
|
|
21
|
+
SMS = "SMS",
|
|
22
|
+
WHATSAPP = "WHATSAPP",
|
|
23
|
+
TUTORIAL = "TUTORIAL"
|
|
24
|
+
}
|
|
25
|
+
export interface IEventComunication {
|
|
26
|
+
_id: Types.ObjectId;
|
|
27
|
+
account: Types.ObjectId | IAccount;
|
|
28
|
+
comunication: Types.ObjectId | IAdminComunication;
|
|
29
|
+
content: any;
|
|
30
|
+
type: EventComunicationType;
|
|
31
|
+
statusDelivery: EventComunicationDeliveryStatus;
|
|
32
|
+
status: EventComunicationStatus;
|
|
33
|
+
message?: string;
|
|
34
|
+
createdAtDateTime: Date;
|
|
35
|
+
updatedAtDateTime: Date;
|
|
36
|
+
}
|
|
37
|
+
export declare const EventComunicationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
38
|
+
timestamps: {
|
|
39
|
+
createdAt: string;
|
|
40
|
+
updatedAt: string;
|
|
41
|
+
};
|
|
42
|
+
}, {} & {
|
|
43
|
+
type: string;
|
|
44
|
+
account: {
|
|
45
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
46
|
+
cacheHexString?: unknown;
|
|
47
|
+
generate?: {} | null | undefined;
|
|
48
|
+
createFromTime?: {} | null | undefined;
|
|
49
|
+
createFromHexString?: {} | null | undefined;
|
|
50
|
+
createFromBase64?: {} | null | undefined;
|
|
51
|
+
isValid?: {} | null | undefined;
|
|
52
|
+
};
|
|
53
|
+
status: string;
|
|
54
|
+
comunication: {
|
|
55
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
56
|
+
cacheHexString?: unknown;
|
|
57
|
+
generate?: {} | null | undefined;
|
|
58
|
+
createFromTime?: {} | null | undefined;
|
|
59
|
+
createFromHexString?: {} | null | undefined;
|
|
60
|
+
createFromBase64?: {} | null | undefined;
|
|
61
|
+
isValid?: {} | null | undefined;
|
|
62
|
+
};
|
|
63
|
+
statusDelivery: string;
|
|
64
|
+
content: any;
|
|
65
|
+
message?: string | null | undefined;
|
|
66
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
67
|
+
type: string;
|
|
68
|
+
account: {
|
|
69
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
70
|
+
cacheHexString?: unknown;
|
|
71
|
+
generate?: {} | null | undefined;
|
|
72
|
+
createFromTime?: {} | null | undefined;
|
|
73
|
+
createFromHexString?: {} | null | undefined;
|
|
74
|
+
createFromBase64?: {} | null | undefined;
|
|
75
|
+
isValid?: {} | null | undefined;
|
|
76
|
+
};
|
|
77
|
+
status: string;
|
|
78
|
+
comunication: {
|
|
79
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
80
|
+
cacheHexString?: unknown;
|
|
81
|
+
generate?: {} | null | undefined;
|
|
82
|
+
createFromTime?: {} | null | undefined;
|
|
83
|
+
createFromHexString?: {} | null | undefined;
|
|
84
|
+
createFromBase64?: {} | null | undefined;
|
|
85
|
+
isValid?: {} | null | undefined;
|
|
86
|
+
};
|
|
87
|
+
statusDelivery: string;
|
|
88
|
+
content: any;
|
|
89
|
+
message?: string | null | undefined;
|
|
90
|
+
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
91
|
+
type: string;
|
|
92
|
+
account: {
|
|
93
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
94
|
+
cacheHexString?: unknown;
|
|
95
|
+
generate?: {} | null | undefined;
|
|
96
|
+
createFromTime?: {} | null | undefined;
|
|
97
|
+
createFromHexString?: {} | null | undefined;
|
|
98
|
+
createFromBase64?: {} | null | undefined;
|
|
99
|
+
isValid?: {} | null | undefined;
|
|
100
|
+
};
|
|
101
|
+
status: string;
|
|
102
|
+
comunication: {
|
|
103
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
104
|
+
cacheHexString?: unknown;
|
|
105
|
+
generate?: {} | null | undefined;
|
|
106
|
+
createFromTime?: {} | null | undefined;
|
|
107
|
+
createFromHexString?: {} | null | undefined;
|
|
108
|
+
createFromBase64?: {} | null | undefined;
|
|
109
|
+
isValid?: {} | null | undefined;
|
|
110
|
+
};
|
|
111
|
+
statusDelivery: string;
|
|
112
|
+
content: any;
|
|
113
|
+
message?: string | null | undefined;
|
|
114
|
+
}> & {
|
|
115
|
+
_id: Types.ObjectId;
|
|
116
|
+
} & {
|
|
117
|
+
__v: number;
|
|
118
|
+
}>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventComunicationSchema = exports.EventComunicationType = exports.EventComunicationDeliveryStatus = exports.EventComunicationStatus = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
var EventComunicationStatus;
|
|
6
|
+
(function (EventComunicationStatus) {
|
|
7
|
+
EventComunicationStatus["CREATED"] = "CREATED";
|
|
8
|
+
EventComunicationStatus["RUNNING"] = "RUNNING";
|
|
9
|
+
EventComunicationStatus["ERROR"] = "ERROR";
|
|
10
|
+
EventComunicationStatus["DONE"] = "DONE";
|
|
11
|
+
})(EventComunicationStatus || (exports.EventComunicationStatus = EventComunicationStatus = {}));
|
|
12
|
+
var EventComunicationDeliveryStatus;
|
|
13
|
+
(function (EventComunicationDeliveryStatus) {
|
|
14
|
+
EventComunicationDeliveryStatus["CREATED"] = "CREATED";
|
|
15
|
+
EventComunicationDeliveryStatus["SENT"] = "SENT";
|
|
16
|
+
EventComunicationDeliveryStatus["DELIVERED"] = "DELIVERED";
|
|
17
|
+
EventComunicationDeliveryStatus["READ"] = "READ";
|
|
18
|
+
EventComunicationDeliveryStatus["ERROR"] = "ERROR";
|
|
19
|
+
})(EventComunicationDeliveryStatus || (exports.EventComunicationDeliveryStatus = EventComunicationDeliveryStatus = {}));
|
|
20
|
+
var EventComunicationType;
|
|
21
|
+
(function (EventComunicationType) {
|
|
22
|
+
EventComunicationType["PUSH"] = "PUSH";
|
|
23
|
+
EventComunicationType["EMAIL"] = "EMAIL";
|
|
24
|
+
EventComunicationType["IN_APP"] = "IN_APP";
|
|
25
|
+
EventComunicationType["SMS"] = "SMS";
|
|
26
|
+
EventComunicationType["WHATSAPP"] = "WHATSAPP";
|
|
27
|
+
EventComunicationType["TUTORIAL"] = "TUTORIAL";
|
|
28
|
+
})(EventComunicationType || (exports.EventComunicationType = EventComunicationType = {}));
|
|
29
|
+
exports.EventComunicationSchema = new mongoose_1.Schema({
|
|
30
|
+
account: { type: mongoose_1.Types.ObjectId, ref: "account", required: true },
|
|
31
|
+
comunication: { type: mongoose_1.Types.ObjectId, ref: "admin-comunication", required: true },
|
|
32
|
+
type: { type: String, enum: EventComunicationType, required: true },
|
|
33
|
+
status: { type: String, enum: EventComunicationStatus, required: true, default: EventComunicationStatus.CREATED },
|
|
34
|
+
statusDelivery: { type: String, enum: EventComunicationDeliveryStatus, required: true, default: EventComunicationDeliveryStatus.CREATED },
|
|
35
|
+
content: { type: mongoose_1.Schema.Types.Mixed, required: true },
|
|
36
|
+
message: { type: String, required: false },
|
|
37
|
+
}, {
|
|
38
|
+
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
39
|
+
});
|
|
40
|
+
exports.EventComunicationSchema.index({ account: 1 }, { unique: false });
|
|
41
|
+
exports.EventComunicationSchema.index({ account: 1, status: 1 }, { unique: false });
|
package/dist/models/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from "./Access";
|
|
|
2
2
|
export * from "./Account";
|
|
3
3
|
export * from "./AccountDeletionRequest";
|
|
4
4
|
export * from "./AdminComunication";
|
|
5
|
-
export * from "./
|
|
5
|
+
export * from "./EventComunication";
|
|
6
6
|
export * from "./AdminTemplateEmail";
|
|
7
7
|
export * from "./AdminTemplatePush";
|
|
8
8
|
export * from "./Challenge";
|
package/dist/models/index.js
CHANGED
|
@@ -18,7 +18,7 @@ __exportStar(require("./Access"), exports);
|
|
|
18
18
|
__exportStar(require("./Account"), exports);
|
|
19
19
|
__exportStar(require("./AccountDeletionRequest"), exports);
|
|
20
20
|
__exportStar(require("./AdminComunication"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
21
|
+
__exportStar(require("./EventComunication"), exports);
|
|
22
22
|
__exportStar(require("./AdminTemplateEmail"), exports);
|
|
23
23
|
__exportStar(require("./AdminTemplatePush"), exports);
|
|
24
24
|
__exportStar(require("./Challenge"), exports);
|
package/package.json
CHANGED