Officially documented release

This commit is contained in:
2025-11-10 10:10:46 +11:00
parent 1bb7661f94
commit 4c58351635
23 changed files with 282 additions and 214 deletions

View File

@@ -1,10 +1,21 @@
package models
// AnalyticsConversationWithAttributesQuery is used to bind the results of a paginated GenesysCloud API request.
type AnalyticsConversationWithAttributesQuery struct {
Conversations []AnalyticsConversationWithAttributes `json:"conversations"`
Cursor *string `json:"cursor"`
}
// AnalyticsConversationWithAttributes is used to bind the results of a GenesysCloud API request.
//
// It is a hierarchical structure (Participants has many Sessions has many Segments) and needs to be flattened into multiple tables prior to being saved in the database.
//
// The following payload JSON fields have an expected structure:
// - Participants
// - Participants.Sessions
// - Participants.Sessions.MediaEndpointStats
// - Participants.Sessions.Metrics
// - Participants.Sessions.Segments
type AnalyticsConversationWithAttributes struct {
ConversationEnd string `json:"conversationEnd"`
ConversationId string `json:"conversationId"`
@@ -58,10 +69,23 @@ type AnalyticsConversationWithAttributes struct {
} `json:"participants"`
}
// AnalyticsConversationWithoutAttributesQuery is used to bind the results of a paginated GenesysCloud API request.
type AnalyticsConversationWithoutAttributesQuery struct {
Conversations []AnalyticsConversationWithoutAttributes `json:"conversations"`
TotalHits int `json:"totalHits"`
}
// AnalyticsConversationWithoutAttributes is used to bind the results of a GenesysCloud API request.
//
// It is a hierarchical structure (Participants has many Sessions has many Segments) and needs to be flattened into multiple tables prior to being saved in the database.
//
// The following payload JSON fields have an expected structure:
// - Participants
// - Participants.Sessions
// - Participants.Sessions.Segments
// - Participants.Sessions.Flow
// - Participants.Sessions.Metrics
// - Participants.Sessions.MediaEndpointStats
type AnalyticsConversationWithoutAttributes struct {
ConversationId string `json:"conversationId"`
ConversationStart string `json:"conversationStart"`
@@ -127,6 +151,16 @@ type AnalyticsConversationWithoutAttributes struct {
} `json:"participants"`
}
// NotificationConversationWithAttributes is used to bind the results of a GenesysCloud websocket notification.
//
// It is a hierarchical structure (Participants has many Sessions has many Segments) and needs to be flattened into multiple tables prior to being saved in the database.
//
// The following payload JSON fields have an expected structure:
// - Divisions
// - Divisions.Division
// - Divisions.Entities
// - Participants
// - Participants.Calls
type NotificationConversationWithAttributes struct {
Address string `json:"address"`
Divisions []struct {
@@ -185,12 +219,16 @@ type NotificationConversationWithAttributes struct {
UtilizationLabelId string `json:"utilizationLabelId"`
}
// UsersQuery is used to bind the results of an GenesysCloud API request to get all users.
type UsersQuery struct {
Entities []GCUser `json:"entities"`
PageSize int `json:"pageSize"`
Total int `json:"total"`
}
// GCUser is a model used to store the results of GenesysCloud users.
//
// Given the similarity between the API requests returned value and the desired database schema, the DB model is used in UsersQuery, and also to upload directly to the database. No additional formatting work is required.
type GCUser struct {
Id string `json:"id" gorm:"primaryKey"`
Name string `json:"name"`