agrs-sequelize-sdk 1.2.76 → 1.2.78

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.
@@ -83,11 +83,16 @@ module.exports = (sequelize, DataTypes) => {
83
83
  allowNull: true,
84
84
  comment: "User who created this rule",
85
85
  },
86
- updatedBy: {
87
- type: DataTypes.STRING(255),
88
- allowNull: true,
89
- comment: "User who last updated this rule",
90
- },
86
+ updatedBy: {
87
+ type: DataTypes.STRING(255),
88
+ allowNull: true,
89
+ comment: "User who last updated this rule",
90
+ },
91
+ mediaBuyer: {
92
+ type: DataTypes.STRING(255),
93
+ allowNull: true,
94
+ comment: "Media buyer assigned to this rule for permissions",
95
+ },
91
96
  },
92
97
  {
93
98
  tableName: "AutomationRules", // New table name
@@ -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,
@@ -25,19 +25,19 @@ module.exports = (sequelize) => {
25
25
  },
26
26
  operator: {
27
27
  type: DataTypes.ENUM(
28
- "EQUALS",
29
- "NOT_EQUALS",
30
- "GREATER_THAN",
31
- "LESS_THAN",
32
- "GREATER_THAN_OR_EQUAL",
33
- "LESS_THAN_OR_EQUAL",
34
- "BETWEEN",
35
- "IN",
36
- "NOT_IN",
37
- "CONTAINS",
38
- "NOT_CONTAINS",
39
- "IS_NULL",
40
- "IS_NOT_NULL"
28
+ "eq",
29
+ "ne",
30
+ "gt",
31
+ "lt",
32
+ "gte",
33
+ "lte",
34
+ "between",
35
+ "in",
36
+ "not_in",
37
+ "contains",
38
+ "not_contains",
39
+ "is_null",
40
+ "is_not_null"
41
41
  ),
42
42
  allowNull: false,
43
43
  comment: "Comparison operator",
@@ -48,6 +48,12 @@ module.exports = (sequelize) => {
48
48
  comment:
49
49
  "Value(s) to compare against (can be array for BETWEEN, IN, etc.)",
50
50
  },
51
+ valueType: {
52
+ type: DataTypes.ENUM("STRING", "NUMBER", "ARRAY"),
53
+ allowNull: true,
54
+ defaultValue: "STRING",
55
+ comment: "Type of the value field",
56
+ },
51
57
  logicalOperator: {
52
58
  type: DataTypes.ENUM("AND", "OR"),
53
59
  allowNull: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agrs-sequelize-sdk",
3
- "version": "1.2.76",
3
+ "version": "1.2.78",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "start": "node index.js",