agrs-sequelize-sdk 1.2.77 → 1.2.79

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.
@@ -20,29 +20,32 @@ module.exports = (sequelize) => {
20
20
  },
21
21
  actionType: {
22
22
  type: DataTypes.ENUM(
23
- // Campaign level actions
24
- "PAUSE_CAMPAIGN",
25
- "ACTIVATE_CAMPAIGN",
26
- "CHANGE_CAMPAIGN_BUDGET",
27
- "CHANGE_CAMPAIGN_BID_STRATEGY",
28
-
29
- // AdSet level actions
30
- "PAUSE_ADSET",
31
- "ACTIVATE_ADSET",
32
- "CHANGE_ADSET_BUDGET",
33
- "CHANGE_ADSET_BID",
34
- "CHANGE_ADSET_BID_STRATEGY",
35
-
36
- // Ad level actions
37
- "PAUSE_AD",
38
- "ACTIVATE_AD",
39
-
40
- // Custom actions
23
+ "PAUSE",
24
+ "ACTIVATE",
25
+ "CHANGE_BUDGET",
26
+ "CHANGE_BID",
27
+ "CHANGE_BID_STRATEGY",
41
28
  "CUSTOM_ACTION"
42
29
  ),
43
30
  allowNull: false,
44
31
  comment: "Type of action to perform",
45
32
  },
33
+ targetLevel: {
34
+ type: DataTypes.ENUM("CAMPAIGN", "ADSET", "AD"),
35
+ allowNull: false,
36
+ comment: "Level at which the action operates",
37
+ },
38
+ value: {
39
+ type: DataTypes.STRING(255),
40
+ allowNull: true,
41
+ comment: "Value for the action (budget amount, bid amount, etc.)",
42
+ },
43
+ valueType: {
44
+ type: DataTypes.ENUM("STRING", "NUMBER", "ARRAY"),
45
+ allowNull: true,
46
+ defaultValue: "STRING",
47
+ comment: "Type of the value field",
48
+ },
46
49
  actionConfig: {
47
50
  type: DataTypes.JSONB,
48
51
  allowNull: true,
@@ -23,10 +23,16 @@ module.exports = (sequelize) => {
23
23
  allowNull: false,
24
24
  comment: "Field to evaluate (e.g., roi, ctr, campaign_name)",
25
25
  },
26
+ type: {
27
+ type: DataTypes.ENUM("DIMENSION", "METRIC"),
28
+ allowNull: false,
29
+ defaultValue: "DIMENSION",
30
+ comment: "Type of field - DIMENSION for filtering, METRIC for calculations",
31
+ },
26
32
  operator: {
27
33
  type: DataTypes.ENUM(
28
34
  "EQUALS",
29
- "NOT_EQUALS",
35
+ "NOT_EQUALS",
30
36
  "GREATER_THAN",
31
37
  "LESS_THAN",
32
38
  "GREATER_THAN_OR_EQUAL",
@@ -48,6 +54,12 @@ module.exports = (sequelize) => {
48
54
  comment:
49
55
  "Value(s) to compare against (can be array for BETWEEN, IN, etc.)",
50
56
  },
57
+ valueType: {
58
+ type: DataTypes.ENUM("STRING", "NUMBER", "ARRAY"),
59
+ allowNull: true,
60
+ defaultValue: "STRING",
61
+ comment: "Type of the value field",
62
+ },
51
63
  logicalOperator: {
52
64
  type: DataTypes.ENUM("AND", "OR"),
53
65
  allowNull: false,
@@ -77,6 +77,11 @@ module.exports = (sequelize) => {
77
77
  allowNull: true,
78
78
  comment: "Detailed execution results and logs",
79
79
  },
80
+ matchedItems: {
81
+ type: DataTypes.JSONB,
82
+ allowNull: true,
83
+ comment: "List of items that matched the rule conditions and had actions applied",
84
+ },
80
85
  triggeredBy: {
81
86
  type: DataTypes.STRING(255),
82
87
  allowNull: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agrs-sequelize-sdk",
3
- "version": "1.2.77",
3
+ "version": "1.2.79",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "start": "node index.js",