@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 +1 -1
- package/src/enums/index.js +1 -1
- package/src/models/Campaign.js +2 -0
package/package.json
CHANGED
package/src/enums/index.js
CHANGED
|
@@ -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"];
|
package/src/models/Campaign.js
CHANGED
|
@@ -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 },
|