-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathconstants.js
117 lines (95 loc) · 2.65 KB
/
constants.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/**
* Copyright (c) 2016, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or
* https://opensource.org/licenses/BSD-3-Clause
*/
/**
* realtime/constants.js
*/
'use strict';
const bot = {
client: 'pubBot',
channel: 'botChannelName',
roomFilterIndex: 0,
botActionFilterIndex: 1,
botDataFilterIndex: 2,
botEventFilterIndex: 3,
};
module.exports = {
asbPathIndex: 0,
aspectFilterIndex: 1,
subjectTagFilterIndex: 2,
aspectTagFilterIndex: 3,
statusFilterIndex: 4,
filterSeperator: '&',
valuesSeparator: ';',
fieldTypeFieldSeparator: '=',
validFilterTypes: ['INCLUDE', 'EXCLUDE'],
filterTypeInclude: 'INCLUDE',
events: {
subject: {
add: 'refocus.internal.realtime.subject.add',
upd: 'refocus.internal.realtime.subject.update',
del: 'refocus.internal.realtime.subject.remove',
},
botAction: {
add: 'refocus.internal.realtime.bot.action.add',
upd: 'refocus.internal.realtime.bot.action.update',
del: 'refocus.internal.realtime.bot.action.remove',
},
botData: {
add: 'refocus.internal.realtime.bot.data.add',
upd: 'refocus.internal.realtime.bot.data.update',
del: 'refocus.internal.realtime.bot.data.remove',
},
botEvent: {
add: 'refocus.internal.realtime.bot.event.add',
upd: 'refocus.internal.realtime.bot.event.update',
del: 'refocus.internal.realtime.bot.event.remove',
},
room: {
add: 'refocus.internal.realtime.bot.namespace.initialize',
upd: 'refocus.internal.realtime.room.settingsChanged',
del: 'refocus.internal.realtime.room.remove',
},
sample: {
add: 'refocus.internal.realtime.sample.add',
upd: 'refocus.internal.realtime.sample.update',
del: 'refocus.internal.realtime.sample.remove',
nc: 'refocus.internal.realtime.sample.nochange',
},
perspective: {
initialize: 'refocus.internal.realtime.perspective.namespace.initialize',
},
},
bot,
pubOpts: {
botAction: {
client: bot.client,
channel: bot.channel,
filterIndex: bot.botActionFilterIndex,
filterField: 'name',
},
botData: {
client: bot.client,
channel: bot.channel,
filterIndex: bot.botDataFilterIndex,
filterField: 'name',
},
event: {
client: bot.client,
channel: bot.channel,
filterIndex: bot.botEventFilterIndex,
filterField: 'id',
},
room: {
client: bot.client,
channel: bot.channel,
filterIndex: bot.roomFilterIndex,
filterField: 'name',
},
},
pubStatsHash: 'pubstats',
};