c2-climbing-x 1.0.98 → 1.0.100
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.
|
@@ -10,18 +10,18 @@ export declare enum AdminEventComunicationStatus {
|
|
|
10
10
|
ERROR = "ERROR",
|
|
11
11
|
DONE = "DONE"
|
|
12
12
|
}
|
|
13
|
-
export declare enum
|
|
13
|
+
export declare enum AdminEventComunicationMessageStatus {
|
|
14
14
|
CREATED = "CREATED",
|
|
15
15
|
SENT = "SENT",
|
|
16
16
|
DELIVERED = "DELIVERED",
|
|
17
17
|
READ = "READ"
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface IAdminEventComunication {
|
|
20
20
|
account: Types.ObjectId | IAccount;
|
|
21
21
|
comunication: Types.ObjectId | IAdminComunication;
|
|
22
22
|
pushContent?: {
|
|
23
23
|
template: Types.ObjectId | IAdminTemplatePush;
|
|
24
|
-
status:
|
|
24
|
+
status: AdminEventComunicationMessageStatus;
|
|
25
25
|
title: string;
|
|
26
26
|
message: string;
|
|
27
27
|
image?: IFile;
|
|
@@ -30,15 +30,16 @@ export interface IAccountNotification {
|
|
|
30
30
|
};
|
|
31
31
|
emailContent?: {
|
|
32
32
|
template: Types.ObjectId | IAdminTemplateEmail;
|
|
33
|
-
status:
|
|
33
|
+
status: AdminEventComunicationMessageStatus;
|
|
34
34
|
subject: string;
|
|
35
35
|
bodyHtml: string;
|
|
36
|
+
addresses: string[];
|
|
36
37
|
};
|
|
37
38
|
status: AdminEventComunicationStatus;
|
|
38
39
|
createdAtDateTime: Date;
|
|
39
40
|
updatedAtDateTime: Date;
|
|
40
41
|
}
|
|
41
|
-
export declare const
|
|
42
|
+
export declare const AdminEventComunicationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
42
43
|
timestamps: {
|
|
43
44
|
createdAt: string;
|
|
44
45
|
updatedAt: string;
|
|
@@ -79,13 +80,10 @@ export declare const AccountNotificationSchema: Schema<any, import("mongoose").M
|
|
|
79
80
|
isValid?: {} | undefined;
|
|
80
81
|
};
|
|
81
82
|
image?: {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
createFromHexString?: {} | undefined;
|
|
87
|
-
createFromBase64?: {} | undefined;
|
|
88
|
-
isValid?: {} | undefined;
|
|
83
|
+
contentType: string;
|
|
84
|
+
description: string;
|
|
85
|
+
format?: string | undefined;
|
|
86
|
+
url?: string | undefined;
|
|
89
87
|
} | undefined;
|
|
90
88
|
redirect?: string | undefined;
|
|
91
89
|
metadata?: Map<string, string> | undefined;
|
|
@@ -141,13 +139,10 @@ export declare const AccountNotificationSchema: Schema<any, import("mongoose").M
|
|
|
141
139
|
isValid?: {} | undefined;
|
|
142
140
|
};
|
|
143
141
|
image?: {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
createFromHexString?: {} | undefined;
|
|
149
|
-
createFromBase64?: {} | undefined;
|
|
150
|
-
isValid?: {} | undefined;
|
|
142
|
+
contentType: string;
|
|
143
|
+
description: string;
|
|
144
|
+
format?: string | undefined;
|
|
145
|
+
url?: string | undefined;
|
|
151
146
|
} | undefined;
|
|
152
147
|
redirect?: string | undefined;
|
|
153
148
|
metadata?: Map<string, string> | undefined;
|
|
@@ -203,13 +198,10 @@ export declare const AccountNotificationSchema: Schema<any, import("mongoose").M
|
|
|
203
198
|
isValid?: {} | undefined;
|
|
204
199
|
};
|
|
205
200
|
image?: {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
createFromHexString?: {} | undefined;
|
|
211
|
-
createFromBase64?: {} | undefined;
|
|
212
|
-
isValid?: {} | undefined;
|
|
201
|
+
contentType: string;
|
|
202
|
+
description: string;
|
|
203
|
+
format?: string | undefined;
|
|
204
|
+
url?: string | undefined;
|
|
213
205
|
} | undefined;
|
|
214
206
|
redirect?: string | undefined;
|
|
215
207
|
metadata?: Map<string, string> | undefined;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AdminEventComunicationSchema = exports.AdminEventComunicationMessageStatus = exports.AdminEventComunicationStatus = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
-
const
|
|
6
|
-
const AdminTemplateEmail_1 = require("./AdminTemplateEmail");
|
|
5
|
+
const File_1 = require("./File");
|
|
7
6
|
var AdminEventComunicationStatus;
|
|
8
7
|
(function (AdminEventComunicationStatus) {
|
|
9
8
|
AdminEventComunicationStatus["CREATED"] = "CREATED";
|
|
@@ -11,23 +10,23 @@ var AdminEventComunicationStatus;
|
|
|
11
10
|
AdminEventComunicationStatus["ERROR"] = "ERROR";
|
|
12
11
|
AdminEventComunicationStatus["DONE"] = "DONE";
|
|
13
12
|
})(AdminEventComunicationStatus || (exports.AdminEventComunicationStatus = AdminEventComunicationStatus = {}));
|
|
14
|
-
var
|
|
15
|
-
(function (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})(
|
|
21
|
-
exports.
|
|
13
|
+
var AdminEventComunicationMessageStatus;
|
|
14
|
+
(function (AdminEventComunicationMessageStatus) {
|
|
15
|
+
AdminEventComunicationMessageStatus["CREATED"] = "CREATED";
|
|
16
|
+
AdminEventComunicationMessageStatus["SENT"] = "SENT";
|
|
17
|
+
AdminEventComunicationMessageStatus["DELIVERED"] = "DELIVERED";
|
|
18
|
+
AdminEventComunicationMessageStatus["READ"] = "READ";
|
|
19
|
+
})(AdminEventComunicationMessageStatus || (exports.AdminEventComunicationMessageStatus = AdminEventComunicationMessageStatus = {}));
|
|
20
|
+
exports.AdminEventComunicationSchema = new mongoose_1.Schema({
|
|
22
21
|
account: { type: mongoose_1.Types.ObjectId, ref: "account", required: true },
|
|
23
22
|
comunication: { type: mongoose_1.Types.ObjectId, ref: "admin-comunication", required: true },
|
|
24
23
|
pushContent: {
|
|
25
24
|
type: {
|
|
26
25
|
template: { type: mongoose_1.Types.ObjectId, ref: "admin-template-push", required: true },
|
|
27
|
-
status: { type: String, enum:
|
|
26
|
+
status: { type: String, enum: AdminEventComunicationMessageStatus, required: true, default: AdminEventComunicationMessageStatus.CREATED },
|
|
28
27
|
title: { type: String, required: true },
|
|
29
28
|
message: { type: String, required: true },
|
|
30
|
-
image: { type:
|
|
29
|
+
image: { type: File_1.FileSchema, required: false },
|
|
31
30
|
redirect: { type: String, required: false },
|
|
32
31
|
metadata: { type: Map, of: String, required: false }
|
|
33
32
|
},
|
|
@@ -36,7 +35,7 @@ exports.AccountNotificationSchema = new mongoose_1.Schema({
|
|
|
36
35
|
emailContent: {
|
|
37
36
|
type: {
|
|
38
37
|
template: { type: mongoose_1.Types.ObjectId, ref: "admin-template-email", required: true },
|
|
39
|
-
status: { type: String, enum:
|
|
38
|
+
status: { type: String, enum: AdminEventComunicationMessageStatus, required: true, default: AdminEventComunicationMessageStatus.CREATED },
|
|
40
39
|
subject: { type: String, required: true },
|
|
41
40
|
bodyHtml: { type: String, required: true },
|
|
42
41
|
addresses: { type: [String], required: true }
|
|
@@ -49,5 +48,5 @@ exports.AccountNotificationSchema = new mongoose_1.Schema({
|
|
|
49
48
|
}, {
|
|
50
49
|
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
51
50
|
});
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
51
|
+
exports.AdminEventComunicationSchema.index({ account: 1 }, { unique: false });
|
|
52
|
+
exports.AdminEventComunicationSchema.index({ account: 1, status: 1 }, { unique: false });
|
package/package.json
CHANGED