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
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* c2-climbing-x — Modelagem Escalada X
|
|
4
|
+
* Times, campeonatos, fases, rodadas, confrontos, desafios e rodadas do desafio.
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
__exportStar(require("./types"), exports);
|
|
22
|
+
__exportStar(require("./models"), exports);
|
|
23
|
+
__exportStar(require("./utils"), exports);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { IAccount } from "./Account";
|
|
3
|
+
export interface IAccess {
|
|
4
|
+
account: Types.ObjectId | IAccount;
|
|
5
|
+
token: string;
|
|
6
|
+
addressIP: string;
|
|
7
|
+
userAgent: string;
|
|
8
|
+
notes: string;
|
|
9
|
+
latitude: number;
|
|
10
|
+
longitude: number;
|
|
11
|
+
tokenFCM: string;
|
|
12
|
+
active: boolean;
|
|
13
|
+
createdAtDateTime: Date;
|
|
14
|
+
updatedAtDateTime: Date;
|
|
15
|
+
}
|
|
16
|
+
export declare const AccessSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
17
|
+
timestamps: {
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
};
|
|
21
|
+
}, {} & {
|
|
22
|
+
active: boolean;
|
|
23
|
+
account: Types.ObjectId;
|
|
24
|
+
token: string;
|
|
25
|
+
addressIP: string;
|
|
26
|
+
userAgent: string;
|
|
27
|
+
latitude: number;
|
|
28
|
+
longitude: number;
|
|
29
|
+
notes?: string | null | undefined;
|
|
30
|
+
tokenFCM?: string | null | undefined;
|
|
31
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
32
|
+
active: boolean;
|
|
33
|
+
account: Types.ObjectId;
|
|
34
|
+
token: string;
|
|
35
|
+
addressIP: string;
|
|
36
|
+
userAgent: string;
|
|
37
|
+
latitude: number;
|
|
38
|
+
longitude: number;
|
|
39
|
+
notes?: string | null | undefined;
|
|
40
|
+
tokenFCM?: string | null | undefined;
|
|
41
|
+
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
42
|
+
active: boolean;
|
|
43
|
+
account: Types.ObjectId;
|
|
44
|
+
token: string;
|
|
45
|
+
addressIP: string;
|
|
46
|
+
userAgent: string;
|
|
47
|
+
latitude: number;
|
|
48
|
+
longitude: number;
|
|
49
|
+
notes?: string | null | undefined;
|
|
50
|
+
tokenFCM?: string | null | undefined;
|
|
51
|
+
}> & {
|
|
52
|
+
_id: Types.ObjectId;
|
|
53
|
+
} & {
|
|
54
|
+
__v: number;
|
|
55
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccessSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
exports.AccessSchema = new mongoose_1.Schema({
|
|
6
|
+
account: { type: mongoose_1.Schema.Types.ObjectId, ref: "account", required: true },
|
|
7
|
+
token: { type: String, required: true },
|
|
8
|
+
addressIP: { type: String, required: true },
|
|
9
|
+
userAgent: { type: String, required: true },
|
|
10
|
+
notes: { type: String, required: false },
|
|
11
|
+
latitude: { type: Number, required: true, default: 0 },
|
|
12
|
+
longitude: { type: Number, required: true, default: 0 },
|
|
13
|
+
tokenFCM: { type: String },
|
|
14
|
+
active: { type: Boolean, required: true }
|
|
15
|
+
}, {
|
|
16
|
+
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
17
|
+
});
|
|
18
|
+
exports.AccessSchema.index({ account: 1, token: 1 }, { unique: true });
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { IFile } from "./File";
|
|
3
|
+
export interface IAccount {
|
|
4
|
+
_id: Types.ObjectId;
|
|
5
|
+
name: string;
|
|
6
|
+
nickName: string;
|
|
7
|
+
socialId: string;
|
|
8
|
+
emailAccess: string;
|
|
9
|
+
passwordAccess: string;
|
|
10
|
+
salt: string;
|
|
11
|
+
phones: {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[];
|
|
15
|
+
active: boolean;
|
|
16
|
+
pixKey?: string;
|
|
17
|
+
createdAtDateTime: Date;
|
|
18
|
+
updatedAtDateTime: Date;
|
|
19
|
+
image?: IFile;
|
|
20
|
+
}
|
|
21
|
+
export declare const AccountSchema: Schema<IAccount, import("mongoose").Model<IAccount, any, any, any, import("mongoose").Document<unknown, any, IAccount, any> & IAccount & Required<{
|
|
22
|
+
_id: Types.ObjectId;
|
|
23
|
+
}> & {
|
|
24
|
+
__v: number;
|
|
25
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IAccount, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IAccount>, {}> & import("mongoose").FlatRecord<IAccount> & Required<{
|
|
26
|
+
_id: Types.ObjectId;
|
|
27
|
+
}> & {
|
|
28
|
+
__v: number;
|
|
29
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccountSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const File_1 = require("./File");
|
|
6
|
+
exports.AccountSchema = new mongoose_1.Schema({
|
|
7
|
+
name: { type: String, required: true },
|
|
8
|
+
nickName: { type: String, required: true },
|
|
9
|
+
socialId: { type: String, required: true },
|
|
10
|
+
emailAccess: { type: String, required: true },
|
|
11
|
+
passwordAccess: { type: String, required: true },
|
|
12
|
+
salt: { type: String, required: true },
|
|
13
|
+
phones: { type: [{ label: String, value: String }], required: true },
|
|
14
|
+
image: { type: File_1.FileSchema, required: false },
|
|
15
|
+
active: { type: Boolean, required: true, default: true },
|
|
16
|
+
pixKey: { type: String, required: false }
|
|
17
|
+
}, {
|
|
18
|
+
timestamps: {
|
|
19
|
+
createdAt: "createdAtDateTime",
|
|
20
|
+
updatedAt: "updatedAtDateTime"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
exports.AccountSchema.index({ name: 1 }, { unique: false });
|
|
24
|
+
exports.AccountSchema.index({ nickName: 1 }, { unique: true });
|
|
25
|
+
exports.AccountSchema.index({ socialId: 1 }, { unique: false });
|
|
26
|
+
exports.AccountSchema.index({ emailAccess: 1 }, { unique: true });
|
|
27
|
+
exports.AccountSchema.index({ phones: 1 }, { unique: false });
|
|
28
|
+
exports.AccountSchema.index({ active: 1 }, { unique: false });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { IAccount } from "./Account";
|
|
3
|
+
export declare enum AccountDeletionRequestStatus {
|
|
4
|
+
PENDING = "PENDING",
|
|
5
|
+
PROCESSING = "PROCESSING",
|
|
6
|
+
DONE = "DONE",
|
|
7
|
+
ERROR = "ERROR"
|
|
8
|
+
}
|
|
9
|
+
export interface IAccountDeletionRequest {
|
|
10
|
+
_id: Types.ObjectId;
|
|
11
|
+
emailAccess: string;
|
|
12
|
+
nickName?: string;
|
|
13
|
+
reason?: string;
|
|
14
|
+
account?: Types.ObjectId | IAccount;
|
|
15
|
+
status: AccountDeletionRequestStatus;
|
|
16
|
+
processedAtDateTime?: Date;
|
|
17
|
+
errorMessage?: string;
|
|
18
|
+
ipAddress?: string;
|
|
19
|
+
userAgent?: string;
|
|
20
|
+
createdAtDateTime: Date;
|
|
21
|
+
updatedAtDateTime: Date;
|
|
22
|
+
}
|
|
23
|
+
export declare const AccountDeletionRequestSchema: Schema<IAccountDeletionRequest, import("mongoose").Model<IAccountDeletionRequest, any, any, any, import("mongoose").Document<unknown, any, IAccountDeletionRequest, any> & IAccountDeletionRequest & Required<{
|
|
24
|
+
_id: Types.ObjectId;
|
|
25
|
+
}> & {
|
|
26
|
+
__v: number;
|
|
27
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IAccountDeletionRequest, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IAccountDeletionRequest>, {}> & import("mongoose").FlatRecord<IAccountDeletionRequest> & Required<{
|
|
28
|
+
_id: Types.ObjectId;
|
|
29
|
+
}> & {
|
|
30
|
+
__v: number;
|
|
31
|
+
}>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccountDeletionRequestSchema = exports.AccountDeletionRequestStatus = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
var AccountDeletionRequestStatus;
|
|
6
|
+
(function (AccountDeletionRequestStatus) {
|
|
7
|
+
AccountDeletionRequestStatus["PENDING"] = "PENDING";
|
|
8
|
+
AccountDeletionRequestStatus["PROCESSING"] = "PROCESSING";
|
|
9
|
+
AccountDeletionRequestStatus["DONE"] = "DONE";
|
|
10
|
+
AccountDeletionRequestStatus["ERROR"] = "ERROR";
|
|
11
|
+
})(AccountDeletionRequestStatus || (exports.AccountDeletionRequestStatus = AccountDeletionRequestStatus = {}));
|
|
12
|
+
exports.AccountDeletionRequestSchema = new mongoose_1.Schema({
|
|
13
|
+
emailAccess: { type: String, required: true },
|
|
14
|
+
nickName: { type: String, required: false },
|
|
15
|
+
reason: { type: String, required: false },
|
|
16
|
+
account: { type: mongoose_1.Schema.Types.ObjectId, ref: "account", required: false },
|
|
17
|
+
status: {
|
|
18
|
+
type: String,
|
|
19
|
+
enum: AccountDeletionRequestStatus,
|
|
20
|
+
required: true,
|
|
21
|
+
default: AccountDeletionRequestStatus.PENDING,
|
|
22
|
+
},
|
|
23
|
+
processedAtDateTime: { type: Date, required: false },
|
|
24
|
+
errorMessage: { type: String, required: false },
|
|
25
|
+
ipAddress: { type: String, required: false },
|
|
26
|
+
userAgent: { type: String, required: false },
|
|
27
|
+
}, {
|
|
28
|
+
timestamps: {
|
|
29
|
+
createdAt: "createdAtDateTime",
|
|
30
|
+
updatedAt: "updatedAtDateTime",
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
exports.AccountDeletionRequestSchema.index({ emailAccess: 1 }, { unique: false });
|
|
34
|
+
exports.AccountDeletionRequestSchema.index({ status: 1 }, { unique: false });
|
|
35
|
+
exports.AccountDeletionRequestSchema.index({ createdAtDateTime: -1 }, { unique: false });
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { IAccount } from "./Account";
|
|
3
|
+
import { IAdminNotification } from "./AdminNotification";
|
|
4
|
+
export declare enum AccountNotificationStatus {
|
|
5
|
+
CREATED = "CREATED",
|
|
6
|
+
SENT = "SENT",
|
|
7
|
+
DELIVERED = "DELIVERED",
|
|
8
|
+
READ = "READ"
|
|
9
|
+
}
|
|
10
|
+
export interface IAccountNotification {
|
|
11
|
+
account: Types.ObjectId | IAccount;
|
|
12
|
+
adminNotification: Types.ObjectId | IAdminNotification;
|
|
13
|
+
status: AccountNotificationStatus;
|
|
14
|
+
push: boolean;
|
|
15
|
+
title: string;
|
|
16
|
+
message: string;
|
|
17
|
+
redirect: string;
|
|
18
|
+
metadata: Map<string, string>;
|
|
19
|
+
createdAtDateTime: Date;
|
|
20
|
+
updatedAtDateTime: Date;
|
|
21
|
+
}
|
|
22
|
+
export declare const AccountNotificationSchema: 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
|
+
account: {
|
|
33
|
+
prototype?: Types.ObjectId | undefined;
|
|
34
|
+
cacheHexString?: unknown;
|
|
35
|
+
generate?: {} | undefined;
|
|
36
|
+
createFromTime?: {} | undefined;
|
|
37
|
+
createFromHexString?: {} | undefined;
|
|
38
|
+
createFromBase64?: {} | undefined;
|
|
39
|
+
isValid?: {} | undefined;
|
|
40
|
+
};
|
|
41
|
+
status: string;
|
|
42
|
+
title: string;
|
|
43
|
+
adminNotification: {
|
|
44
|
+
prototype?: Types.ObjectId | undefined;
|
|
45
|
+
cacheHexString?: unknown;
|
|
46
|
+
generate?: {} | undefined;
|
|
47
|
+
createFromTime?: {} | undefined;
|
|
48
|
+
createFromHexString?: {} | undefined;
|
|
49
|
+
createFromBase64?: {} | undefined;
|
|
50
|
+
isValid?: {} | undefined;
|
|
51
|
+
};
|
|
52
|
+
redirect?: string | undefined;
|
|
53
|
+
metadata?: Map<string, string> | undefined;
|
|
54
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
55
|
+
push: boolean;
|
|
56
|
+
createdAtDateTime: Date;
|
|
57
|
+
updatedAtDateTime: Date;
|
|
58
|
+
message: string;
|
|
59
|
+
account: {
|
|
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
|
+
status: string;
|
|
69
|
+
title: string;
|
|
70
|
+
adminNotification: {
|
|
71
|
+
prototype?: Types.ObjectId | undefined;
|
|
72
|
+
cacheHexString?: unknown;
|
|
73
|
+
generate?: {} | undefined;
|
|
74
|
+
createFromTime?: {} | undefined;
|
|
75
|
+
createFromHexString?: {} | undefined;
|
|
76
|
+
createFromBase64?: {} | undefined;
|
|
77
|
+
isValid?: {} | undefined;
|
|
78
|
+
};
|
|
79
|
+
redirect?: string | undefined;
|
|
80
|
+
metadata?: Map<string, string> | undefined;
|
|
81
|
+
}>> & import("mongoose").FlatRecord<{
|
|
82
|
+
push: boolean;
|
|
83
|
+
createdAtDateTime: Date;
|
|
84
|
+
updatedAtDateTime: Date;
|
|
85
|
+
message: string;
|
|
86
|
+
account: {
|
|
87
|
+
prototype?: Types.ObjectId | undefined;
|
|
88
|
+
cacheHexString?: unknown;
|
|
89
|
+
generate?: {} | undefined;
|
|
90
|
+
createFromTime?: {} | undefined;
|
|
91
|
+
createFromHexString?: {} | undefined;
|
|
92
|
+
createFromBase64?: {} | undefined;
|
|
93
|
+
isValid?: {} | undefined;
|
|
94
|
+
};
|
|
95
|
+
status: string;
|
|
96
|
+
title: string;
|
|
97
|
+
adminNotification: {
|
|
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
|
+
redirect?: string | undefined;
|
|
107
|
+
metadata?: Map<string, string> | undefined;
|
|
108
|
+
}> & {
|
|
109
|
+
_id: Types.ObjectId;
|
|
110
|
+
}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccountNotificationSchema = exports.AccountNotificationStatus = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
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
|
+
account: { type: mongoose_1.Types.ObjectId, ref: "account", required: true },
|
|
14
|
+
adminNotification: { type: mongoose_1.Types.ObjectId, ref: "admin-notification", required: true },
|
|
15
|
+
status: { type: String, enum: AccountNotificationStatus, required: true, default: AccountNotificationStatus.CREATED },
|
|
16
|
+
push: { type: Boolean, required: true, default: false },
|
|
17
|
+
title: { type: String, required: true },
|
|
18
|
+
message: { type: String, required: true },
|
|
19
|
+
redirect: { type: String, required: false },
|
|
20
|
+
metadata: { type: Map, of: String, required: false },
|
|
21
|
+
createdAtDateTime: { type: Date, required: true },
|
|
22
|
+
updatedAtDateTime: { type: Date, required: true }
|
|
23
|
+
}, {
|
|
24
|
+
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
25
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
_id: Types.ObjectId;
|
|
11
|
+
key: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
templateEmail?: Types.ObjectId | IAdminTemplateEmail;
|
|
15
|
+
templatePush?: Types.ObjectId | IAdminTemplatePush;
|
|
16
|
+
status: AdminComunicationStatus;
|
|
17
|
+
requiredVariables?: string[];
|
|
18
|
+
createdAtDateTime: Date;
|
|
19
|
+
updatedAtDateTime: Date;
|
|
20
|
+
}
|
|
21
|
+
export declare const AdminComunicationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
22
|
+
timestamps: {
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
};
|
|
26
|
+
}, {} & {
|
|
27
|
+
name: string;
|
|
28
|
+
status: string;
|
|
29
|
+
key: string;
|
|
30
|
+
description?: string | null | undefined;
|
|
31
|
+
templateEmail?: {
|
|
32
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
33
|
+
cacheHexString?: unknown;
|
|
34
|
+
generate?: {} | null | undefined;
|
|
35
|
+
createFromTime?: {} | null | undefined;
|
|
36
|
+
createFromHexString?: {} | null | undefined;
|
|
37
|
+
createFromBase64?: {} | null | undefined;
|
|
38
|
+
isValid?: {} | null | undefined;
|
|
39
|
+
} | null | undefined;
|
|
40
|
+
templatePush?: {
|
|
41
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
42
|
+
cacheHexString?: unknown;
|
|
43
|
+
generate?: {} | null | undefined;
|
|
44
|
+
createFromTime?: {} | null | undefined;
|
|
45
|
+
createFromHexString?: {} | null | undefined;
|
|
46
|
+
createFromBase64?: {} | null | undefined;
|
|
47
|
+
isValid?: {} | null | undefined;
|
|
48
|
+
} | null | undefined;
|
|
49
|
+
requiredVariables?: string[] | null | undefined;
|
|
50
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
51
|
+
name: string;
|
|
52
|
+
status: string;
|
|
53
|
+
key: string;
|
|
54
|
+
description?: string | null | undefined;
|
|
55
|
+
templateEmail?: {
|
|
56
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
57
|
+
cacheHexString?: unknown;
|
|
58
|
+
generate?: {} | null | undefined;
|
|
59
|
+
createFromTime?: {} | null | undefined;
|
|
60
|
+
createFromHexString?: {} | null | undefined;
|
|
61
|
+
createFromBase64?: {} | null | undefined;
|
|
62
|
+
isValid?: {} | null | undefined;
|
|
63
|
+
} | null | undefined;
|
|
64
|
+
templatePush?: {
|
|
65
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
66
|
+
cacheHexString?: unknown;
|
|
67
|
+
generate?: {} | null | undefined;
|
|
68
|
+
createFromTime?: {} | null | undefined;
|
|
69
|
+
createFromHexString?: {} | null | undefined;
|
|
70
|
+
createFromBase64?: {} | null | undefined;
|
|
71
|
+
isValid?: {} | null | undefined;
|
|
72
|
+
} | null | undefined;
|
|
73
|
+
requiredVariables?: string[] | null | undefined;
|
|
74
|
+
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
75
|
+
name: string;
|
|
76
|
+
status: string;
|
|
77
|
+
key: string;
|
|
78
|
+
description?: string | null | undefined;
|
|
79
|
+
templateEmail?: {
|
|
80
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
81
|
+
cacheHexString?: unknown;
|
|
82
|
+
generate?: {} | null | undefined;
|
|
83
|
+
createFromTime?: {} | null | undefined;
|
|
84
|
+
createFromHexString?: {} | null | undefined;
|
|
85
|
+
createFromBase64?: {} | null | undefined;
|
|
86
|
+
isValid?: {} | null | undefined;
|
|
87
|
+
} | null | undefined;
|
|
88
|
+
templatePush?: {
|
|
89
|
+
prototype?: Types.ObjectId | null | undefined;
|
|
90
|
+
cacheHexString?: unknown;
|
|
91
|
+
generate?: {} | null | undefined;
|
|
92
|
+
createFromTime?: {} | null | undefined;
|
|
93
|
+
createFromHexString?: {} | null | undefined;
|
|
94
|
+
createFromBase64?: {} | null | undefined;
|
|
95
|
+
isValid?: {} | null | undefined;
|
|
96
|
+
} | null | undefined;
|
|
97
|
+
requiredVariables?: string[] | null | undefined;
|
|
98
|
+
}> & {
|
|
99
|
+
_id: Types.ObjectId;
|
|
100
|
+
} & {
|
|
101
|
+
__v: number;
|
|
102
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
key: { type: String, required: true },
|
|
13
|
+
name: { type: String, required: true },
|
|
14
|
+
description: { type: String, required: false },
|
|
15
|
+
templateEmail: { type: mongoose_1.Types.ObjectId, ref: "admin-template-email", required: false },
|
|
16
|
+
templatePush: { type: mongoose_1.Types.ObjectId, ref: "admin-template-push", required: false },
|
|
17
|
+
status: { type: String, enum: AdminComunicationStatus, required: true, default: AdminComunicationStatus.DRAFT },
|
|
18
|
+
requiredVariables: { type: [String], required: false },
|
|
19
|
+
}, {
|
|
20
|
+
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
21
|
+
});
|
|
22
|
+
exports.AdminComunicationSchema.index({ name: 1 }, { unique: true });
|
|
23
|
+
exports.AdminComunicationSchema.index({ key: 1 }, { unique: true });
|