c2-desafiox 1.0.127 → 1.0.130
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/AdminAccessProfile.d.ts +16 -0
- package/dist/models/AdminAccessProfile.js +13 -0
- package/dist/models/AdminAccount.d.ts +5 -13
- package/dist/models/AdminAccount.js +11 -9
- package/dist/models/Challenge.d.ts +1 -0
- package/dist/models/Challenge.js +1 -0
- package/dist/models/IDefault.d.ts +13 -0
- package/dist/models/IDefault.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
import { IDefaultAdmin } from "./IDefault";
|
|
3
|
+
export interface IAdminAccessProfile extends IDefaultAdmin {
|
|
4
|
+
name: string;
|
|
5
|
+
roles: string[];
|
|
6
|
+
active: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const AdminAccessProfileSchema: Schema<IAdminAccessProfile, import("mongoose").Model<IAdminAccessProfile, any, any, any, import("mongoose").Document<unknown, any, IAdminAccessProfile, any> & IAdminAccessProfile & Required<{
|
|
9
|
+
_id: import("mongoose").Types.ObjectId;
|
|
10
|
+
}> & {
|
|
11
|
+
__v: number;
|
|
12
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IAdminAccessProfile, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IAdminAccessProfile>, {}> & import("mongoose").FlatRecord<IAdminAccessProfile> & Required<{
|
|
13
|
+
_id: import("mongoose").Types.ObjectId;
|
|
14
|
+
}> & {
|
|
15
|
+
__v: number;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminAccessProfileSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
exports.AdminAccessProfileSchema = new mongoose_1.Schema({
|
|
6
|
+
name: { type: String, required: true, unique: true },
|
|
7
|
+
roles: { type: [String], required: true, default: [] },
|
|
8
|
+
active: { type: Boolean, required: true, default: true }
|
|
9
|
+
}, {
|
|
10
|
+
timestamps: { createdAt: 'createdAtDateTime', updatedAt: 'updatedAtDateTime' }
|
|
11
|
+
});
|
|
12
|
+
exports.AdminAccessProfileSchema.index({ name: 1 }, { unique: true });
|
|
13
|
+
exports.AdminAccessProfileSchema.index({ active: 1 }, { unique: false });
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { IAdminAccessProfile } from "./AdminAccessProfile";
|
|
2
3
|
import { IFile } from "./File";
|
|
3
|
-
export interface
|
|
4
|
-
accountId: string;
|
|
5
|
-
sub: string;
|
|
6
|
-
email: string;
|
|
7
|
-
emailVerified: boolean;
|
|
8
|
-
name: string;
|
|
9
|
-
familyName: string;
|
|
10
|
-
givenName: string;
|
|
11
|
-
picture: string;
|
|
12
|
-
}
|
|
13
|
-
export interface IAccount {
|
|
4
|
+
export interface IAdminAccount {
|
|
14
5
|
_id: Types.ObjectId;
|
|
15
6
|
name: string;
|
|
16
7
|
emailAccess: string;
|
|
@@ -27,12 +18,13 @@ export interface IAccount {
|
|
|
27
18
|
updatedAtDateTime: Date;
|
|
28
19
|
checked: boolean;
|
|
29
20
|
tokenConfirmChecking: string | null;
|
|
21
|
+
adminAccessProfile: Types.ObjectId | IAdminAccessProfile;
|
|
30
22
|
}
|
|
31
|
-
export declare const
|
|
23
|
+
export declare const AdminAccountSchema: Schema<IAdminAccount, import("mongoose").Model<IAdminAccount, any, any, any, import("mongoose").Document<unknown, any, IAdminAccount, any> & IAdminAccount & Required<{
|
|
32
24
|
_id: Types.ObjectId;
|
|
33
25
|
}> & {
|
|
34
26
|
__v: number;
|
|
35
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions,
|
|
27
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IAdminAccount, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IAdminAccount>, {}> & import("mongoose").FlatRecord<IAdminAccount> & Required<{
|
|
36
28
|
_id: Types.ObjectId;
|
|
37
29
|
}> & {
|
|
38
30
|
__v: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AdminAccountSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const File_1 = require("./File");
|
|
6
|
-
exports.
|
|
6
|
+
exports.AdminAccountSchema = new mongoose_1.Schema({
|
|
7
7
|
name: { type: String, required: true },
|
|
8
8
|
emailAccess: { type: String, required: true },
|
|
9
9
|
passwordAccess: { type: String, required: false },
|
|
@@ -14,16 +14,18 @@ exports.AccountSchema = new mongoose_1.Schema({
|
|
|
14
14
|
checked: { type: Boolean, required: false, default: false },
|
|
15
15
|
tokenConfirmChecking: { type: String, required: false, default: null },
|
|
16
16
|
bornDate: { type: Date, required: false, default: null },
|
|
17
|
+
adminAccessProfile: { type: mongoose_1.Types.ObjectId, ref: "admin-access-profile", required: true },
|
|
17
18
|
}, {
|
|
18
19
|
timestamps: {
|
|
19
20
|
createdAt: "createdAtDateTime",
|
|
20
21
|
updatedAt: "updatedAtDateTime"
|
|
21
22
|
}
|
|
22
23
|
});
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
24
|
+
exports.AdminAccountSchema.index({ name: 1 }, { unique: false });
|
|
25
|
+
exports.AdminAccountSchema.index({ emailAccess: 1 }, { unique: true });
|
|
26
|
+
exports.AdminAccountSchema.index({ phones: 1 }, { unique: false });
|
|
27
|
+
exports.AdminAccountSchema.index({ active: 1 }, { unique: false });
|
|
28
|
+
exports.AdminAccountSchema.index({ checked: 1 }, { unique: false });
|
|
29
|
+
exports.AdminAccountSchema.index({ tokenConfirmChecking: 1 }, { unique: false });
|
|
30
|
+
exports.AdminAccountSchema.index({ bornDate: 1 }, { unique: false });
|
|
31
|
+
exports.AdminAccountSchema.index({ adminAccessProfile: 1 }, { unique: false });
|
package/dist/models/Challenge.js
CHANGED
|
@@ -42,6 +42,7 @@ exports.ChallengeSchema = new mongoose_1.Schema({
|
|
|
42
42
|
roundCurrentIndex: { type: Number, required: false },
|
|
43
43
|
roundCurrentStatus: { type: String, enum: ChallengeRoundStatus_1.ChallengeRoundStatus, required: false },
|
|
44
44
|
roundEndIndex: { type: Number, required: false },
|
|
45
|
+
currentRound: { type: mongoose_1.Schema.Types.ObjectId, ref: "championship-round", required: false },
|
|
45
46
|
totalTicketsPaid: { type: Number, required: false },
|
|
46
47
|
totalTicketsInGamming: { type: Number, required: false },
|
|
47
48
|
type: { type: String, enum: ChallengeType, required: true, default: ChallengeType.SURVIVAL },
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
2
|
+
import { IAccount } from "./Account";
|
|
3
|
+
export declare interface IDefaultAccount {
|
|
4
|
+
_id?: Types.ObjectId;
|
|
5
|
+
account?: Types.ObjectId | IAccount;
|
|
6
|
+
createdAtDateTime?: Date;
|
|
7
|
+
updatedAtDateTime?: Date;
|
|
8
|
+
}
|
|
9
|
+
export declare interface IDefaultAdmin {
|
|
10
|
+
_id?: Types.ObjectId;
|
|
11
|
+
createdAtDateTime?: Date;
|
|
12
|
+
updatedAtDateTime?: Date;
|
|
13
|
+
}
|
package/package.json
CHANGED