c2-desafiox 1.0.112 → 1.0.116
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.
|
@@ -5,7 +5,9 @@ export declare enum TicketOrderPaymentMethod {
|
|
|
5
5
|
WALLET = "WALLET",
|
|
6
6
|
CREDIT_CARD = "CREDIT_CARD",
|
|
7
7
|
DEBIT_CARD = "DEBIT_CARD",
|
|
8
|
-
PIX = "PIX"
|
|
8
|
+
PIX = "PIX",
|
|
9
|
+
/** Checkout InfinitePay (Pix ou cartão definidos no checkout externo). */
|
|
10
|
+
CHECKOUT = "CHECKOUT"
|
|
9
11
|
}
|
|
10
12
|
export declare enum TicketOrderStatus {
|
|
11
13
|
DRAFT = "DRAFT",
|
|
@@ -19,6 +21,26 @@ export interface IAcceptTermsOfChallenge {
|
|
|
19
21
|
acceptedAppVersion: string;
|
|
20
22
|
contentAccepted: string;
|
|
21
23
|
}
|
|
24
|
+
/** Tracking / conciliação InfinitePay (checkout + webhook). */
|
|
25
|
+
export interface ITicketOrderInfinitePay {
|
|
26
|
+
handle?: string;
|
|
27
|
+
/** Nosso identificador enviado como order_nsu (geralmente o _id do pedido). */
|
|
28
|
+
orderNsu?: string;
|
|
29
|
+
checkoutUrl?: string;
|
|
30
|
+
invoiceSlug?: string;
|
|
31
|
+
transactionNsu?: string;
|
|
32
|
+
captureMethod?: string;
|
|
33
|
+
amountCents?: number;
|
|
34
|
+
paidAmountCents?: number;
|
|
35
|
+
installments?: number;
|
|
36
|
+
receiptUrl?: string;
|
|
37
|
+
/** pending | paid | failed | ... */
|
|
38
|
+
paymentStatus?: string;
|
|
39
|
+
webhookReceivedAt?: Date;
|
|
40
|
+
/** Último payload de webhook (auditoria / reprocessamento). */
|
|
41
|
+
lastWebhookPayload?: Record<string, unknown>;
|
|
42
|
+
checkoutCreatedAt?: Date;
|
|
43
|
+
}
|
|
22
44
|
export interface ITicketOrder {
|
|
23
45
|
_id: Types.ObjectId;
|
|
24
46
|
sequenceNumber: number;
|
|
@@ -31,6 +53,7 @@ export interface ITicketOrder {
|
|
|
31
53
|
totalValue: number;
|
|
32
54
|
coupons: string[];
|
|
33
55
|
acceptTermsOfChallenge: IAcceptTermsOfChallenge;
|
|
56
|
+
infinitePay?: ITicketOrderInfinitePay;
|
|
34
57
|
createdAtDateTime: Date;
|
|
35
58
|
updatedAtDateTime: Date;
|
|
36
59
|
}
|
|
@@ -43,6 +66,15 @@ export declare const AcceptTermsOfChallengeSchema: Schema<IAcceptTermsOfChalleng
|
|
|
43
66
|
} & {
|
|
44
67
|
__v: number;
|
|
45
68
|
}>;
|
|
69
|
+
export declare const TicketOrderInfinitePaySchema: Schema<ITicketOrderInfinitePay, import("mongoose").Model<ITicketOrderInfinitePay, any, any, any, import("mongoose").Document<unknown, any, ITicketOrderInfinitePay, any> & ITicketOrderInfinitePay & {
|
|
70
|
+
_id: Types.ObjectId;
|
|
71
|
+
} & {
|
|
72
|
+
__v: number;
|
|
73
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ITicketOrderInfinitePay, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ITicketOrderInfinitePay>, {}> & import("mongoose").FlatRecord<ITicketOrderInfinitePay> & {
|
|
74
|
+
_id: Types.ObjectId;
|
|
75
|
+
} & {
|
|
76
|
+
__v: number;
|
|
77
|
+
}>;
|
|
46
78
|
export declare const TicketOrderSchema: Schema<ITicketOrder, import("mongoose").Model<ITicketOrder, any, any, any, import("mongoose").Document<unknown, any, ITicketOrder, any> & ITicketOrder & Required<{
|
|
47
79
|
_id: Types.ObjectId;
|
|
48
80
|
}> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TicketOrderSchema = exports.AcceptTermsOfChallengeSchema = exports.TicketOrderStatus = exports.TicketOrderPaymentMethod = void 0;
|
|
3
|
+
exports.TicketOrderSchema = exports.TicketOrderInfinitePaySchema = exports.AcceptTermsOfChallengeSchema = exports.TicketOrderStatus = exports.TicketOrderPaymentMethod = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
var TicketOrderPaymentMethod;
|
|
6
6
|
(function (TicketOrderPaymentMethod) {
|
|
@@ -8,6 +8,8 @@ var TicketOrderPaymentMethod;
|
|
|
8
8
|
TicketOrderPaymentMethod["CREDIT_CARD"] = "CREDIT_CARD";
|
|
9
9
|
TicketOrderPaymentMethod["DEBIT_CARD"] = "DEBIT_CARD";
|
|
10
10
|
TicketOrderPaymentMethod["PIX"] = "PIX";
|
|
11
|
+
/** Checkout InfinitePay (Pix ou cartão definidos no checkout externo). */
|
|
12
|
+
TicketOrderPaymentMethod["CHECKOUT"] = "CHECKOUT";
|
|
11
13
|
})(TicketOrderPaymentMethod || (exports.TicketOrderPaymentMethod = TicketOrderPaymentMethod = {}));
|
|
12
14
|
var TicketOrderStatus;
|
|
13
15
|
(function (TicketOrderStatus) {
|
|
@@ -22,6 +24,22 @@ exports.AcceptTermsOfChallengeSchema = new mongoose_1.Schema({
|
|
|
22
24
|
acceptedAppVersion: { type: String, required: true },
|
|
23
25
|
contentAccepted: { type: String, required: true },
|
|
24
26
|
});
|
|
27
|
+
exports.TicketOrderInfinitePaySchema = new mongoose_1.Schema({
|
|
28
|
+
handle: { type: String, required: false },
|
|
29
|
+
orderNsu: { type: String, required: false, index: true },
|
|
30
|
+
checkoutUrl: { type: String, required: false },
|
|
31
|
+
invoiceSlug: { type: String, required: false, index: true },
|
|
32
|
+
transactionNsu: { type: String, required: false, index: true },
|
|
33
|
+
captureMethod: { type: String, required: false },
|
|
34
|
+
amountCents: { type: Number, required: false },
|
|
35
|
+
paidAmountCents: { type: Number, required: false },
|
|
36
|
+
installments: { type: Number, required: false },
|
|
37
|
+
receiptUrl: { type: String, required: false },
|
|
38
|
+
paymentStatus: { type: String, required: false },
|
|
39
|
+
webhookReceivedAt: { type: Date, required: false },
|
|
40
|
+
lastWebhookPayload: { type: mongoose_1.Schema.Types.Mixed, required: false },
|
|
41
|
+
checkoutCreatedAt: { type: Date, required: false },
|
|
42
|
+
}, { _id: false });
|
|
25
43
|
exports.TicketOrderSchema = new mongoose_1.Schema({
|
|
26
44
|
sequenceNumber: { type: Number, required: true },
|
|
27
45
|
account: { type: mongoose_1.Schema.Types.ObjectId, ref: "account", required: true },
|
|
@@ -33,6 +51,7 @@ exports.TicketOrderSchema = new mongoose_1.Schema({
|
|
|
33
51
|
totalValue: { type: Number, required: true },
|
|
34
52
|
coupons: { type: [String], required: true },
|
|
35
53
|
acceptTermsOfChallenge: { type: exports.AcceptTermsOfChallengeSchema, required: true },
|
|
54
|
+
infinitePay: { type: exports.TicketOrderInfinitePaySchema, required: false },
|
|
36
55
|
}, {
|
|
37
56
|
timestamps: {
|
|
38
57
|
createdAt: "createdAtDateTime",
|
|
@@ -43,3 +62,5 @@ exports.TicketOrderSchema.index({ account: 1 });
|
|
|
43
62
|
exports.TicketOrderSchema.index({ challenge: 1 });
|
|
44
63
|
exports.TicketOrderSchema.index({ status: 1 });
|
|
45
64
|
exports.TicketOrderSchema.index({ paymentMethod: 1 });
|
|
65
|
+
exports.TicketOrderSchema.index({ "infinitePay.orderNsu": 1 });
|
|
66
|
+
exports.TicketOrderSchema.index({ "infinitePay.transactionNsu": 1 });
|
package/package.json
CHANGED