orbitx-core-models 9.0.4 → 11.0.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.
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/interfaces/monthlyTierSnapshot.interface.d.ts +24 -0
- package/dist/interfaces/monthlyTierSnapshot.interface.d.ts.map +1 -0
- package/dist/interfaces/monthlyTierSnapshot.interface.js +2 -0
- package/dist/models/monthlyTierSnapshot.model.d.ts +9 -0
- package/dist/models/monthlyTierSnapshot.model.d.ts.map +1 -0
- package/dist/models/monthlyTierSnapshot.model.js +124 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { Transaction } from "./models/transaction.model";
|
|
|
12
12
|
import { Lead } from "./models/lead.model";
|
|
13
13
|
import { TierConfig } from "./models/tierConfig.model";
|
|
14
14
|
import { TierProgress } from "./models/tierProgress.model";
|
|
15
|
+
import { MonthlyTierSnapshot } from "./models/monthlyTierSnapshot.model";
|
|
15
16
|
import { IChat } from "./interfaces/chat.interface";
|
|
16
17
|
import { IMacro } from "./interfaces/macro.interface";
|
|
17
18
|
import { IVertical } from "./interfaces/vertical.interface";
|
|
@@ -26,6 +27,7 @@ import { ITransaction } from "./interfaces/transaction.interface";
|
|
|
26
27
|
import { ILead } from "./interfaces/lead.interface";
|
|
27
28
|
import { ITierConfig } from "./interfaces/tierConfig.interface";
|
|
28
29
|
import { ITierProgress } from "./interfaces/tierProgress.interface";
|
|
29
|
-
|
|
30
|
-
export
|
|
30
|
+
import { IMonthlyTierSnapshot } from "@interfaces/monthlyTierSnapshot.interface";
|
|
31
|
+
export { Chat, Message, User, Vertical, Macro, Partner, Company, Review, Wallet, StripeLog, Transaction, Lead, TierConfig, TierProgress, MonthlyTierSnapshot, };
|
|
32
|
+
export type { IChat, IMessage, IUser, IVertical, IMacro, IPartner, ICompany, IReview, IWallet, IStripeLog, ITransaction, ILead, ITierConfig, ITierProgress, IMonthlyTierSnapshot };
|
|
31
33
|
//# 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":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB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,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EACL,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,WAAW,EACX,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,mBAAmB,GACpB,CAAC;AACF,YAAY,EACV,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO,EACP,UAAU,EACV,YAAY,EACZ,KAAK,EACL,WAAW,EACX,aAAa,EACb,oBAAoB,EACrB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TierProgress = exports.TierConfig = exports.Lead = exports.Transaction = exports.StripeLog = exports.Wallet = exports.Review = exports.Company = exports.Partner = exports.Macro = exports.Vertical = exports.User = exports.Message = exports.Chat = void 0;
|
|
3
|
+
exports.MonthlyTierSnapshot = exports.TierProgress = exports.TierConfig = exports.Lead = exports.Transaction = 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; } });
|
|
@@ -30,3 +30,5 @@ const tierConfig_model_1 = require("./models/tierConfig.model");
|
|
|
30
30
|
Object.defineProperty(exports, "TierConfig", { enumerable: true, get: function () { return tierConfig_model_1.TierConfig; } });
|
|
31
31
|
const tierProgress_model_1 = require("./models/tierProgress.model");
|
|
32
32
|
Object.defineProperty(exports, "TierProgress", { enumerable: true, get: function () { return tierProgress_model_1.TierProgress; } });
|
|
33
|
+
const monthlyTierSnapshot_model_1 = require("./models/monthlyTierSnapshot.model");
|
|
34
|
+
Object.defineProperty(exports, "MonthlyTierSnapshot", { enumerable: true, get: function () { return monthlyTierSnapshot_model_1.MonthlyTierSnapshot; } });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
2
|
+
import { TierName } from "./tierConfig.interface";
|
|
3
|
+
export interface IMonthlyTierSnapshot {
|
|
4
|
+
_id?: Types.ObjectId;
|
|
5
|
+
partner: Types.ObjectId;
|
|
6
|
+
month: string;
|
|
7
|
+
tier: TierName;
|
|
8
|
+
commissionRate: number;
|
|
9
|
+
activeClientsCount: number;
|
|
10
|
+
reviewCredits: {
|
|
11
|
+
text: number;
|
|
12
|
+
video: number;
|
|
13
|
+
};
|
|
14
|
+
totalTierCredits: number;
|
|
15
|
+
leadsPerClient: number;
|
|
16
|
+
rewardPerClient: number;
|
|
17
|
+
targetLeads: number;
|
|
18
|
+
leadsGenerated: number;
|
|
19
|
+
isTargetMet: boolean;
|
|
20
|
+
rewardAmount: number;
|
|
21
|
+
commissionEarned: number;
|
|
22
|
+
lockedAt: Date;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=monthlyTierSnapshot.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthlyTierSnapshot.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/monthlyTierSnapshot.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IAErB,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC;IAExB,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,EAAE,QAAQ,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IAEvB,kBAAkB,EAAE,MAAM,CAAC;IAE3B,aAAa,EAAE;QACb,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,gBAAgB,EAAE,MAAM,CAAC;IAEzB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IAExB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IAEvB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IAErB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,QAAQ,EAAE,IAAI,CAAC;CAChB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import { IMonthlyTierSnapshot } from "../interfaces/monthlyTierSnapshot.interface";
|
|
3
|
+
export declare const MonthlyTierSnapshot: mongoose.Model<IMonthlyTierSnapshot, {}, {}, {}, mongoose.Document<unknown, {}, IMonthlyTierSnapshot, {}, {}> & IMonthlyTierSnapshot & Required<{
|
|
4
|
+
_id: mongoose.Types.ObjectId;
|
|
5
|
+
}> & {
|
|
6
|
+
__v: number;
|
|
7
|
+
}, any>;
|
|
8
|
+
export default MonthlyTierSnapshot;
|
|
9
|
+
//# sourceMappingURL=monthlyTierSnapshot.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthlyTierSnapshot.model.d.ts","sourceRoot":"","sources":["../../src/models/monthlyTierSnapshot.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAyGnF,eAAO,MAAM,mBAAmB;;;;OAG/B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
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.MonthlyTierSnapshot = void 0;
|
|
37
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
38
|
+
const MonthlyTierSnapshotSchema = new mongoose_1.Schema({
|
|
39
|
+
partner: {
|
|
40
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
41
|
+
ref: "Partner",
|
|
42
|
+
required: true,
|
|
43
|
+
index: true,
|
|
44
|
+
},
|
|
45
|
+
month: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: true,
|
|
48
|
+
index: true,
|
|
49
|
+
},
|
|
50
|
+
tier: {
|
|
51
|
+
type: String,
|
|
52
|
+
enum: ["Silver", "Gold", "Platinum"],
|
|
53
|
+
required: true,
|
|
54
|
+
},
|
|
55
|
+
commissionRate: {
|
|
56
|
+
type: Number,
|
|
57
|
+
required: true,
|
|
58
|
+
},
|
|
59
|
+
activeClientsCount: {
|
|
60
|
+
type: Number,
|
|
61
|
+
required: true,
|
|
62
|
+
min: 0,
|
|
63
|
+
},
|
|
64
|
+
reviewCredits: {
|
|
65
|
+
text: {
|
|
66
|
+
type: Number,
|
|
67
|
+
required: true,
|
|
68
|
+
min: 0,
|
|
69
|
+
},
|
|
70
|
+
video: {
|
|
71
|
+
type: Number,
|
|
72
|
+
required: true,
|
|
73
|
+
min: 0,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
totalTierCredits: {
|
|
77
|
+
type: Number,
|
|
78
|
+
required: true,
|
|
79
|
+
min: 0,
|
|
80
|
+
},
|
|
81
|
+
leadsPerClient: {
|
|
82
|
+
type: Number,
|
|
83
|
+
required: true,
|
|
84
|
+
min: 0,
|
|
85
|
+
},
|
|
86
|
+
rewardPerClient: {
|
|
87
|
+
type: Number,
|
|
88
|
+
required: true,
|
|
89
|
+
min: 0,
|
|
90
|
+
},
|
|
91
|
+
targetLeads: {
|
|
92
|
+
type: Number,
|
|
93
|
+
required: true,
|
|
94
|
+
min: 0,
|
|
95
|
+
},
|
|
96
|
+
leadsGenerated: {
|
|
97
|
+
type: Number,
|
|
98
|
+
required: true,
|
|
99
|
+
min: 0,
|
|
100
|
+
},
|
|
101
|
+
isTargetMet: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
required: true,
|
|
104
|
+
},
|
|
105
|
+
rewardAmount: {
|
|
106
|
+
type: Number,
|
|
107
|
+
required: true,
|
|
108
|
+
min: 0,
|
|
109
|
+
},
|
|
110
|
+
commissionEarned: {
|
|
111
|
+
type: Number,
|
|
112
|
+
required: true,
|
|
113
|
+
min: 0,
|
|
114
|
+
},
|
|
115
|
+
lockedAt: {
|
|
116
|
+
type: Date,
|
|
117
|
+
default: Date.now,
|
|
118
|
+
immutable: true,
|
|
119
|
+
},
|
|
120
|
+
}, {
|
|
121
|
+
timestamps: false,
|
|
122
|
+
});
|
|
123
|
+
exports.MonthlyTierSnapshot = mongoose_1.default.model("MonthlyTierSnapshot", MonthlyTierSnapshotSchema);
|
|
124
|
+
exports.default = exports.MonthlyTierSnapshot;
|