package seismic

import (
	"fmt"
	"strings"

	"github.com/amp-labs/connectors/internal/components"
	"github.com/amp-labs/connectors/providers"
)

// nolint:funlen
func supportedOperations() components.EndpointRegistryInput {
	readSupport := []string{
		// These are supported objects in the reporting API,
		// ref: https://developer.seismic.com/seismicsoftware/reference/h1-reporting-api-overview
		"adminImpersonationSessions",
		"aiActivity",
		"aiGeneratedText",
		"aiGeneratedTextUserFeedback",
		"aiSuggestedContentProperties",
		"announcements",
		"answers",
		"assignments",
		"channels",
		"contentActivities",
		"contentAskExperts",
		"contentInsertInstances",
		"contentPages",
		"contentProfiles",
		"contentProfileAssignments",
		"contentProfileAssignmentsHistory",
		"contentProperties",
		"contentPropertyAssignments",
		"contentReviews",
		"contentSlideInsertInstances",
		"contentUsageHistory",
		"contentVersions",
		"contentViewHistory",
		"copilotForSalesDsrRecommendations",
		"copilotForSalesRecommendations",
		"customContents",
		"customContentTypeFields",
		"customContentTypes",
		"customProperties",
		"customPropertyAssignments",
		"customUserFields",
		"customUserFieldValues",
		"dailyActiveUsers",
		"digitalSalesRoomTemplates",
		"digitalSalesRoomTemplateVersions",
		"digitalSalesRoomViewingSessions",
		"digitalSalesRooms",
		"distributionApprovalWorkflowStepsHistory",
		"distributionApprovalWorkflows",
		"emails",
		"emailTemplateInstances",
		"emailTemplateSectionSelections",
		"emailTemplateStaticImages",
		"emailTemplateVariableValues",
		"entitlementRoles",
		"externalContentDetails",
		"externalUsers",
		"favoriteStatus",
		"feedbackCriteria",
		"followStatus",
		"generatedLivedocComponents",
		"generatedLivedocFields",
		"generatedLivedocOutputFormats",
		"generatedLivedocSlides",
		"generatedLivedocs",
		"groupManagers",
		"groupMembers",
		"groups",
		"indirectGroupManagers",
		"indirectGroupMembers",
		"instructorLedTrainingEventAttendance",
		"instructorLedTrainingEventContentAssignments",
		"instructorLedTrainingEventSessions",
		"instructorLedTrainingEvents",
		"interactionContexts",
		"interactionRecipients",
		"learningJourneys",
		"learningJourneySteps",
		"learningJourneyTasks",
		"learningProgress",
		"learningStatuses",
		"lessonTags",
		"lessonVersions",
		"lessons",
		"libraryContentExpertAssociations",
		"libraryContentVersions",
		"libraryContents",
		"livedocCustomContentDataSourceRetrieveDataRequests",
		"livedocDataSourceInfo",
		"livedocDataSourceRetrieveDataRequests",
		"livedocGlobalVariableRequests",
		"livesendCommentMentions",
		"livesendCommentReactions",
		"livesendComments",
		"livesendContentViewingSessions",
		"livesendLinkContents",
		"livesendLinkMeetingContents",
		"livesendLinkMembers",
		"livesendLinks",
		"livesendPageViews",
		"livesendViewingSessions",
		"meetingAgendaUpdates",
		"meetingContentPagePresentations",
		"meetingContentPresentations",
		"meetingGeneralNotesUpdates",
		"meetingKeywords",
		"meetingParticipants",
		"meetingQuestions",
		"meetingTrackers",
		"meetings",
		"microappScreenViews",
		"microappScreens",
		"notificationFrequencySettings",
		"notificationStatus",
		"pageClicks",
		"pageContentHistory",
		"paths",
		"pathContents",
		"pathTags",
		"postContents",
		"posts",
		"proficiencyLevels",
		"programAssociations",
		"programDates",
		"programItems",
		"programRequestDates",
		"programRequests",
		"programTaskDates",
		"programTasks",
		"publishingApprovalWorkflowAcknowledgements",
		"publishingApprovalWorkflowStepsHistory",
		"publishingApprovalWorkflows",
		"questions",
		"searchClickMatchDetails",
		"searchClicks",
		"searchFacets",
		"searchHistory",
		"searchWords",
		"skillAssessments",
		"skillProfiles",
		"skillProfileDetails",
		"skillRatings",
		"skillRequests",
		"skillReviews",
		"skillTags",
		"skillUserProfiles",
		"skills",
		"teamsites",
		"trainingGroupManagers",
		"trainingGroupMembers",
		"trainingGroups",
		"userActivity",
		"userEntitlementRoleAssignments",
		"userGroupsList",
		"userProperties",
		"userPropertyAssignments",
		"users",
		"virusScanAuditLog",
		"watermarks",
		"workspaceContentVersions",
		"workspaceContents",
	}

	return components.EndpointRegistryInput{
		providers.ModuleReporting: {
			{
				Endpoint: fmt.Sprintf("{%s}", strings.Join(readSupport, ",")),
				Support:  components.ReadSupport,
			},
		},
	}
}
