orbitx-core-models 11.103.0 → 11.104.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,6 +1,6 @@
1
1
  import { Document, Schema } from "mongoose";
2
2
  type AgentRole = "agent-chat" | "account-manager" | "admin";
3
- type CurrentStatus = "online" | "away" | "offline";
3
+ type CurrentStatus = string;
4
4
  type PresenceStatus = "available" | "busy";
5
5
  export interface IAgent extends Document {
6
6
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"agent.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/agent.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAE5C,KAAK,SAAS,GAAG,YAAY,GAAG,iBAAiB,GAAG,OAAO,CAAC;AAC5D,KAAK,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AACnD,KAAK,cAAc,GAAG,WAAW,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,MAAO,SAAQ,QAAQ;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnC,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,SAA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AM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,UAAU,EAAE,OAAO,CAAC;CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"agent.model.d.ts","sourceRoot":"","sources":["../../src/models/agent.model.ts"],"names":[],"mappings":"AAEA,OAAiB,EAAU,KAAK,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAuHrD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,MAAM,CAAgD,CAAC;AACjF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"agent.model.d.ts","sourceRoot":"","sources":["../../src/models/agent.model.ts"],"names":[],"mappings":"AAEA,OAAiB,EAAU,KAAK,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAsHrD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,MAAM,CAAgD,CAAC;AACjF,eAAe,KAAK,CAAC"}
@@ -86,7 +86,6 @@ const agentSchema = new mongoose_1.Schema({
86
86
  ],
87
87
  currentStatus: {
88
88
  type: String,
89
- enum: ["online", "away", "offline"],
90
89
  default: "offline",
91
90
  index: true,
92
91
  },
@@ -142,7 +141,7 @@ agentSchema.methods.comparePassword = async function (input) {
142
141
  };
143
142
  agentSchema.virtual("isRoutable").get(function () {
144
143
  return (this.role === "agent-chat" &&
145
- this.currentStatus === "online" &&
144
+ this.currentStatus === "active" &&
146
145
  this.presenceStatus === "available" &&
147
146
  !this.lockedOut);
148
147
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbitx-core-models",
3
- "version": "11.103.0",
3
+ "version": "11.104.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",