@@ -21,6 +21,12 @@ type CallFlow struct {
21
21
// audio file.
22
22
Steps []CallFlowStep
23
23
24
+ // Record instructs the Voice system to record the entire call.
25
+ //
26
+ // Note that this is distinct from the Record CallFlow step which records
27
+ // only a single message from the callee.
28
+ Record bool
29
+
24
30
CreatedAt time.Time
25
31
UpdatedAt time.Time
26
32
}
@@ -29,6 +35,7 @@ type jsonCallFlow struct {
29
35
ID string `json:"id,omitempty"`
30
36
Title string `json:"title"`
31
37
Steps []CallFlowStep `json:"steps"`
38
+ Record bool `json:"record"`
32
39
CreatedAt string `json:"createdAt"`
33
40
UpdatedAt string `json:"updatedAt"`
34
41
}
@@ -40,6 +47,7 @@ func (callflow CallFlow) MarshalJSON() ([]byte, error) {
40
47
Title : callflow .Title ,
41
48
// Steps are able to serialize themselves to JSON.
42
49
Steps : callflow .Steps ,
50
+ Record : callflow .Record ,
43
51
CreatedAt : callflow .CreatedAt .Format (time .RFC3339 ),
44
52
UpdatedAt : callflow .UpdatedAt .Format (time .RFC3339 ),
45
53
}
@@ -95,6 +103,7 @@ func (callflow *CallFlow) UnmarshalJSON(data []byte) error {
95
103
ID : raw .ID ,
96
104
Title : raw .Title ,
97
105
Steps : raw .Steps ,
106
+ Record : raw .Record ,
98
107
CreatedAt : createdAt ,
99
108
UpdatedAt : updatedAt ,
100
109
}
@@ -399,6 +408,9 @@ func (step *CallFlowPauseStep) UnmarshalJSON(data []byte) error {
399
408
400
409
// A CallFlowRecordStep initiates an audio recording during a call, e.g. for
401
410
// capturing a user response.
411
+ //
412
+ // Note that this is distinct from CallFlow.Record which records the entire
413
+ // call.
402
414
type CallFlowRecordStep struct {
403
415
CallFlowStepBase
404
416
0 commit comments