Added raw responses and extract utils.
This commit is contained in:
166
models/raw.go
Normal file
166
models/raw.go
Normal file
@@ -0,0 +1,166 @@
|
||||
package models
|
||||
|
||||
type AnalyticsConversationWithAttributes struct {
|
||||
ConversationEnd string `json:"conversationEnd"`
|
||||
ConversationId string `json:"conversationId"`
|
||||
ConversationStart string `json:"conversationStart"`
|
||||
DivisionIds []string `json:"divisionIds"`
|
||||
ExternalTag string `json:"externalTag"`
|
||||
MediaStatsMinConversationMos float32 `json:"mediaStatsMinConversationMos"`
|
||||
MediaStatsMinConversationRFactor float32 `json:"mediaStatsMinConversationRFactor"`
|
||||
OriginatingDirection string `json:"originatingDirection"`
|
||||
Participants []struct {
|
||||
ExternalContactId string `json:"externalContactId"`
|
||||
ParticipantId string `json:"participantId"`
|
||||
ParticipantName string `json:"participantName"`
|
||||
Purpose string `json:"purpose"`
|
||||
Sessions []struct {
|
||||
ANI string `json:"ani"`
|
||||
Direction string `json:"direction"`
|
||||
DNIS string `json:"dnis"`
|
||||
EdgeId string `json:"edgeId"`
|
||||
MediaType string `json:"mediaType"`
|
||||
ProtocolCallId string `json:"protocolCallId"`
|
||||
Provider string `json:"provider"`
|
||||
Recording bool `json:"recording"`
|
||||
RemoteNameDisplayable string `json:"remoteNameDisplayable"`
|
||||
SessionDnis string `json:"sessionDnis"`
|
||||
SessionId string `json:"sessionId"`
|
||||
MediaEndpointStats []struct {
|
||||
Codecs []string `json:"codecs"`
|
||||
EventTime string `json:"eventTime"`
|
||||
MaxLatencyMs int `json:"maxLatencyMs"`
|
||||
MinMos float32 `json:"minMos"`
|
||||
MinRFactor float32 `json:"minRFactor"`
|
||||
ReceivedPackets int `json:"receivedPackets"`
|
||||
} `json:"mediaEndpointStats"`
|
||||
Metrics []struct {
|
||||
EmitDate string `json:"emitDate"`
|
||||
Name string `json:"name"`
|
||||
Value int `json:"value"`
|
||||
} `json:"metrics"`
|
||||
Segments []struct {
|
||||
Conference bool `json:"conference"`
|
||||
DisconnectType string `json:"disconnectType"`
|
||||
Q850ResponseCodes []int `json:"q850ResponseCodes"`
|
||||
SegmentEnd string `json:"segmentEnd"`
|
||||
SegmentStart string `json:"segmentStart"`
|
||||
SegmentType string `json:"segmentType"`
|
||||
WrapUpCode string `json:"wrapUpCode"`
|
||||
} `json:"segments"`
|
||||
} `json:"sessions"`
|
||||
Attributes map[string]any `json:"attributes"`
|
||||
} `json:"participants"`
|
||||
}
|
||||
|
||||
type AnalyticsConversationWithoutAttributesQuery struct {
|
||||
Conversations []AnalyticsConversationWithoutAttributes `json:"conversations"`
|
||||
TotalHits int `json:"totalHits"`
|
||||
}
|
||||
type AnalyticsConversationWithoutAttributes struct {
|
||||
ConversationId string `json:"conversationId"`
|
||||
ConversationStart string `json:"conversationStart"`
|
||||
ConversationEnd string `json:"conversationEnd"`
|
||||
MediaStatsMinConversationMos float32 `json:"mediaStatsMinConversationMos"`
|
||||
MediaStatsMinConversationRFactor float32 `json:"mediaStatsMinConversationRFactor"`
|
||||
OriginatingDirection string `json:"originatingDirection"`
|
||||
DivisionIds []string `json:"divisionIds"`
|
||||
Participants []struct {
|
||||
ParticipantId string `json:"participantId"`
|
||||
ParticipantName string `json:"participantName"`
|
||||
Purpose string `json:"purpose"`
|
||||
ExternalContactId string `json:"externalContactId"`
|
||||
Sessions []struct {
|
||||
MediaType string `json:"mediaType"`
|
||||
SessionId string `json:"sessionId"`
|
||||
ANI string `json:"ani"`
|
||||
Direction string `json:"direction"`
|
||||
DNIS string `json:"dnis"`
|
||||
SessionDNIS string `json:"sessionDnis"`
|
||||
EdgeId string `json:"edgeId"`
|
||||
RemoteNameDisplayable string `json:"remoteNameDisplayable"`
|
||||
Segments []struct {
|
||||
SegmentStart string `json:"segmentStart"`
|
||||
SegmentEnd string `json:"segmentEnd"`
|
||||
WrapUpCode string `json:"wrapUpCode"`
|
||||
DisconnectType string `json:"disconnectType"`
|
||||
SegmentType string `json:"SegmentType"`
|
||||
Q850ResponseCodes []int `json:"q850ResponseCodes"`
|
||||
Conference bool `json:"conference"`
|
||||
} `json:"segments"`
|
||||
Metrics []struct {
|
||||
Name string `json:"name"`
|
||||
Value int `json:"value"`
|
||||
EmitDate string `json:"emitDate"`
|
||||
} `json:"metrics"`
|
||||
MediaEndpointStats []struct {
|
||||
Codecs []string `json:"codecs"`
|
||||
MinMos float32 `json:"minMos"`
|
||||
MinRFactor float32 `json:"minRFactor"`
|
||||
MaxLatencyMs int `json:"maxLatencyMs"`
|
||||
ReceivedPackets int `json:"receivedPackets"`
|
||||
} `json:"mediaEndpointStats"`
|
||||
Recording bool `json:"recording"`
|
||||
ProtocolCallId string `json:"protocolCallId"`
|
||||
Provider string `json:"provider"`
|
||||
} `json:"sessions"`
|
||||
} `json:"participants"`
|
||||
}
|
||||
|
||||
type NotificationConversationWithAttributes struct {
|
||||
Address string `json:"address"`
|
||||
Divisions []struct {
|
||||
Division struct {
|
||||
Id string `json:"id"`
|
||||
SelfUri string `json:"selfUri"`
|
||||
} `json:"division"`
|
||||
Entities []struct {
|
||||
DateDivisionUpdated string `json:"dateDivisionUpdated"`
|
||||
Id string `json:"id"`
|
||||
SelfUri string `json:"selfUri"`
|
||||
} `json:"entities"`
|
||||
} `json:"divisions"`
|
||||
ExternalTag string `json:"externalTag"`
|
||||
Id string `json:"id"`
|
||||
Participants []struct {
|
||||
Address string `json:"address"`
|
||||
Attributes map[string]any `json:"attributes"`
|
||||
Calls []struct {
|
||||
AfterCallWorkRequired bool `json:"afterCallWorkRequired"`
|
||||
Confined bool `json:"confined"`
|
||||
ConnectedTime string `json:"connectedTime"`
|
||||
Direction string `json:"direction"`
|
||||
DisconnectReasons []struct{} `json:"disconnectReasons"`
|
||||
DisconnectType string `json:"disconnectType"`
|
||||
DisconnectedTime string `json:"disconnectedTime"`
|
||||
Held bool `json:"held"`
|
||||
Id string `json:"id"`
|
||||
InitialState string `json:"initialState"`
|
||||
Muted bool `json:"muted"`
|
||||
Other map[string]any `json:"other"`
|
||||
PeerId string `json:"peerId"`
|
||||
Provider string `json:"provider"`
|
||||
Recording bool `json:"recording"`
|
||||
RecordingState string `json:"recordingState"`
|
||||
SecurePause bool `json:"securePause"`
|
||||
Self map[string]any `json:"self"`
|
||||
State string `json:"state"`
|
||||
} `json:"calls"`
|
||||
ConnectedTime string `json:"connectedTime"`
|
||||
EndTime string `json:"endTime"`
|
||||
ExternalContactId string `json:"externalContactId"`
|
||||
ExternalContactInitialDivisionId string `json:"externalContactInitialDivisionId"`
|
||||
Id string `json:"id"`
|
||||
MediaRoles []string `json:"mediaRoles"`
|
||||
Name string `json:"name"`
|
||||
Purpose string `json:"purpose"`
|
||||
QueueId string `json:"queueId"`
|
||||
Wrapup map[string]any `json:"wrapup"`
|
||||
WrapupExpected bool `json:"wrapupExpected"`
|
||||
WrapupRequired bool `json:"wrapupRequired"`
|
||||
} `json:"participants"`
|
||||
RecentTransfers []map[string]any `json:"recentTransfers"`
|
||||
RecordingState string `json:"recordingState"`
|
||||
SecurePause bool `json:"securePause"`
|
||||
UtilizationLabelId string `json:"utilizationLabelId"`
|
||||
}
|
||||
Reference in New Issue
Block a user