-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.go
254 lines (227 loc) · 4.59 KB
/
automations.go
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
package models
import "database/sql"
type AutomationListsParams struct {
Search_By string
Fields string
Company_Id int
Agent_Id int
StartFrom int
Limit int
Name string
}
type LoadAutomationsParams struct {
Search_By string
Fields string
Company_Id int
Agent_Id int
Used_For string
StartFrom int
Limit int
Name string
}
type LoadSingleAutomationsParams struct {
Search_By string
Fields string
Company_Id int
Name string
Automation_Id int
Parent_Id string
Order_By string
Limit int
}
type AddAutomationParams struct {
Company_Id int
Agent_Id int
Used_For string
Name string
Date string
Default_Trigger interface{}
Version int
Tx *sql.Tx
}
type AddMultipleStepsParams struct {
Company_Id int
Agent_Id int
Automation_Id int
Step_UID string
Step_Type string
Parent_Id string
Parent_UID string
Parent_Type string
Step_Position string
Children string
Event_Info string
}
type UpdateAutomationParams struct {
Update_Type string
Company_Id int
Agent_Id int
Automation_Id int
Automation_Name string
Parent_Id int
Trigger interface{}
Assigned_Agents interface{}
Must_Update bool
Status string
Is_Published string
Tx *sql.Tx
}
type LoadAutomationsStepsParams struct {
Company_Id int
Automation_Id int
Fields string
}
type LoadAutomationVersionParams struct {
Fields string
Company_Id int
Parent_Id int
}
type LoadStepDetailsParams struct {
Load_Type string
Fields string
Company_Id int
Automation_Id int
Step_Id int
Step_UID string
Step_Position int
Parent_Type string
}
type LoadStepChildrenParams struct {
Fields string
Company_Id int
Step_Id int
Automation_Id int
}
type AddNewStepParams struct {
Company_Id int
Agent_Id int
Automation_Id int
Tx *sql.Tx
}
type GetStepPositionParams struct {
Company_Id int
Automation_Id int
Old_Position string
New_Step_Id int64
Fields string
}
type UpdateStepParams struct {
Update_Type string
Company_Id int
Agent_Id int
Automation_Id int
Step_Position int
Step_Id int
Must_Update bool
New_Step_Id int64
New_Step_UId string
Old_Step_Id string
Step_UID string
Parent_Id string
Parent_UID string
Parent_Type string
Children interface{}
Event_Info string
Tx *sql.Tx
}
type DeleteStepParams struct {
Company_Id int
Step_Id int
Automation_Id int
Tx *sql.Tx
}
type DeleteAutomationParams struct {
Company_Id int
Automation_Id int
Tx *sql.Tx
}
type DeleteTodoDripsParams struct {
Delete_Type string
Company_Id int
Automation_Id int
Item_Type string
Item_Id int
Tx *sql.Tx
}
type DeleteMultipleTodoDripsParams struct {
Delete_Type string
Company_Id int
Item_Type string
Item_Ids []interface{}
Tx *sql.Tx
}
type TriggerAutomParams struct {
Company_Id int
Automation_Type string
Item_Info map[string]interface{}
Tx *sql.Tx
}
type InitiateCampaignParams struct {
Company_Id int
Automation_Id int
Automation_Name string
Item_Id int
Item_Type string
Agent_Id int
Tx *sql.Tx
}
type AddAutomLogParams struct {
Company_Id int
Automation_Id int
Agent_Id int
Item_Id int
Item_Type string
Event_Name string
Message string
Step_UID string
Date string
Log_Type string
Exception_Message string
Tx *sql.Tx
}
type TodoAutomListsParams struct {
Fields string
Limit int
}
type ProcessNextDripParams struct {
Company_Id int
Automation_Id int
Item_Id int
Item_Type string
Step_Position int
Todo_Id int
Agent_Id int
Tx *sql.Tx
}
type DelTodoStepParams struct {
Company_Id int
Agent_Id int
Automation_Id int
Item_Id int
Item_Type string
Todo_Id int
Tx *sql.Tx
}
type TerminateAutomParams struct {
Company_Id int
Agent_Id int
Automation_Id int
Item_Id int
Item_Type string
Event_Name string
Reason string
Todo_Id string
Step_Position string
Step_UID string
Delete_Todo string
Tx *sql.Tx
}
type AutoTemplateParams struct {
Template_Id int
Company_Id int
Fields string
Template_Type string
}
type CheckPublishedAutomations struct {
Company_Id int
}