Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
// Package teamhubagentapi provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT.
package teamhubagentapi
import (
"encoding/json"
"errors"
"fmt"
"time"
"github.com/oapi-codegen/runtime"
openapi_types "github.com/oapi-codegen/runtime/types"
)
const (
AgentBearerScopes agentBearerContextKey = "agentBearer.Scopes"
)
// Defines values for AgentAgentChangeResponseStatus.
const (
AgentChangeApplied AgentAgentChangeResponseStatus = "applied"
AgentChangeConfirmationPending AgentAgentChangeResponseStatus = "confirmation_pending"
)
// Valid indicates whether the value is a known member of the AgentAgentChangeResponseStatus enum.
func (e AgentAgentChangeResponseStatus) Valid() bool {
switch e {
case AgentChangeApplied:
return true
case AgentChangeConfirmationPending:
return true
default:
return false
}
}
// Defines values for AgentApiErrorCode.
const (
AgentApiErrorCodeAgentConfigurationUpdating AgentApiErrorCode = "agent_configuration_updating"
AgentApiErrorCodeAgentCredentialInvalid AgentApiErrorCode = "agent_credential_invalid"
AgentApiErrorCodeAgentLimitReached AgentApiErrorCode = "agent_limit_reached"
AgentApiErrorCodeAppNotConnected AgentApiErrorCode = "app_not_connected"
AgentApiErrorCodeArtifactPathConflict AgentApiErrorCode = "artifact_path_conflict"
AgentApiErrorCodeArtifactReferenceInvalid AgentApiErrorCode = "artifact_reference_invalid"
AgentApiErrorCodeArtifactVersionConflict AgentApiErrorCode = "artifact_version_conflict"
AgentApiErrorCodeConnectionNotActive AgentApiErrorCode = "connection_not_active"
AgentApiErrorCodeConnectionNotFound AgentApiErrorCode = "connection_not_found"
AgentApiErrorCodeContextIdentityInvalid AgentApiErrorCode = "context_identity_invalid"
AgentApiErrorCodeDependencyUnavailable AgentApiErrorCode = "dependency_unavailable"
AgentApiErrorCodeForbidden AgentApiErrorCode = "forbidden"
AgentApiErrorCodeIdempotencyConflict AgentApiErrorCode = "idempotency_conflict"
AgentApiErrorCodeIncompleteResponse AgentApiErrorCode = "incomplete_response"
AgentApiErrorCodeInternalError AgentApiErrorCode = "internal_error"
AgentApiErrorCodeInvalidInput AgentApiErrorCode = "invalid_input"
AgentApiErrorCodeInvalidRequest AgentApiErrorCode = "invalid_request"
AgentApiErrorCodeInvalidToolArguments AgentApiErrorCode = "invalid_tool_arguments"
AgentApiErrorCodeNotFound AgentApiErrorCode = "not_found"
AgentApiErrorCodeOperationForbidden AgentApiErrorCode = "operation_forbidden"
AgentApiErrorCodePayloadTooLarge AgentApiErrorCode = "payload_too_large"
AgentApiErrorCodeProfileDocumentInvalid AgentApiErrorCode = "profile_document_invalid"
AgentApiErrorCodeProfileModuleEmpty AgentApiErrorCode = "profile_module_empty"
AgentApiErrorCodeProfileRevisionConflict AgentApiErrorCode = "profile_revision_conflict"
AgentApiErrorCodeProviderAuthFailed AgentApiErrorCode = "provider_auth_failed"
AgentApiErrorCodeProviderKeyRequired AgentApiErrorCode = "provider_key_required"
AgentApiErrorCodeProviderRateLimited AgentApiErrorCode = "provider_rate_limited"
AgentApiErrorCodeProviderUnavailable AgentApiErrorCode = "provider_unavailable"
AgentApiErrorCodeSearchKeyRequested AgentApiErrorCode = "search_key_requested"
AgentApiErrorCodeSearchQuotaExhausted AgentApiErrorCode = "search_quota_exhausted"
AgentApiErrorCodeTaskFinishConflict AgentApiErrorCode = "task_finish_conflict"
AgentApiErrorCodeTaskLimitReached AgentApiErrorCode = "task_limit_reached"
AgentApiErrorCodeTeamMdDocumentInvalid AgentApiErrorCode = "team_md_document_invalid"
AgentApiErrorCodeToolExecutionFailed AgentApiErrorCode = "tool_execution_failed"
AgentApiErrorCodeToolNotFound AgentApiErrorCode = "tool_not_found"
AgentApiErrorCodeUnauthenticated AgentApiErrorCode = "unauthenticated"
AgentApiErrorCodeVersionConflict AgentApiErrorCode = "version_conflict"
)
// Valid indicates whether the value is a known member of the AgentApiErrorCode enum.
func (e AgentApiErrorCode) Valid() bool {
switch e {
case AgentApiErrorCodeAgentConfigurationUpdating:
return true
case AgentApiErrorCodeAgentCredentialInvalid:
return true
case AgentApiErrorCodeAgentLimitReached:
return true
case AgentApiErrorCodeAppNotConnected:
return true
case AgentApiErrorCodeArtifactPathConflict:
return true
case AgentApiErrorCodeArtifactReferenceInvalid:
return true
case AgentApiErrorCodeArtifactVersionConflict:
return true
case AgentApiErrorCodeConnectionNotActive:
return true
case AgentApiErrorCodeConnectionNotFound:
return true
case AgentApiErrorCodeContextIdentityInvalid:
return true
case AgentApiErrorCodeDependencyUnavailable:
return true
case AgentApiErrorCodeForbidden:
return true
case AgentApiErrorCodeIdempotencyConflict:
return true
case AgentApiErrorCodeIncompleteResponse:
return true
case AgentApiErrorCodeInternalError:
return true
case AgentApiErrorCodeInvalidInput:
return true
case AgentApiErrorCodeInvalidRequest:
return true
case AgentApiErrorCodeInvalidToolArguments:
return true
case AgentApiErrorCodeNotFound:
return true
case AgentApiErrorCodeOperationForbidden:
return true
case AgentApiErrorCodePayloadTooLarge:
return true
case AgentApiErrorCodeProfileDocumentInvalid:
return true
case AgentApiErrorCodeProfileModuleEmpty:
return true
case AgentApiErrorCodeProfileRevisionConflict:
return true
case AgentApiErrorCodeProviderAuthFailed:
return true
case AgentApiErrorCodeProviderKeyRequired:
return true
case AgentApiErrorCodeProviderRateLimited:
return true
case AgentApiErrorCodeProviderUnavailable:
return true
case AgentApiErrorCodeSearchKeyRequested:
return true
case AgentApiErrorCodeSearchQuotaExhausted:
return true
case AgentApiErrorCodeTaskFinishConflict:
return true
case AgentApiErrorCodeTaskLimitReached:
return true
case AgentApiErrorCodeTeamMdDocumentInvalid:
return true
case AgentApiErrorCodeToolExecutionFailed:
return true
case AgentApiErrorCodeToolNotFound:
return true
case AgentApiErrorCodeUnauthenticated:
return true
case AgentApiErrorCodeVersionConflict:
return true
default:
return false
}
}
// Defines values for AgentApiErrorDetailsOrigin.
const (
AgentApiErrorDetailsOriginRequested AgentApiErrorDetailsOrigin = "requested"
AgentApiErrorDetailsOriginSuggested AgentApiErrorDetailsOrigin = "suggested"
)
// Valid indicates whether the value is a known member of the AgentApiErrorDetailsOrigin enum.
func (e AgentApiErrorDetailsOrigin) Valid() bool {
switch e {
case AgentApiErrorDetailsOriginRequested:
return true
case AgentApiErrorDetailsOriginSuggested:
return true
default:
return false
}
}
// Defines values for AgentApiErrorDetailsReason.
const (
AgentApiErrorDetailsReasonFreeLimit AgentApiErrorDetailsReason = "free_limit"
AgentApiErrorDetailsReasonMissing AgentApiErrorDetailsReason = "missing"
AgentApiErrorDetailsReasonRejected AgentApiErrorDetailsReason = "rejected"
)
// Valid indicates whether the value is a known member of the AgentApiErrorDetailsReason enum.
func (e AgentApiErrorDetailsReason) Valid() bool {
switch e {
case AgentApiErrorDetailsReasonFreeLimit:
return true
case AgentApiErrorDetailsReasonMissing:
return true
case AgentApiErrorDetailsReasonRejected:
return true
default:
return false
}
}
// Defines values for AgentAppToolConfirmationPendingStatus.
const (
ConfirmationPending AgentAppToolConfirmationPendingStatus = "confirmation_pending"
)
// Valid indicates whether the value is a known member of the AgentAppToolConfirmationPendingStatus enum.
func (e AgentAppToolConfirmationPendingStatus) Valid() bool {
switch e {
case ConfirmationPending:
return true
default:
return false
}
}
// Defines values for AgentAskUserResponseStatus.
const (
AgentAskUserResponseStatusPending AgentAskUserResponseStatus = "pending"
)
// Valid indicates whether the value is a known member of the AgentAskUserResponseStatus enum.
func (e AgentAskUserResponseStatus) Valid() bool {
switch e {
case AgentAskUserResponseStatusPending:
return true
default:
return false
}
}
// Defines values for AgentCLIFileRole.
const (
AgentCLIFileRoleEditor AgentCLIFileRole = "editor"
AgentCLIFileRoleManager AgentCLIFileRole = "manager"
AgentCLIFileRoleOwner AgentCLIFileRole = "owner"
AgentCLIFileRoleViewer AgentCLIFileRole = "viewer"
)
// Valid indicates whether the value is a known member of the AgentCLIFileRole enum.
func (e AgentCLIFileRole) Valid() bool {
switch e {
case AgentCLIFileRoleEditor:
return true
case AgentCLIFileRoleManager:
return true
case AgentCLIFileRoleOwner:
return true
case AgentCLIFileRoleViewer:
return true
default:
return false
}
}
// Defines values for AgentCLIFileLinkCommandOperation.
const (
Read AgentCLIFileLinkCommandOperation = "read"
Revoke AgentCLIFileLinkCommandOperation = "revoke"
Set AgentCLIFileLinkCommandOperation = "set"
)
// Valid indicates whether the value is a known member of the AgentCLIFileLinkCommandOperation enum.
func (e AgentCLIFileLinkCommandOperation) Valid() bool {
switch e {
case Read:
return true
case Revoke:
return true
case Set:
return true
default:
return false
}
}
// Defines values for AgentCLIFileLinkCommandRole.
const (
AgentCLIFileLinkCommandRoleEditor AgentCLIFileLinkCommandRole = "editor"
AgentCLIFileLinkCommandRoleViewer AgentCLIFileLinkCommandRole = "viewer"
)
// Valid indicates whether the value is a known member of the AgentCLIFileLinkCommandRole enum.
func (e AgentCLIFileLinkCommandRole) Valid() bool {
switch e {
case AgentCLIFileLinkCommandRoleEditor:
return true
case AgentCLIFileLinkCommandRoleViewer:
return true
default:
return false
}
}
// Defines values for AgentCLIFileShareRole.
const (
Editor AgentCLIFileShareRole = "editor"
Manager AgentCLIFileShareRole = "manager"
Viewer AgentCLIFileShareRole = "viewer"
)
// Valid indicates whether the value is a known member of the AgentCLIFileShareRole enum.
func (e AgentCLIFileShareRole) Valid() bool {
switch e {
case Editor:
return true
case Manager:
return true
case Viewer:
return true
default:
return false
}
}
// Defines values for AgentCLIFileShareTargetKind.
const (
AgentCLIFileShareTargetKindActor AgentCLIFileShareTargetKind = "actor"
AgentCLIFileShareTargetKindRoom AgentCLIFileShareTargetKind = "room"
AgentCLIFileShareTargetKindTask AgentCLIFileShareTargetKind = "task"
)
// Valid indicates whether the value is a known member of the AgentCLIFileShareTargetKind enum.
func (e AgentCLIFileShareTargetKind) Valid() bool {
switch e {
case AgentCLIFileShareTargetKindActor:
return true
case AgentCLIFileShareTargetKindRoom:
return true
case AgentCLIFileShareTargetKindTask:
return true
default:
return false
}
}
// Defines values for AgentContextMemberAgentType.
const (
Anotherme AgentContextMemberAgentType = "anotherme"
General AgentContextMemberAgentType = "general"
)
// Valid indicates whether the value is a known member of the AgentContextMemberAgentType enum.
func (e AgentContextMemberAgentType) Valid() bool {
switch e {
case Anotherme:
return true
case General:
return true
default:
return false
}
}
// Defines values for AgentContextMemberKind.
const (
AgentContextMemberKindAgent AgentContextMemberKind = "agent"
AgentContextMemberKindHuman AgentContextMemberKind = "human"
)
// Valid indicates whether the value is a known member of the AgentContextMemberKind enum.
func (e AgentContextMemberKind) Valid() bool {
switch e {
case AgentContextMemberKindAgent:
return true
case AgentContextMemberKindHuman:
return true
default:
return false
}
}
// Defines values for AgentDocumentCommentAuthorKind.
const (
AgentDocumentCommentAuthorKindAgent AgentDocumentCommentAuthorKind = "agent"
AgentDocumentCommentAuthorKindHuman AgentDocumentCommentAuthorKind = "human"
)
// Valid indicates whether the value is a known member of the AgentDocumentCommentAuthorKind enum.
func (e AgentDocumentCommentAuthorKind) Valid() bool {
switch e {
case AgentDocumentCommentAuthorKindAgent:
return true
case AgentDocumentCommentAuthorKindHuman:
return true
default:
return false
}
}
// Defines values for AgentDocumentCommentTextReplacementResponseStatus.
const (
AgentDocumentCommentTextReplacementResponseStatusApplied AgentDocumentCommentTextReplacementResponseStatus = "applied"
AgentDocumentCommentTextReplacementResponseStatusConflicted AgentDocumentCommentTextReplacementResponseStatus = "conflicted"
)
// Valid indicates whether the value is a known member of the AgentDocumentCommentTextReplacementResponseStatus enum.
func (e AgentDocumentCommentTextReplacementResponseStatus) Valid() bool {
switch e {
case AgentDocumentCommentTextReplacementResponseStatusApplied:
return true
case AgentDocumentCommentTextReplacementResponseStatusConflicted:
return true
default:
return false
}
}
// Defines values for AgentDocumentSemanticMutationResponseStatus.
const (
AgentDocumentSemanticMutationResponseStatusApplied AgentDocumentSemanticMutationResponseStatus = "applied"
AgentDocumentSemanticMutationResponseStatusConflicted AgentDocumentSemanticMutationResponseStatus = "conflicted"
)
// Valid indicates whether the value is a known member of the AgentDocumentSemanticMutationResponseStatus enum.
func (e AgentDocumentSemanticMutationResponseStatus) Valid() bool {
switch e {
case AgentDocumentSemanticMutationResponseStatusApplied:
return true
case AgentDocumentSemanticMutationResponseStatusConflicted:
return true
default:
return false
}
}
// Defines values for AgentHistoryInboxKind.
const (
AgentHistoryInboxKindMeta AgentHistoryInboxKind = "meta"
AgentHistoryInboxKindRoom AgentHistoryInboxKind = "room"
AgentHistoryInboxKindTask AgentHistoryInboxKind = "task"
AgentHistoryInboxKindTaskmeta AgentHistoryInboxKind = "taskmeta"
AgentHistoryInboxKindThread AgentHistoryInboxKind = "thread"
)
// Valid indicates whether the value is a known member of the AgentHistoryInboxKind enum.
func (e AgentHistoryInboxKind) Valid() bool {
switch e {
case AgentHistoryInboxKindMeta:
return true
case AgentHistoryInboxKindRoom:
return true
case AgentHistoryInboxKindTask:
return true
case AgentHistoryInboxKindTaskmeta:
return true
case AgentHistoryInboxKindThread:
return true
default:
return false
}
}
// Defines values for AgentHistoryMessageAuthorKind.
const (
AgentHistoryMessageAuthorKindAgent AgentHistoryMessageAuthorKind = "agent"
AgentHistoryMessageAuthorKindHuman AgentHistoryMessageAuthorKind = "human"
)
// Valid indicates whether the value is a known member of the AgentHistoryMessageAuthorKind enum.
func (e AgentHistoryMessageAuthorKind) Valid() bool {
switch e {
case AgentHistoryMessageAuthorKindAgent:
return true
case AgentHistoryMessageAuthorKindHuman:
return true
default:
return false
}
}
// Defines values for AgentHistoryMessageMessageKind.
const (
AgentHistoryMessageMessageKindAgentRuntime AgentHistoryMessageMessageKind = "agent_runtime"
AgentHistoryMessageMessageKindConversation AgentHistoryMessageMessageKind = "conversation"
AgentHistoryMessageMessageKindTaskTerminalNotice AgentHistoryMessageMessageKind = "task_terminal_notice"
)
// Valid indicates whether the value is a known member of the AgentHistoryMessageMessageKind enum.
func (e AgentHistoryMessageMessageKind) Valid() bool {
switch e {
case AgentHistoryMessageMessageKindAgentRuntime:
return true
case AgentHistoryMessageMessageKindConversation:
return true
case AgentHistoryMessageMessageKindTaskTerminalNotice:
return true
default:
return false
}
}
// Defines values for AgentInsertDocumentBlocksSemanticOperationPosition.
const (
After AgentInsertDocumentBlocksSemanticOperationPosition = "after"
Before AgentInsertDocumentBlocksSemanticOperationPosition = "before"
)
// Valid indicates whether the value is a known member of the AgentInsertDocumentBlocksSemanticOperationPosition enum.
func (e AgentInsertDocumentBlocksSemanticOperationPosition) Valid() bool {
switch e {
case After:
return true
case Before:
return true
default:
return false
}
}
// Defines values for AgentKnowledgeSearchRequestScope.
const (
Originals AgentKnowledgeSearchRequestScope = "originals"
Summaries AgentKnowledgeSearchRequestScope = "summaries"
)
// Valid indicates whether the value is a known member of the AgentKnowledgeSearchRequestScope enum.
func (e AgentKnowledgeSearchRequestScope) Valid() bool {
switch e {
case Originals:
return true
case Summaries:
return true
default:
return false
}
}
// Defines values for AgentMessageCommitResponseTargetType.
const (
Room AgentMessageCommitResponseTargetType = "room"
Task AgentMessageCommitResponseTargetType = "task"
Thread AgentMessageCommitResponseTargetType = "thread"
)
// Valid indicates whether the value is a known member of the AgentMessageCommitResponseTargetType enum.
func (e AgentMessageCommitResponseTargetType) Valid() bool {
switch e {
case Room:
return true
case Task:
return true
case Thread:
return true
default:
return false
}
}
// Defines values for AgentMessageDocumentResourceStatus.
const (
AgentMessageDocumentResourceStatusPublished AgentMessageDocumentResourceStatus = "published"
AgentMessageDocumentResourceStatusReused AgentMessageDocumentResourceStatus = "reused"
)
// Valid indicates whether the value is a known member of the AgentMessageDocumentResourceStatus enum.
func (e AgentMessageDocumentResourceStatus) Valid() bool {
switch e {
case AgentMessageDocumentResourceStatusPublished:
return true
case AgentMessageDocumentResourceStatusReused:
return true
default:
return false
}
}
// Defines values for AgentMessageReadResponseMode.
const (
Inbox AgentMessageReadResponseMode = "inbox"
Inboxes AgentMessageReadResponseMode = "inboxes"
Messages AgentMessageReadResponseMode = "messages"
)
// Valid indicates whether the value is a known member of the AgentMessageReadResponseMode enum.
func (e AgentMessageReadResponseMode) Valid() bool {
switch e {
case Inbox:
return true
case Inboxes:
return true
case Messages:
return true
default:
return false
}
}
// Defines values for AgentMessageTreeResourceStatus.
const (
AgentMessageTreeResourceStatusPublished AgentMessageTreeResourceStatus = "published"
AgentMessageTreeResourceStatusReused AgentMessageTreeResourceStatus = "reused"
)
// Valid indicates whether the value is a known member of the AgentMessageTreeResourceStatus enum.
func (e AgentMessageTreeResourceStatus) Valid() bool {
switch e {
case AgentMessageTreeResourceStatusPublished:
return true
case AgentMessageTreeResourceStatusReused:
return true
default:
return false
}
}
// Defines values for AgentPresentationSequencePause.
const (
Brief AgentPresentationSequencePause = "brief"
Natural AgentPresentationSequencePause = "natural"
None AgentPresentationSequencePause = "none"
)
// Valid indicates whether the value is a known member of the AgentPresentationSequencePause enum.
func (e AgentPresentationSequencePause) Valid() bool {
switch e {
case Brief:
return true
case Natural:
return true
case None:
return true
default:
return false
}
}
// Defines values for AgentReadMessageAuthorKind.
const (
AgentReadMessageAuthorKindAgent AgentReadMessageAuthorKind = "agent"
AgentReadMessageAuthorKindHuman AgentReadMessageAuthorKind = "human"
)
// Valid indicates whether the value is a known member of the AgentReadMessageAuthorKind enum.
func (e AgentReadMessageAuthorKind) Valid() bool {
switch e {
case AgentReadMessageAuthorKindAgent:
return true
case AgentReadMessageAuthorKindHuman:
return true
default:
return false
}
}
// Defines values for AgentReadMessageMessageKind.
const (
AgentReadMessageMessageKindAgentRuntime AgentReadMessageMessageKind = "agent_runtime"
AgentReadMessageMessageKindConversation AgentReadMessageMessageKind = "conversation"
AgentReadMessageMessageKindTaskTerminalNotice AgentReadMessageMessageKind = "task_terminal_notice"
)
// Valid indicates whether the value is a known member of the AgentReadMessageMessageKind enum.
func (e AgentReadMessageMessageKind) Valid() bool {
switch e {
case AgentReadMessageMessageKindAgentRuntime:
return true
case AgentReadMessageMessageKindConversation:
return true
case AgentReadMessageMessageKindTaskTerminalNotice:
return true
default:
return false
}
}
// Defines values for AgentReferenceMessageSegmentTargetType.
const (
AgentReferenceMessageSegmentTargetTypeAgent AgentReferenceMessageSegmentTargetType = "agent"
AgentReferenceMessageSegmentTargetTypeUser AgentReferenceMessageSegmentTargetType = "user"
)
// Valid indicates whether the value is a known member of the AgentReferenceMessageSegmentTargetType enum.
func (e AgentReferenceMessageSegmentTargetType) Valid() bool {
switch e {
case AgentReferenceMessageSegmentTargetTypeAgent:
return true
case AgentReferenceMessageSegmentTargetTypeUser:
return true
default:
return false
}
}
// Defines values for AgentRoutineListenerApp.
const (
Gmail AgentRoutineListenerApp = "gmail"
GoogleCalendar AgentRoutineListenerApp = "google_calendar"
Outlook AgentRoutineListenerApp = "outlook"
OutlookCalendar AgentRoutineListenerApp = "outlook_calendar"
Slack AgentRoutineListenerApp = "slack"
)
// Valid indicates whether the value is a known member of the AgentRoutineListenerApp enum.
func (e AgentRoutineListenerApp) Valid() bool {
switch e {
case Gmail:
return true
case GoogleCalendar:
return true
case Outlook:
return true
case OutlookCalendar:
return true
case Slack:
return true
default:
return false
}
}
// Defines values for AgentRoutineScheduleKind.
const (
Daily AgentRoutineScheduleKind = "daily"
EveryNHours AgentRoutineScheduleKind = "every_n_hours"
EveryNMinutes AgentRoutineScheduleKind = "every_n_minutes"
Once AgentRoutineScheduleKind = "once"
Weekly AgentRoutineScheduleKind = "weekly"
)
// Valid indicates whether the value is a known member of the AgentRoutineScheduleKind enum.
func (e AgentRoutineScheduleKind) Valid() bool {
switch e {
case Daily:
return true
case EveryNHours:
return true
case EveryNMinutes:
return true
case Once:
return true
case Weekly:
return true
default:
return false
}
}
// Defines values for AgentRoutineWeekday.
const (
Friday AgentRoutineWeekday = "friday"
Monday AgentRoutineWeekday = "monday"
Saturday AgentRoutineWeekday = "saturday"
Sunday AgentRoutineWeekday = "sunday"
Thursday AgentRoutineWeekday = "thursday"
Tuesday AgentRoutineWeekday = "tuesday"
Wednesday AgentRoutineWeekday = "wednesday"
)
// Valid indicates whether the value is a known member of the AgentRoutineWeekday enum.
func (e AgentRoutineWeekday) Valid() bool {
switch e {
case Friday:
return true
case Monday:
return true
case Saturday:
return true
case Sunday:
return true
case Thursday:
return true
case Tuesday:
return true
case Wednesday:
return true
default:
return false
}
}
// Defines values for AgentSendTaskResponseDelivery.
const (
AgentTaskDeliveryQueued AgentSendTaskResponseDelivery = "queued"
AgentTaskDeliveryStarted AgentSendTaskResponseDelivery = "started"
AgentTaskDeliverySteered AgentSendTaskResponseDelivery = "steered"
)
// Valid indicates whether the value is a known member of the AgentSendTaskResponseDelivery enum.
func (e AgentSendTaskResponseDelivery) Valid() bool {
switch e {
case AgentTaskDeliveryQueued:
return true
case AgentTaskDeliveryStarted:
return true
case AgentTaskDeliverySteered:
return true
default:
return false
}
}
// Defines values for AgentTaskPendingApprovalKind.
const (
AgentTaskApprovalConnector AgentTaskPendingApprovalKind = "connector"
AgentTaskApprovalPermission AgentTaskPendingApprovalKind = "permission"
)
// Valid indicates whether the value is a known member of the AgentTaskPendingApprovalKind enum.
func (e AgentTaskPendingApprovalKind) Valid() bool {
switch e {
case AgentTaskApprovalConnector:
return true
case AgentTaskApprovalPermission:
return true
default:
return false
}
}
// Defines values for AgentTaskStatus.
const (
AgentTaskCanceled AgentTaskStatus = "canceled"
AgentTaskFailed AgentTaskStatus = "failed"
AgentTaskIdle AgentTaskStatus = "idle"
AgentTaskRunning AgentTaskStatus = "running"
AgentTaskWaitingForApproval AgentTaskStatus = "waiting_for_approval"
)
// Valid indicates whether the value is a known member of the AgentTaskStatus enum.
func (e AgentTaskStatus) Valid() bool {
switch e {
case AgentTaskCanceled:
return true
case AgentTaskFailed:
return true
case AgentTaskIdle:
return true
case AgentTaskRunning:
return true
case AgentTaskWaitingForApproval:
return true
default:
return false
}
}
// Defines values for ComputerPermissionId.
const (
ComputerPermissionIdAccessibility ComputerPermissionId = "accessibility"
ComputerPermissionIdScreenRecording ComputerPermissionId = "screen_recording"
)
// Valid indicates whether the value is a known member of the ComputerPermissionId enum.
func (e ComputerPermissionId) Valid() bool {
switch e {
case ComputerPermissionIdAccessibility:
return true
case ComputerPermissionIdScreenRecording:
return true
default:
return false
}
}
// Defines values for ComputerPermissionPrompt.
const (
ComputerPermissionPromptAvailable ComputerPermissionPrompt = "available"
ComputerPermissionPromptSettingsOnly ComputerPermissionPrompt = "settings_only"
)
// Valid indicates whether the value is a known member of the ComputerPermissionPrompt enum.
func (e ComputerPermissionPrompt) Valid() bool {
switch e {
case ComputerPermissionPromptAvailable:
return true
case ComputerPermissionPromptSettingsOnly:
return true
default:
return false
}
}
// Defines values for ComputerPermissionState.
const (
ComputerPermissionStateDenied ComputerPermissionState = "denied"
ComputerPermissionStateGranted ComputerPermissionState = "granted"
ComputerPermissionStateNotDetermined ComputerPermissionState = "not_determined"
ComputerPermissionStateUnknown ComputerPermissionState = "unknown"
)
// Valid indicates whether the value is a known member of the ComputerPermissionState enum.
func (e ComputerPermissionState) Valid() bool {
switch e {
case ComputerPermissionStateDenied:
return true
case ComputerPermissionStateGranted:
return true
case ComputerPermissionStateNotDetermined:
return true
case ComputerPermissionStateUnknown:
return true
default:
return false
}
}
// Defines values for ComputerPermissionStatusHost.
const (
ComputerPermissionHostDesktop ComputerPermissionStatusHost = "desktop"
ComputerPermissionHostStandalone ComputerPermissionStatusHost = "standalone"
)
// Valid indicates whether the value is a known member of the ComputerPermissionStatusHost enum.
func (e ComputerPermissionStatusHost) Valid() bool {
switch e {
case ComputerPermissionHostDesktop:
return true
case ComputerPermissionHostStandalone:
return true
default:
return false
}
}
// Defines values for ComputerPermissionStatusPlatform.
const (
ComputerPermissionPlatformDarwin ComputerPermissionStatusPlatform = "darwin"
ComputerPermissionPlatformLinux ComputerPermissionStatusPlatform = "linux"
ComputerPermissionPlatformWindows ComputerPermissionStatusPlatform = "windows"
)
// Valid indicates whether the value is a known member of the ComputerPermissionStatusPlatform enum.
func (e ComputerPermissionStatusPlatform) Valid() bool {
switch e {
case ComputerPermissionPlatformDarwin:
return true
case ComputerPermissionPlatformLinux:
return true
case ComputerPermissionPlatformWindows:
return true
default:
return false
}
}
// Defines values for ComputerPermissionSubject.
const (
ComputerPermissionSubjectComputerUse ComputerPermissionSubject = "computer_use"
ComputerPermissionSubjectLinger ComputerPermissionSubject = "linger"
)
// Valid indicates whether the value is a known member of the ComputerPermissionSubject enum.
func (e ComputerPermissionSubject) Valid() bool {
switch e {
case ComputerPermissionSubjectComputerUse:
return true
case ComputerPermissionSubjectLinger:
return true
default:
return false
}
}
// Defines values for DocumentLinkShareRole.
const (
DocumentLinkShareRoleEditor DocumentLinkShareRole = "editor"
DocumentLinkShareRoleViewer DocumentLinkShareRole = "viewer"
)
// Valid indicates whether the value is a known member of the DocumentLinkShareRole enum.
func (e DocumentLinkShareRole) Valid() bool {
switch e {
case DocumentLinkShareRoleEditor:
return true
case DocumentLinkShareRoleViewer:
return true
default:
return false
}
}
// Defines values for DocumentLinkShareStatus.
const (
Active DocumentLinkShareStatus = "active"
Revoked DocumentLinkShareStatus = "revoked"
)
// Valid indicates whether the value is a known member of the DocumentLinkShareStatus enum.
func (e DocumentLinkShareStatus) Valid() bool {
switch e {
case Active:
return true
case Revoked:
return true
default:
return false
}
}
// Defines values for DocumentSegmentPresentation.
const (
Canvas DocumentSegmentPresentation = "canvas"
Card DocumentSegmentPresentation = "card"
Inline DocumentSegmentPresentation = "inline"
)
// Valid indicates whether the value is a known member of the DocumentSegmentPresentation enum.
func (e DocumentSegmentPresentation) Valid() bool {
switch e {
case Canvas:
return true
case Card:
return true
case Inline:
return true
default:
return false
}
}
// Defines values for EditNativeDocumentSemanticOperationCommand.
const (
Append EditNativeDocumentSemanticOperationCommand = "append"
BlockDelete EditNativeDocumentSemanticOperationCommand = "block_delete"
BlockInsertAfter EditNativeDocumentSemanticOperationCommand = "block_insert_after"
BlockInsertBefore EditNativeDocumentSemanticOperationCommand = "block_insert_before"
BlockReplace EditNativeDocumentSemanticOperationCommand = "block_replace"
FileInsertAfter EditNativeDocumentSemanticOperationCommand = "file_insert_after"
ImageInsertAfter EditNativeDocumentSemanticOperationCommand = "image_insert_after"
ImageReplace EditNativeDocumentSemanticOperationCommand = "image_replace"
SetTitle EditNativeDocumentSemanticOperationCommand = "set_title"
StrReplace EditNativeDocumentSemanticOperationCommand = "str_replace"
)
// Valid indicates whether the value is a known member of the EditNativeDocumentSemanticOperationCommand enum.
func (e EditNativeDocumentSemanticOperationCommand) Valid() bool {
switch e {
case Append:
return true
case BlockDelete:
return true
case BlockInsertAfter:
return true
case BlockInsertBefore:
return true
case BlockReplace:
return true
case FileInsertAfter:
return true
case ImageInsertAfter:
return true
case ImageReplace:
return true
case SetTitle:
return true
case StrReplace:
return true
default:
return false
}
}
// Defines values for ReferenceSegmentTargetType.
const (
ReferenceSegmentTargetTypeAgent ReferenceSegmentTargetType = "agent"
ReferenceSegmentTargetTypeUser ReferenceSegmentTargetType = "user"
)
// Valid indicates whether the value is a known member of the ReferenceSegmentTargetType enum.
func (e ReferenceSegmentTargetType) Valid() bool {
switch e {
case ReferenceSegmentTargetTypeAgent:
return true
case ReferenceSegmentTargetTypeUser:
return true
default:
return false
}
}
// Defines values for TrackingItemKind.
const (
TrackingItemKindMeeting TrackingItemKind = "meeting"
TrackingItemKindQuestion TrackingItemKind = "question"
TrackingItemKindTodo TrackingItemKind = "todo"
)
// Valid indicates whether the value is a known member of the TrackingItemKind enum.
func (e TrackingItemKind) Valid() bool {
switch e {
case TrackingItemKindMeeting:
return true
case TrackingItemKindQuestion:
return true
case TrackingItemKindTodo:
return true
default:
return false
}
}
// Defines values for TrackingItemStatus.
const (
TrackingItemStatusDone TrackingItemStatus = "done"
TrackingItemStatusOpen TrackingItemStatus = "open"
)
// Valid indicates whether the value is a known member of the TrackingItemStatus enum.
func (e TrackingItemStatus) Valid() bool {
switch e {
case TrackingItemStatusDone:
return true
case TrackingItemStatusOpen:
return true
default:
return false
}
}
// Defines values for TrackingItemCreateKind.
const (
TrackingItemCreateKindMeeting TrackingItemCreateKind = "meeting"
TrackingItemCreateKindQuestion TrackingItemCreateKind = "question"
TrackingItemCreateKindTodo TrackingItemCreateKind = "todo"
)
// Valid indicates whether the value is a known member of the TrackingItemCreateKind enum.
func (e TrackingItemCreateKind) Valid() bool {
switch e {
case TrackingItemCreateKindMeeting:
return true
case TrackingItemCreateKindQuestion:
return true
case TrackingItemCreateKindTodo:
return true
default:
return false
}
}
// Defines values for TrackingItemFieldsKind.
const (
TrackingItemFieldsKindMeeting TrackingItemFieldsKind = "meeting"
TrackingItemFieldsKindQuestion TrackingItemFieldsKind = "question"
TrackingItemFieldsKindTodo TrackingItemFieldsKind = "todo"
)
// Valid indicates whether the value is a known member of the TrackingItemFieldsKind enum.
func (e TrackingItemFieldsKind) Valid() bool {
switch e {
case TrackingItemFieldsKindMeeting:
return true
case TrackingItemFieldsKindQuestion:
return true
case TrackingItemFieldsKindTodo:
return true
default:
return false
}
}
// Defines values for TrackingItemUpdateKind.
const (
TrackingItemUpdateKindMeeting TrackingItemUpdateKind = "meeting"
TrackingItemUpdateKindQuestion TrackingItemUpdateKind = "question"
TrackingItemUpdateKindTodo TrackingItemUpdateKind = "todo"
)
// Valid indicates whether the value is a known member of the TrackingItemUpdateKind enum.
func (e TrackingItemUpdateKind) Valid() bool {
switch e {
case TrackingItemUpdateKindMeeting:
return true
case TrackingItemUpdateKindQuestion:
return true
case TrackingItemUpdateKindTodo:
return true
default:
return false
}
}
// Defines values for TrackingItemUpdateStatus.
const (
TrackingItemUpdateStatusDone TrackingItemUpdateStatus = "done"
TrackingItemUpdateStatusOpen TrackingItemUpdateStatus = "open"
)
// Valid indicates whether the value is a known member of the TrackingItemUpdateStatus enum.
func (e TrackingItemUpdateStatus) Valid() bool {
switch e {
case TrackingItemUpdateStatusDone:
return true
case TrackingItemUpdateStatusOpen:
return true
default:
return false
}
}
// Defines values for WebConnectResponseStatus.
const (
WebConnectResponseStatusConnectionRequested WebConnectResponseStatus = "connection_requested"
WebConnectResponseStatusReady WebConnectResponseStatus = "ready"
)
// Valid indicates whether the value is a known member of the WebConnectResponseStatus enum.
func (e WebConnectResponseStatus) Valid() bool {
switch e {
case WebConnectResponseStatusConnectionRequested:
return true
case WebConnectResponseStatusReady:
return true
default:
return false
}
}
// Defines values for WebOpenRequestBackend.
const (
WebOpenRequestBackendExa WebOpenRequestBackend = "exa"
WebOpenRequestBackendFirecrawl WebOpenRequestBackend = "firecrawl"
WebOpenRequestBackendTavily WebOpenRequestBackend = "tavily"
WebOpenRequestBackendYou WebOpenRequestBackend = "you"
)
// Valid indicates whether the value is a known member of the WebOpenRequestBackend enum.
func (e WebOpenRequestBackend) Valid() bool {
switch e {
case WebOpenRequestBackendExa:
return true
case WebOpenRequestBackendFirecrawl:
return true
case WebOpenRequestBackendTavily:
return true
case WebOpenRequestBackendYou:
return true
default:
return false
}
}
// Defines values for WebSearchBackendKeyState.
const (
WebSearchBackendKeyStateNone WebSearchBackendKeyState = "none"
WebSearchBackendKeyStateRejected WebSearchBackendKeyState = "rejected"
WebSearchBackendKeyStateUnverified WebSearchBackendKeyState = "unverified"
WebSearchBackendKeyStateVerified WebSearchBackendKeyState = "verified"
)
// Valid indicates whether the value is a known member of the WebSearchBackendKeyState enum.
func (e WebSearchBackendKeyState) Valid() bool {
switch e {
case WebSearchBackendKeyStateNone:
return true
case WebSearchBackendKeyStateRejected:
return true
case WebSearchBackendKeyStateUnverified:
return true
case WebSearchBackendKeyStateVerified:
return true
default:
return false
}
}
// Defines values for WebSearchBackendStatus.
const (
WebSearchBackendStatusKeyRejected WebSearchBackendStatus = "key_rejected"
WebSearchBackendStatusKeyRequired WebSearchBackendStatus = "key_required"
WebSearchBackendStatusReady WebSearchBackendStatus = "ready"
)
// Valid indicates whether the value is a known member of the WebSearchBackendStatus enum.
func (e WebSearchBackendStatus) Valid() bool {
switch e {
case WebSearchBackendStatusKeyRejected:
return true
case WebSearchBackendStatusKeyRequired:
return true
case WebSearchBackendStatusReady:
return true
default:
return false
}
}
// Defines values for WebSearchBackendTier.
const (
WebSearchBackendTierFree WebSearchBackendTier = "free"
WebSearchBackendTierKey WebSearchBackendTier = "key"
WebSearchBackendTierNone WebSearchBackendTier = "none"
)
// Valid indicates whether the value is a known member of the WebSearchBackendTier enum.
func (e WebSearchBackendTier) Valid() bool {
switch e {
case WebSearchBackendTierFree:
return true
case WebSearchBackendTierKey:
return true
case WebSearchBackendTierNone:
return true
default:
return false
}
}
// Defines values for WebSearchBackendId.
const (
WebSearchBackendIdBrave WebSearchBackendId = "brave"
WebSearchBackendIdDirect WebSearchBackendId = "direct"
WebSearchBackendIdDuckduckgo WebSearchBackendId = "duckduckgo"
WebSearchBackendIdExa WebSearchBackendId = "exa"
WebSearchBackendIdFirecrawl WebSearchBackendId = "firecrawl"
WebSearchBackendIdTavily WebSearchBackendId = "tavily"
WebSearchBackendIdYou WebSearchBackendId = "you"
)
// Valid indicates whether the value is a known member of the WebSearchBackendId enum.
func (e WebSearchBackendId) Valid() bool {
switch e {
case WebSearchBackendIdBrave:
return true
case WebSearchBackendIdDirect:
return true
case WebSearchBackendIdDuckduckgo:
return true
case WebSearchBackendIdExa:
return true
case WebSearchBackendIdFirecrawl:
return true
case WebSearchBackendIdTavily:
return true
case WebSearchBackendIdYou:
return true
default:
return false
}
}
// Defines values for WebSearchCommand.
const (
WebSearchCommandOpen WebSearchCommand = "open"
WebSearchCommandSearch WebSearchCommand = "search"
)
// Valid indicates whether the value is a known member of the WebSearchCommand enum.
func (e WebSearchCommand) Valid() bool {
switch e {
case WebSearchCommandOpen:
return true
case WebSearchCommandSearch:
return true
default:
return false
}
}
// Defines values for WebSearchFilter.
const (
WebSearchFilterRecency WebSearchFilter = "recency"
WebSearchFilterSite WebSearchFilter = "site"
)
// Valid indicates whether the value is a known member of the WebSearchFilter enum.
func (e WebSearchFilter) Valid() bool {
switch e {
case WebSearchFilterRecency:
return true
case WebSearchFilterSite:
return true
default:
return false
}
}
// Defines values for WebSearchKeyBackend.
const (
WebSearchKeyBackendBrave WebSearchKeyBackend = "brave"
WebSearchKeyBackendExa WebSearchKeyBackend = "exa"
WebSearchKeyBackendFirecrawl WebSearchKeyBackend = "firecrawl"
WebSearchKeyBackendTavily WebSearchKeyBackend = "tavily"
WebSearchKeyBackendYou WebSearchKeyBackend = "you"
)
// Valid indicates whether the value is a known member of the WebSearchKeyBackend enum.
func (e WebSearchKeyBackend) Valid() bool {
switch e {
case WebSearchKeyBackendBrave:
return true
case WebSearchKeyBackendExa:
return true
case WebSearchKeyBackendFirecrawl:
return true
case WebSearchKeyBackendTavily:
return true
case WebSearchKeyBackendYou:
return true
default:
return false
}
}
// Defines values for WebSearchQuotaFrom.
const (
WebSearchQuotaFromLastResponse WebSearchQuotaFrom = "last_response"
WebSearchQuotaFromProvider WebSearchQuotaFrom = "provider"
WebSearchQuotaFromUnavailable WebSearchQuotaFrom = "unavailable"
)
// Valid indicates whether the value is a known member of the WebSearchQuotaFrom enum.
func (e WebSearchQuotaFrom) Valid() bool {
switch e {
case WebSearchQuotaFromLastResponse:
return true
case WebSearchQuotaFromProvider:
return true
case WebSearchQuotaFromUnavailable:
return true
default:
return false
}
}
// Defines values for WebSearchQuotaReason.
const (
WebSearchQuotaReasonKeyRejected WebSearchQuotaReason = "key_rejected"
WebSearchQuotaReasonNoKey WebSearchQuotaReason = "no_key"
WebSearchQuotaReasonNotObserved WebSearchQuotaReason = "not_observed"
WebSearchQuotaReasonNotReported WebSearchQuotaReason = "not_reported"
WebSearchQuotaReasonProviderUnavailable WebSearchQuotaReason = "provider_unavailable"
)
// Valid indicates whether the value is a known member of the WebSearchQuotaReason enum.
func (e WebSearchQuotaReason) Valid() bool {
switch e {
case WebSearchQuotaReasonKeyRejected:
return true
case WebSearchQuotaReasonNoKey:
return true
case WebSearchQuotaReasonNotObserved:
return true
case WebSearchQuotaReasonNotReported:
return true
case WebSearchQuotaReasonProviderUnavailable:
return true
default:
return false
}
}
// Defines values for WebSearchQuotaUnit.
const (
WebSearchQuotaUnitCredits WebSearchQuotaUnit = "credits"
WebSearchQuotaUnitRequests WebSearchQuotaUnit = "requests"
WebSearchQuotaUnitUsd WebSearchQuotaUnit = "usd"
)
// Valid indicates whether the value is a known member of the WebSearchQuotaUnit enum.
func (e WebSearchQuotaUnit) Valid() bool {
switch e {
case WebSearchQuotaUnitCredits:
return true
case WebSearchQuotaUnitRequests:
return true
case WebSearchQuotaUnitUsd:
return true
default:
return false
}
}
// Defines values for WebSearchRecency.
const (
WebSearchRecencyDay WebSearchRecency = "day"
WebSearchRecencyMonth WebSearchRecency = "month"
WebSearchRecencyWeek WebSearchRecency = "week"
WebSearchRecencyYear WebSearchRecency = "year"
)
// Valid indicates whether the value is a known member of the WebSearchRecency enum.
func (e WebSearchRecency) Valid() bool {
switch e {
case WebSearchRecencyDay:
return true
case WebSearchRecencyMonth:
return true
case WebSearchRecencyWeek:
return true
case WebSearchRecencyYear:
return true
default:
return false
}
}
// Defines values for WebSearchSearchBackend.
const (
WebSearchSearchBackendBrave WebSearchSearchBackend = "brave"
WebSearchSearchBackendDuckduckgo WebSearchSearchBackend = "duckduckgo"
WebSearchSearchBackendExa WebSearchSearchBackend = "exa"
WebSearchSearchBackendFirecrawl WebSearchSearchBackend = "firecrawl"
WebSearchSearchBackendTavily WebSearchSearchBackend = "tavily"
WebSearchSearchBackendYou WebSearchSearchBackend = "you"
)
// Valid indicates whether the value is a known member of the WebSearchSearchBackend enum.
func (e WebSearchSearchBackend) Valid() bool {
switch e {
case WebSearchSearchBackendBrave:
return true
case WebSearchSearchBackendDuckduckgo:
return true
case WebSearchSearchBackendExa:
return true
case WebSearchSearchBackendFirecrawl:
return true
case WebSearchSearchBackendTavily:
return true
case WebSearchSearchBackendYou:
return true
default:
return false
}
}
// Defines values for ResolveConnectorAccount200JSONResponseBodyStatus.
const (
ResolveConnectorAccount200JSONResponseBodyStatusAccountAmbiguous ResolveConnectorAccount200JSONResponseBodyStatus = "account_ambiguous"
ResolveConnectorAccount200JSONResponseBodyStatusAuthorizationRequired ResolveConnectorAccount200JSONResponseBodyStatus = "authorization_required"
ResolveConnectorAccount200JSONResponseBodyStatusReady ResolveConnectorAccount200JSONResponseBodyStatus = "ready"
)
// Valid indicates whether the value is a known member of the ResolveConnectorAccount200JSONResponseBodyStatus enum.
func (e ResolveConnectorAccount200JSONResponseBodyStatus) Valid() bool {
switch e {
case ResolveConnectorAccount200JSONResponseBodyStatusAccountAmbiguous:
return true
case ResolveConnectorAccount200JSONResponseBodyStatusAuthorizationRequired:
return true
case ResolveConnectorAccount200JSONResponseBodyStatusReady:
return true
default:
return false
}
}
// Defines values for RequestAgentBrowserConnection200JSONResponseBodyStatus.
const (
RequestAgentBrowserConnection200JSONResponseBodyStatusConnectionRequested RequestAgentBrowserConnection200JSONResponseBodyStatus = "connection_requested"
RequestAgentBrowserConnection200JSONResponseBodyStatusReady RequestAgentBrowserConnection200JSONResponseBodyStatus = "ready"
)
// Valid indicates whether the value is a known member of the RequestAgentBrowserConnection200JSONResponseBodyStatus enum.
func (e RequestAgentBrowserConnection200JSONResponseBodyStatus) Valid() bool {
switch e {
case RequestAgentBrowserConnection200JSONResponseBodyStatusConnectionRequested:
return true
case RequestAgentBrowserConnection200JSONResponseBodyStatusReady:
return true
default:
return false
}
}
// Defines values for RequestAgentComputerPermissions200JSONResponseBodyStatus.
const (
PermissionRequested RequestAgentComputerPermissions200JSONResponseBodyStatus = "permission_requested"
Ready RequestAgentComputerPermissions200JSONResponseBodyStatus = "ready"
)
// Valid indicates whether the value is a known member of the RequestAgentComputerPermissions200JSONResponseBodyStatus enum.
func (e RequestAgentComputerPermissions200JSONResponseBodyStatus) Valid() bool {
switch e {
case PermissionRequested:
return true
case Ready:
return true
default:
return false
}
}
// Defines values for PublicReplaceAgentCLIDocumentBodyParamsFormat.
const (
PublicReplaceAgentCLIDocumentBodyParamsFormatBlocks PublicReplaceAgentCLIDocumentBodyParamsFormat = "blocks"
PublicReplaceAgentCLIDocumentBodyParamsFormatHtml PublicReplaceAgentCLIDocumentBodyParamsFormat = "html"
)
// Valid indicates whether the value is a known member of the PublicReplaceAgentCLIDocumentBodyParamsFormat enum.
func (e PublicReplaceAgentCLIDocumentBodyParamsFormat) Valid() bool {
switch e {
case PublicReplaceAgentCLIDocumentBodyParamsFormatBlocks:
return true
case PublicReplaceAgentCLIDocumentBodyParamsFormatHtml:
return true
default:
return false
}
}
// Defines values for PublicDownloadAgentCLIFileParamsFormat.
const (
PublicDownloadAgentCLIFileParamsFormatBlocks PublicDownloadAgentCLIFileParamsFormat = "blocks"
PublicDownloadAgentCLIFileParamsFormatHtml PublicDownloadAgentCLIFileParamsFormat = "html"
PublicDownloadAgentCLIFileParamsFormatMarkdown PublicDownloadAgentCLIFileParamsFormat = "markdown"
)
// Valid indicates whether the value is a known member of the PublicDownloadAgentCLIFileParamsFormat enum.
func (e PublicDownloadAgentCLIFileParamsFormat) Valid() bool {
switch e {
case PublicDownloadAgentCLIFileParamsFormatBlocks:
return true
case PublicDownloadAgentCLIFileParamsFormatHtml:
return true
case PublicDownloadAgentCLIFileParamsFormatMarkdown:
return true
default:
return false
}
}
// AgentAccountProfileQueryRequest Reads the Account fields of the Human who owns this Agent.
type AgentAccountProfileQueryRequest = map[string]interface{}
// AgentAccountProfileResponse defines model for AgentAccountProfileResponse.
type AgentAccountProfileResponse struct {
Bio string `json:"bio"`
Name string `json:"name"`
Organization string `json:"organization"`
}
// AgentAccountProfileUpdateRequest Sets at least one Account field of the Human who owns this Agent.
type AgentAccountProfileUpdateRequest struct {
Bio *string `json:"bio,omitempty"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
Name *string `json:"name,omitempty"`
Organization *string `json:"organization,omitempty"`
}
// AgentAddRoomMemberRequest One existing Agent to add to the calling Agent's Context Room. The Room and the Sponsor who admits the Agent are derived by TeamHub, never accepted from the caller. Adding a member is idempotent by itself, so TeamHub keeps no receipt for invocation_id.
type AgentAddRoomMemberRequest struct {
// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ActorId Id `json:"actor_id"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
}
// AgentAddRoomMemberResponse The Agent is a member of the Room. added is false when it already was, so a retried call adds nothing and announces nothing.
type AgentAddRoomMemberResponse struct {
// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ActorId Id `json:"actor_id"`
Added bool `json:"added"`
// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RoomId Id `json:"room_id"`
}
// AgentAgentChangeResponse applied means TeamHub made the change now. confirmation_pending means it waits for the Sponsor's card; TeamHub runs it after approval and tells the caller the result.
type AgentAgentChangeResponse struct {
// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ActorId *Id `json:"actor_id,omitempty"`
// InteractionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
InteractionId *Id `json:"interaction_id,omitempty"`
// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
MessageId *Id `json:"message_id,omitempty"`
// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RoomId *Id `json:"room_id,omitempty"`
Status AgentAgentChangeResponseStatus `json:"status"`
}
// AgentAgentChangeResponseStatus defines model for AgentAgentChangeResponse.Status.
type AgentAgentChangeResponseStatus string
// AgentAgentProfile The current profile of one General Agent of the calling Agent's Sponsor.
type AgentAgentProfile struct {
// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ActorId Id `json:"actor_id"`
Description string `json:"description"`
Name string `json:"name"`
Prompt string `json:"prompt"`
}
// AgentApiError Safe error detail returned by the TeamHub Agent API.
type AgentApiError struct {
// Code Stable machine-readable failure classification.
Code AgentApiErrorCode `json:"code"`
// Details Machine-readable facts a failure carries for the CLI to act on. A search_key_requested failure names the card it posted and the backend it shows; a quota or rate limit names the backend and the other backends ready now.
Details *AgentApiErrorDetails `json:"details,omitempty"`
// Issues Safe field-level validation issues, when the failure has actionable paths.
Issues *[]AgentApiErrorIssue `json:"issues,omitempty"`
// Message Human-readable failure summary containing no credential material.
Message string `json:"message"`
// RequestId Correlation identifier safe to include in logs and support reports.
RequestId string `json:"request_id"`
}
// AgentApiErrorCode Stable machine-readable failure classification.
type AgentApiErrorCode string
// AgentApiErrorDetails Machine-readable facts a failure carries for the CLI to act on. A search_key_requested failure names the card it posted and the backend it shows; a quota or rate limit names the backend and the other backends ready now.
type AgentApiErrorDetails struct {
Backend *string `json:"backend,omitempty"`
InteractionId *string `json:"interaction_id,omitempty"`
MessageId *string `json:"message_id,omitempty"`
// Origin requested when the command named the backend the card shows; suggested when it named none and TeamHub picked one.
Origin *AgentApiErrorDetailsOrigin `json:"origin,omitempty"`
ReadyBackends *[]string `json:"ready_backends,omitempty"`
Reason *AgentApiErrorDetailsReason `json:"reason,omitempty"`
RetryAfterSeconds *int `json:"retry_after_seconds,omitempty"`
RoomId *string `json:"room_id,omitempty"`
}
// AgentApiErrorDetailsOrigin requested when the command named the backend the card shows; suggested when it named none and TeamHub picked one.
type AgentApiErrorDetailsOrigin string
// AgentApiErrorDetailsReason defines model for AgentApiErrorDetails.Reason.
type AgentApiErrorDetailsReason string
// AgentApiErrorEnvelope Standard failure envelope for every TeamHub Agent API operation.
type AgentApiErrorEnvelope struct {
// Error Safe error detail returned by the TeamHub Agent API.
Error AgentApiError `json:"error"`
}
// AgentApiErrorIssue One model-safe validation issue.
type AgentApiErrorIssue struct {
Code string `json:"code"`
Message string `json:"message"`
Path string `json:"path"`
}
// AgentAppToolConfirmationPending Nothing external ran. After the sponsor approves the card, TeamHub runs the stored call once and tells the Agent the result; a denial (with its reason) or expiry is reported the same way. An identical pending call reuses its card.
type AgentAppToolConfirmationPending struct {
// InteractionId The confirmation card's decision.
InteractionId string `json:"interaction_id"`
MessageId string `json:"message_id"`
RoomId string `json:"room_id"`
Status AgentAppToolConfirmationPendingStatus `json:"status"`
}
// AgentAppToolConfirmationPendingStatus defines model for AgentAppToolConfirmationPending.Status.
type AgentAppToolConfirmationPendingStatus string
// AgentAppToolResult defines model for AgentAppToolResult.
type AgentAppToolResult struct {
// Data Sanitized JSON result returned by the connected application Tool.
Data interface{} `json:"data"`
}
// AgentAppendDocumentBlocksSemanticOperation defines model for AgentAppendDocumentBlocksSemanticOperation.
type AgentAppendDocumentBlocksSemanticOperation struct {
// Blocks Every block and nested child must have a unique valid id. Missing or duplicate IDs are invalid input. Preserve IDs for updates and choose new IDs for inserts.
Blocks AgentDocumentSemanticBlocks `json:"blocks"`
Kind string `json:"kind"`
}
// AgentAskUserQuestion One question on the card. The sponsor picks one option, or several when multiple is true; an open question is asked in an ordinary message instead. TeamHub names the question and its options itself and reports the answer by their text.
type AgentAskUserQuestion struct {
Multiple *bool `json:"multiple,omitempty"`
Options []string `json:"options"`
Question string `json:"question"`
}
// AgentAskUserRequest One question card the current Agent posts in its Context Room, or in one of that Room's Threads, for its sponsor to answer. The answer arrives where the card was posted.
type AgentAskUserRequest struct {
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
Questions []AgentAskUserQuestion `json:"questions"`
// ThreadId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ThreadId *Id `json:"thread_id,omitempty"`
Title string `json:"title"`
}
// AgentAskUserResponse defines model for AgentAskUserResponse.
type AgentAskUserResponse struct {
// InteractionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
InteractionId Id `json:"interaction_id"`
// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
MessageId Id `json:"message_id"`
Status AgentAskUserResponseStatus `json:"status"`
}
// AgentAskUserResponseStatus defines model for AgentAskUserResponse.Status.
type AgentAskUserResponseStatus string
// AgentAvailableAgent One active General Agent that the calling Agent's Human Sponsor is authorized to use.
type AgentAvailableAgent struct {
// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ActorId Id `json:"actor_id"`
// Description Current Human-facing description of the Agent's role and capability.
Description string `json:"description"`
// Name Current Agent display name.
Name string `json:"name"`
}
// AgentCLIFile A Document the Agent reads. An Agent reads, writes and manages every Document its Human does; shared_with_me marks a Document someone shared with this Agent so it knows to look at it.
type AgentCLIFile struct {
DocumentId string `json:"document_id"`
Editable bool `json:"editable"`
Name string `json:"name"`
ReadOnly bool `json:"read_only"`
Role AgentCLIFileRole `json:"role"`
SharedWithMe bool `json:"shared_with_me"`
VersionId string `json:"version_id"`
VersionNumber int `json:"version_number"`
}
// AgentCLIFileRole defines model for AgentCLIFile.Role.
type AgentCLIFileRole string
// AgentCLIFileLinkCommand defines model for AgentCLIFileLinkCommand.
type AgentCLIFileLinkCommand struct {
ExpectedVersion *int64 `json:"expected_version,omitempty"`
Operation AgentCLIFileLinkCommandOperation `json:"operation"`
Reset *bool `json:"reset,omitempty"`
Role *AgentCLIFileLinkCommandRole `json:"role,omitempty"`
}
// AgentCLIFileLinkCommandOperation defines model for AgentCLIFileLinkCommand.Operation.
type AgentCLIFileLinkCommandOperation string
// AgentCLIFileLinkCommandRole defines model for AgentCLIFileLinkCommand.Role.
type AgentCLIFileLinkCommandRole string
// AgentCLIFileShare defines model for AgentCLIFileShare.
type AgentCLIFileShare struct {
Role AgentCLIFileShareRole `json:"role"`
TargetId string `json:"target_id"`
TargetKind AgentCLIFileShareTargetKind `json:"target_kind"`
}
// AgentCLIFileShareRole defines model for AgentCLIFileShare.Role.
type AgentCLIFileShareRole string
// AgentCLIFileShareTargetKind defines model for AgentCLIFileShare.TargetKind.
type AgentCLIFileShareTargetKind string
// AgentCapabilityResult The domain receipt. Knowledge keeps the original evidence schema.
type AgentCapabilityResult map[string]interface{}
// AgentCheckTaskRequest One Task to show, or none to list the Tasks this Room delegated.
type AgentCheckTaskRequest struct {
// TaskId A delegated Task created by this Room's Meta.
TaskId *AgentTaskId `json:"task_id,omitempty"`
}
// AgentCheckTaskResponse Exactly one of task (with task_id) or tasks (without).
type AgentCheckTaskResponse struct {
Task *AgentTaskDetail `json:"task,omitempty"`
Tasks *[]AgentTaskSummary `json:"tasks,omitempty"`
}
// AgentConnectedApp defines model for AgentConnectedApp.
type AgentConnectedApp struct {
AppKey string `json:"app_key"`
ConnectionId string `json:"connection_id"`
DisplayName string `json:"display_name"`
IdentityLabel string `json:"identity_label"`
}
// AgentConnectedAppTool defines model for AgentConnectedAppTool.
type AgentConnectedAppTool struct {
AppKey string `json:"app_key"`
AvailableConnections []AgentConnectedApp `json:"available_connections"`
Description string `json:"description"`
InputSchema map[string]interface{} `json:"input_schema"`
Name string `json:"name"`
OutputSchema map[string]interface{} `json:"output_schema"`
ToolSlug string `json:"tool_slug"`
ToolVersion string `json:"tool_version"`
}
// AgentContextMember defines model for AgentContextMember.
type AgentContextMember struct {
// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ActorId Id `json:"actor_id"`
// AgentType Current registered Agent type; omitted for Human members.
AgentType *AgentContextMemberAgentType `json:"agent_type,omitempty"`
// Description Current Agent capability description, treated as untrusted data; omitted for Human members.
Description *string `json:"description,omitempty"`
DisplayName string `json:"display_name"`
Kind AgentContextMemberKind `json:"kind"`
}
// AgentContextMemberAgentType Current registered Agent type; omitted for Human members.
type AgentContextMemberAgentType string
// AgentContextMemberKind defines model for AgentContextMember.Kind.
type AgentContextMemberKind string
// AgentCreateAgentRequest A new General Agent for the calling Agent's Sponsor. Sponsor, Runtime, and Room are derived by TeamHub, never accepted from the caller.
type AgentCreateAgentRequest struct {
Description *string `json:"description,omitempty"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
Name string `json:"name"`
Prompt string `json:"prompt"`
}
// AgentCreateRoutineRequest defines model for AgentCreateRoutineRequest.
type AgentCreateRoutineRequest struct {
Instruction string `json:"instruction"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
// MentionActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
MentionActorId *Id `json:"mention_actor_id,omitempty"`
Name string `json:"name"`
Schedule AgentRoutineSchedule `json:"schedule"`
// TrackingItemId Tracking Item of the represented Human this Routine serves. Deleting the item deletes the Routine.
TrackingItemId *string `json:"tracking_item_id,omitempty"`
// TrackingPurpose What this Routine checks or reminds for its Tracking Item. Required with tracking_item_id.
TrackingPurpose *string `json:"tracking_purpose,omitempty"`
}
// AgentCreateTaskRequest One delegated Task created and started immediately for the calling Agent's own AlterEgo. The origin Room is the caller's Room Context; no Human approval is requested.
type AgentCreateTaskRequest struct {
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
// Name Short Task title shown in Task lists.
Name string `json:"name"`
// Requirement Self-contained plain-text brief: the work, the origin Room context it needs, Document IDs or file paths, the completion standard, and what to report.
Requirement string `json:"requirement"`
}
// AgentCreateTaskResponse The created and started delegated Task.
type AgentCreateTaskResponse struct {
// Accepted Whether TeamHub durably created the Task.
Accepted bool `json:"accepted"`
// DuplicateRequest True only when TeamHub recovered a prior committed invocation.
DuplicateRequest bool `json:"duplicate_request"`
// Status A delegated Task starts running immediately.
Status string `json:"status"`
// TaskId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
TaskId Id `json:"task_id"`
}
// AgentCreateTeamMdRequest Infrastructure-owned active Run provenance plus one complete teamMD collaboration protocol document. TeamHub parses and validates the content, stores it as the owning Room's team.md, which Agents read through teamhub room protocol, and notifies every declared participant except the publishing Agent, including a separately appointed Orchestrator. TeamHub rejects the whole submission when any rule fails.
type AgentCreateTeamMdRequest struct {
// Content Complete team.md Markdown, including the collaborate_pattern frontmatter and the Task Goal, Orchestrator, and Team Member sections. TeamHub stores it verbatim.
Content string `json:"content"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
}
// AgentCreateTeamMdResponse The persisted team.md and the notified participants.
type AgentCreateTeamMdResponse struct {
// Created Whether TeamHub accepted and persisted the team.md.
Created bool `json:"created"`
// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
MessageId Id `json:"message_id"`
// NotifiedActorIds Declared participant Actor IDs that TeamHub notified, including a separately appointed Orchestrator. The publishing Agent is excluded.
NotifiedActorIds []Id `json:"notified_actor_ids"`
// Revision Monotonic revision of this Room's team.md after the write.
Revision int64 `json:"revision"`
// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RoomId Id `json:"room_id"`
}
// AgentCreationActorIds Duplicate-free TeamHub Actor identifiers in caller-supplied order.
type AgentCreationActorIds = []Id
// AgentCreationApprovalResponse Durable pending Room creation approval request.
type AgentCreationApprovalResponse struct {
// Accepted Whether TeamHub accepted and durably persisted the Creation request.
Accepted bool `json:"accepted"`
// CreationApprovalRequestId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
CreationApprovalRequestId Id `json:"creation_approval_request_id"`
// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
MessageId Id `json:"message_id"`
// Status Initial lifecycle state while awaiting a Human decision.
Status string `json:"status"`
}
// AgentCreationMessageSegment One structured initial message segment accepted by a Creation request. Every segment must include its type discriminator. Document and file segments remain excluded because the destination Room does not exist yet; create_room delivers existing Documents through its separate artifacts field.
type AgentCreationMessageSegment struct {
union json.RawMessage
}
// AgentCreationMessageSegments Ordered text or Actor-reference segments for the first message created after approval. Copy one of these JSON shapes: {"type":"text","content":"..."} or {"type":"reference","content":"...","target":"actor_...","target_type":"agent"}. Every item needs its type discriminator; combined content must be non-blank and no longer than 50,000 Unicode characters.
type AgentCreationMessageSegments = []AgentCreationMessageSegment
// AgentCurrentDocumentProjection Host-only canonical Markdown for the committed Revision. The Agent CLI must write these exact bytes to the active read-only latest Document projection and omit them from the model-visible Tool result.
type AgentCurrentDocumentProjection struct {
ContentBase64 []byte `json:"content_base64"`
Sha256 string `json:"sha256"`
SizeBytes int64 `json:"size_bytes"`
}
// AgentDeleteDocumentBlocksSemanticOperation defines model for AgentDeleteDocumentBlocksSemanticOperation.
type AgentDeleteDocumentBlocksSemanticOperation struct {
Kind string `json:"kind"`
StableBlockIds []Id `json:"stable_block_ids"`
}
// AgentDeleteRoutineResponse defines model for AgentDeleteRoutineResponse.
type AgentDeleteRoutineResponse struct {
Deleted bool `json:"deleted"`
// RoutineId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RoutineId Id `json:"routine_id"`
}
// AgentDocumentAuthorityId Opaque document identifier.
type AgentDocumentAuthorityId = string
// AgentDocumentComment Latest visible, non-deleted version of one Document Comment.
type AgentDocumentComment struct {
// Author Narrow visible author projection for one Document Comment.
Author AgentDocumentCommentAuthor `json:"author"`
// CommentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
CommentId Id `json:"comment_id"`
CreatedAt time.Time `json:"created_at"`
// ParentCommentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ParentCommentId *Id `json:"parent_comment_id,omitempty"`
Segments []DocumentCommentSegment `json:"segments"`
}
// AgentDocumentCommentAuthor Narrow visible author projection for one Document Comment.
type AgentDocumentCommentAuthor struct {
DisplayName string `json:"display_name"`
Kind AgentDocumentCommentAuthorKind `json:"kind"`
}
// AgentDocumentCommentAuthorKind defines model for AgentDocumentCommentAuthor.Kind.
type AgentDocumentCommentAuthorKind string
// AgentDocumentCommentReplyRequest Reply to the active Document Comment Thread as the current Agent. Document, Agent, origin Room, and idempotency scope remain infrastructure-owned.
type AgentDocumentCommentReplyRequest struct {
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
// ParentCommentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ParentCommentId *Id `json:"parent_comment_id,omitempty"`
Segments []DocumentCommentSegment `json:"segments"`
// ThreadId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ThreadId Id `json:"thread_id"`
}
// AgentDocumentCommentReplyResponse Durable Agent Comment reply.
type AgentDocumentCommentReplyResponse struct {
// CommentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
CommentId Id `json:"comment_id"`
Replayed bool `json:"replayed"`
// ThreadId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ThreadId Id `json:"thread_id"`
}
// AgentDocumentCommentTextReplacementRequest Replace the current attached text selection for the active Document Comment Thread. TeamHub captures the current canonical Revision as the mutation-scoped base and commits Revision and History atomically.
type AgentDocumentCommentTextReplacementRequest struct {
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
ReplaceStr string `json:"replace_str"`
// ThreadId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ThreadId Id `json:"thread_id"`
}
// AgentDocumentCommentTextReplacementResponse Canonical replacement result.
type AgentDocumentCommentTextReplacementResponse struct {
ConflictReason *string `json:"conflict_reason,omitempty"`
// CurrentDocumentProjection Host-only canonical Markdown for the committed Revision. The Agent CLI must write these exact bytes to the active read-only latest Document projection and omit them from the model-visible Tool result.
CurrentDocumentProjection *AgentCurrentDocumentProjection `json:"current_document_projection,omitempty"`
// HistoryEntryId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
HistoryEntryId *Id `json:"history_entry_id,omitempty"`
Observation string `json:"observation"`
Replayed bool `json:"replayed"`
// RevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RevisionId *Id `json:"revision_id,omitempty"`
Status AgentDocumentCommentTextReplacementResponseStatus `json:"status"`
// ThreadId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ThreadId Id `json:"thread_id"`
}
// AgentDocumentCommentTextReplacementResponseStatus defines model for AgentDocumentCommentTextReplacementResponse.Status.
type AgentDocumentCommentTextReplacementResponseStatus string
// AgentDocumentCommentThreadRequest Read the active attached, unresolved Document Comment Thread selected by the current Document Local Run. TeamHub derives the Document and Agent from trusted Context authority.
type AgentDocumentCommentThreadRequest struct {
// ThreadId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ThreadId Id `json:"thread_id"`
}
// AgentDocumentCommentThreadResponse Attached selection and latest visible comments for the active unresolved Thread. Deleted comments, edit timestamps, resolution state, and internal trigger flags are omitted.
type AgentDocumentCommentThreadResponse struct {
Comments []AgentDocumentComment `json:"comments"`
// Selection Current attached text selection for one visible Document Comment Thread.
Selection AgentDocumentCommentThreadSelection `json:"selection"`
// ThreadId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ThreadId Id `json:"thread_id"`
}
// AgentDocumentCommentThreadSelection Current attached text selection for one visible Document Comment Thread.
type AgentDocumentCommentThreadSelection struct {
ContextAfter string `json:"context_after"`
ContextBefore string `json:"context_before"`
QuotedText string `json:"quoted_text"`
}
// AgentDocumentCreateRequest One native Document creation command. TeamHub derives the Agent owner from the credential and rechecks the current document permissions for the requested business target.
type AgentDocumentCreateRequest struct {
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
Markdown string `json:"markdown"`
Title string `json:"title"`
}
// AgentDocumentCreateResponse Canonical Agent-owned native Document result.
type AgentDocumentCreateResponse struct {
// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
DocumentId Id `json:"document_id"`
Replayed bool `json:"replayed"`
// RevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RevisionId Id `json:"revision_id"`
Status string `json:"status"`
}
// AgentDocumentSemanticBlocks Every block and nested child must have a unique valid id. Missing or duplicate IDs are invalid input. Preserve IDs for updates and choose new IDs for inserts.
type AgentDocumentSemanticBlocks = []map[string]interface{}
// AgentDocumentSemanticMutationRequest One fixed semantic edit command. TeamHub validates the current Agent permissions and applies the edit against the current Document revision. Supply document_id; TeamHub validates current authority before mutation.
type AgentDocumentSemanticMutationRequest struct {
// DocumentId Opaque document identifier.
DocumentId AgentDocumentAuthorityId `json:"document_id"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
SchemaVersion string `json:"schema_version"`
SemanticChange AgentDocumentSemanticOperations `json:"semantic_change"`
}
// AgentDocumentSemanticMutationResponse Canonical durable semantic mutation result.
type AgentDocumentSemanticMutationResponse struct {
ConflictReason *string `json:"conflict_reason,omitempty"`
// HistoryEntryId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
HistoryEntryId *Id `json:"history_entry_id,omitempty"`
Replayed bool `json:"replayed"`
// RevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RevisionId *Id `json:"revision_id,omitempty"`
// SemanticMutationId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
SemanticMutationId Id `json:"semantic_mutation_id"`
Status AgentDocumentSemanticMutationResponseStatus `json:"status"`
}
// AgentDocumentSemanticMutationResponseStatus defines model for AgentDocumentSemanticMutationResponse.Status.
type AgentDocumentSemanticMutationResponseStatus string
// AgentDocumentSemanticOperations defines model for AgentDocumentSemanticOperations.
type AgentDocumentSemanticOperations = []AgentDocumentSemanticOperations_Item
// AgentDocumentSemanticOperations_Item defines model for AgentDocumentSemanticOperations.Item.
type AgentDocumentSemanticOperations_Item struct {
union json.RawMessage
}
// AgentExecuteAppToolRequest defines model for AgentExecuteAppToolRequest.
type AgentExecuteAppToolRequest struct {
Arguments map[string]interface{} `json:"arguments"`
ConnectionId string `json:"connection_id"`
ToolSlug string `json:"tool_slug"`
ToolVersion string `json:"tool_version"`
}
// AgentExecuteAppToolResponse The Tool result, or, for a write that needs the sponsor's confirmation, the receipt of the confirmation card TeamHub posted instead of running it. TeamHub classifies every call: reads and writes nobody else sees run at once; other writes, including any Tool TeamHub does not know, wait for the card.
type AgentExecuteAppToolResponse struct {
union json.RawMessage
}
// AgentGetAgentRequest One General Agent of the calling Agent's Sponsor to read.
type AgentGetAgentRequest struct {
// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ActorId Id `json:"actor_id"`
}
// AgentHistoryInbox defines model for AgentHistoryInbox.
type AgentHistoryInbox struct {
InboxId string `json:"inbox_id"`
Kind AgentHistoryInboxKind `json:"kind"`
}
// AgentHistoryInboxKind defines model for AgentHistoryInbox.Kind.
type AgentHistoryInboxKind string
// AgentHistoryMessage defines model for AgentHistoryMessage.
type AgentHistoryMessage struct {
Author string `json:"author"`
AuthorActorId string `json:"author_actor_id"`
AuthorKind AgentHistoryMessageAuthorKind `json:"author_kind"`
Body string `json:"body"`
ContextMessageIds []string `json:"context_message_ids"`
CreatedAt time.Time `json:"created_at"`
InboxId string `json:"inbox_id"`
MessageId string `json:"message_id"`
MessageKind AgentHistoryMessageMessageKind `json:"message_kind"`
ResourceReferences []struct {
DocumentId string `json:"document_id"`
} `json:"resource_references"`
Segments []MessageSegment `json:"segments"`
}
// AgentHistoryMessageAuthorKind defines model for AgentHistoryMessage.AuthorKind.
type AgentHistoryMessageAuthorKind string
// AgentHistoryMessageMessageKind defines model for AgentHistoryMessage.MessageKind.
type AgentHistoryMessageMessageKind string
// AgentInsertDocumentBlocksSemanticOperation defines model for AgentInsertDocumentBlocksSemanticOperation.
type AgentInsertDocumentBlocksSemanticOperation struct {
// Blocks Every block and nested child must have a unique valid id. Missing or duplicate IDs are invalid input. Preserve IDs for updates and choose new IDs for inserts.
Blocks AgentDocumentSemanticBlocks `json:"blocks"`
Kind string `json:"kind"`
Position AgentInsertDocumentBlocksSemanticOperationPosition `json:"position"`
// StableBlockId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
StableBlockId Id `json:"stable_block_id"`
}
// AgentInsertDocumentBlocksSemanticOperationPosition defines model for AgentInsertDocumentBlocksSemanticOperation.Position.
type AgentInsertDocumentBlocksSemanticOperationPosition string
// AgentInvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
type AgentInvocationId = string
// AgentKnowledgeReadRequest Selected evidence sections to read after a search.
type AgentKnowledgeReadRequest struct {
// EvidenceId Opaque raw_... candidate ID from a search; pass it unchanged.
EvidenceId string `json:"evidenceId"`
// SectionRequests Sections selected from the candidate directory.
SectionRequests []struct {
// Offset Character offset for continuing a truncated section.
Offset *int `json:"offset,omitempty"`
// SectionId Stable section identifier within one evidence item.
SectionId string `json:"sectionId"`
} `json:"sectionRequests"`
}
// AgentKnowledgeSearchRequest One search over every source of the Human's knowledge index (Sessions, recordings, My pages, mail, Pocket Notes, the Profile, the published Wiki and Daily and Weekly reports), returned as two separately ranked lists, items (originals) and summaries (Wiki and reports).
type AgentKnowledgeSearchRequest struct {
// Alternates Up to six synonyms, translations or related terms the evidence may use instead of the query's words. Each is searched separately beside the query; always pass some when the query is a single wording.
Alternates *[]string `json:"alternates,omitempty"`
// AsOf Day a changing value or state is asked for, today for the current one; among similarly relevant results, those said shortly before that day rank a little higher and later ones remain.
AsOf *openapi_types.Date `json:"asOf,omitempty"`
// DateFrom Start of the period the asked records were made in, such as mail received in January; ranks sources and facts recorded then higher and excludes none.
DateFrom *openapi_types.Date `json:"dateFrom,omitempty"`
// DateTo End of the period the sources were recorded in; pair with dateFrom.
DateTo *openapi_types.Date `json:"dateTo,omitempty"`
// EventFrom Inclusive start of when the asked event happened, whenever it was recorded; ranks facts and sources from that period higher and excludes none.
EventFrom *openapi_types.Date `json:"eventFrom,omitempty"`
// EventTo Inclusive end of when the asked event happened; pair with eventFrom.
EventTo *openapi_types.Date `json:"eventTo,omitempty"`
// Page Result page of the same search; a result with nextPage has more on that page.
Page *int `json:"page,omitempty"`
// Query The distinctive phrase, entity, or term being asked about, keeping the current request's named project, person, or event. Do not add unrelated topics from earlier turns or put dates in the query text.
Query string `json:"query"`
// Scope Return only one list with the whole result size, summaries (Wiki pages and Daily/Weekly reports) or originals (conversations, recordings, mail, documents, notes, the Profile). Omit to get both.
Scope *AgentKnowledgeSearchRequestScope `json:"scope,omitempty"`
}
// AgentKnowledgeSearchRequestScope Return only one list with the whole result size, summaries (Wiki pages and Daily/Weekly reports) or originals (conversations, recordings, mail, documents, notes, the Profile). Omit to get both.
type AgentKnowledgeSearchRequestScope string
// AgentListAvailableAgentsRequest Manifest-attested pagination input for Sponsor-authorized Agent discovery. Sponsor, Human, Tenant, and candidate Agent identifiers are derived by TeamHub rather than accepted as authority from the caller.
type AgentListAvailableAgentsRequest struct {
// Cursor Opaque, case-sensitive identifier. Clients must not infer type or time from it.
Cursor *Id `json:"cursor,omitempty"`
// Limit Maximum number of Agents returned in this page.
Limit *int32 `json:"limit,omitempty"`
}
// AgentListAvailableAgentsResponse One stable page of active General Agents authorized for the calling Agent's exact Human Sponsor, plus the Manifest attested in the same authorization transaction.
type AgentListAvailableAgentsResponse struct {
Agents []AgentAvailableAgent `json:"agents"`
// NextCursor Opaque, case-sensitive identifier. Clients must not infer type or time from it.
NextCursor *Id `json:"next_cursor,omitempty"`
}
// AgentListConnectedAppsRequest defines model for AgentListConnectedAppsRequest.
type AgentListConnectedAppsRequest = map[string]interface{}
// AgentListConnectedAppsResponse defines model for AgentListConnectedAppsResponse.
type AgentListConnectedAppsResponse struct {
Connections []AgentConnectedApp `json:"connections"`
}
// AgentListRoutinesResponse defines model for AgentListRoutinesResponse.
type AgentListRoutinesResponse struct {
Routines []AgentRoutine `json:"routines"`
}
// AgentMessageCommitMultipart defines model for AgentMessageCommitMultipart.
type AgentMessageCommitMultipart struct {
// File Repeated opaque upload_id file parts, at most 50 MiB each and 512 MiB combined.
File *[]openapi_types.File `json:"file,omitempty"`
// Metadata Strict AgentMessageCommitMetadata JSON, at most 5 MiB, sent before file parts. Uploads identify immutable file parts by upload_id; file part filename is that ID. Local filesystem paths and binary/base64 data do not belong in metadata. Like every Agent command, it carries no execution fields: the CLI names its Local Run in the X-TeamHub-Run-Id header, which TeamHub records on the Message only for a running Run of the same Tenant and Agent whose status shows in the target's collaboration Room.
Metadata string `json:"metadata"`
}
// AgentMessageCommitResponse defines model for AgentMessageCommitResponse.
type AgentMessageCommitResponse struct {
Accepted bool `json:"accepted"`
DuplicateRequest bool `json:"duplicate_request"`
InboxId string `json:"inbox_id"`
MessageId string `json:"message_id"`
Reason *string `json:"reason,omitempty"`
Resources []AgentMessageResource `json:"resources"`
Target struct {
Id string `json:"id"`
Type AgentMessageCommitResponseTargetType `json:"type"`
} `json:"target"`
}
// AgentMessageCommitResponseTargetType defines model for AgentMessageCommitResponse.Target.Type.
type AgentMessageCommitResponseTargetType string
// AgentMessageDocumentResource defines model for AgentMessageDocumentResource.
type AgentMessageDocumentResource struct {
DocumentId string `json:"document_id"`
Kind string `json:"kind"`
Name string `json:"name"`
RevisionId *string `json:"revision_id,omitempty"`
SegmentIndex int `json:"segment_index"`
Status AgentMessageDocumentResourceStatus `json:"status"`
VersionId *string `json:"version_id,omitempty"`
}
// AgentMessageDocumentResourceStatus defines model for AgentMessageDocumentResource.Status.
type AgentMessageDocumentResourceStatus string
// AgentMessageReadRequest defines model for AgentMessageReadRequest.
type AgentMessageReadRequest struct {
Cursor *string `json:"cursor,omitempty"`
InboxId *string `json:"inbox_id,omitempty"`
Limit *int `json:"limit,omitempty"`
ListInboxes *bool `json:"list_inboxes,omitempty"`
MessageIds *[]string `json:"message_ids,omitempty"`
ThreadId *string `json:"thread_id,omitempty"`
union json.RawMessage
}
// AgentMessageReadRequest0 defines model for .
type AgentMessageReadRequest0 = interface{}
// AgentMessageReadRequest1 defines model for .
type AgentMessageReadRequest1 = interface{}
// AgentMessageReadRequest2 defines model for .
type AgentMessageReadRequest2 = interface{}
// AgentMessageReadRequest3 defines model for .
type AgentMessageReadRequest3 = interface{}
// AgentMessageReadResponse defines model for AgentMessageReadResponse.
type AgentMessageReadResponse struct {
HasMore bool `json:"has_more"`
InboxId *string `json:"inbox_id,omitempty"`
Inboxes *[]AgentHistoryInbox `json:"inboxes,omitempty"`
Messages *[]AgentReadMessage `json:"messages,omitempty"`
Mode AgentMessageReadResponseMode `json:"mode"`
NextCursor *string `json:"next_cursor,omitempty"`
RequestedMessageIds *[]string `json:"requested_message_ids,omitempty"`
Root *AgentReadMessage `json:"root,omitempty"`
UnavailableMessageIds *[]string `json:"unavailable_message_ids,omitempty"`
}
// AgentMessageReadResponseMode defines model for AgentMessageReadResponse.Mode.
type AgentMessageReadResponseMode string
// AgentMessageResource defines model for AgentMessageResource.
type AgentMessageResource struct {
union json.RawMessage
}
// AgentMessageSearchRequest defines model for AgentMessageSearchRequest.
type AgentMessageSearchRequest struct {
Cursor *string `json:"cursor,omitempty"`
InboxIds *[]string `json:"inbox_ids,omitempty"`
Limit *int `json:"limit,omitempty"`
Query string `json:"query"`
}
// AgentMessageSearchResponse defines model for AgentMessageSearchResponse.
type AgentMessageSearchResponse struct {
HasMore bool `json:"has_more"`
Messages []AgentHistoryMessage `json:"messages"`
NextCursor *string `json:"next_cursor,omitempty"`
}
// AgentMessageSegmentContent User-visible text carried by this segment.
type AgentMessageSegmentContent = string
// AgentMessageTreeResource defines model for AgentMessageTreeResource.
type AgentMessageTreeResource struct {
DirectoryCount int `json:"directory_count"`
Documents []struct {
DocumentId string `json:"document_id"`
DocumentVersionId string `json:"document_version_id"`
RelativePath string `json:"relative_path"`
} `json:"documents"`
EntryDocumentId *string `json:"entry_document_id,omitempty"`
EntryDocumentVersionId *string `json:"entry_document_version_id,omitempty"`
FileCount int `json:"file_count"`
Kind string `json:"kind"`
PublicationGroupId string `json:"publication_group_id"`
RootPlacementPath string `json:"root_placement_path"`
SegmentIndex int `json:"segment_index"`
Status AgentMessageTreeResourceStatus `json:"status"`
TotalBytes int `json:"total_bytes"`
}
// AgentMessageTreeResourceStatus defines model for AgentMessageTreeResource.Status.
type AgentMessageTreeResourceStatus string
// AgentPersonalProfileBuildRequest Records that this Agent has started writing its owner's Personal Profile. The next revision ends the build; otherwise it ends after 30 minutes. Repeating it keeps the original start, so the invocation ID is not stored.
type AgentPersonalProfileBuildRequest struct {
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
}
// AgentPersonalProfileBuildResponse defines model for AgentPersonalProfileBuildResponse.
type AgentPersonalProfileBuildResponse struct {
// BuildingSince When the build in progress started.
BuildingSince time.Time `json:"building_since"`
}
// AgentPersonalProfileQueryRequest Reads the Personal Profile of the Human who owns this Agent.
type AgentPersonalProfileQueryRequest = map[string]interface{}
// AgentPersonalProfileResponse defines model for AgentPersonalProfileResponse.
type AgentPersonalProfileResponse struct {
// Current The current revision, or null when the owner has no Personal Profile yet.
Current *AgentPersonalProfileRevision `json:"current"`
}
// AgentPersonalProfileRevision The current revision, or null when the owner has no Personal Profile yet.
type AgentPersonalProfileRevision struct {
// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
CreatedAt Timestamp `json:"created_at"`
// Markdown The Markdown TeamHub rendered from profile; edit profile, not this.
Markdown string `json:"markdown"`
// Profile The structured Personal Profile. Text fields are plain text: no line may start with "#", and scripts and images are rejected. TeamHub renders the Markdown. Invalid documents are rejected with profile_document_invalid or profile_module_empty and an issue naming the field.
Profile PersonalProfileDocument `json:"profile"`
// RevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RevisionId Id `json:"revision_id"`
SourceApps *[]string `json:"source_apps,omitempty"`
}
// AgentPersonalProfileWriteRequest defines model for AgentPersonalProfileWriteRequest.
type AgentPersonalProfileWriteRequest struct {
// BaseRevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
BaseRevisionId *Id `json:"base_revision_id,omitempty"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
// Profile The structured Personal Profile. Text fields are plain text: no line may start with "#", and scripts and images are rejected. TeamHub renders the Markdown. Invalid documents are rejected with profile_document_invalid or profile_module_empty and an issue naming the field.
Profile PersonalProfileDocument `json:"profile"`
// SourceApps App keys actually used as evidence for this complete Profile; omit when unknown.
SourceApps *[]string `json:"source_apps,omitempty"`
}
// AgentPersonalProfileWriteResponse defines model for AgentPersonalProfileWriteResponse.
type AgentPersonalProfileWriteResponse struct {
// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
CreatedAt Timestamp `json:"created_at"`
// RevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RevisionId Id `json:"revision_id"`
}
// AgentPresentationSequenceItem defines model for AgentPresentationSequenceItem.
type AgentPresentationSequenceItem struct {
// Content One non-blank user-visible message bubble.
Content string `json:"content"`
// PauseBefore Delay tier before this bubble is published. The first item must be none.
PauseBefore AgentPresentationSequencePause `json:"pause_before"`
}
// AgentPresentationSequenceItems defines model for AgentPresentationSequenceItems.
type AgentPresentationSequenceItems = []AgentPresentationSequenceItem
// AgentPresentationSequencePause Delay tier before this bubble is published. The first item must be none.
type AgentPresentationSequencePause string
// AgentReadMessage defines model for AgentReadMessage.
type AgentReadMessage struct {
Author string `json:"author"`
AuthorActorId string `json:"author_actor_id"`
AuthorKind AgentReadMessageAuthorKind `json:"author_kind"`
Body string `json:"body"`
ContextMessageIds []string `json:"context_message_ids"`
ContextMessages []AgentHistoryMessage `json:"context_messages"`
CreatedAt time.Time `json:"created_at"`
InboxId string `json:"inbox_id"`
MessageId string `json:"message_id"`
MessageKind AgentReadMessageMessageKind `json:"message_kind"`
ResourceReferences []struct {
DocumentId string `json:"document_id"`
} `json:"resource_references"`
Segments []MessageSegment `json:"segments"`
ThreadId *string `json:"thread_id,omitempty"`
}
// AgentReadMessageAuthorKind defines model for AgentReadMessage.AuthorKind.
type AgentReadMessageAuthorKind string
// AgentReadMessageMessageKind defines model for AgentReadMessage.MessageKind.
type AgentReadMessageMessageKind string
// AgentReferenceMessageSegment Actor-reference segment. Include type: reference, content, target, and target_type.
type AgentReferenceMessageSegment struct {
// Content User-visible text carried by this segment.
Content AgentMessageSegmentContent `json:"content"`
// Target Opaque, case-sensitive identifier. Clients must not infer type or time from it.
Target Id `json:"target"`
// TargetType Declared Actor kind; TeamHub verifies it against the target.
TargetType AgentReferenceMessageSegmentTargetType `json:"target_type"`
// Type Discriminator identifying the message segment kind.
Type string `json:"type"`
}
// AgentReferenceMessageSegmentTargetType Declared Actor kind; TeamHub verifies it against the target.
type AgentReferenceMessageSegmentTargetType string
// AgentReplaceDocumentBlocksSemanticOperation defines model for AgentReplaceDocumentBlocksSemanticOperation.
type AgentReplaceDocumentBlocksSemanticOperation struct {
Blocks []map[string]interface{} `json:"blocks"`
Kind string `json:"kind"`
StableBlockIds []Id `json:"stable_block_ids"`
}
// AgentRoomCreationApprovalRequest Room caller input, separately frozen effective payload, Manifest attestation, and infrastructure-owned active Run provenance.
type AgentRoomCreationApprovalRequest struct {
// CallerInput Exact model-visible input submitted to create_room before normalization.
CallerInput AgentRoomCreationCallerInput `json:"caller_input"`
// EffectivePayload Canonical Room creation business payload frozen by the Agent CLI. TeamHub derives the authoritative origin Room from the requested business target in the final transaction.
EffectivePayload AgentRoomCreationEffectivePayload `json:"effective_payload"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
// RequestKind Discriminator selecting Room creation approval.
RequestKind string `json:"request_kind"`
}
// AgentRoomCreationArtifacts Ordered, duplicate-free stable IDs of existing unified Documents from the authorized source Room. TeamHub freezes each current Content Head (Version or native Revision) for delivery after approval.
type AgentRoomCreationArtifacts = []Id
// AgentRoomCreationCallerInput Exact model-visible input submitted to create_room before normalization.
type AgentRoomCreationCallerInput struct {
// Artifacts Ordered, duplicate-free stable IDs of existing unified Documents from the authorized source Room. TeamHub freezes each current Content Head (Version or native Revision) for delivery after approval.
Artifacts *AgentRoomCreationArtifacts `json:"artifacts,omitempty"`
// Description Optional description of the proposed collaboration Room.
Description *string `json:"description,omitempty"`
// InitialMessageSegments Ordered text or Actor-reference segments for the first message created after approval. Copy one of these JSON shapes: {"type":"text","content":"..."} or {"type":"reference","content":"...","target":"actor_...","target_type":"agent"}. Every item needs its type discriminator; combined content must be non-blank and no longer than 50,000 Unicode characters.
InitialMessageSegments AgentCreationMessageSegments `json:"initial_message_segments"`
// MemberIds Duplicate-free TeamHub Actor identifiers in caller-supplied order.
MemberIds AgentCreationActorIds `json:"member_ids"`
// Name Name of the proposed collaboration Room.
Name string `json:"name"`
}
// AgentRoomCreationEffectivePayload Canonical Room creation business payload frozen by the Agent CLI. TeamHub derives the authoritative origin Room from the requested business target in the final transaction.
type AgentRoomCreationEffectivePayload struct {
// Artifacts Ordered, duplicate-free stable IDs of existing unified Documents from the authorized source Room. TeamHub freezes each current Content Head (Version or native Revision) for delivery after approval.
Artifacts *AgentRoomCreationArtifacts `json:"artifacts,omitempty"`
// Description Optional normalized description of the proposed Room.
Description *string `json:"description,omitempty"`
// InitialMessageSegments Ordered text or Actor-reference segments for the first message created after approval. Copy one of these JSON shapes: {"type":"text","content":"..."} or {"type":"reference","content":"...","target":"actor_...","target_type":"agent"}. Every item needs its type discriminator; combined content must be non-blank and no longer than 50,000 Unicode characters.
InitialMessageSegments AgentCreationMessageSegments `json:"initial_message_segments"`
// MemberIds Duplicate-free TeamHub Actor identifiers in caller-supplied order.
MemberIds AgentCreationActorIds `json:"member_ids"`
// Name Normalized name of the proposed collaboration Room.
Name string `json:"name"`
}
// AgentRoomHandoffRequest The Room to hand the Human's request to and the instruction the AnotherMe's Context there carries out. The caller, its direct chat and its Human are derived by TeamHub, never accepted from the caller.
type AgentRoomHandoffRequest struct {
// Instruction Self-contained instruction for the AnotherMe in the target Room. Hidden from the Room's timeline; the receiving Context decides what to post there.
Instruction string `json:"instruction"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RoomId Id `json:"room_id"`
}
// AgentRoomHandoffResponse The handoff posted in the target Room.
type AgentRoomHandoffResponse struct {
// Accepted Whether TeamHub posted the handoff.
Accepted bool `json:"accepted"`
// DuplicateRequest True only when the server recovered a prior committed operation.
DuplicateRequest bool `json:"duplicate_request"`
// HandoffId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
HandoffId Id `json:"handoff_id"`
// InboxId Canonical public Inbox of the target Room.
InboxId string `json:"inbox_id"`
// Reason Optional public receipt explanation.
Reason *string `json:"reason,omitempty"`
}
// AgentRoomMembersRequest defines model for AgentRoomMembersRequest.
type AgentRoomMembersRequest struct {
InboxId string `json:"inbox_id"`
}
// AgentRoomMembersResponse defines model for AgentRoomMembersResponse.
type AgentRoomMembersResponse struct {
InboxId string `json:"inbox_id"`
Members []AgentContextMember `json:"members"`
MembershipRevision int64 `json:"membership_revision"`
// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RoomId Id `json:"room_id"`
}
// AgentRoutine A Routine has exactly one of schedule and listener. A listener Routine is an app listener; it can only be paused and enabled, and goes away when the Human revokes AnotherMe's access to the app.
type AgentRoutine struct {
Enabled bool `json:"enabled"`
// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
Id Id `json:"id"`
Instruction string `json:"instruction"`
Listener *AgentRoutineListener `json:"listener,omitempty"`
// MentionActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
MentionActorId *Id `json:"mention_actor_id,omitempty"`
Name string `json:"name"`
// NextRunAt UTC timestamp in RFC 3339 format with an explicit offset.
NextRunAt *Timestamp `json:"next_run_at,omitempty"`
Schedule *AgentRoutineSchedule `json:"schedule,omitempty"`
// TrackingItemId Tracking Item this Routine serves, when it serves one.
TrackingItemId *string `json:"tracking_item_id,omitempty"`
}
// AgentRoutineCommandRequest defines model for AgentRoutineCommandRequest.
type AgentRoutineCommandRequest = map[string]interface{}
// AgentRoutineIdRequest defines model for AgentRoutineIdRequest.
type AgentRoutineIdRequest struct {
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
// RoutineId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RoutineId Id `json:"routine_id"`
}
// AgentRoutineListener defines model for AgentRoutineListener.
type AgentRoutineListener struct {
// App Connected app whose new events the Routine hands to proactive judgement.
App AgentRoutineListenerApp `json:"app"`
}
// AgentRoutineListenerApp Connected app whose new events the Routine hands to proactive judgement.
type AgentRoutineListenerApp string
// AgentRoutineResponse defines model for AgentRoutineResponse.
type AgentRoutineResponse struct {
// Routine A Routine has exactly one of schedule and listener. A listener Routine is an app listener; it can only be paused and enabled, and goes away when the Human revokes AnotherMe's access to the app.
Routine AgentRoutine `json:"routine"`
}
// AgentRoutineSchedule defines model for AgentRoutineSchedule.
type AgentRoutineSchedule struct {
// IntervalHours Repeat interval in whole hours for every_n_hours (1 to 168), accepted on input for compatibility with older clients and stored in minutes. Responses always use every_n_minutes with interval_minutes. Do not send a clock or timezone with it.
IntervalHours *int `json:"interval_hours,omitempty"`
// IntervalMinutes Repeat interval in minutes for every_n_minutes (10 to 10080, in 10-minute increments). Do not send a clock or timezone with it.
IntervalMinutes *int `json:"interval_minutes,omitempty"`
Kind AgentRoutineScheduleKind `json:"kind"`
// RunAt The one moment a once Routine fires (RFC 3339 with offset). It must be in the future; the Routine is done (disabled) after it fires. Timezone is optional and only used for display.
RunAt *time.Time `json:"run_at,omitempty"`
// Time Local 24-hour clock as HH:MM. Required for daily and weekly.
Time *string `json:"time,omitempty"`
// Timezone IANA timezone. Required for daily and weekly.
Timezone *string `json:"timezone,omitempty"`
// Weekdays Selected local weekdays. Required for weekly. Responses use Monday through Sunday order.
Weekdays *[]AgentRoutineWeekday `json:"weekdays,omitempty"`
}
// AgentRoutineScheduleKind defines model for AgentRoutineSchedule.Kind.
type AgentRoutineScheduleKind string
// AgentRoutineWeekday defines model for AgentRoutineWeekday.
type AgentRoutineWeekday string
// AgentSearchAppToolsRequest defines model for AgentSearchAppToolsRequest.
type AgentSearchAppToolsRequest struct {
AppKey *string `json:"app_key,omitempty"`
ConnectionId *string `json:"connection_id,omitempty"`
Limit *int32 `json:"limit,omitempty"`
Query string `json:"query"`
}
// AgentSearchAppToolsResponse defines model for AgentSearchAppToolsResponse.
type AgentSearchAppToolsResponse struct {
Tools []AgentConnectedAppTool `json:"tools"`
}
// AgentSendDirectMessageRequest Infrastructure-owned invocation identity and Runtime Manifest attestation plus the ordered private messages to send to the current Agent's Human sponsor.
type AgentSendDirectMessageRequest struct {
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
// Messages Ordered private messages persisted atomically in the Direct Room.
Messages []string `json:"messages"`
}
// AgentSendDirectMessageResponse Accepted Direct Room messages plus the exact active Manifest attested in the same authorization and persistence transaction.
type AgentSendDirectMessageResponse struct {
// Accepted Whether TeamHub accepted and persisted every message.
Accepted bool `json:"accepted"`
// DuplicateRequest True only when the server recovered a prior committed operation.
DuplicateRequest bool `json:"duplicate_request"`
// InboxId Canonical public Inbox of the Human sponsor Direct Room.
InboxId string `json:"inbox_id"`
// MessageIds Stable identifiers of the created messages, in input order.
MessageIds []Id `json:"message_ids"`
// Reason Optional public receipt explanation.
Reason *string `json:"reason,omitempty"`
// RoomCreated Whether this invocation created the sponsor Direct Room.
RoomCreated bool `json:"room_created"`
}
// AgentSendEmojiReactionRequest One emoji Reaction the current Agent adds to a Message it can see.
type AgentSendEmojiReactionRequest struct {
// Emoji Stable emoji ID in the official Reaction library shared by Humans and Agents: the emoji IDs of @emoji-mart/data 1.2.1 set 15 (Unicode Emoji 15). TeamHub rejects IDs outside that library.
Emoji MessageReactionId `json:"emoji"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
MessageId Id `json:"message_id"`
}
// AgentSendEmojiReactionResponse defines model for AgentSendEmojiReactionResponse.
type AgentSendEmojiReactionResponse struct {
Accepted bool `json:"accepted"`
// Emoji Stable emoji ID in the official Reaction library shared by Humans and Agents: the emoji IDs of @emoji-mart/data 1.2.1 set 15 (Unicode Emoji 15). TeamHub rejects IDs outside that library.
Emoji MessageReactionId `json:"emoji"`
// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
MessageId Id `json:"message_id"`
}
// AgentSendPresentationSequenceRequest A Room-bound ordered sequence of conversational bubbles with optional reply provenance. This operation is restricted to AnotherMe Agents. Every bubble records the Local Run named by the X-TeamHub-Run-Id header when TeamHub accepts that Run as the sequence is queued.
type AgentSendPresentationSequenceRequest struct {
// InboxId The current public Room Inbox.
InboxId string `json:"inbox_id"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
Messages AgentPresentationSequenceItems `json:"messages"`
// SourceMessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
SourceMessageId *Id `json:"source_message_id,omitempty"`
}
// AgentSendPresentationSequenceResponse defines model for AgentSendPresentationSequenceResponse.
type AgentSendPresentationSequenceResponse struct {
Accepted bool `json:"accepted"`
// DuplicateRequest True only when the server recovered a prior committed operation.
DuplicateRequest *bool `json:"duplicate_request,omitempty"`
InboxId string `json:"inbox_id"`
// Reason Optional public receipt explanation.
Reason *string `json:"reason,omitempty"`
// SequenceId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
SequenceId Id `json:"sequence_id"`
}
// AgentSendTaskRequest One plain-text message for the Task's AlterEgo.
type AgentSendTaskRequest struct {
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
Message string `json:"message"`
// Steer Ask to join the running turn instead of queuing as the next turn.
Steer *bool `json:"steer,omitempty"`
// TaskId A delegated Task created by this Room's Meta.
TaskId AgentTaskId `json:"task_id"`
}
// AgentSendTaskResponse defines model for AgentSendTaskResponse.
type AgentSendTaskResponse struct {
Accepted bool `json:"accepted"`
// Delivery started wakes a Task that was not running; queued runs after the current turn; steered was requested into the current turn and runs as the next turn when the turn cannot take it.
Delivery AgentSendTaskResponseDelivery `json:"delivery"`
// DuplicateRequest True only when TeamHub recovered a prior committed invocation.
DuplicateRequest bool `json:"duplicate_request"`
Status string `json:"status"`
// TaskId A delegated Task created by this Room's Meta.
TaskId AgentTaskId `json:"task_id"`
}
// AgentSendTaskResponseDelivery started wakes a Task that was not running; queued runs after the current turn; steered was requested into the current turn and runs as the next turn when the turn cannot take it.
type AgentSendTaskResponseDelivery string
// AgentSetDocumentTitleSemanticOperation defines model for AgentSetDocumentTitleSemanticOperation.
type AgentSetDocumentTitleSemanticOperation struct {
Kind string `json:"kind"`
Title string `json:"title"`
}
// AgentStopTaskRequest defines model for AgentStopTaskRequest.
type AgentStopTaskRequest struct {
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
// TaskId A delegated Task created by this Room's Meta.
TaskId AgentTaskId `json:"task_id"`
}
// AgentStopTaskResponse defines model for AgentStopTaskResponse.
type AgentStopTaskResponse struct {
Accepted bool `json:"accepted"`
// DuplicateRequest True only when TeamHub recovered a prior committed invocation.
DuplicateRequest bool `json:"duplicate_request"`
Status string `json:"status"`
// TaskId A delegated Task created by this Room's Meta.
TaskId AgentTaskId `json:"task_id"`
}
// AgentTaskActivity defines model for AgentTaskActivity.
type AgentTaskActivity struct {
At time.Time `json:"at"`
// Kind started, message, approval_result, or the state the Task entered.
Kind string `json:"kind"`
Summary string `json:"summary"`
}
// AgentTaskDetail defines model for AgentTaskDetail.
type AgentTaskDetail struct {
CreatedAt time.Time `json:"created_at"`
// LastReport The Task's latest report to this Meta, truncated to 4000 characters.
LastReport *AgentTaskReport `json:"last_report,omitempty"`
Name string `json:"name"`
// OriginRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
OriginRoomId Id `json:"origin_room_id"`
// PendingApprovals Approval cards the AlterEgo is waiting on.
PendingApprovals []AgentTaskPendingApproval `json:"pending_approvals"`
// QueuedMessageCount Messages waiting behind the running turn.
QueuedMessageCount int `json:"queued_message_count"`
// Reason Why the Task is failed (an error code) or canceled (stopped).
Reason *string `json:"reason,omitempty"`
// RecentActivity The latest state changes and inputs, newest first.
RecentActivity []AgentTaskActivity `json:"recent_activity"`
// Status A delegated Task's state. None is terminal: task send wakes every state but running.
Status AgentTaskStatus `json:"status"`
// StatusSince When the Task entered its current state.
StatusSince time.Time `json:"status_since"`
// TaskId A delegated Task created by this Room's Meta.
TaskId AgentTaskId `json:"task_id"`
// WorkRoomId The Task's execution Room; read-only for Humans.
WorkRoomId string `json:"work_room_id"`
}
// AgentTaskId A delegated Task created by this Room's Meta.
type AgentTaskId = string
// AgentTaskPendingApproval defines model for AgentTaskPendingApproval.
type AgentTaskPendingApproval struct {
CreatedAt time.Time `json:"created_at"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
// Id The approval card's interaction ID.
Id string `json:"id"`
Kind AgentTaskPendingApprovalKind `json:"kind"`
Title string `json:"title"`
}
// AgentTaskPendingApprovalKind defines model for AgentTaskPendingApproval.Kind.
type AgentTaskPendingApprovalKind string
// AgentTaskReport The Task's latest report to this Meta, truncated to 4000 characters.
type AgentTaskReport struct {
At time.Time `json:"at"`
Body string `json:"body"`
}
// AgentTaskStatus A delegated Task's state. None is terminal: task send wakes every state but running.
type AgentTaskStatus string
// AgentTaskSummary defines model for AgentTaskSummary.
type AgentTaskSummary struct {
CreatedAt time.Time `json:"created_at"`
Name string `json:"name"`
// Reason Why the Task is failed (an error code) or canceled (stopped).
Reason *string `json:"reason,omitempty"`
// Status A delegated Task's state. None is terminal: task send wakes every state but running.
Status AgentTaskStatus `json:"status"`
// TaskId A delegated Task created by this Room's Meta.
TaskId AgentTaskId `json:"task_id"`
UpdatedAt time.Time `json:"updated_at"`
}
// AgentTeamMdResponse The Room's current team.md. A readable Room where none has been published yet, the normal state of a new Room, answers published false and revision 0 without raw_markdown or updated_at.
type AgentTeamMdResponse struct {
Published bool `json:"published"`
// RawMarkdown Present exactly when published is true.
RawMarkdown *string `json:"raw_markdown,omitempty"`
// Revision 0 until the first publish, then 1 and up.
Revision int64 `json:"revision"`
// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
RoomId Id `json:"room_id"`
// UpdatedAt Present exactly when published is true.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
// AgentTextMessageSegment Plain text segment. Include type: text and content.
type AgentTextMessageSegment struct {
// Content User-visible text carried by this segment.
Content AgentMessageSegmentContent `json:"content"`
// Type Discriminator identifying the message segment kind.
Type string `json:"type"`
}
// AgentUpdateAgentRequest Changes to one General Agent of the calling Agent's Sponsor. Omitted fields are kept; actor_id defaults to the caller.
type AgentUpdateAgentRequest struct {
// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ActorId *Id `json:"actor_id,omitempty"`
Description *string `json:"description,omitempty"`
// InvocationId Stable SHA-256 operation identity derived by the CLI from the Agent identity, command, and caller operation ID. Credential rotation and Runtime restarts do not change it.
InvocationId AgentInvocationId `json:"invocation_id"`
Name *string `json:"name,omitempty"`
Prompt *string `json:"prompt,omitempty"`
}
// AgentUpdateDocumentBlockSemanticOperation defines model for AgentUpdateDocumentBlockSemanticOperation.
type AgentUpdateDocumentBlockSemanticOperation struct {
Block map[string]interface{} `json:"block"`
Kind string `json:"kind"`
// StableBlockId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
StableBlockId Id `json:"stable_block_id"`
}
// ArtifactTreeSegment defines model for ArtifactTreeSegment.
type ArtifactTreeSegment struct {
Content string `json:"content"`
DirectoryCount int `json:"directory_count"`
// EntryDocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
EntryDocumentId *Id `json:"entry_document_id,omitempty"`
// EntryDocumentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
EntryDocumentVersionId *Id `json:"entry_document_version_id,omitempty"`
FileCount int `json:"file_count"`
// PublicationGroupId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
PublicationGroupId Id `json:"publication_group_id"`
RootPath string `json:"root_path"`
TotalBytes int64 `json:"total_bytes"`
Type string `json:"type"`
union json.RawMessage
}
// ArtifactTreeSegment0 defines model for .
type ArtifactTreeSegment0 = interface{}
// ArtifactTreeSegment1 defines model for .
type ArtifactTreeSegment1 = interface{}
// ComputerPermissionEntry defines model for ComputerPermissionEntry.
type ComputerPermissionEntry struct {
// Id A macOS privacy permission an Agent can ask its Computer owner to grant.
Id ComputerPermissionId `json:"id"`
// Prompt available when the Computer can raise the macOS prompt itself; settings_only when it can only open the System Settings pane.
Prompt ComputerPermissionPrompt `json:"prompt"`
// RelaunchRequired macOS applies a new grant only after the app restarts. True once the running app asked for this permission without seeing it granted.
RelaunchRequired bool `json:"relaunch_required"`
State ComputerPermissionState `json:"state"`
}
// ComputerPermissionId A macOS privacy permission an Agent can ask its Computer owner to grant.
type ComputerPermissionId string
// ComputerPermissionPrompt available when the Computer can raise the macOS prompt itself; settings_only when it can only open the System Settings pane.
type ComputerPermissionPrompt string
// ComputerPermissionState defines model for ComputerPermissionState.
type ComputerPermissionState string
// ComputerPermissionStatus The macOS privacy permissions of one Local Computer. Other platforms have no such permissions and report no subjects.
type ComputerPermissionStatus struct {
// Host desktop when the Linger desktop app runs the Computer; standalone otherwise.
Host ComputerPermissionStatusHost `json:"host"`
Platform ComputerPermissionStatusPlatform `json:"platform"`
Subjects []ComputerPermissionSubjectStatus `json:"subjects"`
}
// ComputerPermissionStatusHost desktop when the Linger desktop app runs the Computer; standalone otherwise.
type ComputerPermissionStatusHost string
// ComputerPermissionStatusPlatform defines model for ComputerPermissionStatus.Platform.
type ComputerPermissionStatusPlatform string
// ComputerPermissionSubject The app macOS grants the permission to. linger is the Linger desktop app, which owns shell commands such as screencapture; computer_use is CuaDriver, which owns the computer-use tools.
type ComputerPermissionSubject string
// ComputerPermissionSubjectStatus defines model for ComputerPermissionSubjectStatus.
type ComputerPermissionSubjectStatus struct {
Permissions []ComputerPermissionEntry `json:"permissions"`
// Subject The app macOS grants the permission to. linger is the Linger desktop app, which owns shell commands such as screencapture; computer_use is CuaDriver, which owns the computer-use tools.
Subject ComputerPermissionSubject `json:"subject"`
}
// ConnectorAutoReminders Whether AnotherMe watches one Sponsor-owned connection for things that need the Human's attention.
type ConnectorAutoReminders struct {
AppKey string `json:"app_key"`
ConnectionId string `json:"connection_id"`
Enabled bool `json:"enabled"`
IdentityLabel string `json:"identity_label"`
Status string `json:"status"`
}
// DocumentCommentReferenceSegment defines model for DocumentCommentReferenceSegment.
type DocumentCommentReferenceSegment struct {
// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
ActorId Id `json:"actor_id"`
Content string `json:"content"`
Type string `json:"type"`
}
// DocumentCommentSegment defines model for DocumentCommentSegment.
type DocumentCommentSegment struct {
union json.RawMessage
}
// DocumentCommentTextSegment defines model for DocumentCommentTextSegment.
type DocumentCommentTextSegment struct {
Content string `json:"content"`
Type string `json:"type"`
}
// DocumentLinkShare defines model for DocumentLinkShare.
type DocumentLinkShare struct {
DocumentId string `json:"document_id"`
Id string `json:"id"`
Role DocumentLinkShareRole `json:"role"`
Status DocumentLinkShareStatus `json:"status"`
// Token Returned only on creation or reset. Never persisted as plaintext.
Token *string `json:"token,omitempty"`
// Url Public Web URL with the capability in its fragment; returned only with a new token.
Url *string `json:"url,omitempty"`
Version int64 `json:"version"`
}
// DocumentLinkShareRole defines model for DocumentLinkShare.Role.
type DocumentLinkShareRole string
// DocumentLinkShareStatus defines model for DocumentLinkShare.Status.
type DocumentLinkShareStatus string
// DocumentSegment defines model for DocumentSegment.
type DocumentSegment struct {
// Content User-visible Document label included in raw_message.
Content string `json:"content"`
// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
DocumentId Id `json:"document_id"`
// Presentation Optional presentation intent. inline preserves an in-text @Document reference; card presents a delivered Document with the shared Human/Agent Document card; canvas presents the card and asks clients viewing the Room live to open the Document in the side panel. Omitted values remain inline for historical compatibility.
Presentation *DocumentSegmentPresentation `json:"presentation,omitempty"`
Type string `json:"type"`
}
// DocumentSegmentPresentation Optional presentation intent. inline preserves an in-text @Document reference; card presents a delivered Document with the shared Human/Agent Document card; canvas presents the card and asks clients viewing the Room live to open the Document in the side panel. Omitted values remain inline for historical compatibility.
type DocumentSegmentPresentation string
// EditNativeDocumentSemanticOperation One Native Document edit, resolved against the frozen mutation state. Action-specific fields are validated before admission and computation.
type EditNativeDocumentSemanticOperation struct {
// AssetId Image and file commands only. An available Asset of this Document, an image for image commands; admission pins it for this mutation.
AssetId *string `json:"asset_id,omitempty"`
BlockId *string `json:"block_id,omitempty"`
// Caption Optional single-line image caption for image commands.
Caption *string `json:"caption,omitempty"`
Command EditNativeDocumentSemanticOperationCommand `json:"command"`
Content *string `json:"content,omitempty"`
EndBlockId *string `json:"end_block_id,omitempty"`
Kind string `json:"kind"`
// Name Optional single-line file name shown on the block, for file_insert_after.
Name *string `json:"name,omitempty"`
ParserVersion string `json:"parser_version"`
Pattern *string `json:"pattern,omitempty"`
StartBlockId *string `json:"start_block_id,omitempty"`
Title *string `json:"title,omitempty"`
}
// EditNativeDocumentSemanticOperationCommand defines model for EditNativeDocumentSemanticOperation.Command.
type EditNativeDocumentSemanticOperationCommand string
// FileSegment Legacy immutable attachment reference retained for historical Messages.
type FileSegment struct {
Content string `json:"content"`
// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
DocumentId Id `json:"document_id"`
// DocumentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
DocumentVersionId Id `json:"document_version_id"`
// Filename Canonical filename of the immutable Version, supplied by TeamHub.
Filename *string `json:"filename,omitempty"`
// MediaType Canonical media type of the immutable Version, supplied by TeamHub.
MediaType *string `json:"media_type,omitempty"`
Type string `json:"type"`
}
// HtmlFragmentSegment defines model for HtmlFragmentSegment.
type HtmlFragmentSegment struct {
// Content Raw-message text for the inline widget. show_fragment uses the exact flat, content-addressed Documents path of its projected HTML file; this is not widget markup.
Content string `json:"content"`
// Html Widget HTML or SVG markup inlined by show_fragment. This is message content, not a published Document. Ordinary delivered Documents use presentation=card.
Html string `json:"html"`
Type string `json:"type"`
}
// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type Id = string
// ManifestVersion Immutable strict Semantic Version for a Skill Manifest.
type ManifestVersion = string
// MeetingNotesSegment A finished recording's quick notes, which TeamHub writes from its transcript after posting the recording and transcript. Clients read them from the Capture's quick_notes. Only TeamHub creates it.
type MeetingNotesSegment struct {
// CaptureId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
CaptureId Id `json:"capture_id"`
// Content User-visible label included in raw_message.
Content string `json:"content"`
Type string `json:"type"`
}
// MessageReactionId Stable emoji ID in the official Reaction library shared by Humans and Agents: the emoji IDs of @emoji-mart/data 1.2.1 set 15 (Unicode Emoji 15). TeamHub rejects IDs outside that library.
type MessageReactionId = string
// MessageSegment defines model for MessageSegment.
type MessageSegment struct {
union json.RawMessage
}
// PersonalProfileBackground The Background module; it needs a non-blank overview, a point, or a timeline entry.
type PersonalProfileBackground struct {
Overview string `json:"overview"`
Points []PersonalProfilePoint `json:"points"`
// Timeline Entries in the submitted order.
Timeline []PersonalProfileTimelineEntry `json:"timeline"`
}
// PersonalProfileDocument The structured Personal Profile. Text fields are plain text: no line may start with "#", and scripts and images are rejected. TeamHub renders the Markdown. Invalid documents are rejected with profile_document_invalid or profile_module_empty and an issue naming the field.
type PersonalProfileDocument struct {
// Background The Background module; it needs a non-blank overview, a point, or a timeline entry.
Background PersonalProfileBackground `json:"background"`
// CommunicationStyle One Profile module; it needs a non-blank overview or at least one point.
CommunicationStyle PersonalProfileModule `json:"communication_style"`
Name string `json:"name"`
// Preferences One Profile module; it needs a non-blank overview or at least one point.
Preferences PersonalProfileModule `json:"preferences"`
// WorkingStyle One Profile module; it needs a non-blank overview or at least one point.
WorkingStyle PersonalProfileModule `json:"working_style"`
// WritingStyle One Profile module; it needs a non-blank overview or at least one point.
WritingStyle PersonalProfileModule `json:"writing_style"`
}
// PersonalProfileModule One Profile module; it needs a non-blank overview or at least one point.
type PersonalProfileModule struct {
Overview string `json:"overview"`
Points []PersonalProfilePoint `json:"points"`
}
// PersonalProfilePoint One topical point of a module; it needs non-empty text or at least one item.
type PersonalProfilePoint struct {
Items []string `json:"items"`
Text string `json:"text"`
Title string `json:"title"`
}
// PersonalProfileTimelineEntry One education or work entry; period and organization are required, and an empty place, role or description means the value is unknown.
type PersonalProfileTimelineEntry struct {
Description string `json:"description"`
Details []string `json:"details"`
Organization string `json:"organization"`
Period string `json:"period"`
Place string `json:"place"`
Role string `json:"role"`
}
// ReferenceSegment defines model for ReferenceSegment.
type ReferenceSegment struct {
Content string `json:"content"`
// Target Opaque, case-sensitive identifier. Clients must not infer type or time from it.
Target Id `json:"target"`
// TargetType user references a Human Actor; agent references an Agent Actor.
TargetType ReferenceSegmentTargetType `json:"target_type"`
Type string `json:"type"`
}
// ReferenceSegmentTargetType user references a Human Actor; agent references an Agent Actor.
type ReferenceSegmentTargetType string
// SkillIdentifier Stable, case-sensitive logical Skill identifier.
type SkillIdentifier = string
// SkillSegment defines model for SkillSegment.
type SkillSegment struct {
// Content Exact slash token shown in raw_message, for example /summarize.
Content string `json:"content"`
// ManifestVersion Immutable strict Semantic Version for a Skill Manifest.
ManifestVersion ManifestVersion `json:"manifest_version"`
// SkillId Stable, case-sensitive logical Skill identifier.
SkillId SkillIdentifier `json:"skill_id"`
// Target Opaque, case-sensitive identifier. Clients must not infer type or time from it.
Target Id `json:"target"`
Type string `json:"type"`
}
// TextSegment defines model for TextSegment.
type TextSegment struct {
Content string `json:"content"`
Type string `json:"type"`
}
// Timestamp UTC timestamp in RFC 3339 format with an explicit offset.
type Timestamp = time.Time
// TrackingItem defines model for TrackingItem.
type TrackingItem struct {
Content string `json:"content"`
CreatedAt time.Time `json:"created_at"`
DueAt *time.Time `json:"due_at"`
DueText *string `json:"due_text"`
Id string `json:"id"`
Kind TrackingItemKind `json:"kind"`
Revision int64 `json:"revision"`
Routines []struct {
Purpose string `json:"purpose"`
RoutineId string `json:"routine_id"`
} `json:"routines"`
SourceDate openapi_types.Date `json:"source_date"`
SourceRef string `json:"source_ref"`
SourceTimezone string `json:"source_timezone"`
Status TrackingItemStatus `json:"status"`
UpdatedAt time.Time `json:"updated_at"`
}
// TrackingItemKind defines model for TrackingItem.Kind.
type TrackingItemKind string
// TrackingItemStatus defines model for TrackingItem.Status.
type TrackingItemStatus string
// TrackingItemCreate defines model for TrackingItemCreate.
type TrackingItemCreate struct {
Content string `json:"content"`
DueAt *time.Time `json:"due_at"`
DueText *string `json:"due_text"`
IdempotencyKey string `json:"idempotency_key"`
Kind TrackingItemCreateKind `json:"kind"`
SourceDate openapi_types.Date `json:"source_date"`
SourceRef string `json:"source_ref"`
SourceTimezone string `json:"source_timezone"`
}
// TrackingItemCreateKind defines model for TrackingItemCreate.Kind.
type TrackingItemCreateKind string
// TrackingItemFields defines model for TrackingItemFields.
type TrackingItemFields struct {
Content string `json:"content"`
DueAt *time.Time `json:"due_at"`
DueText *string `json:"due_text"`
Kind TrackingItemFieldsKind `json:"kind"`
SourceDate openapi_types.Date `json:"source_date"`
SourceRef string `json:"source_ref"`
SourceTimezone string `json:"source_timezone"`
}
// TrackingItemFieldsKind defines model for TrackingItemFields.Kind.
type TrackingItemFieldsKind string
// TrackingItemList defines model for TrackingItemList.
type TrackingItemList struct {
Cursor *string `json:"cursor,omitempty"`
IncludeClosed *bool `json:"include_closed,omitempty"`
Limit *int `json:"limit,omitempty"`
}
// TrackingItemPage defines model for TrackingItemPage.
type TrackingItemPage struct {
Items []TrackingItem `json:"items"`
NextCursor string `json:"next_cursor"`
}
// TrackingItemUpdate defines model for TrackingItemUpdate.
type TrackingItemUpdate struct {
Content string `json:"content"`
DueAt *time.Time `json:"due_at"`
DueText *string `json:"due_text"`
ExpectedRevision int64 `json:"expected_revision"`
Id string `json:"id"`
Kind TrackingItemUpdateKind `json:"kind"`
SourceDate openapi_types.Date `json:"source_date"`
SourceRef string `json:"source_ref"`
SourceTimezone string `json:"source_timezone"`
Status TrackingItemUpdateStatus `json:"status"`
}
// TrackingItemUpdateKind defines model for TrackingItemUpdate.Kind.
type TrackingItemUpdateKind string
// TrackingItemUpdateStatus defines model for TrackingItemUpdate.Status.
type TrackingItemUpdateStatus string
// TrackingItemVersion defines model for TrackingItemVersion.
type TrackingItemVersion struct {
ExpectedRevision int64 `json:"expected_revision"`
Id string `json:"id"`
}
// WebBackendsQuery defines model for WebBackendsQuery.
type WebBackendsQuery struct {
// Backend A web search backend. duckduckgo searches without a key. direct opens pages only and is fetched by the Agent CLI on the Agent's computer; TeamHub never fetches a page itself.
Backend *WebSearchBackendId `json:"backend,omitempty"`
}
// WebConnectRequest defines model for WebConnectRequest.
type WebConnectRequest struct {
// Backend A backend that takes an API key saved in the product.
Backend WebSearchKeyBackend `json:"backend"`
}
// WebConnectResponse defines model for WebConnectResponse.
type WebConnectResponse struct {
// Backend One backend with the static text a client shows for it and its live state. status is ready when a call would run now: DuckDuckGo and direct always, You.com also without a key, the others with a key that is not rejected.
Backend *WebSearchBackend `json:"backend,omitempty"`
InteractionId *string `json:"interaction_id,omitempty"`
MessageId *string `json:"message_id,omitempty"`
RoomId *string `json:"room_id,omitempty"`
Status WebConnectResponseStatus `json:"status"`
}
// WebConnectResponseStatus defines model for WebConnectResponse.Status.
type WebConnectResponseStatus string
// WebOpenRequest defines model for WebOpenRequest.
type WebOpenRequest struct {
// Backend A backend that opens pages; direct is fetched by the CLI.
Backend WebOpenRequestBackend `json:"backend"`
Url string `json:"url"`
}
// WebOpenRequestBackend A backend that opens pages; direct is fetched by the CLI.
type WebOpenRequestBackend string
// WebOpenResponse defines model for WebOpenResponse.
type WebOpenResponse struct {
Markdown string `json:"markdown"`
Title *string `json:"title,omitempty"`
// Truncated True when the page was longer than the 20,000 characters returned.
Truncated bool `json:"truncated"`
// Url The page's final URL when the provider reports one.
Url string `json:"url"`
}
// WebSearchBackend One backend with the static text a client shows for it and its live state. status is ready when a call would run now: DuckDuckGo and direct always, You.com also without a key, the others with a key that is not rejected.
type WebSearchBackend struct {
Commands []WebSearchCommand `json:"commands"`
// Description The provider's own one-line description of its product.
Description string `json:"description"`
// Filters The search filters the backend honors; any other is refused before a call.
Filters []WebSearchFilter `json:"filters"`
// FreeTier The provider's free allowance, for display.
FreeTier *string `json:"free_tier,omitempty"`
// Id A web search backend. duckduckgo searches without a key. direct opens pages only and is fetched by the Agent CLI on the Agent's computer; TeamHub never fetches a page itself.
Id WebSearchBackendId `json:"id"`
KeyState WebSearchBackendKeyState `json:"key_state"`
// KeyUrl Where the Human gets a key.
KeyUrl *string `json:"key_url,omitempty"`
// Keyless Whether the backend works without a saved key.
Keyless bool `json:"keyless"`
// MaxLimit The most results one search returns; 0 for a backend without search.
MaxLimit int `json:"max_limit"`
// MaxSites How many sites one search may name; 0 when it takes no site filter.
MaxSites int `json:"max_sites"`
Name string `json:"name"`
// OfficialKeyCheck Whether the provider has an official endpoint TeamHub checks a key with before saving it. Without one the key is saved unverified and proven by its first call.
OfficialKeyCheck bool `json:"official_key_check"`
// Quota Left out when the caller asked for the list without quota.
Quota *WebSearchQuota `json:"quota,omitempty"`
Status WebSearchBackendStatus `json:"status"`
// Tier How a call to the backend runs now. key: with an API key saved in the product (or one it still needs); free: without a key, on a free service with limits that TeamHub does not count (DuckDuckGo, and You.com without a key); none: direct, which needs no account.
Tier WebSearchBackendTier `json:"tier"`
// TierText A short display line for the tier, set for free.
TierText *string `json:"tier_text,omitempty"`
}
// WebSearchBackendKeyState defines model for WebSearchBackend.KeyState.
type WebSearchBackendKeyState string
// WebSearchBackendStatus defines model for WebSearchBackend.Status.
type WebSearchBackendStatus string
// WebSearchBackendTier How a call to the backend runs now. key: with an API key saved in the product (or one it still needs); free: without a key, on a free service with limits that TeamHub does not count (DuckDuckGo, and You.com without a key); none: direct, which needs no account.
type WebSearchBackendTier string
// WebSearchBackendId A web search backend. duckduckgo searches without a key. direct opens pages only and is fetched by the Agent CLI on the Agent's computer; TeamHub never fetches a page itself.
type WebSearchBackendId string
// WebSearchBackendList Every backend in TeamHub's default order. default_search is the backend a search without one uses now: the default a Human saved (chosen_default_search) even when its key stopped working, else the first backend with a usable key in that order, else duckduckgo.
type WebSearchBackendList struct {
Backends []WebSearchBackend `json:"backends"`
// CanSaveKeys False when the deployment has no TEAMHUB_SECRET_ENCRYPTION_KEY to seal keys with.
CanSaveKeys bool `json:"can_save_keys"`
// ChosenDefaultSearch A backend that runs searches.
ChosenDefaultSearch *WebSearchSearchBackend `json:"chosen_default_search,omitempty"`
DefaultOpen string `json:"default_open"`
// DefaultSearch A backend that runs searches.
DefaultSearch WebSearchSearchBackend `json:"default_search"`
}
// WebSearchCommand defines model for WebSearchCommand.
type WebSearchCommand string
// WebSearchFilter defines model for WebSearchFilter.
type WebSearchFilter string
// WebSearchKeyBackend A backend that takes an API key saved in the product.
type WebSearchKeyBackend string
// WebSearchQuota What is left on the backend's account. from says where the numbers came from: provider is the provider's official usage endpoint read for this response; last_response is the rate-limit headers of the last call (Brave), as of observed_at; unavailable carries no numbers and reason says why.
type WebSearchQuota struct {
From WebSearchQuotaFrom `json:"from"`
// Limit Absent when the provider reports no cap.
Limit *float32 `json:"limit,omitempty"`
// ObservedAt UTC timestamp in RFC 3339 format with an explicit offset.
ObservedAt *Timestamp `json:"observed_at,omitempty"`
Plan *string `json:"plan,omitempty"`
// Reason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, DuckDuckGo, Exa, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.
Reason *WebSearchQuotaReason `json:"reason,omitempty"`
Remaining *float32 `json:"remaining,omitempty"`
// ResetsAt UTC timestamp in RFC 3339 format with an explicit offset.
ResetsAt *Timestamp `json:"resets_at,omitempty"`
Unit *WebSearchQuotaUnit `json:"unit,omitempty"`
}
// WebSearchQuotaFrom defines model for WebSearchQuota.From.
type WebSearchQuotaFrom string
// WebSearchQuotaReason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, DuckDuckGo, Exa, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.
type WebSearchQuotaReason string
// WebSearchQuotaUnit defines model for WebSearchQuota.Unit.
type WebSearchQuotaUnit string
// WebSearchRecency defines model for WebSearchRecency.
type WebSearchRecency string
// WebSearchRequest defines model for WebSearchRequest.
type WebSearchRequest struct {
// Backend A backend that runs searches.
Backend *WebSearchSearchBackend `json:"backend,omitempty"`
// Limit Defaults to 10.
Limit *int `json:"limit,omitempty"`
Query string `json:"query"`
Recency *WebSearchRecency `json:"recency,omitempty"`
// Sites Hostnames to search within, up to the backend's max_sites.
Sites *[]string `json:"sites,omitempty"`
}
// WebSearchResponse defines model for WebSearchResponse.
type WebSearchResponse struct {
Results []WebSearchResult `json:"results"`
}
// WebSearchResult defines model for WebSearchResult.
type WebSearchResult struct {
// PublishedAt The page date as the provider reports it.
PublishedAt *string `json:"published_at,omitempty"`
Snippet string `json:"snippet"`
Title string `json:"title"`
Url string `json:"url"`
}
// WebSearchSearchBackend A backend that runs searches.
type WebSearchSearchBackend string
// CLIFileDocumentId defines model for CLIFileDocumentId.
type CLIFileDocumentId = string
// BadRequest Standard failure envelope for every TeamHub Agent API operation.
type BadRequest = AgentApiErrorEnvelope
// Conflict Standard failure envelope for every TeamHub Agent API operation.
type Conflict = AgentApiErrorEnvelope
// FileError defines model for FileError.
type FileError struct {
Error struct {
BaseVersionId *string `json:"base_version_id,omitempty"`
Code string `json:"code"`
CurrentVersionId *string `json:"current_version_id,omitempty"`
Details *struct {
// RetryAfterSeconds Advisory delay for latest_not_ready.
RetryAfterSeconds int32 `json:"retry_after_seconds"`
} `json:"details,omitempty"`
Message string `json:"message"`
} `json:"error"`
}
// Forbidden Standard failure envelope for every TeamHub Agent API operation.
type Forbidden = AgentApiErrorEnvelope
// InternalError Standard failure envelope for every TeamHub Agent API operation.
type InternalError = AgentApiErrorEnvelope
// NotFound Standard failure envelope for every TeamHub Agent API operation.
type NotFound = AgentApiErrorEnvelope
// PayloadTooLarge Standard failure envelope for every TeamHub Agent API operation.
type PayloadTooLarge = AgentApiErrorEnvelope
// ServiceUnavailable Standard failure envelope for every TeamHub Agent API operation.
type ServiceUnavailable = AgentApiErrorEnvelope
// TooManyRequests Standard failure envelope for every TeamHub Agent API operation.
type TooManyRequests = AgentApiErrorEnvelope
// Unauthenticated Standard failure envelope for every TeamHub Agent API operation.
type Unauthenticated = AgentApiErrorEnvelope
// agentBearerContextKey is the context key for agentBearer security scheme
type agentBearerContextKey string
// ResolveConnectorAccountJSONBody defines parameters for ResolveConnectorAccount.
type ResolveConnectorAccountJSONBody struct {
Account *string `json:"account,omitempty"`
AppKey string `json:"app_key"`
}
// ResolveConnectorAccount200JSONResponseBodyStatus defines parameters for ResolveConnectorAccount.
type ResolveConnectorAccount200JSONResponseBodyStatus string
// ListConnectorAutoRemindersJSONBody defines parameters for ListConnectorAutoReminders.
type ListConnectorAutoRemindersJSONBody = map[string]interface{}
// SetConnectorAutoRemindersJSONBody defines parameters for SetConnectorAutoReminders.
type SetConnectorAutoRemindersJSONBody struct {
ConnectionId string `json:"connection_id"`
Enabled bool `json:"enabled"`
}
// PrepareConnectorFileUploadJSONBody defines parameters for PrepareConnectorFileUpload.
type PrepareConnectorFileUploadJSONBody struct {
ConnectionId string `json:"connection_id"`
Filename string `json:"filename"`
Md5 string `json:"md5"`
Mimetype string `json:"mimetype"`
ToolSlug string `json:"tool_slug"`
ToolVersion string `json:"tool_version"`
}
// SaveConnectorGmailCanvasDraftJSONBody defines parameters for SaveConnectorGmailCanvasDraft.
type SaveConnectorGmailCanvasDraftJSONBody struct {
// Cc Defaults to the header's cc.
Cc *[]string `json:"cc,omitempty"`
ConnectionId string `json:"connection_id"`
DocumentId string `json:"document_id"`
DraftId *string `json:"draft_id,omitempty"`
// Subject Defaults to the header's subject; the draft needs one.
Subject *string `json:"subject,omitempty"`
// To Recipients; a draft may have none yet. Defaults to the header's to.
To *[]string `json:"to,omitempty"`
}
// PrepareConnectorMailBodyJSONBody defines parameters for PrepareConnectorMailBody.
type PrepareConnectorMailBodyJSONBody struct {
Content string `json:"content"`
}
// PrepareConnectorNotionBodyJSONBody defines parameters for PrepareConnectorNotionBody.
type PrepareConnectorNotionBodyJSONBody struct {
Content string `json:"content"`
Markdown bool `json:"markdown"`
}
// BindConnectorToolsJSONBody defines parameters for BindConnectorTools.
type BindConnectorToolsJSONBody struct {
ConnectionId string `json:"connection_id"`
ToolSlugs []string `json:"tool_slugs"`
ToolVersion string `json:"tool_version"`
}
// RequestAgentBrowserConnectionJSONBody defines parameters for RequestAgentBrowserConnection.
type RequestAgentBrowserConnectionJSONBody = map[string]interface{}
// RequestAgentBrowserConnection200JSONResponseBodyStatus defines parameters for RequestAgentBrowserConnection.
type RequestAgentBrowserConnection200JSONResponseBodyStatus string
// RequestAgentComputerPermissionsJSONBody defines parameters for RequestAgentComputerPermissions.
type RequestAgentComputerPermissionsJSONBody struct {
Permissions []ComputerPermissionId `json:"permissions"`
// Reason Plain text shown on the card.
Reason *string `json:"reason,omitempty"`
// Subject The app macOS grants the permission to. linger is the Linger desktop app, which owns shell commands such as screencapture; computer_use is CuaDriver, which owns the computer-use tools.
Subject ComputerPermissionSubject `json:"subject"`
}
// RequestAgentComputerPermissions200JSONResponseBodyStatus defines parameters for RequestAgentComputerPermissions.
type RequestAgentComputerPermissions200JSONResponseBodyStatus string
// GetAgentComputerPermissionsJSONBody defines parameters for GetAgentComputerPermissions.
type GetAgentComputerPermissionsJSONBody = map[string]interface{}
// PublicListAgentCLIFilesParams defines parameters for PublicListAgentCLIFiles.
type PublicListAgentCLIFilesParams struct {
AfterId *string `form:"after_id,omitempty" json:"after_id,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// SharedWithMe Only Documents someone shared with this Agent.
SharedWithMe *bool `form:"shared_with_me,omitempty" json:"shared_with_me,omitempty"`
}
// PublicUploadAgentCLIDocumentAssetParams defines parameters for PublicUploadAgentCLIDocumentAsset.
type PublicUploadAgentCLIDocumentAssetParams struct {
Filename string `form:"filename" json:"filename"`
OperationId string `form:"operation_id" json:"operation_id"`
}
// PublicReplaceAgentCLIDocumentBodyParams defines parameters for PublicReplaceAgentCLIDocumentBody.
type PublicReplaceAgentCLIDocumentBodyParams struct {
// Format Blocks JSON working copy, or legacy HTML when omitted.
Format *PublicReplaceAgentCLIDocumentBodyParamsFormat `form:"format,omitempty" json:"format,omitempty"`
BaseRevisionId string `form:"base_revision_id" json:"base_revision_id"`
OperationId string `form:"operation_id" json:"operation_id"`
}
// PublicReplaceAgentCLIDocumentBodyParamsFormat defines parameters for PublicReplaceAgentCLIDocumentBody.
type PublicReplaceAgentCLIDocumentBodyParamsFormat string
// PublicDownloadAgentCLIFileParams defines parameters for PublicDownloadAgentCLIFile.
type PublicDownloadAgentCLIFileParams struct {
// Format Native export format. Blocks is the editable JSON working copy; HTML remains compatible. Omitted uses Markdown. Ordinary files reject native export formats.
Format *PublicDownloadAgentCLIFileParamsFormat `form:"format,omitempty" json:"format,omitempty"`
// IfNoneMatch Exact ordinary-file cache validator; current Agent access is checked before returning 304. Native exports always return content.
IfNoneMatch *string `json:"If-None-Match,omitempty"`
}
// PublicDownloadAgentCLIFileParamsFormat defines parameters for PublicDownloadAgentCLIFile.
type PublicDownloadAgentCLIFileParamsFormat string
// GetAgentAccountProfileJSONRequestBody defines body for GetAgentAccountProfile for application/json ContentType.
type GetAgentAccountProfileJSONRequestBody = AgentAccountProfileQueryRequest
// UpdateAgentAccountProfileJSONRequestBody defines body for UpdateAgentAccountProfile for application/json ContentType.
type UpdateAgentAccountProfileJSONRequestBody = AgentAccountProfileUpdateRequest
// CreateAgentJSONRequestBody defines body for CreateAgent for application/json ContentType.
type CreateAgentJSONRequestBody = AgentCreateAgentRequest
// GetAgentJSONRequestBody defines body for GetAgent for application/json ContentType.
type GetAgentJSONRequestBody = AgentGetAgentRequest
// UpdateAgentJSONRequestBody defines body for UpdateAgent for application/json ContentType.
type UpdateAgentJSONRequestBody = AgentUpdateAgentRequest
// ResolveConnectorAccountJSONRequestBody defines body for ResolveConnectorAccount for application/json ContentType.
type ResolveConnectorAccountJSONRequestBody ResolveConnectorAccountJSONBody
// ListConnectorAutoRemindersJSONRequestBody defines body for ListConnectorAutoReminders for application/json ContentType.
type ListConnectorAutoRemindersJSONRequestBody = ListConnectorAutoRemindersJSONBody
// SetConnectorAutoRemindersJSONRequestBody defines body for SetConnectorAutoReminders for application/json ContentType.
type SetConnectorAutoRemindersJSONRequestBody SetConnectorAutoRemindersJSONBody
// ListAgentConnectedAppsJSONRequestBody defines body for ListAgentConnectedApps for application/json ContentType.
type ListAgentConnectedAppsJSONRequestBody = AgentListConnectedAppsRequest
// PrepareConnectorFileUploadJSONRequestBody defines body for PrepareConnectorFileUpload for application/json ContentType.
type PrepareConnectorFileUploadJSONRequestBody PrepareConnectorFileUploadJSONBody
// SaveConnectorGmailCanvasDraftJSONRequestBody defines body for SaveConnectorGmailCanvasDraft for application/json ContentType.
type SaveConnectorGmailCanvasDraftJSONRequestBody SaveConnectorGmailCanvasDraftJSONBody
// PrepareConnectorMailBodyJSONRequestBody defines body for PrepareConnectorMailBody for application/json ContentType.
type PrepareConnectorMailBodyJSONRequestBody PrepareConnectorMailBodyJSONBody
// PrepareConnectorNotionBodyJSONRequestBody defines body for PrepareConnectorNotionBody for application/json ContentType.
type PrepareConnectorNotionBodyJSONRequestBody PrepareConnectorNotionBodyJSONBody
// BindConnectorToolsJSONRequestBody defines body for BindConnectorTools for application/json ContentType.
type BindConnectorToolsJSONRequestBody BindConnectorToolsJSONBody
// ExecuteAgentConnectedAppToolJSONRequestBody defines body for ExecuteAgentConnectedAppTool for application/json ContentType.
type ExecuteAgentConnectedAppToolJSONRequestBody = AgentExecuteAppToolRequest
// SearchAgentConnectedAppToolsJSONRequestBody defines body for SearchAgentConnectedAppTools for application/json ContentType.
type SearchAgentConnectedAppToolsJSONRequestBody = AgentSearchAppToolsRequest
// ListAvailableAgentsJSONRequestBody defines body for ListAvailableAgents for application/json ContentType.
type ListAvailableAgentsJSONRequestBody = AgentListAvailableAgentsRequest
// RequestAgentBrowserConnectionJSONRequestBody defines body for RequestAgentBrowserConnection for application/json ContentType.
type RequestAgentBrowserConnectionJSONRequestBody = RequestAgentBrowserConnectionJSONBody
// RequestAgentComputerPermissionsJSONRequestBody defines body for RequestAgentComputerPermissions for application/json ContentType.
type RequestAgentComputerPermissionsJSONRequestBody RequestAgentComputerPermissionsJSONBody
// GetAgentComputerPermissionsJSONRequestBody defines body for GetAgentComputerPermissions for application/json ContentType.
type GetAgentComputerPermissionsJSONRequestBody = GetAgentComputerPermissionsJSONBody
// SubmitAgentCreationApprovalRequestJSONRequestBody defines body for SubmitAgentCreationApprovalRequest for application/json ContentType.
type SubmitAgentCreationApprovalRequestJSONRequestBody = AgentRoomCreationApprovalRequest
// SendAgentDirectMessageJSONRequestBody defines body for SendAgentDirectMessage for application/json ContentType.
type SendAgentDirectMessageJSONRequestBody = AgentSendDirectMessageRequest
// ReplyAgentDocumentCommentJSONRequestBody defines body for ReplyAgentDocumentComment for application/json ContentType.
type ReplyAgentDocumentCommentJSONRequestBody = AgentDocumentCommentReplyRequest
// ReplaceAgentDocumentCommentTextJSONRequestBody defines body for ReplaceAgentDocumentCommentText for application/json ContentType.
type ReplaceAgentDocumentCommentTextJSONRequestBody = AgentDocumentCommentTextReplacementRequest
// GetAgentDocumentCommentThreadJSONRequestBody defines body for GetAgentDocumentCommentThread for application/json ContentType.
type GetAgentDocumentCommentThreadJSONRequestBody = AgentDocumentCommentThreadRequest
// ApplyAgentDocumentSemanticMutationJSONRequestBody defines body for ApplyAgentDocumentSemanticMutation for application/json ContentType.
type ApplyAgentDocumentSemanticMutationJSONRequestBody = AgentDocumentSemanticMutationRequest
// CreateAgentDocumentJSONRequestBody defines body for CreateAgentDocument for application/json ContentType.
type CreateAgentDocumentJSONRequestBody = AgentDocumentCreateRequest
// SendAgentEmojiReactionJSONRequestBody defines body for SendAgentEmojiReaction for application/json ContentType.
type SendAgentEmojiReactionJSONRequestBody = AgentSendEmojiReactionRequest
// PublicManageAgentCLIFileLinkJSONRequestBody defines body for PublicManageAgentCLIFileLink for application/json ContentType.
type PublicManageAgentCLIFileLinkJSONRequestBody = AgentCLIFileLinkCommand
// PublicShareAgentCLIFileJSONRequestBody defines body for PublicShareAgentCLIFile for application/json ContentType.
type PublicShareAgentCLIFileJSONRequestBody = AgentCLIFileShare
// ReadAgentKnowledgeJSONRequestBody defines body for ReadAgentKnowledge for application/json ContentType.
type ReadAgentKnowledgeJSONRequestBody = AgentKnowledgeReadRequest
// SearchAgentKnowledgeJSONRequestBody defines body for SearchAgentKnowledge for application/json ContentType.
type SearchAgentKnowledgeJSONRequestBody = AgentKnowledgeSearchRequest
// CommitAgentMessageMultipartRequestBody defines body for CommitAgentMessage for multipart/form-data ContentType.
type CommitAgentMessageMultipartRequestBody = AgentMessageCommitMultipart
// ReadAgentHistoryMessagesJSONRequestBody defines body for ReadAgentHistoryMessages for application/json ContentType.
type ReadAgentHistoryMessagesJSONRequestBody = AgentMessageReadRequest
// SearchAgentHistoryMessagesJSONRequestBody defines body for SearchAgentHistoryMessages for application/json ContentType.
type SearchAgentHistoryMessagesJSONRequestBody = AgentMessageSearchRequest
// StartAgentPersonalProfileBuildJSONRequestBody defines body for StartAgentPersonalProfileBuild for application/json ContentType.
type StartAgentPersonalProfileBuildJSONRequestBody = AgentPersonalProfileBuildRequest
// GetAgentPersonalProfileJSONRequestBody defines body for GetAgentPersonalProfile for application/json ContentType.
type GetAgentPersonalProfileJSONRequestBody = AgentPersonalProfileQueryRequest
// WriteAgentPersonalProfileJSONRequestBody defines body for WriteAgentPersonalProfile for application/json ContentType.
type WriteAgentPersonalProfileJSONRequestBody = AgentPersonalProfileWriteRequest
// SendAgentPresentationSequenceJSONRequestBody defines body for SendAgentPresentationSequence for application/json ContentType.
type SendAgentPresentationSequenceJSONRequestBody = AgentSendPresentationSequenceRequest
// HandOffAgentRoomWorkJSONRequestBody defines body for HandOffAgentRoomWork for application/json ContentType.
type HandOffAgentRoomWorkJSONRequestBody = AgentRoomHandoffRequest
// AddAgentRoomMemberJSONRequestBody defines body for AddAgentRoomMember for application/json ContentType.
type AddAgentRoomMemberJSONRequestBody = AgentAddRoomMemberRequest
// GetAgentRoomMembersJSONRequestBody defines body for GetAgentRoomMembers for application/json ContentType.
type GetAgentRoomMembersJSONRequestBody = AgentRoomMembersRequest
// CreateAgentRoutineJSONRequestBody defines body for CreateAgentRoutine for application/json ContentType.
type CreateAgentRoutineJSONRequestBody = AgentCreateRoutineRequest
// DeleteAgentRoutineJSONRequestBody defines body for DeleteAgentRoutine for application/json ContentType.
type DeleteAgentRoutineJSONRequestBody = AgentRoutineIdRequest
// EnableAgentRoutineJSONRequestBody defines body for EnableAgentRoutine for application/json ContentType.
type EnableAgentRoutineJSONRequestBody = AgentRoutineIdRequest
// PauseAgentRoutineJSONRequestBody defines body for PauseAgentRoutine for application/json ContentType.
type PauseAgentRoutineJSONRequestBody = AgentRoutineIdRequest
// ListAgentRoutinesJSONRequestBody defines body for ListAgentRoutines for application/json ContentType.
type ListAgentRoutinesJSONRequestBody = AgentRoutineCommandRequest
// RunAgentRoutineJSONRequestBody defines body for RunAgentRoutine for application/json ContentType.
type RunAgentRoutineJSONRequestBody = AgentRoutineIdRequest
// CreateAgentTaskJSONRequestBody defines body for CreateAgentTask for application/json ContentType.
type CreateAgentTaskJSONRequestBody = AgentCreateTaskRequest
// CheckAgentTaskJSONRequestBody defines body for CheckAgentTask for application/json ContentType.
type CheckAgentTaskJSONRequestBody = AgentCheckTaskRequest
// SendAgentTaskJSONRequestBody defines body for SendAgentTask for application/json ContentType.
type SendAgentTaskJSONRequestBody = AgentSendTaskRequest
// StopAgentTaskJSONRequestBody defines body for StopAgentTask for application/json ContentType.
type StopAgentTaskJSONRequestBody = AgentStopTaskRequest
// CreateAgentTeamMdJSONRequestBody defines body for CreateAgentTeamMd for application/json ContentType.
type CreateAgentTeamMdJSONRequestBody = AgentCreateTeamMdRequest
// GetAgentTeamMdJSONRequestBody defines body for GetAgentTeamMd for application/json ContentType.
type GetAgentTeamMdJSONRequestBody = AgentRoomMembersRequest
// AddAgentTrackingItemJSONRequestBody defines body for AddAgentTrackingItem for application/json ContentType.
type AddAgentTrackingItemJSONRequestBody = TrackingItemCreate
// CompleteAgentTrackingItemJSONRequestBody defines body for CompleteAgentTrackingItem for application/json ContentType.
type CompleteAgentTrackingItemJSONRequestBody = TrackingItemVersion
// ListAgentTrackingItemsJSONRequestBody defines body for ListAgentTrackingItems for application/json ContentType.
type ListAgentTrackingItemsJSONRequestBody = TrackingItemList
// UpdateAgentTrackingItemJSONRequestBody defines body for UpdateAgentTrackingItem for application/json ContentType.
type UpdateAgentTrackingItemJSONRequestBody = TrackingItemUpdate
// AskAgentUserJSONRequestBody defines body for AskAgentUser for application/json ContentType.
type AskAgentUserJSONRequestBody = AgentAskUserRequest
// ListAgentWebBackendsJSONRequestBody defines body for ListAgentWebBackends for application/json ContentType.
type ListAgentWebBackendsJSONRequestBody = WebBackendsQuery
// ConnectAgentWebBackendJSONRequestBody defines body for ConnectAgentWebBackend for application/json ContentType.
type ConnectAgentWebBackendJSONRequestBody = WebConnectRequest
// OpenAgentWebPageJSONRequestBody defines body for OpenAgentWebPage for application/json ContentType.
type OpenAgentWebPageJSONRequestBody = WebOpenRequest
// SearchAgentWebJSONRequestBody defines body for SearchAgentWeb for application/json ContentType.
type SearchAgentWebJSONRequestBody = WebSearchRequest
// AsAgentTextMessageSegment returns the union data inside the AgentCreationMessageSegment as a AgentTextMessageSegment
func (t AgentCreationMessageSegment) AsAgentTextMessageSegment() (AgentTextMessageSegment, error) {
var body AgentTextMessageSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentTextMessageSegment overwrites any union data inside the AgentCreationMessageSegment as the provided AgentTextMessageSegment
func (t *AgentCreationMessageSegment) FromAgentTextMessageSegment(v AgentTextMessageSegment) error {
v.Type = "text"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentTextMessageSegment performs a merge with any union data inside the AgentCreationMessageSegment, using the provided AgentTextMessageSegment
func (t *AgentCreationMessageSegment) MergeAgentTextMessageSegment(v AgentTextMessageSegment) error {
v.Type = "text"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentReferenceMessageSegment returns the union data inside the AgentCreationMessageSegment as a AgentReferenceMessageSegment
func (t AgentCreationMessageSegment) AsAgentReferenceMessageSegment() (AgentReferenceMessageSegment, error) {
var body AgentReferenceMessageSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentReferenceMessageSegment overwrites any union data inside the AgentCreationMessageSegment as the provided AgentReferenceMessageSegment
func (t *AgentCreationMessageSegment) FromAgentReferenceMessageSegment(v AgentReferenceMessageSegment) error {
v.Type = "reference"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentReferenceMessageSegment performs a merge with any union data inside the AgentCreationMessageSegment, using the provided AgentReferenceMessageSegment
func (t *AgentCreationMessageSegment) MergeAgentReferenceMessageSegment(v AgentReferenceMessageSegment) error {
v.Type = "reference"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
func (t AgentCreationMessageSegment) Discriminator() (string, error) {
var discriminator struct {
Discriminator string `json:"type"`
}
err := json.Unmarshal(t.union, &discriminator)
return discriminator.Discriminator, err
}
func (t AgentCreationMessageSegment) ValueByDiscriminator() (interface{}, error) {
discriminator, err := t.Discriminator()
if err != nil {
return nil, err
}
switch discriminator {
case "reference":
return t.AsAgentReferenceMessageSegment()
case "text":
return t.AsAgentTextMessageSegment()
default:
return nil, errors.New("unknown discriminator value: " + discriminator)
}
}
func (t AgentCreationMessageSegment) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
func (t *AgentCreationMessageSegment) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
// AsEditNativeDocumentSemanticOperation returns the union data inside the AgentDocumentSemanticOperations_Item as a EditNativeDocumentSemanticOperation
func (t AgentDocumentSemanticOperations_Item) AsEditNativeDocumentSemanticOperation() (EditNativeDocumentSemanticOperation, error) {
var body EditNativeDocumentSemanticOperation
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromEditNativeDocumentSemanticOperation overwrites any union data inside the AgentDocumentSemanticOperations_Item as the provided EditNativeDocumentSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) FromEditNativeDocumentSemanticOperation(v EditNativeDocumentSemanticOperation) error {
v.Kind = "edit_document"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeEditNativeDocumentSemanticOperation performs a merge with any union data inside the AgentDocumentSemanticOperations_Item, using the provided EditNativeDocumentSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) MergeEditNativeDocumentSemanticOperation(v EditNativeDocumentSemanticOperation) error {
v.Kind = "edit_document"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentSetDocumentTitleSemanticOperation returns the union data inside the AgentDocumentSemanticOperations_Item as a AgentSetDocumentTitleSemanticOperation
func (t AgentDocumentSemanticOperations_Item) AsAgentSetDocumentTitleSemanticOperation() (AgentSetDocumentTitleSemanticOperation, error) {
var body AgentSetDocumentTitleSemanticOperation
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentSetDocumentTitleSemanticOperation overwrites any union data inside the AgentDocumentSemanticOperations_Item as the provided AgentSetDocumentTitleSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) FromAgentSetDocumentTitleSemanticOperation(v AgentSetDocumentTitleSemanticOperation) error {
v.Kind = "set_title"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentSetDocumentTitleSemanticOperation performs a merge with any union data inside the AgentDocumentSemanticOperations_Item, using the provided AgentSetDocumentTitleSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) MergeAgentSetDocumentTitleSemanticOperation(v AgentSetDocumentTitleSemanticOperation) error {
v.Kind = "set_title"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentInsertDocumentBlocksSemanticOperation returns the union data inside the AgentDocumentSemanticOperations_Item as a AgentInsertDocumentBlocksSemanticOperation
func (t AgentDocumentSemanticOperations_Item) AsAgentInsertDocumentBlocksSemanticOperation() (AgentInsertDocumentBlocksSemanticOperation, error) {
var body AgentInsertDocumentBlocksSemanticOperation
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentInsertDocumentBlocksSemanticOperation overwrites any union data inside the AgentDocumentSemanticOperations_Item as the provided AgentInsertDocumentBlocksSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) FromAgentInsertDocumentBlocksSemanticOperation(v AgentInsertDocumentBlocksSemanticOperation) error {
v.Kind = "insert_blocks"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentInsertDocumentBlocksSemanticOperation performs a merge with any union data inside the AgentDocumentSemanticOperations_Item, using the provided AgentInsertDocumentBlocksSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) MergeAgentInsertDocumentBlocksSemanticOperation(v AgentInsertDocumentBlocksSemanticOperation) error {
v.Kind = "insert_blocks"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentAppendDocumentBlocksSemanticOperation returns the union data inside the AgentDocumentSemanticOperations_Item as a AgentAppendDocumentBlocksSemanticOperation
func (t AgentDocumentSemanticOperations_Item) AsAgentAppendDocumentBlocksSemanticOperation() (AgentAppendDocumentBlocksSemanticOperation, error) {
var body AgentAppendDocumentBlocksSemanticOperation
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentAppendDocumentBlocksSemanticOperation overwrites any union data inside the AgentDocumentSemanticOperations_Item as the provided AgentAppendDocumentBlocksSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) FromAgentAppendDocumentBlocksSemanticOperation(v AgentAppendDocumentBlocksSemanticOperation) error {
v.Kind = "append_blocks"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentAppendDocumentBlocksSemanticOperation performs a merge with any union data inside the AgentDocumentSemanticOperations_Item, using the provided AgentAppendDocumentBlocksSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) MergeAgentAppendDocumentBlocksSemanticOperation(v AgentAppendDocumentBlocksSemanticOperation) error {
v.Kind = "append_blocks"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentReplaceDocumentBlocksSemanticOperation returns the union data inside the AgentDocumentSemanticOperations_Item as a AgentReplaceDocumentBlocksSemanticOperation
func (t AgentDocumentSemanticOperations_Item) AsAgentReplaceDocumentBlocksSemanticOperation() (AgentReplaceDocumentBlocksSemanticOperation, error) {
var body AgentReplaceDocumentBlocksSemanticOperation
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentReplaceDocumentBlocksSemanticOperation overwrites any union data inside the AgentDocumentSemanticOperations_Item as the provided AgentReplaceDocumentBlocksSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) FromAgentReplaceDocumentBlocksSemanticOperation(v AgentReplaceDocumentBlocksSemanticOperation) error {
v.Kind = "replace_blocks"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentReplaceDocumentBlocksSemanticOperation performs a merge with any union data inside the AgentDocumentSemanticOperations_Item, using the provided AgentReplaceDocumentBlocksSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) MergeAgentReplaceDocumentBlocksSemanticOperation(v AgentReplaceDocumentBlocksSemanticOperation) error {
v.Kind = "replace_blocks"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentUpdateDocumentBlockSemanticOperation returns the union data inside the AgentDocumentSemanticOperations_Item as a AgentUpdateDocumentBlockSemanticOperation
func (t AgentDocumentSemanticOperations_Item) AsAgentUpdateDocumentBlockSemanticOperation() (AgentUpdateDocumentBlockSemanticOperation, error) {
var body AgentUpdateDocumentBlockSemanticOperation
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentUpdateDocumentBlockSemanticOperation overwrites any union data inside the AgentDocumentSemanticOperations_Item as the provided AgentUpdateDocumentBlockSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) FromAgentUpdateDocumentBlockSemanticOperation(v AgentUpdateDocumentBlockSemanticOperation) error {
v.Kind = "update_block"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentUpdateDocumentBlockSemanticOperation performs a merge with any union data inside the AgentDocumentSemanticOperations_Item, using the provided AgentUpdateDocumentBlockSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) MergeAgentUpdateDocumentBlockSemanticOperation(v AgentUpdateDocumentBlockSemanticOperation) error {
v.Kind = "update_block"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentDeleteDocumentBlocksSemanticOperation returns the union data inside the AgentDocumentSemanticOperations_Item as a AgentDeleteDocumentBlocksSemanticOperation
func (t AgentDocumentSemanticOperations_Item) AsAgentDeleteDocumentBlocksSemanticOperation() (AgentDeleteDocumentBlocksSemanticOperation, error) {
var body AgentDeleteDocumentBlocksSemanticOperation
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentDeleteDocumentBlocksSemanticOperation overwrites any union data inside the AgentDocumentSemanticOperations_Item as the provided AgentDeleteDocumentBlocksSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) FromAgentDeleteDocumentBlocksSemanticOperation(v AgentDeleteDocumentBlocksSemanticOperation) error {
v.Kind = "delete_blocks"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentDeleteDocumentBlocksSemanticOperation performs a merge with any union data inside the AgentDocumentSemanticOperations_Item, using the provided AgentDeleteDocumentBlocksSemanticOperation
func (t *AgentDocumentSemanticOperations_Item) MergeAgentDeleteDocumentBlocksSemanticOperation(v AgentDeleteDocumentBlocksSemanticOperation) error {
v.Kind = "delete_blocks"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
func (t AgentDocumentSemanticOperations_Item) Discriminator() (string, error) {
var discriminator struct {
Discriminator string `json:"kind"`
}
err := json.Unmarshal(t.union, &discriminator)
return discriminator.Discriminator, err
}
func (t AgentDocumentSemanticOperations_Item) ValueByDiscriminator() (interface{}, error) {
discriminator, err := t.Discriminator()
if err != nil {
return nil, err
}
switch discriminator {
case "append_blocks":
return t.AsAgentAppendDocumentBlocksSemanticOperation()
case "delete_blocks":
return t.AsAgentDeleteDocumentBlocksSemanticOperation()
case "edit_document":
return t.AsEditNativeDocumentSemanticOperation()
case "insert_blocks":
return t.AsAgentInsertDocumentBlocksSemanticOperation()
case "replace_blocks":
return t.AsAgentReplaceDocumentBlocksSemanticOperation()
case "set_title":
return t.AsAgentSetDocumentTitleSemanticOperation()
case "update_block":
return t.AsAgentUpdateDocumentBlockSemanticOperation()
default:
return nil, errors.New("unknown discriminator value: " + discriminator)
}
}
func (t AgentDocumentSemanticOperations_Item) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
func (t *AgentDocumentSemanticOperations_Item) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
// AsAgentAppToolResult returns the union data inside the AgentExecuteAppToolResponse as a AgentAppToolResult
func (t AgentExecuteAppToolResponse) AsAgentAppToolResult() (AgentAppToolResult, error) {
var body AgentAppToolResult
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentAppToolResult overwrites any union data inside the AgentExecuteAppToolResponse as the provided AgentAppToolResult
func (t *AgentExecuteAppToolResponse) FromAgentAppToolResult(v AgentAppToolResult) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentAppToolResult performs a merge with any union data inside the AgentExecuteAppToolResponse, using the provided AgentAppToolResult
func (t *AgentExecuteAppToolResponse) MergeAgentAppToolResult(v AgentAppToolResult) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentAppToolConfirmationPending returns the union data inside the AgentExecuteAppToolResponse as a AgentAppToolConfirmationPending
func (t AgentExecuteAppToolResponse) AsAgentAppToolConfirmationPending() (AgentAppToolConfirmationPending, error) {
var body AgentAppToolConfirmationPending
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentAppToolConfirmationPending overwrites any union data inside the AgentExecuteAppToolResponse as the provided AgentAppToolConfirmationPending
func (t *AgentExecuteAppToolResponse) FromAgentAppToolConfirmationPending(v AgentAppToolConfirmationPending) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentAppToolConfirmationPending performs a merge with any union data inside the AgentExecuteAppToolResponse, using the provided AgentAppToolConfirmationPending
func (t *AgentExecuteAppToolResponse) MergeAgentAppToolConfirmationPending(v AgentAppToolConfirmationPending) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
func (t AgentExecuteAppToolResponse) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
func (t *AgentExecuteAppToolResponse) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
// AsAgentMessageReadRequest0 returns the union data inside the AgentMessageReadRequest as a AgentMessageReadRequest0
func (t AgentMessageReadRequest) AsAgentMessageReadRequest0() (AgentMessageReadRequest0, error) {
var body AgentMessageReadRequest0
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentMessageReadRequest0 overwrites any union data inside the AgentMessageReadRequest as the provided AgentMessageReadRequest0
func (t *AgentMessageReadRequest) FromAgentMessageReadRequest0(v AgentMessageReadRequest0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentMessageReadRequest0 performs a merge with any union data inside the AgentMessageReadRequest, using the provided AgentMessageReadRequest0
func (t *AgentMessageReadRequest) MergeAgentMessageReadRequest0(v AgentMessageReadRequest0) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentMessageReadRequest1 returns the union data inside the AgentMessageReadRequest as a AgentMessageReadRequest1
func (t AgentMessageReadRequest) AsAgentMessageReadRequest1() (AgentMessageReadRequest1, error) {
var body AgentMessageReadRequest1
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentMessageReadRequest1 overwrites any union data inside the AgentMessageReadRequest as the provided AgentMessageReadRequest1
func (t *AgentMessageReadRequest) FromAgentMessageReadRequest1(v AgentMessageReadRequest1) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentMessageReadRequest1 performs a merge with any union data inside the AgentMessageReadRequest, using the provided AgentMessageReadRequest1
func (t *AgentMessageReadRequest) MergeAgentMessageReadRequest1(v AgentMessageReadRequest1) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentMessageReadRequest2 returns the union data inside the AgentMessageReadRequest as a AgentMessageReadRequest2
func (t AgentMessageReadRequest) AsAgentMessageReadRequest2() (AgentMessageReadRequest2, error) {
var body AgentMessageReadRequest2
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentMessageReadRequest2 overwrites any union data inside the AgentMessageReadRequest as the provided AgentMessageReadRequest2
func (t *AgentMessageReadRequest) FromAgentMessageReadRequest2(v AgentMessageReadRequest2) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentMessageReadRequest2 performs a merge with any union data inside the AgentMessageReadRequest, using the provided AgentMessageReadRequest2
func (t *AgentMessageReadRequest) MergeAgentMessageReadRequest2(v AgentMessageReadRequest2) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentMessageReadRequest3 returns the union data inside the AgentMessageReadRequest as a AgentMessageReadRequest3
func (t AgentMessageReadRequest) AsAgentMessageReadRequest3() (AgentMessageReadRequest3, error) {
var body AgentMessageReadRequest3
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentMessageReadRequest3 overwrites any union data inside the AgentMessageReadRequest as the provided AgentMessageReadRequest3
func (t *AgentMessageReadRequest) FromAgentMessageReadRequest3(v AgentMessageReadRequest3) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentMessageReadRequest3 performs a merge with any union data inside the AgentMessageReadRequest, using the provided AgentMessageReadRequest3
func (t *AgentMessageReadRequest) MergeAgentMessageReadRequest3(v AgentMessageReadRequest3) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
func (t AgentMessageReadRequest) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
if err != nil {
return nil, err
}
object := make(map[string]json.RawMessage)
if t.union != nil {
err = json.Unmarshal(b, &object)
if err != nil {
return nil, err
}
}
if t.Cursor != nil {
object["cursor"], err = json.Marshal(t.Cursor)
if err != nil {
return nil, fmt.Errorf("error marshaling 'cursor': %w", err)
}
}
if t.InboxId != nil {
object["inbox_id"], err = json.Marshal(t.InboxId)
if err != nil {
return nil, fmt.Errorf("error marshaling 'inbox_id': %w", err)
}
}
if t.Limit != nil {
object["limit"], err = json.Marshal(t.Limit)
if err != nil {
return nil, fmt.Errorf("error marshaling 'limit': %w", err)
}
}
if t.ListInboxes != nil {
object["list_inboxes"], err = json.Marshal(t.ListInboxes)
if err != nil {
return nil, fmt.Errorf("error marshaling 'list_inboxes': %w", err)
}
}
if t.MessageIds != nil {
object["message_ids"], err = json.Marshal(t.MessageIds)
if err != nil {
return nil, fmt.Errorf("error marshaling 'message_ids': %w", err)
}
}
if t.ThreadId != nil {
object["thread_id"], err = json.Marshal(t.ThreadId)
if err != nil {
return nil, fmt.Errorf("error marshaling 'thread_id': %w", err)
}
}
b, err = json.Marshal(object)
return b, err
}
func (t *AgentMessageReadRequest) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
if err != nil {
return err
}
object := make(map[string]json.RawMessage)
err = json.Unmarshal(b, &object)
if err != nil {
return err
}
if raw, found := object["cursor"]; found {
err = json.Unmarshal(raw, &t.Cursor)
if err != nil {
return fmt.Errorf("error reading 'cursor': %w", err)
}
}
if raw, found := object["inbox_id"]; found {
err = json.Unmarshal(raw, &t.InboxId)
if err != nil {
return fmt.Errorf("error reading 'inbox_id': %w", err)
}
}
if raw, found := object["limit"]; found {
err = json.Unmarshal(raw, &t.Limit)
if err != nil {
return fmt.Errorf("error reading 'limit': %w", err)
}
}
if raw, found := object["list_inboxes"]; found {
err = json.Unmarshal(raw, &t.ListInboxes)
if err != nil {
return fmt.Errorf("error reading 'list_inboxes': %w", err)
}
}
if raw, found := object["message_ids"]; found {
err = json.Unmarshal(raw, &t.MessageIds)
if err != nil {
return fmt.Errorf("error reading 'message_ids': %w", err)
}
}
if raw, found := object["thread_id"]; found {
err = json.Unmarshal(raw, &t.ThreadId)
if err != nil {
return fmt.Errorf("error reading 'thread_id': %w", err)
}
}
return err
}
// AsAgentMessageDocumentResource returns the union data inside the AgentMessageResource as a AgentMessageDocumentResource
func (t AgentMessageResource) AsAgentMessageDocumentResource() (AgentMessageDocumentResource, error) {
var body AgentMessageDocumentResource
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentMessageDocumentResource overwrites any union data inside the AgentMessageResource as the provided AgentMessageDocumentResource
func (t *AgentMessageResource) FromAgentMessageDocumentResource(v AgentMessageDocumentResource) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentMessageDocumentResource performs a merge with any union data inside the AgentMessageResource, using the provided AgentMessageDocumentResource
func (t *AgentMessageResource) MergeAgentMessageDocumentResource(v AgentMessageDocumentResource) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsAgentMessageTreeResource returns the union data inside the AgentMessageResource as a AgentMessageTreeResource
func (t AgentMessageResource) AsAgentMessageTreeResource() (AgentMessageTreeResource, error) {
var body AgentMessageTreeResource
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromAgentMessageTreeResource overwrites any union data inside the AgentMessageResource as the provided AgentMessageTreeResource
func (t *AgentMessageResource) FromAgentMessageTreeResource(v AgentMessageTreeResource) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeAgentMessageTreeResource performs a merge with any union data inside the AgentMessageResource, using the provided AgentMessageTreeResource
func (t *AgentMessageResource) MergeAgentMessageTreeResource(v AgentMessageTreeResource) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
func (t AgentMessageResource) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
func (t *AgentMessageResource) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
// AsArtifactTreeSegment0 returns the union data inside the ArtifactTreeSegment as a ArtifactTreeSegment0
func (t ArtifactTreeSegment) AsArtifactTreeSegment0() (ArtifactTreeSegment0, error) {
var body ArtifactTreeSegment0
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromArtifactTreeSegment0 overwrites any union data inside the ArtifactTreeSegment as the provided ArtifactTreeSegment0
func (t *ArtifactTreeSegment) FromArtifactTreeSegment0(v ArtifactTreeSegment0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeArtifactTreeSegment0 performs a merge with any union data inside the ArtifactTreeSegment, using the provided ArtifactTreeSegment0
func (t *ArtifactTreeSegment) MergeArtifactTreeSegment0(v ArtifactTreeSegment0) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsArtifactTreeSegment1 returns the union data inside the ArtifactTreeSegment as a ArtifactTreeSegment1
func (t ArtifactTreeSegment) AsArtifactTreeSegment1() (ArtifactTreeSegment1, error) {
var body ArtifactTreeSegment1
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromArtifactTreeSegment1 overwrites any union data inside the ArtifactTreeSegment as the provided ArtifactTreeSegment1
func (t *ArtifactTreeSegment) FromArtifactTreeSegment1(v ArtifactTreeSegment1) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeArtifactTreeSegment1 performs a merge with any union data inside the ArtifactTreeSegment, using the provided ArtifactTreeSegment1
func (t *ArtifactTreeSegment) MergeArtifactTreeSegment1(v ArtifactTreeSegment1) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
func (t ArtifactTreeSegment) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
if err != nil {
return nil, err
}
object := make(map[string]json.RawMessage)
if t.union != nil {
err = json.Unmarshal(b, &object)
if err != nil {
return nil, err
}
}
object["content"], err = json.Marshal(t.Content)
if err != nil {
return nil, fmt.Errorf("error marshaling 'content': %w", err)
}
object["directory_count"], err = json.Marshal(t.DirectoryCount)
if err != nil {
return nil, fmt.Errorf("error marshaling 'directory_count': %w", err)
}
if t.EntryDocumentId != nil {
object["entry_document_id"], err = json.Marshal(t.EntryDocumentId)
if err != nil {
return nil, fmt.Errorf("error marshaling 'entry_document_id': %w", err)
}
}
if t.EntryDocumentVersionId != nil {
object["entry_document_version_id"], err = json.Marshal(t.EntryDocumentVersionId)
if err != nil {
return nil, fmt.Errorf("error marshaling 'entry_document_version_id': %w", err)
}
}
object["file_count"], err = json.Marshal(t.FileCount)
if err != nil {
return nil, fmt.Errorf("error marshaling 'file_count': %w", err)
}
object["publication_group_id"], err = json.Marshal(t.PublicationGroupId)
if err != nil {
return nil, fmt.Errorf("error marshaling 'publication_group_id': %w", err)
}
object["root_path"], err = json.Marshal(t.RootPath)
if err != nil {
return nil, fmt.Errorf("error marshaling 'root_path': %w", err)
}
object["total_bytes"], err = json.Marshal(t.TotalBytes)
if err != nil {
return nil, fmt.Errorf("error marshaling 'total_bytes': %w", err)
}
object["type"], err = json.Marshal(t.Type)
if err != nil {
return nil, fmt.Errorf("error marshaling 'type': %w", err)
}
b, err = json.Marshal(object)
return b, err
}
func (t *ArtifactTreeSegment) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
if err != nil {
return err
}
object := make(map[string]json.RawMessage)
err = json.Unmarshal(b, &object)
if err != nil {
return err
}
if raw, found := object["content"]; found {
err = json.Unmarshal(raw, &t.Content)
if err != nil {
return fmt.Errorf("error reading 'content': %w", err)
}
}
if raw, found := object["directory_count"]; found {
err = json.Unmarshal(raw, &t.DirectoryCount)
if err != nil {
return fmt.Errorf("error reading 'directory_count': %w", err)
}
}
if raw, found := object["entry_document_id"]; found {
err = json.Unmarshal(raw, &t.EntryDocumentId)
if err != nil {
return fmt.Errorf("error reading 'entry_document_id': %w", err)
}
}
if raw, found := object["entry_document_version_id"]; found {
err = json.Unmarshal(raw, &t.EntryDocumentVersionId)
if err != nil {
return fmt.Errorf("error reading 'entry_document_version_id': %w", err)
}
}
if raw, found := object["file_count"]; found {
err = json.Unmarshal(raw, &t.FileCount)
if err != nil {
return fmt.Errorf("error reading 'file_count': %w", err)
}
}
if raw, found := object["publication_group_id"]; found {
err = json.Unmarshal(raw, &t.PublicationGroupId)
if err != nil {
return fmt.Errorf("error reading 'publication_group_id': %w", err)
}
}
if raw, found := object["root_path"]; found {
err = json.Unmarshal(raw, &t.RootPath)
if err != nil {
return fmt.Errorf("error reading 'root_path': %w", err)
}
}
if raw, found := object["total_bytes"]; found {
err = json.Unmarshal(raw, &t.TotalBytes)
if err != nil {
return fmt.Errorf("error reading 'total_bytes': %w", err)
}
}
if raw, found := object["type"]; found {
err = json.Unmarshal(raw, &t.Type)
if err != nil {
return fmt.Errorf("error reading 'type': %w", err)
}
}
return err
}
// AsDocumentCommentTextSegment returns the union data inside the DocumentCommentSegment as a DocumentCommentTextSegment
func (t DocumentCommentSegment) AsDocumentCommentTextSegment() (DocumentCommentTextSegment, error) {
var body DocumentCommentTextSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromDocumentCommentTextSegment overwrites any union data inside the DocumentCommentSegment as the provided DocumentCommentTextSegment
func (t *DocumentCommentSegment) FromDocumentCommentTextSegment(v DocumentCommentTextSegment) error {
v.Type = "text"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeDocumentCommentTextSegment performs a merge with any union data inside the DocumentCommentSegment, using the provided DocumentCommentTextSegment
func (t *DocumentCommentSegment) MergeDocumentCommentTextSegment(v DocumentCommentTextSegment) error {
v.Type = "text"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsDocumentCommentReferenceSegment returns the union data inside the DocumentCommentSegment as a DocumentCommentReferenceSegment
func (t DocumentCommentSegment) AsDocumentCommentReferenceSegment() (DocumentCommentReferenceSegment, error) {
var body DocumentCommentReferenceSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromDocumentCommentReferenceSegment overwrites any union data inside the DocumentCommentSegment as the provided DocumentCommentReferenceSegment
func (t *DocumentCommentSegment) FromDocumentCommentReferenceSegment(v DocumentCommentReferenceSegment) error {
v.Type = "reference"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeDocumentCommentReferenceSegment performs a merge with any union data inside the DocumentCommentSegment, using the provided DocumentCommentReferenceSegment
func (t *DocumentCommentSegment) MergeDocumentCommentReferenceSegment(v DocumentCommentReferenceSegment) error {
v.Type = "reference"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
func (t DocumentCommentSegment) Discriminator() (string, error) {
var discriminator struct {
Discriminator string `json:"type"`
}
err := json.Unmarshal(t.union, &discriminator)
return discriminator.Discriminator, err
}
func (t DocumentCommentSegment) ValueByDiscriminator() (interface{}, error) {
discriminator, err := t.Discriminator()
if err != nil {
return nil, err
}
switch discriminator {
case "reference":
return t.AsDocumentCommentReferenceSegment()
case "text":
return t.AsDocumentCommentTextSegment()
default:
return nil, errors.New("unknown discriminator value: " + discriminator)
}
}
func (t DocumentCommentSegment) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
func (t *DocumentCommentSegment) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
// AsReferenceSegment returns the union data inside the MessageSegment as a ReferenceSegment
func (t MessageSegment) AsReferenceSegment() (ReferenceSegment, error) {
var body ReferenceSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromReferenceSegment overwrites any union data inside the MessageSegment as the provided ReferenceSegment
func (t *MessageSegment) FromReferenceSegment(v ReferenceSegment) error {
v.Type = "reference"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeReferenceSegment performs a merge with any union data inside the MessageSegment, using the provided ReferenceSegment
func (t *MessageSegment) MergeReferenceSegment(v ReferenceSegment) error {
v.Type = "reference"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsTextSegment returns the union data inside the MessageSegment as a TextSegment
func (t MessageSegment) AsTextSegment() (TextSegment, error) {
var body TextSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromTextSegment overwrites any union data inside the MessageSegment as the provided TextSegment
func (t *MessageSegment) FromTextSegment(v TextSegment) error {
v.Type = "text"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeTextSegment performs a merge with any union data inside the MessageSegment, using the provided TextSegment
func (t *MessageSegment) MergeTextSegment(v TextSegment) error {
v.Type = "text"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsFileSegment returns the union data inside the MessageSegment as a FileSegment
func (t MessageSegment) AsFileSegment() (FileSegment, error) {
var body FileSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromFileSegment overwrites any union data inside the MessageSegment as the provided FileSegment
func (t *MessageSegment) FromFileSegment(v FileSegment) error {
v.Type = "file"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeFileSegment performs a merge with any union data inside the MessageSegment, using the provided FileSegment
func (t *MessageSegment) MergeFileSegment(v FileSegment) error {
v.Type = "file"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsHtmlFragmentSegment returns the union data inside the MessageSegment as a HtmlFragmentSegment
func (t MessageSegment) AsHtmlFragmentSegment() (HtmlFragmentSegment, error) {
var body HtmlFragmentSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromHtmlFragmentSegment overwrites any union data inside the MessageSegment as the provided HtmlFragmentSegment
func (t *MessageSegment) FromHtmlFragmentSegment(v HtmlFragmentSegment) error {
v.Type = "html_fragment"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeHtmlFragmentSegment performs a merge with any union data inside the MessageSegment, using the provided HtmlFragmentSegment
func (t *MessageSegment) MergeHtmlFragmentSegment(v HtmlFragmentSegment) error {
v.Type = "html_fragment"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsDocumentSegment returns the union data inside the MessageSegment as a DocumentSegment
func (t MessageSegment) AsDocumentSegment() (DocumentSegment, error) {
var body DocumentSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromDocumentSegment overwrites any union data inside the MessageSegment as the provided DocumentSegment
func (t *MessageSegment) FromDocumentSegment(v DocumentSegment) error {
v.Type = "document"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeDocumentSegment performs a merge with any union data inside the MessageSegment, using the provided DocumentSegment
func (t *MessageSegment) MergeDocumentSegment(v DocumentSegment) error {
v.Type = "document"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsSkillSegment returns the union data inside the MessageSegment as a SkillSegment
func (t MessageSegment) AsSkillSegment() (SkillSegment, error) {
var body SkillSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromSkillSegment overwrites any union data inside the MessageSegment as the provided SkillSegment
func (t *MessageSegment) FromSkillSegment(v SkillSegment) error {
v.Type = "skill"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeSkillSegment performs a merge with any union data inside the MessageSegment, using the provided SkillSegment
func (t *MessageSegment) MergeSkillSegment(v SkillSegment) error {
v.Type = "skill"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsArtifactTreeSegment returns the union data inside the MessageSegment as a ArtifactTreeSegment
func (t MessageSegment) AsArtifactTreeSegment() (ArtifactTreeSegment, error) {
var body ArtifactTreeSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromArtifactTreeSegment overwrites any union data inside the MessageSegment as the provided ArtifactTreeSegment
func (t *MessageSegment) FromArtifactTreeSegment(v ArtifactTreeSegment) error {
v.Type = "artifact_tree"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeArtifactTreeSegment performs a merge with any union data inside the MessageSegment, using the provided ArtifactTreeSegment
func (t *MessageSegment) MergeArtifactTreeSegment(v ArtifactTreeSegment) error {
v.Type = "artifact_tree"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsMeetingNotesSegment returns the union data inside the MessageSegment as a MeetingNotesSegment
func (t MessageSegment) AsMeetingNotesSegment() (MeetingNotesSegment, error) {
var body MeetingNotesSegment
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromMeetingNotesSegment overwrites any union data inside the MessageSegment as the provided MeetingNotesSegment
func (t *MessageSegment) FromMeetingNotesSegment(v MeetingNotesSegment) error {
v.Type = "meeting_notes"
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeMeetingNotesSegment performs a merge with any union data inside the MessageSegment, using the provided MeetingNotesSegment
func (t *MessageSegment) MergeMeetingNotesSegment(v MeetingNotesSegment) error {
v.Type = "meeting_notes"
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
func (t MessageSegment) Discriminator() (string, error) {
var discriminator struct {
Discriminator string `json:"type"`
}
err := json.Unmarshal(t.union, &discriminator)
return discriminator.Discriminator, err
}
func (t MessageSegment) ValueByDiscriminator() (interface{}, error) {
discriminator, err := t.Discriminator()
if err != nil {
return nil, err
}
switch discriminator {
case "artifact_tree":
return t.AsArtifactTreeSegment()
case "document":
return t.AsDocumentSegment()
case "file":
return t.AsFileSegment()
case "html_fragment":
return t.AsHtmlFragmentSegment()
case "meeting_notes":
return t.AsMeetingNotesSegment()
case "reference":
return t.AsReferenceSegment()
case "skill":
return t.AsSkillSegment()
case "text":
return t.AsTextSegment()
default:
return nil, errors.New("unknown discriminator value: " + discriminator)
}
}
func (t MessageSegment) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
func (t *MessageSegment) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}