c2-climbing-x 1.0.95 → 1.0.97

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,16 +1,16 @@
1
1
  import { Schema, Types } from "mongoose";
2
2
  import { IAccount } from "./Account";
3
3
  import { IAdminNotification } from "./AdminNotification";
4
- export declare enum AccountPushNotificationStatus {
4
+ export declare enum AccountNotificationStatus {
5
5
  CREATED = "CREATED",
6
6
  SENT = "SENT",
7
7
  DELIVERED = "DELIVERED",
8
8
  READ = "READ"
9
9
  }
10
- export interface IAccountPushNotification {
10
+ export interface IAccountNotification {
11
11
  account: Types.ObjectId | IAccount;
12
12
  adminNotification: Types.ObjectId | IAdminNotification;
13
- status: AccountPushNotificationStatus;
13
+ status: AccountNotificationStatus;
14
14
  push: boolean;
15
15
  title: string;
16
16
  message: string;
@@ -19,7 +19,7 @@ export interface IAccountPushNotification {
19
19
  createdAtDateTime: Date;
20
20
  updatedAtDateTime: Date;
21
21
  }
22
- export declare const AccountPushNotificationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
22
+ export declare const AccountNotificationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
23
23
  timestamps: {
24
24
  createdAt: string;
25
25
  updatedAt: string;
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccountPushNotificationSchema = exports.AccountPushNotificationStatus = void 0;
3
+ exports.AccountNotificationSchema = exports.AccountNotificationStatus = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
- var AccountPushNotificationStatus;
6
- (function (AccountPushNotificationStatus) {
7
- AccountPushNotificationStatus["CREATED"] = "CREATED";
8
- AccountPushNotificationStatus["SENT"] = "SENT";
9
- AccountPushNotificationStatus["DELIVERED"] = "DELIVERED";
10
- AccountPushNotificationStatus["READ"] = "READ";
11
- })(AccountPushNotificationStatus || (exports.AccountPushNotificationStatus = AccountPushNotificationStatus = {}));
12
- exports.AccountPushNotificationSchema = new mongoose_1.Schema({
5
+ var AccountNotificationStatus;
6
+ (function (AccountNotificationStatus) {
7
+ AccountNotificationStatus["CREATED"] = "CREATED";
8
+ AccountNotificationStatus["SENT"] = "SENT";
9
+ AccountNotificationStatus["DELIVERED"] = "DELIVERED";
10
+ AccountNotificationStatus["READ"] = "READ";
11
+ })(AccountNotificationStatus || (exports.AccountNotificationStatus = AccountNotificationStatus = {}));
12
+ exports.AccountNotificationSchema = new mongoose_1.Schema({
13
13
  account: { type: mongoose_1.Types.ObjectId, ref: "account", required: true },
14
14
  adminNotification: { type: mongoose_1.Types.ObjectId, ref: "admin-notification", required: true },
15
- status: { type: String, enum: AccountPushNotificationStatus, required: true, default: AccountPushNotificationStatus.CREATED },
15
+ status: { type: String, enum: AccountNotificationStatus, required: true, default: AccountNotificationStatus.CREATED },
16
16
  push: { type: Boolean, required: true, default: false },
17
17
  title: { type: String, required: true },
18
18
  message: { type: String, required: true },
@@ -0,0 +1,97 @@
1
+ import { Schema, Types } from "mongoose";
2
+ import { IAdminTemplatePush } from "./AdminTemplatePush";
3
+ import { IAdminTemplateEmail } from "./AdminTemplateEmail";
4
+ export declare enum AdminComunicationStatus {
5
+ DRAFT = "DRAFT",
6
+ ACTIVE = "ACTIVE",
7
+ INACTIVE = "INACTIVE"
8
+ }
9
+ export interface IAdminComunication {
10
+ name: string;
11
+ description?: string;
12
+ templateEmail?: Types.ObjectId | IAdminTemplateEmail;
13
+ templatePush?: Types.ObjectId | IAdminTemplatePush;
14
+ status: AdminComunicationStatus;
15
+ createdAtDateTime: Date;
16
+ updatedAtDateTime: Date;
17
+ }
18
+ export declare const AdminComunicationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
19
+ timestamps: {
20
+ createdAt: string;
21
+ updatedAt: string;
22
+ };
23
+ }, {
24
+ createdAtDateTime: Date;
25
+ updatedAtDateTime: Date;
26
+ name: string;
27
+ status: string;
28
+ description?: string | undefined;
29
+ templateEmail?: {
30
+ prototype?: Types.ObjectId | undefined;
31
+ cacheHexString?: unknown;
32
+ generate?: {} | undefined;
33
+ createFromTime?: {} | undefined;
34
+ createFromHexString?: {} | undefined;
35
+ createFromBase64?: {} | undefined;
36
+ isValid?: {} | undefined;
37
+ } | undefined;
38
+ templatePush?: {
39
+ prototype?: Types.ObjectId | undefined;
40
+ cacheHexString?: unknown;
41
+ generate?: {} | undefined;
42
+ createFromTime?: {} | undefined;
43
+ createFromHexString?: {} | undefined;
44
+ createFromBase64?: {} | undefined;
45
+ isValid?: {} | undefined;
46
+ } | undefined;
47
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
48
+ createdAtDateTime: Date;
49
+ updatedAtDateTime: Date;
50
+ name: string;
51
+ status: string;
52
+ description?: string | undefined;
53
+ templateEmail?: {
54
+ prototype?: Types.ObjectId | undefined;
55
+ cacheHexString?: unknown;
56
+ generate?: {} | undefined;
57
+ createFromTime?: {} | undefined;
58
+ createFromHexString?: {} | undefined;
59
+ createFromBase64?: {} | undefined;
60
+ isValid?: {} | undefined;
61
+ } | undefined;
62
+ templatePush?: {
63
+ prototype?: Types.ObjectId | undefined;
64
+ cacheHexString?: unknown;
65
+ generate?: {} | undefined;
66
+ createFromTime?: {} | undefined;
67
+ createFromHexString?: {} | undefined;
68
+ createFromBase64?: {} | undefined;
69
+ isValid?: {} | undefined;
70
+ } | undefined;
71
+ }>> & import("mongoose").FlatRecord<{
72
+ createdAtDateTime: Date;
73
+ updatedAtDateTime: Date;
74
+ name: string;
75
+ status: string;
76
+ description?: string | undefined;
77
+ templateEmail?: {
78
+ prototype?: Types.ObjectId | undefined;
79
+ cacheHexString?: unknown;
80
+ generate?: {} | undefined;
81
+ createFromTime?: {} | undefined;
82
+ createFromHexString?: {} | undefined;
83
+ createFromBase64?: {} | undefined;
84
+ isValid?: {} | undefined;
85
+ } | undefined;
86
+ templatePush?: {
87
+ prototype?: Types.ObjectId | undefined;
88
+ cacheHexString?: unknown;
89
+ generate?: {} | undefined;
90
+ createFromTime?: {} | undefined;
91
+ createFromHexString?: {} | undefined;
92
+ createFromBase64?: {} | undefined;
93
+ isValid?: {} | undefined;
94
+ } | undefined;
95
+ }> & {
96
+ _id: Types.ObjectId;
97
+ }>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminComunicationSchema = exports.AdminComunicationStatus = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ var AdminComunicationStatus;
6
+ (function (AdminComunicationStatus) {
7
+ AdminComunicationStatus["DRAFT"] = "DRAFT";
8
+ AdminComunicationStatus["ACTIVE"] = "ACTIVE";
9
+ AdminComunicationStatus["INACTIVE"] = "INACTIVE";
10
+ })(AdminComunicationStatus || (exports.AdminComunicationStatus = AdminComunicationStatus = {}));
11
+ exports.AdminComunicationSchema = new mongoose_1.Schema({
12
+ name: { type: String, required: true },
13
+ description: { type: String, required: false },
14
+ templateEmail: { type: mongoose_1.Types.ObjectId, ref: "admin-template-email", required: false },
15
+ templatePush: { type: mongoose_1.Types.ObjectId, ref: "admin-template-push", required: false },
16
+ status: { type: String, enum: AdminComunicationStatus, required: true, default: AdminComunicationStatus.DRAFT },
17
+ createdAtDateTime: { type: Date, required: true },
18
+ updatedAtDateTime: { type: Date, required: true }
19
+ }, {
20
+ timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
21
+ });
22
+ exports.AdminComunicationSchema.index({ name: 1 }, { unique: true });
@@ -0,0 +1,234 @@
1
+ import { Schema, Types } from "mongoose";
2
+ import { IAccount } from "./Account";
3
+ import { IAdminComunication } from "./AdminComunication";
4
+ import { IFile } from "./File";
5
+ import { IAdminTemplatePush } from "./AdminTemplatePush";
6
+ import { IAdminTemplateEmail } from "./AdminTemplateEmail";
7
+ export declare enum AdminEventComunicationStatus {
8
+ CREATED = "CREATED",
9
+ RUNNING = "RUNNING",
10
+ ERROR = "ERROR",
11
+ DONE = "DONE"
12
+ }
13
+ export declare enum AdminMessageStatus {
14
+ CREATED = "CREATED",
15
+ SENT = "SENT",
16
+ DELIVERED = "DELIVERED",
17
+ READ = "READ"
18
+ }
19
+ export interface IAccountNotification {
20
+ account: Types.ObjectId | IAccount;
21
+ comunication: Types.ObjectId | IAdminComunication;
22
+ pushContent?: {
23
+ template: Types.ObjectId | IAdminTemplatePush;
24
+ status: AdminMessageStatus;
25
+ title: string;
26
+ message: string;
27
+ image?: IFile;
28
+ redirect?: string;
29
+ metadata?: Map<string, string>;
30
+ };
31
+ emailContent?: {
32
+ template: Types.ObjectId | IAdminTemplateEmail;
33
+ status: AdminMessageStatus;
34
+ subject: string;
35
+ bodyHtml: string;
36
+ };
37
+ status: AdminEventComunicationStatus;
38
+ createdAtDateTime: Date;
39
+ updatedAtDateTime: Date;
40
+ }
41
+ export declare const AccountNotificationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
42
+ timestamps: {
43
+ createdAt: string;
44
+ updatedAt: string;
45
+ };
46
+ }, {
47
+ createdAtDateTime: Date;
48
+ updatedAtDateTime: Date;
49
+ account: {
50
+ prototype?: Types.ObjectId | undefined;
51
+ cacheHexString?: unknown;
52
+ generate?: {} | undefined;
53
+ createFromTime?: {} | undefined;
54
+ createFromHexString?: {} | undefined;
55
+ createFromBase64?: {} | undefined;
56
+ isValid?: {} | undefined;
57
+ };
58
+ status: string;
59
+ comunication: {
60
+ prototype?: Types.ObjectId | undefined;
61
+ cacheHexString?: unknown;
62
+ generate?: {} | undefined;
63
+ createFromTime?: {} | undefined;
64
+ createFromHexString?: {} | undefined;
65
+ createFromBase64?: {} | undefined;
66
+ isValid?: {} | undefined;
67
+ };
68
+ pushContent?: {
69
+ message: string;
70
+ status: string;
71
+ title: string;
72
+ template: {
73
+ prototype?: Types.ObjectId | undefined;
74
+ cacheHexString?: unknown;
75
+ generate?: {} | undefined;
76
+ createFromTime?: {} | undefined;
77
+ createFromHexString?: {} | undefined;
78
+ createFromBase64?: {} | undefined;
79
+ isValid?: {} | undefined;
80
+ };
81
+ image?: {
82
+ prototype?: Types.ObjectId | undefined;
83
+ cacheHexString?: unknown;
84
+ generate?: {} | undefined;
85
+ createFromTime?: {} | undefined;
86
+ createFromHexString?: {} | undefined;
87
+ createFromBase64?: {} | undefined;
88
+ isValid?: {} | undefined;
89
+ } | undefined;
90
+ redirect?: string | undefined;
91
+ metadata?: Map<string, string> | undefined;
92
+ } | undefined;
93
+ emailContent?: {
94
+ status: string;
95
+ subject: string;
96
+ bodyHtml: string;
97
+ template: {
98
+ prototype?: Types.ObjectId | undefined;
99
+ cacheHexString?: unknown;
100
+ generate?: {} | undefined;
101
+ createFromTime?: {} | undefined;
102
+ createFromHexString?: {} | undefined;
103
+ createFromBase64?: {} | undefined;
104
+ isValid?: {} | undefined;
105
+ };
106
+ addresses: string[];
107
+ } | undefined;
108
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
109
+ createdAtDateTime: Date;
110
+ updatedAtDateTime: Date;
111
+ account: {
112
+ prototype?: Types.ObjectId | undefined;
113
+ cacheHexString?: unknown;
114
+ generate?: {} | undefined;
115
+ createFromTime?: {} | undefined;
116
+ createFromHexString?: {} | undefined;
117
+ createFromBase64?: {} | undefined;
118
+ isValid?: {} | undefined;
119
+ };
120
+ status: string;
121
+ comunication: {
122
+ prototype?: Types.ObjectId | undefined;
123
+ cacheHexString?: unknown;
124
+ generate?: {} | undefined;
125
+ createFromTime?: {} | undefined;
126
+ createFromHexString?: {} | undefined;
127
+ createFromBase64?: {} | undefined;
128
+ isValid?: {} | undefined;
129
+ };
130
+ pushContent?: {
131
+ message: string;
132
+ status: string;
133
+ title: string;
134
+ template: {
135
+ prototype?: Types.ObjectId | undefined;
136
+ cacheHexString?: unknown;
137
+ generate?: {} | undefined;
138
+ createFromTime?: {} | undefined;
139
+ createFromHexString?: {} | undefined;
140
+ createFromBase64?: {} | undefined;
141
+ isValid?: {} | undefined;
142
+ };
143
+ image?: {
144
+ prototype?: Types.ObjectId | undefined;
145
+ cacheHexString?: unknown;
146
+ generate?: {} | undefined;
147
+ createFromTime?: {} | undefined;
148
+ createFromHexString?: {} | undefined;
149
+ createFromBase64?: {} | undefined;
150
+ isValid?: {} | undefined;
151
+ } | undefined;
152
+ redirect?: string | undefined;
153
+ metadata?: Map<string, string> | undefined;
154
+ } | undefined;
155
+ emailContent?: {
156
+ status: string;
157
+ subject: string;
158
+ bodyHtml: string;
159
+ template: {
160
+ prototype?: Types.ObjectId | undefined;
161
+ cacheHexString?: unknown;
162
+ generate?: {} | undefined;
163
+ createFromTime?: {} | undefined;
164
+ createFromHexString?: {} | undefined;
165
+ createFromBase64?: {} | undefined;
166
+ isValid?: {} | undefined;
167
+ };
168
+ addresses: string[];
169
+ } | undefined;
170
+ }>> & import("mongoose").FlatRecord<{
171
+ createdAtDateTime: Date;
172
+ updatedAtDateTime: Date;
173
+ account: {
174
+ prototype?: Types.ObjectId | undefined;
175
+ cacheHexString?: unknown;
176
+ generate?: {} | undefined;
177
+ createFromTime?: {} | undefined;
178
+ createFromHexString?: {} | undefined;
179
+ createFromBase64?: {} | undefined;
180
+ isValid?: {} | undefined;
181
+ };
182
+ status: string;
183
+ comunication: {
184
+ prototype?: Types.ObjectId | undefined;
185
+ cacheHexString?: unknown;
186
+ generate?: {} | undefined;
187
+ createFromTime?: {} | undefined;
188
+ createFromHexString?: {} | undefined;
189
+ createFromBase64?: {} | undefined;
190
+ isValid?: {} | undefined;
191
+ };
192
+ pushContent?: {
193
+ message: string;
194
+ status: string;
195
+ title: string;
196
+ template: {
197
+ prototype?: Types.ObjectId | undefined;
198
+ cacheHexString?: unknown;
199
+ generate?: {} | undefined;
200
+ createFromTime?: {} | undefined;
201
+ createFromHexString?: {} | undefined;
202
+ createFromBase64?: {} | undefined;
203
+ isValid?: {} | undefined;
204
+ };
205
+ image?: {
206
+ prototype?: Types.ObjectId | undefined;
207
+ cacheHexString?: unknown;
208
+ generate?: {} | undefined;
209
+ createFromTime?: {} | undefined;
210
+ createFromHexString?: {} | undefined;
211
+ createFromBase64?: {} | undefined;
212
+ isValid?: {} | undefined;
213
+ } | undefined;
214
+ redirect?: string | undefined;
215
+ metadata?: Map<string, string> | undefined;
216
+ } | undefined;
217
+ emailContent?: {
218
+ status: string;
219
+ subject: string;
220
+ bodyHtml: string;
221
+ template: {
222
+ prototype?: Types.ObjectId | undefined;
223
+ cacheHexString?: unknown;
224
+ generate?: {} | undefined;
225
+ createFromTime?: {} | undefined;
226
+ createFromHexString?: {} | undefined;
227
+ createFromBase64?: {} | undefined;
228
+ isValid?: {} | undefined;
229
+ };
230
+ addresses: string[];
231
+ } | undefined;
232
+ }> & {
233
+ _id: Types.ObjectId;
234
+ }>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountNotificationSchema = exports.AdminMessageStatus = exports.AdminEventComunicationStatus = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const AdminTemplatePush_1 = require("./AdminTemplatePush");
6
+ const AdminTemplateEmail_1 = require("./AdminTemplateEmail");
7
+ var AdminEventComunicationStatus;
8
+ (function (AdminEventComunicationStatus) {
9
+ AdminEventComunicationStatus["CREATED"] = "CREATED";
10
+ AdminEventComunicationStatus["RUNNING"] = "RUNNING";
11
+ AdminEventComunicationStatus["ERROR"] = "ERROR";
12
+ AdminEventComunicationStatus["DONE"] = "DONE";
13
+ })(AdminEventComunicationStatus || (exports.AdminEventComunicationStatus = AdminEventComunicationStatus = {}));
14
+ var AdminMessageStatus;
15
+ (function (AdminMessageStatus) {
16
+ AdminMessageStatus["CREATED"] = "CREATED";
17
+ AdminMessageStatus["SENT"] = "SENT";
18
+ AdminMessageStatus["DELIVERED"] = "DELIVERED";
19
+ AdminMessageStatus["READ"] = "READ";
20
+ })(AdminMessageStatus || (exports.AdminMessageStatus = AdminMessageStatus = {}));
21
+ exports.AccountNotificationSchema = new mongoose_1.Schema({
22
+ account: { type: mongoose_1.Types.ObjectId, ref: "account", required: true },
23
+ comunication: { type: mongoose_1.Types.ObjectId, ref: "admin-comunication", required: true },
24
+ pushContent: {
25
+ type: {
26
+ template: { type: mongoose_1.Types.ObjectId, ref: "admin-template-push", required: true },
27
+ status: { type: String, enum: AdminTemplatePush_1.AdminTemplatePushStatus, required: true, default: AdminTemplatePush_1.AdminTemplatePushStatus.DRAFT },
28
+ title: { type: String, required: true },
29
+ message: { type: String, required: true },
30
+ image: { type: mongoose_1.Types.ObjectId, ref: "file", required: false },
31
+ redirect: { type: String, required: false },
32
+ metadata: { type: Map, of: String, required: false }
33
+ },
34
+ required: false
35
+ },
36
+ emailContent: {
37
+ type: {
38
+ template: { type: mongoose_1.Types.ObjectId, ref: "admin-template-email", required: true },
39
+ status: { type: String, enum: AdminTemplateEmail_1.AdminTemplateEmailStatus, required: true, default: AdminTemplateEmail_1.AdminTemplateEmailStatus.DRAFT },
40
+ subject: { type: String, required: true },
41
+ bodyHtml: { type: String, required: true },
42
+ addresses: { type: [String], required: true }
43
+ },
44
+ required: false
45
+ },
46
+ status: { type: String, enum: AdminEventComunicationStatus, required: true, default: AdminEventComunicationStatus.CREATED },
47
+ createdAtDateTime: { type: Date, required: true },
48
+ updatedAtDateTime: { type: Date, required: true }
49
+ }, {
50
+ timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
51
+ });
52
+ exports.AccountNotificationSchema.index({ account: 1 }, { unique: false });
53
+ exports.AccountNotificationSchema.index({ account: 1, status: 1 }, { unique: false });
@@ -0,0 +1,43 @@
1
+ import { Schema } from "mongoose";
2
+ export declare enum AdminTemplateEmailStatus {
3
+ DRAFT = "DRAFT",
4
+ ACTIVE = "ACTIVE",
5
+ INACTIVE = "INACTIVE"
6
+ }
7
+ export interface IAdminTemplateEmail {
8
+ name: string;
9
+ subject: string;
10
+ bodyHtml: string;
11
+ status: AdminTemplateEmailStatus;
12
+ createdAtDateTime: Date;
13
+ updatedAtDateTime: Date;
14
+ }
15
+ export declare const AdminTemplateEmailSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
16
+ timestamps: {
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ };
20
+ }, {
21
+ createdAtDateTime: Date;
22
+ updatedAtDateTime: Date;
23
+ name: string;
24
+ status: string;
25
+ subject: string;
26
+ bodyHtml: string;
27
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
28
+ createdAtDateTime: Date;
29
+ updatedAtDateTime: Date;
30
+ name: string;
31
+ status: string;
32
+ subject: string;
33
+ bodyHtml: string;
34
+ }>> & import("mongoose").FlatRecord<{
35
+ createdAtDateTime: Date;
36
+ updatedAtDateTime: Date;
37
+ name: string;
38
+ status: string;
39
+ subject: string;
40
+ bodyHtml: string;
41
+ }> & {
42
+ _id: import("mongoose").Types.ObjectId;
43
+ }>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminTemplateEmailSchema = exports.AdminTemplateEmailStatus = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ var AdminTemplateEmailStatus;
6
+ (function (AdminTemplateEmailStatus) {
7
+ AdminTemplateEmailStatus["DRAFT"] = "DRAFT";
8
+ AdminTemplateEmailStatus["ACTIVE"] = "ACTIVE";
9
+ AdminTemplateEmailStatus["INACTIVE"] = "INACTIVE";
10
+ })(AdminTemplateEmailStatus || (exports.AdminTemplateEmailStatus = AdminTemplateEmailStatus = {}));
11
+ exports.AdminTemplateEmailSchema = new mongoose_1.Schema({
12
+ name: { type: String, required: true },
13
+ subject: { type: String, required: true },
14
+ bodyHtml: { type: String, required: true },
15
+ status: { type: String, enum: AdminTemplateEmailStatus, required: true, default: AdminTemplateEmailStatus.DRAFT },
16
+ createdAtDateTime: { type: Date, required: true },
17
+ updatedAtDateTime: { type: Date, required: true }
18
+ }, {
19
+ timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
20
+ });
21
+ exports.AdminTemplateEmailSchema.index({ name: 1 }, { unique: true });
@@ -0,0 +1,71 @@
1
+ import { Schema, Types } from "mongoose";
2
+ import { IFile } from "./File";
3
+ export declare enum AdminTemplatePushStatus {
4
+ DRAFT = "DRAFT",
5
+ ACTIVE = "ACTIVE",
6
+ INACTIVE = "INACTIVE"
7
+ }
8
+ export interface IAdminTemplatePush {
9
+ name: string;
10
+ title: string;
11
+ body: string;
12
+ image?: IFile;
13
+ redirect?: string;
14
+ metadata?: Map<string, string>;
15
+ status: AdminTemplatePushStatus;
16
+ createdAtDateTime: Date;
17
+ updatedAtDateTime: Date;
18
+ }
19
+ export declare const AdminTemplatePushSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
20
+ timestamps: {
21
+ createdAt: string;
22
+ updatedAt: string;
23
+ };
24
+ }, {
25
+ createdAtDateTime: Date;
26
+ updatedAtDateTime: Date;
27
+ name: string;
28
+ status: string;
29
+ title: string;
30
+ body: string;
31
+ image?: {
32
+ contentType: string;
33
+ description: string;
34
+ format?: string | undefined;
35
+ url?: string | undefined;
36
+ } | undefined;
37
+ redirect?: string | undefined;
38
+ metadata?: Map<string, string> | undefined;
39
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
40
+ createdAtDateTime: Date;
41
+ updatedAtDateTime: Date;
42
+ name: string;
43
+ status: string;
44
+ title: string;
45
+ body: string;
46
+ image?: {
47
+ contentType: string;
48
+ description: string;
49
+ format?: string | undefined;
50
+ url?: string | undefined;
51
+ } | undefined;
52
+ redirect?: string | undefined;
53
+ metadata?: Map<string, string> | undefined;
54
+ }>> & import("mongoose").FlatRecord<{
55
+ createdAtDateTime: Date;
56
+ updatedAtDateTime: Date;
57
+ name: string;
58
+ status: string;
59
+ title: string;
60
+ body: string;
61
+ image?: {
62
+ contentType: string;
63
+ description: string;
64
+ format?: string | undefined;
65
+ url?: string | undefined;
66
+ } | undefined;
67
+ redirect?: string | undefined;
68
+ metadata?: Map<string, string> | undefined;
69
+ }> & {
70
+ _id: Types.ObjectId;
71
+ }>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminTemplatePushSchema = exports.AdminTemplatePushStatus = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const File_1 = require("./File");
6
+ var AdminTemplatePushStatus;
7
+ (function (AdminTemplatePushStatus) {
8
+ AdminTemplatePushStatus["DRAFT"] = "DRAFT";
9
+ AdminTemplatePushStatus["ACTIVE"] = "ACTIVE";
10
+ AdminTemplatePushStatus["INACTIVE"] = "INACTIVE";
11
+ })(AdminTemplatePushStatus || (exports.AdminTemplatePushStatus = AdminTemplatePushStatus = {}));
12
+ exports.AdminTemplatePushSchema = new mongoose_1.Schema({
13
+ name: { type: String, required: true },
14
+ title: { type: String, required: true },
15
+ body: { type: String, required: true },
16
+ image: { type: File_1.FileSchema, required: false },
17
+ redirect: { type: String, required: false },
18
+ metadata: { type: Map, of: String, required: false },
19
+ status: { type: String, enum: AdminTemplatePushStatus, required: true, default: AdminTemplatePushStatus.DRAFT },
20
+ createdAtDateTime: { type: Date, required: true },
21
+ updatedAtDateTime: { type: Date, required: true }
22
+ }, {
23
+ timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
24
+ });
25
+ exports.AdminTemplatePushSchema.index({ name: 1 }, { unique: true });
@@ -8,8 +8,8 @@ export * from "./ChampionshipMatch";
8
8
  export * from "./ChampionshipPhase";
9
9
  export * from "./ChampionshipRound";
10
10
  export * from "./File";
11
- export * from "./AdminNotification";
12
- export * from "./AccountNotification";
11
+ export * from "./AdminComunication";
12
+ export * from "./AdminEventComunication";
13
13
  export * from "./Team";
14
14
  export * from "./Ticket";
15
15
  export * from "./TicketGuess";
@@ -24,8 +24,8 @@ __exportStar(require("./ChampionshipMatch"), exports);
24
24
  __exportStar(require("./ChampionshipPhase"), exports);
25
25
  __exportStar(require("./ChampionshipRound"), exports);
26
26
  __exportStar(require("./File"), exports);
27
- __exportStar(require("./AdminNotification"), exports);
28
- __exportStar(require("./AccountNotification"), exports);
27
+ __exportStar(require("./AdminComunication"), exports);
28
+ __exportStar(require("./AdminEventComunication"), exports);
29
29
  __exportStar(require("./Team"), exports);
30
30
  __exportStar(require("./Ticket"), exports);
31
31
  __exportStar(require("./TicketGuess"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-climbing-x",
3
- "version": "1.0.95",
3
+ "version": "1.0.97",
4
4
  "description": "Modelagem TypeScript/Mongoose para o jogo Escalada X (times, campeonatos, fases, rodadas, confrontos, desafios)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",