c2-desafiox 1.0.106
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/index.d.ts +7 -0
- package/dist/index.js +23 -0
- package/dist/models/Access.d.ts +55 -0
- package/dist/models/Access.js +18 -0
- package/dist/models/Account.d.ts +29 -0
- package/dist/models/Account.js +28 -0
- package/dist/models/AccountDeletionRequest.d.ts +31 -0
- package/dist/models/AccountDeletionRequest.js +35 -0
- package/dist/models/AccountNotification.d.ts +110 -0
- package/dist/models/AccountNotification.js +25 -0
- package/dist/models/AdminComunication.d.ts +102 -0
- package/dist/models/AdminComunication.js +23 -0
- package/dist/models/AdminEventComunication.d.ts +236 -0
- package/dist/models/AdminEventComunication.js +54 -0
- package/dist/models/AdminNotification.d.ts +86 -0
- package/dist/models/AdminNotification.js +26 -0
- package/dist/models/AdminTemplateEmail.d.ts +40 -0
- package/dist/models/AdminTemplateEmail.js +19 -0
- package/dist/models/AdminTemplatePush.d.ts +68 -0
- package/dist/models/AdminTemplatePush.js +23 -0
- package/dist/models/Challenge.d.ts +40 -0
- package/dist/models/Challenge.js +38 -0
- package/dist/models/ChallengeRound.d.ts +41 -0
- package/dist/models/ChallengeRound.js +24 -0
- package/dist/models/Championship.d.ts +23 -0
- package/dist/models/Championship.js +20 -0
- package/dist/models/ChampionshipClassification.d.ts +31 -0
- package/dist/models/ChampionshipClassification.js +26 -0
- package/dist/models/ChampionshipMatch.d.ts +33 -0
- package/dist/models/ChampionshipMatch.js +32 -0
- package/dist/models/ChampionshipPhase.d.ts +101 -0
- package/dist/models/ChampionshipPhase.js +55 -0
- package/dist/models/ChampionshipRound.d.ts +26 -0
- package/dist/models/ChampionshipRound.js +31 -0
- package/dist/models/File.d.ts +33 -0
- package/dist/models/File.js +12 -0
- package/dist/models/Team.d.ts +23 -0
- package/dist/models/Team.js +21 -0
- package/dist/models/Ticket.d.ts +34 -0
- package/dist/models/Ticket.js +33 -0
- package/dist/models/TicketGuess.d.ts +33 -0
- package/dist/models/TicketGuess.js +31 -0
- package/dist/models/TicketOrder.d.ts +54 -0
- package/dist/models/TicketOrder.js +45 -0
- package/dist/models/WalletMoviment.d.ts +67 -0
- package/dist/models/WalletMoviment.js +71 -0
- package/dist/models/index.d.ts +20 -0
- package/dist/models/index.js +36 -0
- package/dist/types/ChallengeRoundStatus.d.ts +14 -0
- package/dist/types/ChallengeRoundStatus.js +18 -0
- package/dist/types/ChallengeStatus.d.ts +6 -0
- package/dist/types/ChallengeStatus.js +10 -0
- package/dist/types/GroupMatchMode.d.ts +9 -0
- package/dist/types/GroupMatchMode.js +13 -0
- package/dist/types/MatchStatus.d.ts +11 -0
- package/dist/types/MatchStatus.js +15 -0
- package/dist/types/Modality.d.ts +15 -0
- package/dist/types/Modality.js +19 -0
- package/dist/types/PhaseType.d.ts +8 -0
- package/dist/types/PhaseType.js +12 -0
- package/dist/types/QualificationMode.d.ts +10 -0
- package/dist/types/QualificationMode.js +14 -0
- package/dist/types/RoundStatus.d.ts +12 -0
- package/dist/types/RoundStatus.js +16 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +19 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +17 -0
- package/dist/utils/utils.d.ts +5 -0
- package/dist/utils/utils.js +59 -0
- package/package.json +36 -0
|
@@ -0,0 +1,236 @@
|
|
|
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 AdminEventComunicationMessageStatus {
|
|
14
|
+
CREATED = "CREATED",
|
|
15
|
+
SENT = "SENT",
|
|
16
|
+
DELIVERED = "DELIVERED",
|
|
17
|
+
READ = "READ",
|
|
18
|
+
ERROR = "ERROR"
|
|
19
|
+
}
|
|
20
|
+
export interface IAdminEventComunication {
|
|
21
|
+
_id: Types.ObjectId;
|
|
22
|
+
account: Types.ObjectId | IAccount;
|
|
23
|
+
comunication: Types.ObjectId | IAdminComunication;
|
|
24
|
+
pushContent?: {
|
|
25
|
+
template: Types.ObjectId | IAdminTemplatePush;
|
|
26
|
+
status: AdminEventComunicationMessageStatus;
|
|
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
|
+
};
|
|
42
|
+
status: AdminEventComunicationStatus;
|
|
43
|
+
message?: string;
|
|
44
|
+
createdAtDateTime: Date;
|
|
45
|
+
updatedAtDateTime: Date;
|
|
46
|
+
}
|
|
47
|
+
export declare const AdminEventComunicationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
48
|
+
timestamps: {
|
|
49
|
+
createdAt: string;
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
};
|
|
52
|
+
}, {} & {
|
|
53
|
+
account: {
|
|
54
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
55
|
+
cacheHexString?: unknown;
|
|
56
|
+
generate?: {} | null | undefined;
|
|
57
|
+
createFromTime?: {} | null | undefined;
|
|
58
|
+
createFromHexString?: {} | null | undefined;
|
|
59
|
+
createFromBase64?: {} | null | undefined;
|
|
60
|
+
isValid?: {} | null | undefined;
|
|
61
|
+
};
|
|
62
|
+
status: string;
|
|
63
|
+
comunication: {
|
|
64
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
65
|
+
cacheHexString?: unknown;
|
|
66
|
+
generate?: {} | null | undefined;
|
|
67
|
+
createFromTime?: {} | null | undefined;
|
|
68
|
+
createFromHexString?: {} | null | undefined;
|
|
69
|
+
createFromBase64?: {} | null | undefined;
|
|
70
|
+
isValid?: {} | null | undefined;
|
|
71
|
+
};
|
|
72
|
+
message?: string | null | undefined;
|
|
73
|
+
pushContent?: {
|
|
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;
|
|
112
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
113
|
+
account: {
|
|
114
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
115
|
+
cacheHexString?: unknown;
|
|
116
|
+
generate?: {} | null | undefined;
|
|
117
|
+
createFromTime?: {} | null | undefined;
|
|
118
|
+
createFromHexString?: {} | null | undefined;
|
|
119
|
+
createFromBase64?: {} | null | undefined;
|
|
120
|
+
isValid?: {} | null | undefined;
|
|
121
|
+
};
|
|
122
|
+
status: string;
|
|
123
|
+
comunication: {
|
|
124
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
125
|
+
cacheHexString?: unknown;
|
|
126
|
+
generate?: {} | null | undefined;
|
|
127
|
+
createFromTime?: {} | null | undefined;
|
|
128
|
+
createFromHexString?: {} | null | undefined;
|
|
129
|
+
createFromBase64?: {} | null | undefined;
|
|
130
|
+
isValid?: {} | null | undefined;
|
|
131
|
+
};
|
|
132
|
+
message?: string | null | undefined;
|
|
133
|
+
pushContent?: {
|
|
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;
|
|
172
|
+
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
173
|
+
account: {
|
|
174
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
175
|
+
cacheHexString?: unknown;
|
|
176
|
+
generate?: {} | null | undefined;
|
|
177
|
+
createFromTime?: {} | null | undefined;
|
|
178
|
+
createFromHexString?: {} | null | undefined;
|
|
179
|
+
createFromBase64?: {} | null | undefined;
|
|
180
|
+
isValid?: {} | null | undefined;
|
|
181
|
+
};
|
|
182
|
+
status: string;
|
|
183
|
+
comunication: {
|
|
184
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
185
|
+
cacheHexString?: unknown;
|
|
186
|
+
generate?: {} | null | undefined;
|
|
187
|
+
createFromTime?: {} | null | undefined;
|
|
188
|
+
createFromHexString?: {} | null | undefined;
|
|
189
|
+
createFromBase64?: {} | null | undefined;
|
|
190
|
+
isValid?: {} | null | undefined;
|
|
191
|
+
};
|
|
192
|
+
message?: string | null | undefined;
|
|
193
|
+
pushContent?: {
|
|
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;
|
|
232
|
+
}> & {
|
|
233
|
+
_id: Types.ObjectId;
|
|
234
|
+
} & {
|
|
235
|
+
__v: number;
|
|
236
|
+
}>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminEventComunicationSchema = exports.AdminEventComunicationMessageStatus = exports.AdminEventComunicationStatus = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const File_1 = require("./File");
|
|
6
|
+
var AdminEventComunicationStatus;
|
|
7
|
+
(function (AdminEventComunicationStatus) {
|
|
8
|
+
AdminEventComunicationStatus["CREATED"] = "CREATED";
|
|
9
|
+
AdminEventComunicationStatus["RUNNING"] = "RUNNING";
|
|
10
|
+
AdminEventComunicationStatus["ERROR"] = "ERROR";
|
|
11
|
+
AdminEventComunicationStatus["DONE"] = "DONE";
|
|
12
|
+
})(AdminEventComunicationStatus || (exports.AdminEventComunicationStatus = AdminEventComunicationStatus = {}));
|
|
13
|
+
var AdminEventComunicationMessageStatus;
|
|
14
|
+
(function (AdminEventComunicationMessageStatus) {
|
|
15
|
+
AdminEventComunicationMessageStatus["CREATED"] = "CREATED";
|
|
16
|
+
AdminEventComunicationMessageStatus["SENT"] = "SENT";
|
|
17
|
+
AdminEventComunicationMessageStatus["DELIVERED"] = "DELIVERED";
|
|
18
|
+
AdminEventComunicationMessageStatus["READ"] = "READ";
|
|
19
|
+
AdminEventComunicationMessageStatus["ERROR"] = "ERROR";
|
|
20
|
+
})(AdminEventComunicationMessageStatus || (exports.AdminEventComunicationMessageStatus = AdminEventComunicationMessageStatus = {}));
|
|
21
|
+
exports.AdminEventComunicationSchema = 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: 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
|
+
},
|
|
48
|
+
status: { type: String, enum: AdminEventComunicationStatus, required: true, default: AdminEventComunicationStatus.CREATED },
|
|
49
|
+
message: { type: String, required: false },
|
|
50
|
+
}, {
|
|
51
|
+
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
52
|
+
});
|
|
53
|
+
exports.AdminEventComunicationSchema.index({ account: 1 }, { unique: false });
|
|
54
|
+
exports.AdminEventComunicationSchema.index({ account: 1, status: 1 }, { unique: false });
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { IAccount } from "./Account";
|
|
3
|
+
export declare enum AdminNotificationStatus {
|
|
4
|
+
DRAFT = "DRAFT",
|
|
5
|
+
SCHEDULED = "SCHEDULED",
|
|
6
|
+
SENT = "SENT",
|
|
7
|
+
FAILED = "FAILED",
|
|
8
|
+
CANCELLED = "CANCELLED"
|
|
9
|
+
}
|
|
10
|
+
export interface IAdminNotification {
|
|
11
|
+
title: string;
|
|
12
|
+
message: string;
|
|
13
|
+
redirect: string;
|
|
14
|
+
metadata: Map<string, string>;
|
|
15
|
+
destinations: Types.ObjectId[] | IAccount[];
|
|
16
|
+
sentAtDateTime: Date;
|
|
17
|
+
status: AdminNotificationStatus;
|
|
18
|
+
push: boolean;
|
|
19
|
+
createdAtDateTime: Date;
|
|
20
|
+
updatedAtDateTime: Date;
|
|
21
|
+
}
|
|
22
|
+
export declare const AdminNotificationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
23
|
+
timestamps: {
|
|
24
|
+
createdAt: string;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
};
|
|
27
|
+
}, {
|
|
28
|
+
push: boolean;
|
|
29
|
+
createdAtDateTime: Date;
|
|
30
|
+
updatedAtDateTime: Date;
|
|
31
|
+
message: string;
|
|
32
|
+
status: string;
|
|
33
|
+
title: string;
|
|
34
|
+
redirect?: string | undefined;
|
|
35
|
+
metadata?: Map<string, string> | undefined;
|
|
36
|
+
destinations?: {
|
|
37
|
+
prototype?: Types.ObjectId | undefined;
|
|
38
|
+
cacheHexString?: unknown;
|
|
39
|
+
generate?: {} | undefined;
|
|
40
|
+
createFromTime?: {} | undefined;
|
|
41
|
+
createFromHexString?: {} | undefined;
|
|
42
|
+
createFromBase64?: {} | undefined;
|
|
43
|
+
isValid?: {} | undefined;
|
|
44
|
+
}[] | undefined;
|
|
45
|
+
sentAtDateTime?: Date | undefined;
|
|
46
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
47
|
+
push: boolean;
|
|
48
|
+
createdAtDateTime: Date;
|
|
49
|
+
updatedAtDateTime: Date;
|
|
50
|
+
message: string;
|
|
51
|
+
status: string;
|
|
52
|
+
title: string;
|
|
53
|
+
redirect?: string | undefined;
|
|
54
|
+
metadata?: Map<string, string> | undefined;
|
|
55
|
+
destinations?: {
|
|
56
|
+
prototype?: Types.ObjectId | undefined;
|
|
57
|
+
cacheHexString?: unknown;
|
|
58
|
+
generate?: {} | undefined;
|
|
59
|
+
createFromTime?: {} | undefined;
|
|
60
|
+
createFromHexString?: {} | undefined;
|
|
61
|
+
createFromBase64?: {} | undefined;
|
|
62
|
+
isValid?: {} | undefined;
|
|
63
|
+
}[] | undefined;
|
|
64
|
+
sentAtDateTime?: Date | undefined;
|
|
65
|
+
}>> & import("mongoose").FlatRecord<{
|
|
66
|
+
push: boolean;
|
|
67
|
+
createdAtDateTime: Date;
|
|
68
|
+
updatedAtDateTime: Date;
|
|
69
|
+
message: string;
|
|
70
|
+
status: string;
|
|
71
|
+
title: string;
|
|
72
|
+
redirect?: string | undefined;
|
|
73
|
+
metadata?: Map<string, string> | undefined;
|
|
74
|
+
destinations?: {
|
|
75
|
+
prototype?: Types.ObjectId | undefined;
|
|
76
|
+
cacheHexString?: unknown;
|
|
77
|
+
generate?: {} | undefined;
|
|
78
|
+
createFromTime?: {} | undefined;
|
|
79
|
+
createFromHexString?: {} | undefined;
|
|
80
|
+
createFromBase64?: {} | undefined;
|
|
81
|
+
isValid?: {} | undefined;
|
|
82
|
+
}[] | undefined;
|
|
83
|
+
sentAtDateTime?: Date | undefined;
|
|
84
|
+
}> & {
|
|
85
|
+
_id: Types.ObjectId;
|
|
86
|
+
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminNotificationSchema = exports.AdminNotificationStatus = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
var AdminNotificationStatus;
|
|
6
|
+
(function (AdminNotificationStatus) {
|
|
7
|
+
AdminNotificationStatus["DRAFT"] = "DRAFT";
|
|
8
|
+
AdminNotificationStatus["SCHEDULED"] = "SCHEDULED";
|
|
9
|
+
AdminNotificationStatus["SENT"] = "SENT";
|
|
10
|
+
AdminNotificationStatus["FAILED"] = "FAILED";
|
|
11
|
+
AdminNotificationStatus["CANCELLED"] = "CANCELLED";
|
|
12
|
+
})(AdminNotificationStatus || (exports.AdminNotificationStatus = AdminNotificationStatus = {}));
|
|
13
|
+
exports.AdminNotificationSchema = new mongoose_1.Schema({
|
|
14
|
+
title: { type: String, required: true },
|
|
15
|
+
message: { type: String, required: true },
|
|
16
|
+
redirect: { type: String, required: false },
|
|
17
|
+
metadata: { type: Map, of: String, required: false },
|
|
18
|
+
destinations: { type: [mongoose_1.Types.ObjectId], required: false },
|
|
19
|
+
sentAtDateTime: { type: Date, required: false },
|
|
20
|
+
status: { type: String, enum: AdminNotificationStatus, required: true, default: AdminNotificationStatus.DRAFT },
|
|
21
|
+
push: { type: Boolean, required: true, default: false },
|
|
22
|
+
createdAtDateTime: { type: Date, required: true },
|
|
23
|
+
updatedAtDateTime: { type: Date, required: true }
|
|
24
|
+
}, {
|
|
25
|
+
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
26
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
export declare enum AdminTemplateEmailStatus {
|
|
3
|
+
DRAFT = "DRAFT",
|
|
4
|
+
ACTIVE = "ACTIVE",
|
|
5
|
+
INACTIVE = "INACTIVE"
|
|
6
|
+
}
|
|
7
|
+
export interface IAdminTemplateEmail {
|
|
8
|
+
_id: Types.ObjectId;
|
|
9
|
+
name: string;
|
|
10
|
+
subject: string;
|
|
11
|
+
bodyHtml: string;
|
|
12
|
+
status: AdminTemplateEmailStatus;
|
|
13
|
+
createdAtDateTime: Date;
|
|
14
|
+
updatedAtDateTime: Date;
|
|
15
|
+
}
|
|
16
|
+
export declare const AdminTemplateEmailSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
17
|
+
timestamps: {
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
};
|
|
21
|
+
}, {} & {
|
|
22
|
+
name: string;
|
|
23
|
+
status: string;
|
|
24
|
+
subject: string;
|
|
25
|
+
bodyHtml: string;
|
|
26
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
27
|
+
name: string;
|
|
28
|
+
status: string;
|
|
29
|
+
subject: string;
|
|
30
|
+
bodyHtml: string;
|
|
31
|
+
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
32
|
+
name: string;
|
|
33
|
+
status: string;
|
|
34
|
+
subject: string;
|
|
35
|
+
bodyHtml: string;
|
|
36
|
+
}> & {
|
|
37
|
+
_id: Types.ObjectId;
|
|
38
|
+
} & {
|
|
39
|
+
__v: number;
|
|
40
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
}, {
|
|
17
|
+
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
18
|
+
});
|
|
19
|
+
exports.AdminTemplateEmailSchema.index({ name: 1 }, { unique: true });
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
_id: Types.ObjectId;
|
|
10
|
+
name: string;
|
|
11
|
+
title: string;
|
|
12
|
+
body: string;
|
|
13
|
+
image?: IFile;
|
|
14
|
+
redirect?: string;
|
|
15
|
+
metadata?: Map<string, string>;
|
|
16
|
+
status: AdminTemplatePushStatus;
|
|
17
|
+
createdAtDateTime: Date;
|
|
18
|
+
updatedAtDateTime: Date;
|
|
19
|
+
}
|
|
20
|
+
export declare const AdminTemplatePushSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
21
|
+
timestamps: {
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
};
|
|
25
|
+
}, {} & {
|
|
26
|
+
name: string;
|
|
27
|
+
status: string;
|
|
28
|
+
title: string;
|
|
29
|
+
body: string;
|
|
30
|
+
image?: ({} & {
|
|
31
|
+
contentType: string;
|
|
32
|
+
description: string;
|
|
33
|
+
format?: string | null | undefined;
|
|
34
|
+
url?: string | null | undefined;
|
|
35
|
+
}) | null | undefined;
|
|
36
|
+
redirect?: string | null | undefined;
|
|
37
|
+
metadata?: Map<string, string> | null | undefined;
|
|
38
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
39
|
+
name: string;
|
|
40
|
+
status: string;
|
|
41
|
+
title: string;
|
|
42
|
+
body: string;
|
|
43
|
+
image?: ({} & {
|
|
44
|
+
contentType: string;
|
|
45
|
+
description: string;
|
|
46
|
+
format?: string | null | undefined;
|
|
47
|
+
url?: string | null | undefined;
|
|
48
|
+
}) | null | undefined;
|
|
49
|
+
redirect?: string | null | undefined;
|
|
50
|
+
metadata?: Map<string, string> | null | undefined;
|
|
51
|
+
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
52
|
+
name: string;
|
|
53
|
+
status: string;
|
|
54
|
+
title: string;
|
|
55
|
+
body: string;
|
|
56
|
+
image?: ({} & {
|
|
57
|
+
contentType: string;
|
|
58
|
+
description: string;
|
|
59
|
+
format?: string | null | undefined;
|
|
60
|
+
url?: string | null | undefined;
|
|
61
|
+
}) | null | undefined;
|
|
62
|
+
redirect?: string | null | undefined;
|
|
63
|
+
metadata?: Map<string, string> | null | undefined;
|
|
64
|
+
}> & {
|
|
65
|
+
_id: Types.ObjectId;
|
|
66
|
+
} & {
|
|
67
|
+
__v: number;
|
|
68
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
}, {
|
|
21
|
+
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
22
|
+
});
|
|
23
|
+
exports.AdminTemplatePushSchema.index({ name: 1 }, { unique: true });
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { ChallengeStatus } from "../types/ChallengeStatus";
|
|
3
|
+
import { IChampionship } from "./Championship";
|
|
4
|
+
import { IChampionshipRound } from "./ChampionshipRound";
|
|
5
|
+
import { IFile } from "./File";
|
|
6
|
+
import { ChallengeRoundStatus } from "../types/ChallengeRoundStatus";
|
|
7
|
+
import { ITicket } from "./Ticket";
|
|
8
|
+
export interface IChallenge {
|
|
9
|
+
_id: Types.ObjectId;
|
|
10
|
+
name: string;
|
|
11
|
+
slug: string;
|
|
12
|
+
championship: Types.ObjectId | IChampionship;
|
|
13
|
+
roundStart: IChampionshipRound;
|
|
14
|
+
roundEnd: IChampionshipRound;
|
|
15
|
+
descriptionShort: string;
|
|
16
|
+
descriptionLong: string;
|
|
17
|
+
thumb: IFile;
|
|
18
|
+
bugdetAccumulated: number;
|
|
19
|
+
ticketValue: number;
|
|
20
|
+
ticketsLimitDateTime: Date;
|
|
21
|
+
totalTicketsPaid: number;
|
|
22
|
+
totalTicketsInGamming: number;
|
|
23
|
+
ticketsWinners: Types.ObjectId[] | ITicket[];
|
|
24
|
+
roundStartIndex: number;
|
|
25
|
+
roundCurrentIndex: number;
|
|
26
|
+
roundCurrentStatus: ChallengeRoundStatus;
|
|
27
|
+
roundEndIndex: number;
|
|
28
|
+
createdAtDateTime: Date;
|
|
29
|
+
updatedAtDateTime: Date;
|
|
30
|
+
status: ChallengeStatus;
|
|
31
|
+
}
|
|
32
|
+
export declare const ChallengeSchema: Schema<IChallenge, import("mongoose").Model<IChallenge, any, any, any, import("mongoose").Document<unknown, any, IChallenge, any> & IChallenge & Required<{
|
|
33
|
+
_id: Types.ObjectId;
|
|
34
|
+
}> & {
|
|
35
|
+
__v: number;
|
|
36
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IChallenge, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IChallenge>, {}> & import("mongoose").FlatRecord<IChallenge> & Required<{
|
|
37
|
+
_id: Types.ObjectId;
|
|
38
|
+
}> & {
|
|
39
|
+
__v: number;
|
|
40
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChallengeSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const ChallengeStatus_1 = require("../types/ChallengeStatus");
|
|
6
|
+
const File_1 = require("./File");
|
|
7
|
+
const ChallengeRoundStatus_1 = require("../types/ChallengeRoundStatus");
|
|
8
|
+
exports.ChallengeSchema = new mongoose_1.Schema({
|
|
9
|
+
name: { type: String, required: true },
|
|
10
|
+
slug: { type: String, required: true },
|
|
11
|
+
descriptionShort: { type: String, required: false },
|
|
12
|
+
descriptionLong: { type: String, required: false },
|
|
13
|
+
thumb: { type: File_1.FileSchema, required: false },
|
|
14
|
+
championship: {
|
|
15
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
16
|
+
ref: "championship",
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
roundStart: { type: mongoose_1.Schema.Types.ObjectId, ref: "championship-round", required: true },
|
|
20
|
+
roundEnd: { type: mongoose_1.Schema.Types.ObjectId, ref: "championship-round", required: true },
|
|
21
|
+
status: { type: String, enum: ChallengeStatus_1.ChallengeStatus, default: ChallengeStatus_1.ChallengeStatus.DRAFT },
|
|
22
|
+
bugdetAccumulated: { type: Number, required: false },
|
|
23
|
+
ticketValue: { type: Number, required: true },
|
|
24
|
+
ticketsLimitDateTime: { type: Date, required: false },
|
|
25
|
+
ticketsWinners: { type: [mongoose_1.Schema.Types.ObjectId], ref: "ticket", required: false },
|
|
26
|
+
roundStartIndex: { type: Number, required: false },
|
|
27
|
+
roundCurrentIndex: { type: Number, required: false },
|
|
28
|
+
roundCurrentStatus: { type: String, enum: ChallengeRoundStatus_1.ChallengeRoundStatus, required: false },
|
|
29
|
+
roundEndIndex: { type: Number, required: false },
|
|
30
|
+
totalTicketsPaid: { type: Number, required: false },
|
|
31
|
+
totalTicketsInGamming: { type: Number, required: false },
|
|
32
|
+
}, {
|
|
33
|
+
timestamps: {
|
|
34
|
+
createdAt: "createdAtDateTime",
|
|
35
|
+
updatedAt: "updatedAtDateTime"
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
exports.ChallengeSchema.index({ championship: 1 });
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { ChallengeRoundStatus } from "../types/ChallengeRoundStatus";
|
|
3
|
+
import { IChallenge } from "./Challenge";
|
|
4
|
+
import { IChampionshipMatch } from "./ChampionshipMatch";
|
|
5
|
+
import { IChampionshipRound } from "./ChampionshipRound";
|
|
6
|
+
import { ITeam } from "./Team";
|
|
7
|
+
export interface IChallengeMatch {
|
|
8
|
+
match: Types.ObjectId | IChampionshipMatch;
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
isDraw?: boolean;
|
|
11
|
+
teamWinner?: Types.ObjectId | ITeam;
|
|
12
|
+
}
|
|
13
|
+
export interface IChallengeRound {
|
|
14
|
+
_id: Types.ObjectId;
|
|
15
|
+
challenge: Types.ObjectId | IChallenge;
|
|
16
|
+
round: Types.ObjectId | IChampionshipRound;
|
|
17
|
+
matches?: IChallengeMatch[];
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
status: ChallengeRoundStatus;
|
|
20
|
+
sequenceOrder?: number;
|
|
21
|
+
createdAtDateTime: Date;
|
|
22
|
+
updatedAtDateTime: Date;
|
|
23
|
+
}
|
|
24
|
+
export declare const ChallengeMatchSchema: Schema<IChallengeMatch, import("mongoose").Model<IChallengeMatch, any, any, any, import("mongoose").Document<unknown, any, IChallengeMatch, any> & IChallengeMatch & {
|
|
25
|
+
_id: Types.ObjectId;
|
|
26
|
+
} & {
|
|
27
|
+
__v: number;
|
|
28
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IChallengeMatch, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IChallengeMatch>, {}> & import("mongoose").FlatRecord<IChallengeMatch> & {
|
|
29
|
+
_id: Types.ObjectId;
|
|
30
|
+
} & {
|
|
31
|
+
__v: number;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const ChallengeRoundSchema: Schema<IChallengeRound, import("mongoose").Model<IChallengeRound, any, any, any, import("mongoose").Document<unknown, any, IChallengeRound, any> & IChallengeRound & Required<{
|
|
34
|
+
_id: Types.ObjectId;
|
|
35
|
+
}> & {
|
|
36
|
+
__v: number;
|
|
37
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IChallengeRound, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IChallengeRound>, {}> & import("mongoose").FlatRecord<IChallengeRound> & Required<{
|
|
38
|
+
_id: Types.ObjectId;
|
|
39
|
+
}> & {
|
|
40
|
+
__v: number;
|
|
41
|
+
}>;
|