agrs-sequelize-sdk 1.1.77 → 1.1.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.
- package/models/AdAccountValues.js +25 -25
- package/models/AdHistory.js +30 -30
- package/models/AdSetHistory.js +30 -30
- package/models/AdsetPerformance.js +111 -111
- package/models/Article.js +156 -156
- package/models/Buyers.js +25 -25
- package/models/CampaignCreationLog.js +86 -86
- package/models/CampaignHistory.js +33 -33
- package/models/Channel.js +55 -55
- package/models/Domain.js +25 -25
- package/models/Feed.js +33 -33
- package/models/Pages.js +73 -73
- package/models/PipelineExecution.js +46 -46
- package/models/RSOCFeedCampaign.js +293 -293
- package/models/RsocKeywordPerformance.js +102 -0
- package/models/RulesValues.js +56 -56
- package/models/Vertical.js +25 -25
- package/models/newFiles.js +68 -68
- package/package.json +21 -19
- package/run.sh +214 -214
package/models/RulesValues.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
module.exports = (sequelize, DataTypes) => {
|
|
2
|
-
const RulesValues = sequelize.define(
|
|
3
|
-
"RulesValues",
|
|
4
|
-
{
|
|
5
|
-
id: {
|
|
6
|
-
type: DataTypes.UUID,
|
|
7
|
-
defaultValue: DataTypes.UUIDV4,
|
|
8
|
-
primaryKey: true,
|
|
9
|
-
},
|
|
10
|
-
name: {
|
|
11
|
-
type: DataTypes.STRING,
|
|
12
|
-
allowNull: false,
|
|
13
|
-
},
|
|
14
|
-
code: {
|
|
15
|
-
type: DataTypes.STRING,
|
|
16
|
-
allowNull: false,
|
|
17
|
-
unique: true,
|
|
18
|
-
},
|
|
19
|
-
permissions: {
|
|
20
|
-
type: DataTypes.ARRAY(DataTypes.STRING),
|
|
21
|
-
allowNull: false,
|
|
22
|
-
defaultValue: [],
|
|
23
|
-
},
|
|
24
|
-
feature: {
|
|
25
|
-
type: DataTypes.STRING,
|
|
26
|
-
allowNull: true,
|
|
27
|
-
},
|
|
28
|
-
parentId: {
|
|
29
|
-
type: DataTypes.UUID,
|
|
30
|
-
allowNull: true,
|
|
31
|
-
references: {
|
|
32
|
-
model: "RulesValues",
|
|
33
|
-
key: "id",
|
|
34
|
-
},
|
|
35
|
-
onDelete: "CASCADE",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
tableName: "RulesValues",
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
// Self-referential association to define sub-rules
|
|
44
|
-
RulesValues.hasMany(RulesValues, {
|
|
45
|
-
as: "subRules",
|
|
46
|
-
foreignKey: "parentId",
|
|
47
|
-
onDelete: "CASCADE",
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
RulesValues.belongsTo(RulesValues, {
|
|
51
|
-
as: "parentRule",
|
|
52
|
-
foreignKey: "parentId",
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
return RulesValues;
|
|
56
|
-
};
|
|
1
|
+
module.exports = (sequelize, DataTypes) => {
|
|
2
|
+
const RulesValues = sequelize.define(
|
|
3
|
+
"RulesValues",
|
|
4
|
+
{
|
|
5
|
+
id: {
|
|
6
|
+
type: DataTypes.UUID,
|
|
7
|
+
defaultValue: DataTypes.UUIDV4,
|
|
8
|
+
primaryKey: true,
|
|
9
|
+
},
|
|
10
|
+
name: {
|
|
11
|
+
type: DataTypes.STRING,
|
|
12
|
+
allowNull: false,
|
|
13
|
+
},
|
|
14
|
+
code: {
|
|
15
|
+
type: DataTypes.STRING,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
unique: true,
|
|
18
|
+
},
|
|
19
|
+
permissions: {
|
|
20
|
+
type: DataTypes.ARRAY(DataTypes.STRING),
|
|
21
|
+
allowNull: false,
|
|
22
|
+
defaultValue: [],
|
|
23
|
+
},
|
|
24
|
+
feature: {
|
|
25
|
+
type: DataTypes.STRING,
|
|
26
|
+
allowNull: true,
|
|
27
|
+
},
|
|
28
|
+
parentId: {
|
|
29
|
+
type: DataTypes.UUID,
|
|
30
|
+
allowNull: true,
|
|
31
|
+
references: {
|
|
32
|
+
model: "RulesValues",
|
|
33
|
+
key: "id",
|
|
34
|
+
},
|
|
35
|
+
onDelete: "CASCADE",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
tableName: "RulesValues",
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
// Self-referential association to define sub-rules
|
|
44
|
+
RulesValues.hasMany(RulesValues, {
|
|
45
|
+
as: "subRules",
|
|
46
|
+
foreignKey: "parentId",
|
|
47
|
+
onDelete: "CASCADE",
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
RulesValues.belongsTo(RulesValues, {
|
|
51
|
+
as: "parentRule",
|
|
52
|
+
foreignKey: "parentId",
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
return RulesValues;
|
|
56
|
+
};
|
package/models/Vertical.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
module.exports = (sequelize, DataTypes) => {
|
|
2
|
-
const Vertical = sequelize.define(
|
|
3
|
-
"Vertical",
|
|
4
|
-
{
|
|
5
|
-
id: {
|
|
6
|
-
type: DataTypes.UUID,
|
|
7
|
-
defaultValue: DataTypes.UUIDV4,
|
|
8
|
-
primaryKey: true,
|
|
9
|
-
},
|
|
10
|
-
name: {
|
|
11
|
-
type: DataTypes.STRING,
|
|
12
|
-
allowNull: false,
|
|
13
|
-
},
|
|
14
|
-
code: {
|
|
15
|
-
type: DataTypes.STRING,
|
|
16
|
-
allowNull: false,
|
|
17
|
-
unique: true,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
tableName: "Vertical",
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
return Vertical;
|
|
1
|
+
module.exports = (sequelize, DataTypes) => {
|
|
2
|
+
const Vertical = sequelize.define(
|
|
3
|
+
"Vertical",
|
|
4
|
+
{
|
|
5
|
+
id: {
|
|
6
|
+
type: DataTypes.UUID,
|
|
7
|
+
defaultValue: DataTypes.UUIDV4,
|
|
8
|
+
primaryKey: true,
|
|
9
|
+
},
|
|
10
|
+
name: {
|
|
11
|
+
type: DataTypes.STRING,
|
|
12
|
+
allowNull: false,
|
|
13
|
+
},
|
|
14
|
+
code: {
|
|
15
|
+
type: DataTypes.STRING,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
unique: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
tableName: "Vertical",
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
return Vertical;
|
|
26
26
|
};
|
package/models/newFiles.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
module.exports = (sequelize, DataTypes) => {
|
|
2
|
-
const NewFiles = sequelize.define("NewFiles", {
|
|
3
|
-
id: {
|
|
4
|
-
type: DataTypes.STRING,
|
|
5
|
-
primaryKey: true,
|
|
6
|
-
},
|
|
7
|
-
accounts: {
|
|
8
|
-
type: DataTypes.JSONB(),
|
|
9
|
-
allowNull: true,
|
|
10
|
-
},
|
|
11
|
-
name: {
|
|
12
|
-
type: DataTypes.STRING,
|
|
13
|
-
allowNull: false,
|
|
14
|
-
},
|
|
15
|
-
// need to add a field of the name in the gcp bucket
|
|
16
|
-
gcpFileName: {
|
|
17
|
-
type: DataTypes.STRING,
|
|
18
|
-
allowNull: true,
|
|
19
|
-
},
|
|
20
|
-
type: {
|
|
21
|
-
type: DataTypes.STRING, // Can be "image" or "video"
|
|
22
|
-
allowNull: false,
|
|
23
|
-
},
|
|
24
|
-
URL: {
|
|
25
|
-
type: DataTypes.STRING, // URL for the file
|
|
26
|
-
allowNull: false,
|
|
27
|
-
},
|
|
28
|
-
FileType: {
|
|
29
|
-
type: DataTypes.STRING,
|
|
30
|
-
allowNull: true,
|
|
31
|
-
defaultValue: "image",
|
|
32
|
-
},
|
|
33
|
-
Size: {
|
|
34
|
-
type: DataTypes.STRING,
|
|
35
|
-
allowNull: true,
|
|
36
|
-
},
|
|
37
|
-
Language: {
|
|
38
|
-
type: DataTypes.STRING,
|
|
39
|
-
allowNull: true,
|
|
40
|
-
},
|
|
41
|
-
Vertical: {
|
|
42
|
-
type: DataTypes.STRING,
|
|
43
|
-
allowNull: true,
|
|
44
|
-
},
|
|
45
|
-
// want to add length ( duration of the video) if the file is a video.
|
|
46
|
-
// maybe call it duration
|
|
47
|
-
Duration: {
|
|
48
|
-
type: DataTypes.STRING,
|
|
49
|
-
allowNull: true,
|
|
50
|
-
},
|
|
51
|
-
// Thumbnail URL
|
|
52
|
-
Thumbnail: {
|
|
53
|
-
type: DataTypes.TEXT,
|
|
54
|
-
allowNull: true,
|
|
55
|
-
},
|
|
56
|
-
Thumbnai2: {
|
|
57
|
-
type: DataTypes.TEXT,
|
|
58
|
-
allowNull: true,
|
|
59
|
-
},
|
|
60
|
-
// ImageHash
|
|
61
|
-
ImageHash: {
|
|
62
|
-
type: DataTypes.STRING,
|
|
63
|
-
allowNull: true,
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
return NewFiles;
|
|
68
|
-
};
|
|
1
|
+
module.exports = (sequelize, DataTypes) => {
|
|
2
|
+
const NewFiles = sequelize.define("NewFiles", {
|
|
3
|
+
id: {
|
|
4
|
+
type: DataTypes.STRING,
|
|
5
|
+
primaryKey: true,
|
|
6
|
+
},
|
|
7
|
+
accounts: {
|
|
8
|
+
type: DataTypes.JSONB(),
|
|
9
|
+
allowNull: true,
|
|
10
|
+
},
|
|
11
|
+
name: {
|
|
12
|
+
type: DataTypes.STRING,
|
|
13
|
+
allowNull: false,
|
|
14
|
+
},
|
|
15
|
+
// need to add a field of the name in the gcp bucket
|
|
16
|
+
gcpFileName: {
|
|
17
|
+
type: DataTypes.STRING,
|
|
18
|
+
allowNull: true,
|
|
19
|
+
},
|
|
20
|
+
type: {
|
|
21
|
+
type: DataTypes.STRING, // Can be "image" or "video"
|
|
22
|
+
allowNull: false,
|
|
23
|
+
},
|
|
24
|
+
URL: {
|
|
25
|
+
type: DataTypes.STRING, // URL for the file
|
|
26
|
+
allowNull: false,
|
|
27
|
+
},
|
|
28
|
+
FileType: {
|
|
29
|
+
type: DataTypes.STRING,
|
|
30
|
+
allowNull: true,
|
|
31
|
+
defaultValue: "image",
|
|
32
|
+
},
|
|
33
|
+
Size: {
|
|
34
|
+
type: DataTypes.STRING,
|
|
35
|
+
allowNull: true,
|
|
36
|
+
},
|
|
37
|
+
Language: {
|
|
38
|
+
type: DataTypes.STRING,
|
|
39
|
+
allowNull: true,
|
|
40
|
+
},
|
|
41
|
+
Vertical: {
|
|
42
|
+
type: DataTypes.STRING,
|
|
43
|
+
allowNull: true,
|
|
44
|
+
},
|
|
45
|
+
// want to add length ( duration of the video) if the file is a video.
|
|
46
|
+
// maybe call it duration
|
|
47
|
+
Duration: {
|
|
48
|
+
type: DataTypes.STRING,
|
|
49
|
+
allowNull: true,
|
|
50
|
+
},
|
|
51
|
+
// Thumbnail URL
|
|
52
|
+
Thumbnail: {
|
|
53
|
+
type: DataTypes.TEXT,
|
|
54
|
+
allowNull: true,
|
|
55
|
+
},
|
|
56
|
+
Thumbnai2: {
|
|
57
|
+
type: DataTypes.TEXT,
|
|
58
|
+
allowNull: true,
|
|
59
|
+
},
|
|
60
|
+
// ImageHash
|
|
61
|
+
ImageHash: {
|
|
62
|
+
type: DataTypes.STRING,
|
|
63
|
+
allowNull: true,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
return NewFiles;
|
|
68
|
+
};
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "agrs-sequelize-sdk",
|
|
3
|
+
"version": "1.1.78",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "node index.js",
|
|
7
|
+
"sync": "node services/sequelizeService.js",
|
|
8
|
+
"test": "echo \"Error: no test specified\" \u0026\u0026 exit 1"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
|
|
12
|
+
],
|
|
13
|
+
"author": "",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"description": "",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"pg": "^8.13.0",
|
|
18
|
+
"pg-hstore": "^2.3.4",
|
|
19
|
+
"sequelize": "^6.37.4"
|
|
20
|
+
}
|
|
21
|
+
}
|