orbitx-core-models 11.180.0 → 11.181.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.
@@ -35,7 +35,7 @@ function createInvoiceDocuments({ stripe }) {
35
35
  const CompanyModel = company_model_1.Company;
36
36
  const CounterModel = counter_model_1.Counter;
37
37
  const LeadLedgerModel = leadLedger_model_1.LeadLedger;
38
- /** "INV-2026-0001": sequential across OrbitXPro, starting again each year. */
38
+ /** "INV-2026-0001": sequential across ORBITXPRO, starting again each year. */
39
39
  async function nextInvoiceNumber(at = new Date()) {
40
40
  const year = at.getFullYear();
41
41
  const counter = await CounterModel.findByIdAndUpdate(`invoiceNumber_${year}`, { $inc: { seq: 1 } }, { new: true, upsert: true });
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.createOwnActivityController = createOwnActivityController;
7
7
  /**
8
- * A portal's own Activity log: everything done on its account, by its own users and by OrbitXPro staff (HIPAA: an
8
+ * A portal's own Activity log: everything done on its account, by its own users and by ORBITXPRO staff (HIPAA: an
9
9
  * account must be able to see everyone who touched its data). Shown only after Ops turns on the account's access
10
10
  * (activityLogAccess). Shared by the Client and Partner backends:
11
11
  * createOwnActivityController({ kind: "client" }) // Company accounts, logs filed under `company`
@@ -39,7 +39,7 @@ function createOwnActivityController({ kind }) {
39
39
  const listActivity = (0, _http_1.catchAsync)(async (req, res, next) => {
40
40
  const account = await Account.findById(accountIdOf(req)).select("activityLogAccess").lean();
41
41
  if (!(account === null || account === void 0 ? void 0 : account.activityLogAccess)) {
42
- return next(new errors_1.AppError("Your Activity log isn't turned on. Please ask OrbitXPro support to turn it on.", _http_1.HTTP.FORBIDDEN));
42
+ return next(new errors_1.AppError("Your Activity log isn't turned on. Please ask ORBITXPRO support to turn it on.", _http_1.HTTP.FORBIDDEN));
43
43
  }
44
44
  const q = req.query;
45
45
  const page = Math.max(1, Number(q.page) || 1);
@@ -78,12 +78,12 @@ function createOwnActivityController({ kind }) {
78
78
  .lean(),
79
79
  ActivityLogModel.countDocuments(filter),
80
80
  ]);
81
- // OrbitXPro staff show by name and team; their work email and network address stay internal.
81
+ // ORBITXPRO staff show by name and team; their work email and network address stay internal.
82
82
  const items = rows.map((r) => {
83
83
  var _a, _b, _c;
84
84
  return ((_a = r.actor) === null || _a === void 0 ? void 0 : _a.kind) === kind
85
85
  ? r
86
- : { ...r, actor: { kind: (_b = r.actor) === null || _b === void 0 ? void 0 : _b.kind, name: ((_c = r.actor) === null || _c === void 0 ? void 0 : _c.name) || "OrbitXPro", team: "OrbitXPro" }, ip: undefined };
86
+ : { ...r, actor: { kind: (_b = r.actor) === null || _b === void 0 ? void 0 : _b.kind, name: ((_c = r.actor) === null || _c === void 0 ? void 0 : _c.name) || "ORBITXPRO", team: "ORBITXPRO" }, ip: undefined };
87
87
  });
88
88
  res.status(_http_1.HTTP.OK).json({
89
89
  success: true,
@@ -1,5 +1,5 @@
1
1
  import { Types } from "mongoose";
2
- export type TierName = "Silver" | "Gold" | "Platinum";
2
+ export type TierName = "Gold" | "Platinum" | "Diamond";
3
3
  export interface ITierConfig {
4
4
  _id?: Types.ObjectId;
5
5
  tier: TierName;
@@ -1 +1 @@
1
- {"version":3,"file":"tierConfig.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/tierConfig.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtD,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB"}
1
+ {"version":3,"file":"tierConfig.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/tierConfig.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB"}
@@ -107,7 +107,7 @@ const invoiceSchema = new mongoose_1.Schema({
107
107
  required: [true, "Total due is required"],
108
108
  min: 0,
109
109
  },
110
- // The number printed on the invoice: "INV-2026-0001", sequential across OrbitXPro per year.
110
+ // The number printed on the invoice: "INV-2026-0001", sequential across ORBITXPRO per year.
111
111
  invoiceNumber: {
112
112
  type: String,
113
113
  trim: true,
@@ -49,7 +49,7 @@ const MonthlyTierSnapshotSchema = new mongoose_1.Schema({
49
49
  },
50
50
  tier: {
51
51
  type: String,
52
- enum: ["Silver", "Gold", "Platinum"],
52
+ enum: ["Gold", "Platinum", "Diamond"],
53
53
  required: true,
54
54
  },
55
55
  commissionRate: {
@@ -38,7 +38,7 @@ const mongoose_1 = __importStar(require("mongoose"));
38
38
  const tierConfigSchema = new mongoose_1.Schema({
39
39
  tier: {
40
40
  type: String,
41
- enum: ["Silver", "Gold", "Platinum"],
41
+ enum: ["Gold", "Platinum", "Diamond"],
42
42
  unique: true,
43
43
  required: true,
44
44
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbitx-core-models",
3
- "version": "11.180.0",
3
+ "version": "11.181.0",
4
4
  "description": "Shared Mongoose models and interfaces for OrbitX services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",