orbitx-core-models 11.28.0 → 11.30.0
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.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Types } from "mongoose";
|
|
2
|
-
export type StripeTransactionType = "payout" | "transfer";
|
|
3
2
|
export type TransactionType = "credit" | "debit";
|
|
4
3
|
export type TransactionStatus = "pending" | "paid" | "failed" | "reversed";
|
|
5
4
|
export type TransactionSource = "lead-target" | "commission";
|
|
@@ -8,9 +7,10 @@ export interface ITransaction {
|
|
|
8
7
|
txnId?: string;
|
|
9
8
|
idempotencyKey?: string;
|
|
10
9
|
partner: Types.ObjectId;
|
|
10
|
+
company: Types.ObjectId;
|
|
11
11
|
currency: string;
|
|
12
12
|
periodMonth: string;
|
|
13
|
-
stripeType:
|
|
13
|
+
stripeType: string;
|
|
14
14
|
type: TransactionType;
|
|
15
15
|
amount: number;
|
|
16
16
|
description?: string;
|
|
@@ -20,6 +20,7 @@ export interface ITransaction {
|
|
|
20
20
|
bankLast4?: string | null;
|
|
21
21
|
stripeIntentId?: string | null;
|
|
22
22
|
source?: TransactionSource | null;
|
|
23
|
+
metadata?: any;
|
|
23
24
|
createdAt?: Date;
|
|
24
25
|
updatedAt?: Date;
|
|
25
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/transaction.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"transaction.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/transaction.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;AACjD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAC3E,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,YAAY,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC;IACxB,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.model.d.ts","sourceRoot":"","sources":["../../src/models/transaction.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"transaction.model.d.ts","sourceRoot":"","sources":["../../src/models/transaction.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAsGnE,eAAO,MAAM,WAAW;;;;OAGvB,CAAC;AACF,eAAe,WAAW,CAAC"}
|
|
@@ -51,7 +51,11 @@ const transactionSchema = new mongoose_1.Schema({
|
|
|
51
51
|
partner: {
|
|
52
52
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
53
53
|
ref: "Partner",
|
|
54
|
-
|
|
54
|
+
index: true,
|
|
55
|
+
},
|
|
56
|
+
company: {
|
|
57
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
58
|
+
ref: "Company",
|
|
55
59
|
index: true,
|
|
56
60
|
},
|
|
57
61
|
currency: {
|
|
@@ -70,7 +74,6 @@ const transactionSchema = new mongoose_1.Schema({
|
|
|
70
74
|
},
|
|
71
75
|
stripeType: {
|
|
72
76
|
type: String,
|
|
73
|
-
enum: ["payout", "transfer"],
|
|
74
77
|
required: true,
|
|
75
78
|
},
|
|
76
79
|
amount: {
|
|
@@ -104,6 +107,9 @@ const transactionSchema = new mongoose_1.Schema({
|
|
|
104
107
|
enum: ["credit", "debit"],
|
|
105
108
|
required: true,
|
|
106
109
|
},
|
|
110
|
+
metadata: {
|
|
111
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
112
|
+
}
|
|
107
113
|
}, {
|
|
108
114
|
timestamps: true,
|
|
109
115
|
versionKey: false,
|