agrs-sequelize-sdk 1.1.42 → 1.1.44

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/models/Article.js CHANGED
@@ -15,17 +15,14 @@ module.exports = (sequelize, DataTypes) => {
15
15
  articleUrl: {
16
16
  type: DataTypes.STRING(1024),
17
17
  allowNull: true,
18
- comment: "Generated URL for the article",
19
18
  },
20
19
  feed: {
21
20
  type: DataTypes.STRING,
22
21
  allowNull: false,
23
- comment: "e.g., RSOC, Tonic, Explorer, InMobi",
24
22
  },
25
23
  feedName: {
26
24
  type: DataTypes.STRING,
27
25
  allowNull: false,
28
- comment: "e.g., TNC, SDO, RSOC",
29
26
  },
30
27
  vertical: {
31
28
  type: DataTypes.STRING,
@@ -43,18 +40,15 @@ module.exports = (sequelize, DataTypes) => {
43
40
  topics: {
44
41
  type: DataTypes.ARRAY(DataTypes.STRING),
45
42
  allowNull: true,
46
- comment: "List of topics (3-5 mandatory in UI)",
47
43
  },
48
44
  keywords: {
49
45
  type: DataTypes.ARRAY(DataTypes.STRING),
50
46
  allowNull: true,
51
- comment: "Main keyword and related terms",
52
47
  },
53
48
  date: {
54
49
  type: DataTypes.DATE,
55
50
  allowNull: true,
56
51
  defaultValue: DataTypes.NOW,
57
- comment: "Creation date of the article",
58
52
  },
59
53
  nativeKeyword: {
60
54
  type: DataTypes.STRING,
@@ -63,7 +57,6 @@ module.exports = (sequelize, DataTypes) => {
63
57
  suggestedKeywords: {
64
58
  type: DataTypes.STRING,
65
59
  allowNull: true,
66
- comment: "Comma-separated list of related terms",
67
60
  },
68
61
  articleExcerpt: {
69
62
  type: DataTypes.TEXT,
@@ -79,8 +72,8 @@ module.exports = (sequelize, DataTypes) => {
79
72
  },
80
73
  status: {
81
74
  type: DataTypes.STRING,
75
+ allowNull: false,
82
76
  defaultValue: "pending",
83
- comment: "e.g., pending, approved, rejected",
84
77
  },
85
78
  createdAt: {
86
79
  type: DataTypes.DATE,
@@ -90,6 +83,14 @@ module.exports = (sequelize, DataTypes) => {
90
83
  type: DataTypes.DATE,
91
84
  defaultValue: DataTypes.NOW,
92
85
  },
86
+ buyer: {
87
+ type: DataTypes.STRING,
88
+ allowNull: true,
89
+ },
90
+ country: {
91
+ type: DataTypes.STRING,
92
+ allowNull: true,
93
+ },
93
94
  },
94
95
  {
95
96
  tableName: "articles",
@@ -106,5 +107,9 @@ module.exports = (sequelize, DataTypes) => {
106
107
  });
107
108
  };
108
109
 
110
+ Article.prototype.isAvailableForCampaign = function () {
111
+ return this.status === "approved";
112
+ };
113
+
109
114
  return Article;
110
115
  };
package/models/Channel.js CHANGED
@@ -8,22 +8,19 @@ module.exports = (sequelize, DataTypes) => {
8
8
  autoIncrement: true,
9
9
  },
10
10
  channelId: {
11
- type: DataTypes.STRING(255), // הגדרה מפורשת של VARCHAR(255)
11
+ type: DataTypes.STRING(255),
12
12
  allowNull: false,
13
- unique: true, // חזרה להגדרת unique בשדה עצמו
14
- comment: "Channel ID (e.g., ch123+ch456)",
13
+ unique: true,
15
14
  },
16
15
  styleId: {
17
16
  type: DataTypes.STRING,
18
17
  allowNull: true,
19
18
  defaultValue: "3544685732",
20
- comment: "Style ID (stid)",
21
19
  },
22
20
  connectedCampaigns: {
23
21
  type: DataTypes.JSON,
24
22
  allowNull: true,
25
23
  defaultValue: [],
26
- comment: "List of connected campaign AGRS_CID values",
27
24
  },
28
25
  createdAt: {
29
26
  type: DataTypes.DATE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agrs-sequelize-sdk",
3
- "version": "1.1.42",
3
+ "version": "1.1.44",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "start": "node index.js",