orbitx-core-models 11.154.0 → 11.156.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,5 @@
1
1
  import { Types } from "mongoose";
2
- export type MacroAction = "None" | "TransferToLiveAgent" | "CallConnect" | "EndChat" | "GoToNextMacro" | "SendLead";
2
+ export type MacroAction = "None" | "TransferToLiveAgent" | "CallConnect" | "EndChat" | "GoToNextMacro" | "SendLead" | "SendLeadSales" | "SendLeadService" | "SendLeadOther";
3
3
  export type MacroType = "Text" | "Consent" | "Calendar";
4
4
  export interface IOption {
5
5
  text: string;
@@ -1 +1 @@
1
- {"version":3,"file":"macro.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/macro.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,qBAAqB,GACrB,aAAa,GACb,SAAS,GACT,eAAe,GACf,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;AAExD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
1
+ {"version":3,"file":"macro.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/macro.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,qBAAqB,GACrB,aAAa,GACb,SAAS,GACT,eAAe,GACf,UAAU,GACV,eAAe,GACf,iBAAiB,GACjB,eAAe,CAAC;AAEpB,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;AAExD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"macro.model.d.ts","sourceRoot":"","sources":["../../src/models/macro.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAW,MAAM,+BAA+B,CAAC;AAsFhE,eAAO,MAAM,KAAK;;;;OAA+C,CAAC;AAClE,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"macro.model.d.ts","sourceRoot":"","sources":["../../src/models/macro.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAW,MAAM,+BAA+B,CAAC;AA8FhE,eAAO,MAAM,KAAK;;;;OAA+C,CAAC;AAClE,eAAe,KAAK,CAAC"}
@@ -49,7 +49,12 @@ const optionSchema = new mongoose_1.Schema({
49
49
  "CallConnect",
50
50
  "EndChat",
51
51
  "GoToNextMacro",
52
+ // Legacy: no longer offered in the macro editors (replaced by the three below), kept valid
53
+ // so any older macro that used it still saves.
52
54
  "SendLead",
55
+ "SendLeadSales",
56
+ "SendLeadService",
57
+ "SendLeadOther",
53
58
  ],
54
59
  default: "None",
55
60
  },
@@ -83,7 +88,10 @@ const macroSchema = new mongoose_1.Schema({
83
88
  "CallConnect",
84
89
  "EndChat",
85
90
  "GoToNextMacro",
86
- "SendLead",
91
+ "SendLead", // legacy, see the option enum above
92
+ "SendLeadSales",
93
+ "SendLeadService",
94
+ "SendLeadOther",
87
95
  ],
88
96
  required: [true, "Macro action is required"],
89
97
  default: "None",
@@ -1 +1 @@
1
- {"version":3,"file":"wallet.model.d.ts","sourceRoot":"","sources":["../../src/models/wallet.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAqCzD,eAAO,MAAM,MAAM;;;;OAAkD,CAAC;AACtE,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"wallet.model.d.ts","sourceRoot":"","sources":["../../src/models/wallet.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAuCzD,eAAO,MAAM,MAAM;;;;OAAkD,CAAC;AACtE,eAAe,MAAM,CAAC"}
@@ -36,10 +36,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.Wallet = void 0;
37
37
  const mongoose_1 = __importStar(require("mongoose"));
38
38
  const walletSchema = new mongoose_1.Schema({
39
+ // Can go below zero: a commission payout reversed after the partner already withdrew it is
40
+ // taken back in full, leaving a negative ("owed") balance that the next payout settles first.
41
+ // Withdrawals still require balance >= amount, so an owed balance can't be withdrawn.
39
42
  balance: {
40
43
  type: Number,
41
44
  default: 0,
42
- min: 0,
43
45
  },
44
46
  pendingWithdrawalAmount: {
45
47
  type: Number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbitx-core-models",
3
- "version": "11.154.0",
3
+ "version": "11.156.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",