289 lines
9.0 KiB
Go
289 lines
9.0 KiB
Go
package handlers
|
|
|
|
import (
|
|
domain "Rezina-Backend/internal/domain"
|
|
time "time"
|
|
)
|
|
|
|
// MessageResponse is returned by operations with no data payload. Metadata is
|
|
// reserved and currently null; data is omitted by the runtime JSON encoder.
|
|
type MessageResponse struct {
|
|
Message string `json:"message"`
|
|
Success bool `json:"success"`
|
|
StatusCode int `json:"status_code"`
|
|
// Always null for message-only domain responses.
|
|
Metadata *NullResponseValue `json:"metadata" extensions:"x-nullable"`
|
|
}
|
|
|
|
// NullResponseValue represents a reserved null field (never a populated object).
|
|
// @Description Reserved metadata value. Always null; no object properties are returned.
|
|
type NullResponseValue struct{}
|
|
|
|
// MessageAPIResponse is the alternate envelope used by legacy account operations.
|
|
type MessageAPIResponse struct {
|
|
Status string `json:"status" enums:"success,error"`
|
|
Message string `json:"message"`
|
|
Timestamp time.Time `json:"timestamp"`
|
|
}
|
|
|
|
// Endpoint-specific payloads mirror the JSON fields returned by handlers.
|
|
|
|
type DeleteEmailTemplateData struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type RawQuestionSetResponse struct {
|
|
BannerImage *string `json:"BannerImage"`
|
|
CreatedAt time.Time `json:"CreatedAt"`
|
|
Description *string `json:"Description"`
|
|
ID int64 `json:"ID"`
|
|
IntroVideoURL *string `json:"IntroVideoURL"`
|
|
OwnerID *int64 `json:"OwnerID"`
|
|
OwnerType *string `json:"OwnerType"`
|
|
PassingScore *int32 `json:"PassingScore"`
|
|
Persona *string `json:"Persona"`
|
|
SetType string `json:"SetType"`
|
|
ShuffleQuestions bool `json:"ShuffleQuestions"`
|
|
Status string `json:"Status"`
|
|
TimeLimitMinutes *int32 `json:"TimeLimitMinutes"`
|
|
Title string `json:"Title"`
|
|
UpdatedAt *time.Time `json:"UpdatedAt"`
|
|
UserPersonas []domain.UserPersona `json:"UserPersonas"`
|
|
}
|
|
|
|
type ListExamPrepAssessmentsData struct {
|
|
Assessments []RawQuestionSetResponse `json:"assessments"`
|
|
}
|
|
|
|
type LinkExamPrepAssessmentData struct {
|
|
Assessment RawQuestionSetResponse `json:"assessment"`
|
|
ParentId int64 `json:"parent_id"`
|
|
ParentKind string `json:"parent_kind"`
|
|
}
|
|
|
|
type ListAllExamPrepPracticesData struct {
|
|
Limit int `json:"limit"`
|
|
Offset int `json:"offset"`
|
|
Practices []domain.ExamPrepPractice `json:"practices"`
|
|
TotalCount int64 `json:"total_count"`
|
|
}
|
|
|
|
type ListExamPrepPracticesByLessonData struct {
|
|
Limit int `json:"limit"`
|
|
Offset int `json:"offset"`
|
|
Practices []domain.ExamPrepPractice `json:"practices"`
|
|
TotalCount int64 `json:"total_count"`
|
|
}
|
|
|
|
type ListExamPrepPracticesByCatalogCourseData struct {
|
|
Limit int `json:"limit"`
|
|
Offset int `json:"offset"`
|
|
Practices []domain.ExamPrepPractice `json:"practices"`
|
|
TotalCount int64 `json:"total_count"`
|
|
}
|
|
|
|
type ListExamPrepPracticesByUnitData struct {
|
|
Limit int `json:"limit"`
|
|
Offset int `json:"offset"`
|
|
Practices []domain.ExamPrepPractice `json:"practices"`
|
|
TotalCount int64 `json:"total_count"`
|
|
}
|
|
|
|
type DeleteFAQData struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type ListFieldKeysData struct {
|
|
Fields []string `json:"fields"`
|
|
}
|
|
|
|
type GetFileURLData struct {
|
|
Url string `json:"url"`
|
|
}
|
|
|
|
type RefreshFileURLData struct {
|
|
ExpiresIn int `json:"expires_in"`
|
|
ObjectKey string `json:"object_key"`
|
|
Url string `json:"url"`
|
|
}
|
|
|
|
type UploadAudioData struct {
|
|
ContentType string `json:"content_type"`
|
|
ObjectKey string `json:"object_key"`
|
|
Url string `json:"url"`
|
|
}
|
|
|
|
type SubmitAudioAnswerData struct {
|
|
AudioUrl string `json:"audio_url"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
Id int64 `json:"id"`
|
|
QuestionId int64 `json:"question_id"`
|
|
QuestionSetId int64 `json:"question_set_id"`
|
|
}
|
|
|
|
type DeleteInAppNotificationsData struct {
|
|
DeletedCount int64 `json:"deleted_count"`
|
|
RequestedIds int `json:"requested_ids"`
|
|
}
|
|
|
|
type GetUserNotificationResponse struct {
|
|
Limit int `json:"limit"`
|
|
Notifications []domain.Notification `json:"notifications"`
|
|
Offset int `json:"offset"`
|
|
TotalCount int64 `json:"total_count"`
|
|
}
|
|
|
|
type CountUnreadNotificationsResponse struct {
|
|
Unread int64 `json:"unread"`
|
|
}
|
|
|
|
type GetAllNotificationsResponse struct {
|
|
Limit int `json:"limit"`
|
|
Notifications []domain.Notification `json:"notifications"`
|
|
Page int `json:"page"`
|
|
TotalCount int64 `json:"total_count"`
|
|
}
|
|
|
|
type SendTestPushNotificationData struct {
|
|
DevicesCount int `json:"devices_count"`
|
|
Image string `json:"image"`
|
|
Message string `json:"message"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
type SendBulkPushNotificationData struct {
|
|
DevicesTargeted int `json:"devices_targeted"`
|
|
Failed int `json:"failed"`
|
|
Image string `json:"image"`
|
|
Sent int `json:"sent"`
|
|
TargetUsers int `json:"target_users"`
|
|
}
|
|
|
|
type SendBulkSMSData struct {
|
|
Failed int `json:"failed"`
|
|
Sent int `json:"sent"`
|
|
TotalRecipients int `json:"total_recipients"`
|
|
}
|
|
|
|
type SendBulkInAppNotificationData struct {
|
|
Failed int `json:"failed"`
|
|
Sent int `json:"sent"`
|
|
TeamMemberRecipients int `json:"team_member_recipients"`
|
|
TotalRecipients int `json:"total_recipients"`
|
|
UserRecipients int `json:"user_recipients"`
|
|
}
|
|
|
|
type ListScheduledNotificationsResponse struct {
|
|
Limit int `json:"limit"`
|
|
Page int `json:"page"`
|
|
ScheduledNotifications []domain.ScheduledNotification `json:"scheduled_notifications"`
|
|
TotalCount int64 `json:"total_count"`
|
|
}
|
|
|
|
type SendBulkEmailData struct {
|
|
Failed int `json:"failed"`
|
|
Sent int `json:"sent"`
|
|
TeamMemberRecipients int `json:"team_member_recipients"`
|
|
TotalRecipients int `json:"total_recipients"`
|
|
UserRecipients int `json:"user_recipients"`
|
|
}
|
|
|
|
type ValidateQuestionTypeDefinitionData struct {
|
|
Valid bool `json:"valid"`
|
|
}
|
|
|
|
type UpdateQuestionTypeDefinitionData struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type DeleteQuestionTypeDefinitionData struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type DeleteQuestionTypeDefinitionGroupData struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type AddQuestionToSetData struct {
|
|
AssociatedQuestionId *int64 `json:"associated_question_id"`
|
|
DisplayOrder int32 `json:"display_order"`
|
|
Id int64 `json:"id"`
|
|
QuestionId int64 `json:"question_id"`
|
|
SetId int64 `json:"set_id"`
|
|
}
|
|
|
|
type ListRolesData struct {
|
|
Page int64 `json:"page"`
|
|
PageSize int64 `json:"page_size"`
|
|
Roles []domain.RoleRecord `json:"roles"`
|
|
Total int64 `json:"total"`
|
|
}
|
|
|
|
type CheckSubscriptionStatusData struct {
|
|
HasActiveSubscription bool `json:"has_active_subscription"`
|
|
}
|
|
|
|
type documentAdminGetSampleVideoData struct {
|
|
Iframe string `json:"iframe"`
|
|
Video VimeoVideoResponse `json:"video"`
|
|
}
|
|
|
|
type RevokeTeamInvitationData struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type CheckProfileCompletedData struct {
|
|
IsProfileCompleted bool `json:"is_profile_completed"`
|
|
ProfileCompletionPercentage int `json:"profile_completion_percentage"`
|
|
}
|
|
|
|
type CheckUserPendingData struct {
|
|
IsPending bool `json:"is_pending"`
|
|
}
|
|
|
|
type GetAllUsersData struct {
|
|
Total int64 `json:"total"`
|
|
Users []domain.UserProfileResponse `json:"users"`
|
|
}
|
|
|
|
type ListAccountDeletionRequestsData struct {
|
|
Items []domain.AccountDeletionRequest `json:"items"`
|
|
Page int64 `json:"page"`
|
|
PageSize int64 `json:"page_size"`
|
|
Total int64 `json:"total"`
|
|
}
|
|
|
|
type DeleteMyUserAccountData struct {
|
|
CanCancelUntilAt time.Time `json:"can_cancel_until_at"`
|
|
GracePeriodDays int `json:"grace_period_days"`
|
|
ScheduledPurgeAt time.Time `json:"scheduled_purge_at"`
|
|
}
|
|
|
|
type PurgeDueDeletedUsersData struct {
|
|
BatchLimit int32 `json:"batch_limit"`
|
|
DeletedCount int64 `json:"deleted_count"`
|
|
}
|
|
|
|
type UploadProfilePictureData struct {
|
|
ProfilePictureUrl string `json:"profile_picture_url"`
|
|
}
|
|
|
|
type GetSampleVideoData struct {
|
|
Iframe string `json:"iframe"`
|
|
Video VimeoVideoResponse `json:"video"`
|
|
}
|
|
|
|
// VimeoUploadResultData preserves the raw service result's existing JSON names.
|
|
type VimeoUploadResultData struct {
|
|
VimeoID string `json:"VimeoID"`
|
|
URI string `json:"URI"`
|
|
Link string `json:"Link"`
|
|
UploadLink string `json:"UploadLink"`
|
|
Status string `json:"Status"`
|
|
}
|
|
|
|
type VimeoTranscodeStatusData struct {
|
|
VideoID string `json:"video_id"`
|
|
Status string `json:"status"`
|
|
}
|