@itleanchatbot/shared-models-js-postgres 2.2.0 → 2.3.0
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/migrations/20211025155825-create-stopwords.js +0 -2
- package/src/seeders/20210505134700-insert-profiles-permissions.js +6 -6
- package/src/seeders/20210505140658-insert-channel-configurations.js +7 -7
- package/src/seeders/20210618132740-add-new-channel-configutations.js +7 -7
- package/src/seeders/20210817081230-insert-profiles-permissions.js +1 -1
- package/src/seeders/20210830131930-insert-profiles-permissions.js +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const models = require('./../models')
|
|
2
1
|
const profiles = [
|
|
3
2
|
{
|
|
4
3
|
name: 'Master',
|
|
@@ -54,10 +53,11 @@ module.exports = {
|
|
|
54
53
|
['id']
|
|
55
54
|
)
|
|
56
55
|
|
|
57
|
-
const per = await queryInterface.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
const per = await queryInterface.sequelize.query(
|
|
57
|
+
`SELECT id FROM "Permissions" where "permissionCode" IN (${prof.permissions.map(item => `'${item}'`).join(',')})`,
|
|
58
|
+
{
|
|
59
|
+
type: queryInterface.sequelize.QueryTypes.SELECT
|
|
60
|
+
}
|
|
61
61
|
)
|
|
62
62
|
|
|
63
63
|
prof_per = prof_per.concat(
|
|
@@ -74,7 +74,7 @@ module.exports = {
|
|
|
74
74
|
|
|
75
75
|
return queryInterface.bulkInsert('Profiles_Permissions', prof_per)
|
|
76
76
|
},
|
|
77
|
-
down: async (queryInterface
|
|
77
|
+
down: async (queryInterface) => {
|
|
78
78
|
return queryInterface.bulkDelete('Profiles_Permissions', null, {})
|
|
79
79
|
},
|
|
80
80
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const models = require('../models')
|
|
2
|
-
|
|
3
1
|
const configurations = {
|
|
4
2
|
webchat: [
|
|
5
3
|
{
|
|
@@ -112,10 +110,12 @@ const configurations = {
|
|
|
112
110
|
}
|
|
113
111
|
|
|
114
112
|
module.exports = {
|
|
115
|
-
up: async (queryInterface
|
|
116
|
-
const channelTypes = await queryInterface.
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
up: async (queryInterface) => {
|
|
114
|
+
const channelTypes = await queryInterface.sequelize.query(
|
|
115
|
+
`SELECT * FROM "ChannelTypes"`,
|
|
116
|
+
{
|
|
117
|
+
type: queryInterface.sequelize.QueryTypes.SELECT
|
|
118
|
+
}
|
|
119
119
|
)
|
|
120
120
|
|
|
121
121
|
let channelConfigurations = []
|
|
@@ -140,7 +140,7 @@ module.exports = {
|
|
|
140
140
|
channelConfigurations
|
|
141
141
|
)
|
|
142
142
|
},
|
|
143
|
-
down: async (queryInterface
|
|
143
|
+
down: async (queryInterface) => {
|
|
144
144
|
return queryInterface.bulkDelete('ChannelConfigurations', null, {})
|
|
145
145
|
},
|
|
146
146
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const models = require('../models')
|
|
2
|
-
|
|
3
1
|
const configurations = {
|
|
4
2
|
whatsapp_gupshup: [
|
|
5
3
|
{
|
|
@@ -11,10 +9,12 @@ const configurations = {
|
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
module.exports = {
|
|
14
|
-
up: async (queryInterface
|
|
15
|
-
const channelTypes = await queryInterface.
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
up: async (queryInterface) => {
|
|
13
|
+
const channelTypes = await queryInterface.sequelize.query(
|
|
14
|
+
`SELECT * FROM "ChannelTypes"`,
|
|
15
|
+
{
|
|
16
|
+
type: queryInterface.sequelize.QueryTypes.SELECT
|
|
17
|
+
}
|
|
18
18
|
)
|
|
19
19
|
|
|
20
20
|
let channelConfigurations = []
|
|
@@ -39,7 +39,7 @@ module.exports = {
|
|
|
39
39
|
channelConfigurations
|
|
40
40
|
)
|
|
41
41
|
},
|
|
42
|
-
down: async (queryInterface
|
|
42
|
+
down: async (queryInterface) => {
|
|
43
43
|
return queryInterface.bulkDelete('ChannelConfigurations', null, {})
|
|
44
44
|
},
|
|
45
45
|
}
|