orbitx-core-models 6.0.1 → 7.0.1
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 +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/interfaces/stripeLog.interface.d.ts +15 -0
- package/dist/interfaces/stripeLog.interface.d.ts.map +1 -0
- package/dist/interfaces/stripeLog.interface.js +2 -0
- package/dist/models/stripeLog.model.d.ts +9 -0
- package/dist/models/stripeLog.model.d.ts.map +1 -0
- package/dist/models/stripeLog.model.js +89 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { Partner } from "./models/partner.model";
|
|
|
7
7
|
import { Company } from "./models/company.model";
|
|
8
8
|
import { Review } from "./models/review.model";
|
|
9
9
|
import { Wallet } from "./models/wallet.model";
|
|
10
|
+
import { StripeLog } from "./models/stripeLog.model";
|
|
10
11
|
import { IChat } from "./interfaces/chat.interface";
|
|
11
12
|
import { IMacro } from "./interfaces/macro.interface";
|
|
12
13
|
import { IVertical } from "./interfaces/vertical.interface";
|
|
@@ -16,6 +17,7 @@ import { IPartner } from "./interfaces/partner.interface";
|
|
|
16
17
|
import { ICompany } from "./interfaces/company.interface";
|
|
17
18
|
import { IReview } from "./interfaces/review.interface";
|
|
18
19
|
import { IWallet } from "./interfaces/wallet.interface";
|
|
19
|
-
|
|
20
|
-
export
|
|
20
|
+
import { IStripeLog } from "./interfaces/stripeLog.interface";
|
|
21
|
+
export { Chat, Message, User, Vertical, Macro, Partner, Company, Review, Wallet, StripeLog, };
|
|
22
|
+
export type { IChat, IMessage, IUser, IVertical, IMacro, IPartner, ICompany, IReview, IWallet, IStripeLog, };
|
|
21
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mapp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,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EACL,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,GACV,CAAC;AACF,YAAY,EACV,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO,EACP,UAAU,GACX,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Wallet = exports.Review = exports.Company = exports.Partner = exports.Macro = exports.Vertical = exports.User = exports.Message = exports.Chat = void 0;
|
|
3
|
+
exports.StripeLog = exports.Wallet = exports.Review = exports.Company = exports.Partner = exports.Macro = exports.Vertical = exports.User = exports.Message = exports.Chat = void 0;
|
|
4
4
|
// MODELS
|
|
5
5
|
const chat_model_1 = require("./models/chat.model");
|
|
6
6
|
Object.defineProperty(exports, "Chat", { enumerable: true, get: function () { return chat_model_1.Chat; } });
|
|
@@ -20,3 +20,5 @@ const review_model_1 = require("./models/review.model");
|
|
|
20
20
|
Object.defineProperty(exports, "Review", { enumerable: true, get: function () { return review_model_1.Review; } });
|
|
21
21
|
const wallet_model_1 = require("./models/wallet.model");
|
|
22
22
|
Object.defineProperty(exports, "Wallet", { enumerable: true, get: function () { return wallet_model_1.Wallet; } });
|
|
23
|
+
const stripeLog_model_1 = require("./models/stripeLog.model");
|
|
24
|
+
Object.defineProperty(exports, "StripeLog", { enumerable: true, get: function () { return stripeLog_model_1.StripeLog; } });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
2
|
+
export type StripeEventType = "transfer.created" | "transfer.failed" | "transfer.paid" | "payout.created" | "payout.failed" | "payout.paid" | "payout.canceled" | "account.updated" | "account.requirements.updated";
|
|
3
|
+
export interface IStripeLog {
|
|
4
|
+
_id?: Types.ObjectId;
|
|
5
|
+
type: StripeEventType;
|
|
6
|
+
stripeEventId: string;
|
|
7
|
+
stripeObjectId?: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
partnerId?: Types.ObjectId;
|
|
10
|
+
processed?: boolean;
|
|
11
|
+
errorMessage?: string | null;
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
updatedAt?: Date;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=stripeLog.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripeLog.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/stripeLog.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,MAAM,eAAe,GACvB,kBAAkB,GAClB,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,iBAAiB,GACjB,iBAAiB,GACjB,8BAA8B,CAAC;AAEnC,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrB,IAAI,EAAE,eAAe,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,GAAG,CAAC;IACb,SAAS,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import { IStripeLog } from "../interfaces/stripeLog.interface";
|
|
3
|
+
export declare const StripeLog: mongoose.Model<IStripeLog, {}, {}, {}, mongoose.Document<unknown, {}, IStripeLog, {}, {}> & IStripeLog & Required<{
|
|
4
|
+
_id: mongoose.Types.ObjectId;
|
|
5
|
+
}> & {
|
|
6
|
+
__v: number;
|
|
7
|
+
}, any>;
|
|
8
|
+
export default StripeLog;
|
|
9
|
+
//# sourceMappingURL=stripeLog.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripeLog.model.d.ts","sourceRoot":"","sources":["../../src/models/stripeLog.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAiE/D,eAAO,MAAM,SAAS;;;;OAA2D,CAAC;AAClF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.StripeLog = void 0;
|
|
37
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
38
|
+
const stripeLogSchema = new mongoose_1.Schema({
|
|
39
|
+
type: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true,
|
|
42
|
+
enum: [
|
|
43
|
+
"transfer.created",
|
|
44
|
+
"transfer.failed",
|
|
45
|
+
"transfer.paid",
|
|
46
|
+
"payout.created",
|
|
47
|
+
"payout.failed",
|
|
48
|
+
"payout.paid",
|
|
49
|
+
"payout.canceled",
|
|
50
|
+
"account.updated",
|
|
51
|
+
"account.requirements.updated",
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
stripeEventId: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: true,
|
|
57
|
+
index: true,
|
|
58
|
+
unique: true,
|
|
59
|
+
},
|
|
60
|
+
stripeObjectId: {
|
|
61
|
+
type: String,
|
|
62
|
+
index: true,
|
|
63
|
+
required: false,
|
|
64
|
+
},
|
|
65
|
+
payload: {
|
|
66
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
67
|
+
required: true,
|
|
68
|
+
},
|
|
69
|
+
partnerId: {
|
|
70
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
71
|
+
ref: "Partner",
|
|
72
|
+
required: false,
|
|
73
|
+
index: true,
|
|
74
|
+
},
|
|
75
|
+
processed: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false,
|
|
78
|
+
},
|
|
79
|
+
errorMessage: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: null,
|
|
82
|
+
},
|
|
83
|
+
}, {
|
|
84
|
+
timestamps: true,
|
|
85
|
+
});
|
|
86
|
+
// Helpful index for analytics / filtering
|
|
87
|
+
stripeLogSchema.index({ type: 1, createdAt: -1 });
|
|
88
|
+
exports.StripeLog = mongoose_1.default.model("StripeLog", stripeLogSchema);
|
|
89
|
+
exports.default = exports.StripeLog;
|