c2-desafiox 1.0.138 → 1.0.143

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.
@@ -84,8 +84,8 @@ export declare const ChatMessageSchema: Schema<any, import("mongoose").Model<any
84
84
  seenBy?: Types.ObjectId | null | undefined;
85
85
  seenDateTime?: NativeDate | null | undefined;
86
86
  }>;
87
- content?: string | null | undefined;
88
87
  category?: string | null | undefined;
88
+ content?: string | null | undefined;
89
89
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
90
90
  status: string;
91
91
  chat: Types.ObjectId;
@@ -133,8 +133,8 @@ export declare const ChatMessageSchema: Schema<any, import("mongoose").Model<any
133
133
  seenBy?: Types.ObjectId | null | undefined;
134
134
  seenDateTime?: NativeDate | null | undefined;
135
135
  }>;
136
- content?: string | null | undefined;
137
136
  category?: string | null | undefined;
137
+ content?: string | null | undefined;
138
138
  }>, {}> & import("mongoose").FlatRecord<{} & {
139
139
  status: string;
140
140
  chat: Types.ObjectId;
@@ -182,8 +182,8 @@ export declare const ChatMessageSchema: Schema<any, import("mongoose").Model<any
182
182
  seenBy?: Types.ObjectId | null | undefined;
183
183
  seenDateTime?: NativeDate | null | undefined;
184
184
  }>;
185
- content?: string | null | undefined;
186
185
  category?: string | null | undefined;
186
+ content?: string | null | undefined;
187
187
  }> & {
188
188
  _id: Types.ObjectId;
189
189
  } & {
@@ -51,6 +51,7 @@ export declare const EventComunicationSchema: Schema<any, import("mongoose").Mod
51
51
  isValid?: {} | null | undefined;
52
52
  };
53
53
  status: string;
54
+ content: any;
54
55
  comunication: {
55
56
  prototype?: Types.ObjectId | null | undefined;
56
57
  cacheHexString?: unknown;
@@ -61,7 +62,6 @@ export declare const EventComunicationSchema: Schema<any, import("mongoose").Mod
61
62
  isValid?: {} | null | undefined;
62
63
  };
63
64
  statusDelivery: string;
64
- content: any;
65
65
  message?: string | null | undefined;
66
66
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
67
67
  type: string;
@@ -75,6 +75,7 @@ export declare const EventComunicationSchema: Schema<any, import("mongoose").Mod
75
75
  isValid?: {} | null | undefined;
76
76
  };
77
77
  status: string;
78
+ content: any;
78
79
  comunication: {
79
80
  prototype?: Types.ObjectId | null | undefined;
80
81
  cacheHexString?: unknown;
@@ -85,7 +86,6 @@ export declare const EventComunicationSchema: Schema<any, import("mongoose").Mod
85
86
  isValid?: {} | null | undefined;
86
87
  };
87
88
  statusDelivery: string;
88
- content: any;
89
89
  message?: string | null | undefined;
90
90
  }>, {}> & import("mongoose").FlatRecord<{} & {
91
91
  type: string;
@@ -99,6 +99,7 @@ export declare const EventComunicationSchema: Schema<any, import("mongoose").Mod
99
99
  isValid?: {} | null | undefined;
100
100
  };
101
101
  status: string;
102
+ content: any;
102
103
  comunication: {
103
104
  prototype?: Types.ObjectId | null | undefined;
104
105
  cacheHexString?: unknown;
@@ -109,7 +110,6 @@ export declare const EventComunicationSchema: Schema<any, import("mongoose").Mod
109
110
  isValid?: {} | null | undefined;
110
111
  };
111
112
  statusDelivery: string;
112
- content: any;
113
113
  message?: string | null | undefined;
114
114
  }> & {
115
115
  _id: Types.ObjectId;
@@ -0,0 +1,74 @@
1
+ import { Schema, Types } from "mongoose";
2
+ import { IAccount } from "./Account";
3
+ import { ITicket } from "./Ticket";
4
+ import { IAcceptTermsOfChallenge } from "./TicketOrder";
5
+ import { IWalletMoviment } from "./WalletMoviment";
6
+ export declare enum TicketTransferPaymentMethod {
7
+ WALLET = "WALLET",
8
+ CREDIT_CARD = "CREDIT_CARD",
9
+ DEBIT_CARD = "DEBIT_CARD",
10
+ PIX = "PIX",
11
+ /** Checkout InfinitePay (Pix ou cartão definidos no checkout externo). */
12
+ CHECKOUT = "CHECKOUT"
13
+ }
14
+ export declare enum TicketTransferStatus {
15
+ REQUESTED = "REQUESTED",
16
+ PROCESSING = "PROCESSING",
17
+ COMPLETED = "COMPLETED",
18
+ CANCELLED = "CANCELLED",
19
+ FAILED = "FAILED"
20
+ }
21
+ /** Tracking / conciliação InfinitePay (checkout + webhook). */
22
+ export interface ITicketTransferInfinitePay {
23
+ handle?: string;
24
+ /** Nosso identificador enviado como Transfer_nsu (geralmente o _id do pedido). */
25
+ TransferNsu?: string;
26
+ checkoutUrl?: string;
27
+ invoiceSlug?: string;
28
+ transactionNsu?: string;
29
+ captureMethod?: string;
30
+ amountCents?: number;
31
+ paidAmountCents?: number;
32
+ installments?: number;
33
+ receiptUrl?: string;
34
+ /** pending | paid | failed | ... */
35
+ paymentStatus?: string;
36
+ webhookReceivedAt?: Date;
37
+ /** Último payload de webhook (auditoria / reprocessamento). */
38
+ lastWebhookPayload?: Record<string, unknown>;
39
+ checkoutCreatedAt?: Date;
40
+ }
41
+ export interface ITicketTransfer {
42
+ _id: Types.ObjectId;
43
+ sequenceNumber: number;
44
+ ticket: Types.ObjectId | ITicket;
45
+ accountOrigin: Types.ObjectId | IAccount;
46
+ accountDestination: Types.ObjectId | IAccount;
47
+ status: TicketTransferStatus;
48
+ originAccepted: boolean;
49
+ paymentMethod: TicketTransferPaymentMethod;
50
+ amount: number;
51
+ acceptTermsOfChallenge: IAcceptTermsOfChallenge;
52
+ infinitePay?: ITicketTransferInfinitePay;
53
+ walletMoviment?: Types.ObjectId | IWalletMoviment;
54
+ createdAtDateTime: Date;
55
+ updatedAtDateTime: Date;
56
+ }
57
+ export declare const TicketTransferInfinitePaySchema: Schema<ITicketTransferInfinitePay, import("mongoose").Model<ITicketTransferInfinitePay, any, any, any, import("mongoose").Document<unknown, any, ITicketTransferInfinitePay, any> & ITicketTransferInfinitePay & {
58
+ _id: Types.ObjectId;
59
+ } & {
60
+ __v: number;
61
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ITicketTransferInfinitePay, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ITicketTransferInfinitePay>, {}> & import("mongoose").FlatRecord<ITicketTransferInfinitePay> & {
62
+ _id: Types.ObjectId;
63
+ } & {
64
+ __v: number;
65
+ }>;
66
+ export declare const TicketTransferSchema: Schema<ITicketTransfer, import("mongoose").Model<ITicketTransfer, any, any, any, import("mongoose").Document<unknown, any, ITicketTransfer, any> & ITicketTransfer & Required<{
67
+ _id: Types.ObjectId;
68
+ }> & {
69
+ __v: number;
70
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ITicketTransfer, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ITicketTransfer>, {}> & import("mongoose").FlatRecord<ITicketTransfer> & Required<{
71
+ _id: Types.ObjectId;
72
+ }> & {
73
+ __v: number;
74
+ }>;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TicketTransferSchema = exports.TicketTransferInfinitePaySchema = exports.TicketTransferStatus = exports.TicketTransferPaymentMethod = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const TicketOrder_1 = require("./TicketOrder");
6
+ var TicketTransferPaymentMethod;
7
+ (function (TicketTransferPaymentMethod) {
8
+ TicketTransferPaymentMethod["WALLET"] = "WALLET";
9
+ TicketTransferPaymentMethod["CREDIT_CARD"] = "CREDIT_CARD";
10
+ TicketTransferPaymentMethod["DEBIT_CARD"] = "DEBIT_CARD";
11
+ TicketTransferPaymentMethod["PIX"] = "PIX";
12
+ /** Checkout InfinitePay (Pix ou cartão definidos no checkout externo). */
13
+ TicketTransferPaymentMethod["CHECKOUT"] = "CHECKOUT";
14
+ })(TicketTransferPaymentMethod || (exports.TicketTransferPaymentMethod = TicketTransferPaymentMethod = {}));
15
+ var TicketTransferStatus;
16
+ (function (TicketTransferStatus) {
17
+ TicketTransferStatus["REQUESTED"] = "REQUESTED";
18
+ TicketTransferStatus["PROCESSING"] = "PROCESSING";
19
+ TicketTransferStatus["COMPLETED"] = "COMPLETED";
20
+ TicketTransferStatus["CANCELLED"] = "CANCELLED";
21
+ TicketTransferStatus["FAILED"] = "FAILED";
22
+ })(TicketTransferStatus || (exports.TicketTransferStatus = TicketTransferStatus = {}));
23
+ exports.TicketTransferInfinitePaySchema = new mongoose_1.Schema({
24
+ handle: { type: String, required: false },
25
+ TransferNsu: { type: String, required: false, index: true },
26
+ checkoutUrl: { type: String, required: false },
27
+ invoiceSlug: { type: String, required: false, index: true },
28
+ transactionNsu: { type: String, required: false, index: true },
29
+ captureMethod: { type: String, required: false },
30
+ amountCents: { type: Number, required: false },
31
+ paidAmountCents: { type: Number, required: false },
32
+ installments: { type: Number, required: false },
33
+ receiptUrl: { type: String, required: false },
34
+ paymentStatus: { type: String, required: false },
35
+ webhookReceivedAt: { type: Date, required: false },
36
+ lastWebhookPayload: { type: mongoose_1.Schema.Types.Mixed, required: false },
37
+ checkoutCreatedAt: { type: Date, required: false },
38
+ }, { _id: false });
39
+ exports.TicketTransferSchema = new mongoose_1.Schema({
40
+ sequenceNumber: { type: Number, required: true },
41
+ ticket: { type: mongoose_1.Schema.Types.ObjectId, ref: "ticket", required: true },
42
+ accountOrigin: { type: mongoose_1.Schema.Types.ObjectId, ref: "account", required: true },
43
+ accountDestination: { type: mongoose_1.Schema.Types.ObjectId, ref: "account", required: true },
44
+ status: { type: String, required: true, enum: TicketTransferStatus },
45
+ originAccepted: { type: Boolean, default: false },
46
+ paymentMethod: { type: String, enum: TicketTransferPaymentMethod },
47
+ amount: { type: Number, required: true },
48
+ acceptTermsOfChallenge: { type: TicketOrder_1.AcceptTermsOfChallengeSchema, required: true },
49
+ infinitePay: { type: exports.TicketTransferInfinitePaySchema, required: false },
50
+ walletMoviment: { type: mongoose_1.Schema.Types.ObjectId, ref: "wallet-moviment", required: false },
51
+ }, {
52
+ timestamps: {
53
+ createdAt: "createdAtDateTime",
54
+ updatedAt: "updatedAtDateTime"
55
+ }
56
+ });
57
+ exports.TicketTransferSchema.index({ accountOrigin: 1 });
58
+ exports.TicketTransferSchema.index({ accountDestination: 1 });
59
+ exports.TicketTransferSchema.index({ status: 1 });
60
+ exports.TicketTransferSchema.index({ paymentMethod: 1 });
61
+ exports.TicketTransferSchema.index({ "infinitePay.TransferNsu": 1 });
62
+ exports.TicketTransferSchema.index({ "infinitePay.transactionNsu": 1 });
@@ -8,6 +8,7 @@ export declare enum WalletMovimentStatus {
8
8
  }
9
9
  export declare enum WalletMovimentType {
10
10
  DEPOSIT = "DEPOSIT",
11
+ SALE_TICKET = "SALE_TICKET",
11
12
  WITHDRAW = "WITHDRAW",
12
13
  BUY_TICKET = "BUY_TICKET",
13
14
  AWARD = "AWARD"
@@ -12,6 +12,7 @@ var WalletMovimentStatus;
12
12
  var WalletMovimentType;
13
13
  (function (WalletMovimentType) {
14
14
  WalletMovimentType["DEPOSIT"] = "DEPOSIT";
15
+ WalletMovimentType["SALE_TICKET"] = "SALE_TICKET";
15
16
  WalletMovimentType["WITHDRAW"] = "WITHDRAW";
16
17
  WalletMovimentType["BUY_TICKET"] = "BUY_TICKET";
17
18
  WalletMovimentType["AWARD"] = "AWARD";
@@ -1,10 +1,9 @@
1
1
  export * from "./Access";
2
2
  export * from "./Account";
3
3
  export * from "./AccountDeletionRequest";
4
- export * from "./AdminAccount";
5
4
  export * from "./AdminAccessProfile";
5
+ export * from "./AdminAccount";
6
6
  export * from "./AdminComunication";
7
- export * from "./EventComunication";
8
7
  export * from "./AdminTemplateEmail";
9
8
  export * from "./AdminTemplatePush";
10
9
  export * from "./Challenge";
@@ -17,10 +16,12 @@ export * from "./ChampionshipRound";
17
16
  export * from "./Chat";
18
17
  export * from "./ChatMessage";
19
18
  export * from "./Contact";
19
+ export * from "./EventComunication";
20
20
  export * from "./File";
21
21
  export * from "./Team";
22
22
  export * from "./Ticket";
23
23
  export * from "./TicketGuess";
24
24
  export * from "./TicketOrder";
25
+ export * from "./TicketTransfer";
25
26
  export * from "./WalletMoviment";
26
27
  export * from "./WhatsAppTemplate";
@@ -17,10 +17,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Access"), exports);
18
18
  __exportStar(require("./Account"), exports);
19
19
  __exportStar(require("./AccountDeletionRequest"), exports);
20
- __exportStar(require("./AdminAccount"), exports);
21
20
  __exportStar(require("./AdminAccessProfile"), exports);
21
+ __exportStar(require("./AdminAccount"), exports);
22
22
  __exportStar(require("./AdminComunication"), exports);
23
- __exportStar(require("./EventComunication"), exports);
24
23
  __exportStar(require("./AdminTemplateEmail"), exports);
25
24
  __exportStar(require("./AdminTemplatePush"), exports);
26
25
  __exportStar(require("./Challenge"), exports);
@@ -33,10 +32,12 @@ __exportStar(require("./ChampionshipRound"), exports);
33
32
  __exportStar(require("./Chat"), exports);
34
33
  __exportStar(require("./ChatMessage"), exports);
35
34
  __exportStar(require("./Contact"), exports);
35
+ __exportStar(require("./EventComunication"), exports);
36
36
  __exportStar(require("./File"), exports);
37
37
  __exportStar(require("./Team"), exports);
38
38
  __exportStar(require("./Ticket"), exports);
39
39
  __exportStar(require("./TicketGuess"), exports);
40
40
  __exportStar(require("./TicketOrder"), exports);
41
+ __exportStar(require("./TicketTransfer"), exports);
41
42
  __exportStar(require("./WalletMoviment"), exports);
42
43
  __exportStar(require("./WhatsAppTemplate"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-desafiox",
3
- "version": "1.0.138",
3
+ "version": "1.0.143",
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",