@avakado.ai/schemas 1.1.15 → 1.1.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avakado.ai/schemas",
3
- "version": "1.1.15",
3
+ "version": "1.1.16",
4
4
  "description": "Canonical Mongo schemas, models, enums and index declarations shared by the Avakado services.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -58,7 +58,7 @@ export const LEDGER_CATEGORY = {
58
58
  export const CONVERSATION_STATUS = ["open", "pending", "snoozed", "completed", "closed", "archived", "spam"];
59
59
  export const CONVERSATION_PRIORITY = ["low", "normal", "high", "urgent"];
60
60
 
61
- export const CAMPAIGN_STATUS = ["pending", "active", "completed"];
61
+ export const CAMPAIGN_STATUS = ["pending", "active", "completed", "failed", "partial"];
62
62
  export const TASK_STATUS = ["pending", "in-progress", "completed", "failed", "skipped"];
63
63
  export const TASK_TYPES = ["quick", "webhook"];
64
64
  export const TASK_REFERENCE_TYPES = ["Message", "CallSession"];
@@ -49,6 +49,8 @@ const CampaignSchema = new Schema({
49
49
  completedAt: Date,// end of chain
50
50
  cancelledAt: Date, // breaking the chain
51
51
  lastTaskStartedAt: Date, // last task started time
52
+ partialAt: Date, // partial completion time
53
+ failedAt: Date, // failed time
52
54
  },
53
55
  cancel_requested: { type: Boolean, default: false }, // if true, the next task will be cancelled
54
56
  createdBy: { type: Schema.Types.ObjectId, ref: 'Users', required: true },