c2-desafiox 1.0.120 → 1.0.121

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.
@@ -0,0 +1,118 @@
1
+ import { Schema, Types } from "mongoose";
2
+ import { IAccount } from "./Account";
3
+ import { IAdminComunication } from "./AdminComunication";
4
+ export declare enum EventComunicationStatus {
5
+ CREATED = "CREATED",
6
+ RUNNING = "RUNNING",
7
+ ERROR = "ERROR",
8
+ DONE = "DONE"
9
+ }
10
+ export declare enum EventComunicationDeliveryStatus {
11
+ CREATED = "CREATED",
12
+ SENT = "SENT",
13
+ DELIVERED = "DELIVERED",
14
+ READ = "READ",
15
+ ERROR = "ERROR"
16
+ }
17
+ export declare enum EventComunicationType {
18
+ PUSH = "PUSH",
19
+ EMAIL = "EMAIL",
20
+ IN_APP = "IN_APP",
21
+ SMS = "SMS",
22
+ WHATSAPP = "WHATSAPP",
23
+ TUTORIAL = "TUTORIAL"
24
+ }
25
+ export interface IEventComunication {
26
+ _id: Types.ObjectId;
27
+ account: Types.ObjectId | IAccount;
28
+ comunication: Types.ObjectId | IAdminComunication;
29
+ content: any;
30
+ type: EventComunicationType;
31
+ statusDelivery: EventComunicationDeliveryStatus;
32
+ status: EventComunicationStatus;
33
+ message?: string;
34
+ createdAtDateTime: Date;
35
+ updatedAtDateTime: Date;
36
+ }
37
+ export declare const EventComunicationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
38
+ timestamps: {
39
+ createdAt: string;
40
+ updatedAt: string;
41
+ };
42
+ }, {} & {
43
+ type: string;
44
+ account: {
45
+ prototype?: Types.ObjectId | null | undefined;
46
+ cacheHexString?: unknown;
47
+ generate?: {} | null | undefined;
48
+ createFromTime?: {} | null | undefined;
49
+ createFromHexString?: {} | null | undefined;
50
+ createFromBase64?: {} | null | undefined;
51
+ isValid?: {} | null | undefined;
52
+ };
53
+ status: string;
54
+ comunication: {
55
+ prototype?: Types.ObjectId | null | undefined;
56
+ cacheHexString?: unknown;
57
+ generate?: {} | null | undefined;
58
+ createFromTime?: {} | null | undefined;
59
+ createFromHexString?: {} | null | undefined;
60
+ createFromBase64?: {} | null | undefined;
61
+ isValid?: {} | null | undefined;
62
+ };
63
+ statusDelivery: string;
64
+ content: any;
65
+ message?: string | null | undefined;
66
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
67
+ type: string;
68
+ account: {
69
+ prototype?: Types.ObjectId | null | undefined;
70
+ cacheHexString?: unknown;
71
+ generate?: {} | null | undefined;
72
+ createFromTime?: {} | null | undefined;
73
+ createFromHexString?: {} | null | undefined;
74
+ createFromBase64?: {} | null | undefined;
75
+ isValid?: {} | null | undefined;
76
+ };
77
+ status: string;
78
+ comunication: {
79
+ prototype?: Types.ObjectId | null | undefined;
80
+ cacheHexString?: unknown;
81
+ generate?: {} | null | undefined;
82
+ createFromTime?: {} | null | undefined;
83
+ createFromHexString?: {} | null | undefined;
84
+ createFromBase64?: {} | null | undefined;
85
+ isValid?: {} | null | undefined;
86
+ };
87
+ statusDelivery: string;
88
+ content: any;
89
+ message?: string | null | undefined;
90
+ }>, {}> & import("mongoose").FlatRecord<{} & {
91
+ type: string;
92
+ account: {
93
+ prototype?: Types.ObjectId | null | undefined;
94
+ cacheHexString?: unknown;
95
+ generate?: {} | null | undefined;
96
+ createFromTime?: {} | null | undefined;
97
+ createFromHexString?: {} | null | undefined;
98
+ createFromBase64?: {} | null | undefined;
99
+ isValid?: {} | null | undefined;
100
+ };
101
+ status: string;
102
+ comunication: {
103
+ prototype?: Types.ObjectId | null | undefined;
104
+ cacheHexString?: unknown;
105
+ generate?: {} | null | undefined;
106
+ createFromTime?: {} | null | undefined;
107
+ createFromHexString?: {} | null | undefined;
108
+ createFromBase64?: {} | null | undefined;
109
+ isValid?: {} | null | undefined;
110
+ };
111
+ statusDelivery: string;
112
+ content: any;
113
+ message?: string | null | undefined;
114
+ }> & {
115
+ _id: Types.ObjectId;
116
+ } & {
117
+ __v: number;
118
+ }>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventComunicationSchema = exports.EventComunicationType = exports.EventComunicationDeliveryStatus = exports.EventComunicationStatus = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ var EventComunicationStatus;
6
+ (function (EventComunicationStatus) {
7
+ EventComunicationStatus["CREATED"] = "CREATED";
8
+ EventComunicationStatus["RUNNING"] = "RUNNING";
9
+ EventComunicationStatus["ERROR"] = "ERROR";
10
+ EventComunicationStatus["DONE"] = "DONE";
11
+ })(EventComunicationStatus || (exports.EventComunicationStatus = EventComunicationStatus = {}));
12
+ var EventComunicationDeliveryStatus;
13
+ (function (EventComunicationDeliveryStatus) {
14
+ EventComunicationDeliveryStatus["CREATED"] = "CREATED";
15
+ EventComunicationDeliveryStatus["SENT"] = "SENT";
16
+ EventComunicationDeliveryStatus["DELIVERED"] = "DELIVERED";
17
+ EventComunicationDeliveryStatus["READ"] = "READ";
18
+ EventComunicationDeliveryStatus["ERROR"] = "ERROR";
19
+ })(EventComunicationDeliveryStatus || (exports.EventComunicationDeliveryStatus = EventComunicationDeliveryStatus = {}));
20
+ var EventComunicationType;
21
+ (function (EventComunicationType) {
22
+ EventComunicationType["PUSH"] = "PUSH";
23
+ EventComunicationType["EMAIL"] = "EMAIL";
24
+ EventComunicationType["IN_APP"] = "IN_APP";
25
+ EventComunicationType["SMS"] = "SMS";
26
+ EventComunicationType["WHATSAPP"] = "WHATSAPP";
27
+ EventComunicationType["TUTORIAL"] = "TUTORIAL";
28
+ })(EventComunicationType || (exports.EventComunicationType = EventComunicationType = {}));
29
+ exports.EventComunicationSchema = new mongoose_1.Schema({
30
+ account: { type: mongoose_1.Types.ObjectId, ref: "account", required: true },
31
+ comunication: { type: mongoose_1.Types.ObjectId, ref: "admin-comunication", required: true },
32
+ type: { type: String, enum: EventComunicationType, required: true },
33
+ status: { type: String, enum: EventComunicationStatus, required: true, default: EventComunicationStatus.CREATED },
34
+ statusDelivery: { type: String, enum: EventComunicationDeliveryStatus, required: true, default: EventComunicationDeliveryStatus.CREATED },
35
+ content: { type: mongoose_1.Schema.Types.Mixed, required: true },
36
+ message: { type: String, required: false },
37
+ }, {
38
+ timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
39
+ });
40
+ exports.EventComunicationSchema.index({ account: 1 }, { unique: false });
41
+ exports.EventComunicationSchema.index({ account: 1, status: 1 }, { unique: false });
@@ -2,7 +2,7 @@ export * from "./Access";
2
2
  export * from "./Account";
3
3
  export * from "./AccountDeletionRequest";
4
4
  export * from "./AdminComunication";
5
- export * from "./AdminEventComunication";
5
+ export * from "./EventComunication";
6
6
  export * from "./AdminTemplateEmail";
7
7
  export * from "./AdminTemplatePush";
8
8
  export * from "./Challenge";
@@ -18,7 +18,7 @@ __exportStar(require("./Access"), exports);
18
18
  __exportStar(require("./Account"), exports);
19
19
  __exportStar(require("./AccountDeletionRequest"), exports);
20
20
  __exportStar(require("./AdminComunication"), exports);
21
- __exportStar(require("./AdminEventComunication"), exports);
21
+ __exportStar(require("./EventComunication"), exports);
22
22
  __exportStar(require("./AdminTemplateEmail"), exports);
23
23
  __exportStar(require("./AdminTemplatePush"), exports);
24
24
  __exportStar(require("./Challenge"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-desafiox",
3
- "version": "1.0.120",
3
+ "version": "1.0.121",
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",