Documentation
¶
Index ¶
- Constants
- Variables
- func Bool(v bool) param.Opt[bool]
- func Float(v float64) param.Opt[float64]
- func Int(v int64) param.Opt[int64]
- func String(v string) param.Opt[string]
- func VerifyWebhookSignature(payload []byte, headers http.Header, secret string) error
- func WithIdentityID(identityID string) option.RequestOption
- type Batch
- type BatchCancelParams
- type BatchFile
- type BatchListParams
- type BatchNewParams
- type BatchRequestCounts
- type BatchService
- func (r *BatchService) Cancel(ctx context.Context, batchID string, params BatchCancelParams, ...) (res *Batch, err error)
- func (r *BatchService) Get(ctx context.Context, batchID string, opts ...option.RequestOption) (res *Batch, err error)
- func (r *BatchService) GetError(ctx context.Context, batchID string, opts ...option.RequestOption) (res *BatchFile, err error)
- func (r *BatchService) GetOutput(ctx context.Context, batchID string, opts ...option.RequestOption) (res *BatchFile, err error)
- func (r *BatchService) List(ctx context.Context, params BatchListParams, opts ...option.RequestOption) (res *pagination.Page[Batch], err error)
- func (r *BatchService) ListAutoPaging(ctx context.Context, params BatchListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Batch]
- func (r *BatchService) New(ctx context.Context, params BatchNewParams, opts ...option.RequestOption) (res *Batch, err error)
- type BatchTask
- type BatchTaskArtifactsItem
- type BatchTaskError
- type BatchTaskListParams
- type BatchTaskService
- type BatchTaskUsage
- type BatchUsage
- type Channel
- type ChannelChannelConfig
- type ChannelChannelConfigResponseOptions
- type ChannelIdentityResolution
- type ChannelListParams
- type ChannelNewParams
- type ChannelPairing
- type ChannelPairingListParams
- type ChannelPairingNewParams
- type ChannelPairingService
- func (r *ChannelPairingService) Delete(ctx context.Context, pairingID string, opts ...option.RequestOption) (res *DeletedChannelPairing, err error)
- func (r *ChannelPairingService) Get(ctx context.Context, pairingID string, opts ...option.RequestOption) (res *ChannelPairing, err error)
- func (r *ChannelPairingService) List(ctx context.Context, params ChannelPairingListParams, ...) (res *pagination.Page[ChannelPairing], err error)
- func (r *ChannelPairingService) ListAutoPaging(ctx context.Context, params ChannelPairingListParams, ...) *pagination.PageAutoPager[ChannelPairing]
- func (r *ChannelPairingService) New(ctx context.Context, params ChannelPairingNewParams, ...) (res *ChannelPairing, err error)
- func (r *ChannelPairingService) Update(ctx context.Context, pairingID string, params ChannelPairingUpdateParams, ...) (res *ChannelPairing, err error)
- type ChannelPairingUpdateParams
- type ChannelQRSession
- type ChannelQRSessionNewParams
- type ChannelQRSessionService
- type ChannelService
- func (r *ChannelService) Delete(ctx context.Context, channelID string, opts ...option.RequestOption) (res *DeletedChannel, err error)
- func (r *ChannelService) Get(ctx context.Context, channelID string, opts ...option.RequestOption) (res *Channel, err error)
- func (r *ChannelService) List(ctx context.Context, params ChannelListParams, opts ...option.RequestOption) (res *pagination.Page[Channel], err error)
- func (r *ChannelService) ListAutoPaging(ctx context.Context, params ChannelListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Channel]
- func (r *ChannelService) New(ctx context.Context, params ChannelNewParams, opts ...option.RequestOption) (res *Channel, err error)
- func (r *ChannelService) Update(ctx context.Context, channelID string, params ChannelUpdateParams, ...) (res *Channel, err error)
- type ChannelUpdateParams
- type Client
- type ContentBlock
- type ContentBlockParam
- type Decision
- type DecisionAnswer
- type DecisionChoice
- type DecisionChoiceParam
- type DecisionContext
- type DecisionError
- type DecisionLevel
- type DecisionLevelParam
- type DecisionListParams
- type DecisionNewParams
- type DecisionQuestion
- type DecisionQuestionParam
- type DecisionService
- func (r *DecisionService) Get(ctx context.Context, decisionID string, opts ...option.RequestOption) (res *Decision, err error)
- func (r *DecisionService) List(ctx context.Context, params DecisionListParams, opts ...option.RequestOption) (res *pagination.Page[Decision], err error)
- func (r *DecisionService) ListAutoPaging(ctx context.Context, params DecisionListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Decision]
- func (r *DecisionService) New(ctx context.Context, params DecisionNewParams, opts ...option.RequestOption) (res *Decision, err error)
- type DeletedChannel
- type DeletedChannelPairing
- type DeletedIdentity
- type DeletedMemory
- type DeletedMemoryStore
- type DeletedMemoryStoreMount
- type DeletedSkillVersion
- type Dream
- type DreamError
- type DreamInput
- type DreamInputParam
- type DreamListParams
- type DreamModelConfig
- type DreamModelConfigParam
- type DreamNewParams
- type DreamNewParamsModelUnion
- type DreamOutput
- type DreamService
- func (r *DreamService) Archive(ctx context.Context, dreamID string, opts ...option.RequestOption) (res *Dream, err error)
- func (r *DreamService) Cancel(ctx context.Context, dreamID string, opts ...option.RequestOption) (res *Dream, err error)
- func (r *DreamService) Get(ctx context.Context, dreamID string, opts ...option.RequestOption) (res *Dream, err error)
- func (r *DreamService) List(ctx context.Context, params DreamListParams, opts ...option.RequestOption) (res *pagination.Page[Dream], err error)
- func (r *DreamService) ListAutoPaging(ctx context.Context, params DreamListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Dream]
- func (r *DreamService) New(ctx context.Context, params DreamNewParams, opts ...option.RequestOption) (res *Dream, err error)
- type DreamUsage
- type DriveClearParams
- type DriveClearResponse
- type DriveCreateDownloadURLParams
- type DriveCreateUploadURLParams
- type DriveDeleteEntryParams
- type DriveDeleteEntryResponse
- type DriveDownloadURL
- type DriveEntry
- type DriveListEntriesParams
- type DriveListEntriesResponse
- type DriveService
- func (r *DriveService) Clear(ctx context.Context, params DriveClearParams, opts ...option.RequestOption) (res *DriveClearResponse, err error)
- func (r *DriveService) CreateDownloadURL(ctx context.Context, params DriveCreateDownloadURLParams, ...) (res *DriveDownloadURL, err error)
- func (r *DriveService) CreateUploadURL(ctx context.Context, params DriveCreateUploadURLParams, ...) (res *DriveUploadURL, err error)
- func (r *DriveService) DeleteEntry(ctx context.Context, params DriveDeleteEntryParams, ...) (res *DriveDeleteEntryResponse, err error)
- func (r *DriveService) ListEntries(ctx context.Context, params DriveListEntriesParams, ...) (res *DriveListEntriesResponse, err error)
- type DriveUploadURL
- type EffectiveConfig
- type EffectiveConfigAgent
- type EffectiveConfigAgentToolsItem
- type EffectiveConfigAgentToolsItemConfigsItem
- type EffectiveConfigSession
- type EffectiveConfigSessionResourcesItem
- type Environment
- type EnvironmentBindingInfo
- type EnvironmentConfig
- type EnvironmentConfigPackages
- type EnvironmentListParams
- type EnvironmentNewParams
- type EnvironmentSearchParams
- type EnvironmentService
- func (r *EnvironmentService) Archive(ctx context.Context, id string, opts ...option.RequestOption) (res *Environment, err error)
- func (r *EnvironmentService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *EnvironmentService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Environment, err error)
- func (r *EnvironmentService) List(ctx context.Context, params EnvironmentListParams, ...) (res *pagination.PageCursor[Environment], err error)
- func (r *EnvironmentService) ListAutoPaging(ctx context.Context, params EnvironmentListParams, ...) *pagination.PageCursorAutoPager[Environment]
- func (r *EnvironmentService) New(ctx context.Context, params EnvironmentNewParams, opts ...option.RequestOption) (res *Environment, err error)
- func (r *EnvironmentService) Search(ctx context.Context, params EnvironmentSearchParams, ...) (*pagination.PageCursor[Environment], error)
- func (r *EnvironmentService) SearchAutoPaging(ctx context.Context, params EnvironmentSearchParams, ...) *pagination.PageCursorAutoPager[Environment]
- func (r *EnvironmentService) Update(ctx context.Context, id string, params EnvironmentUpdateParams, ...) (res *Environment, err error)
- type EnvironmentUpdateParams
- type EnvironmentVariableOverride
- type EnvironmentVariableOverrideParam
- type EnvironmentVariableUpdateParam
- type EnvironmentVariablesUnionParam
- type Error
- type EventContentUnionParam
- type FileListParams
- type FileMetadata
- type FileSearchParams
- type FileService
- func (r *FileService) Delete(ctx context.Context, fileID string, opts ...option.RequestOption) (err error)
- func (r *FileService) Download(ctx context.Context, fileID string, opts ...option.RequestOption) (res *http.Response, err error)
- func (r *FileService) GetMetadata(ctx context.Context, fileID string, opts ...option.RequestOption) (res *FileMetadata, err error)
- func (r *FileService) List(ctx context.Context, params FileListParams, opts ...option.RequestOption) (res *pagination.PageCursor[FileMetadata], err error)
- func (r *FileService) ListAutoPaging(ctx context.Context, params FileListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[FileMetadata]
- func (r *FileService) Search(ctx context.Context, params FileSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[FileMetadata], error)
- func (r *FileService) SearchAutoPaging(ctx context.Context, params FileSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[FileMetadata]
- func (r *FileService) Upload(ctx context.Context, params FileUploadParams, opts ...option.RequestOption) (res *FileMetadata, err error)
- type FileUploadParams
- type GitHubRepository
- type GitHubRepositoryParam
- type Identity
- type IdentityClearParams
- type IdentityClearResponse
- type IdentityClearResponseSummary
- type IdentityConfig
- type IdentityConfigListParams
- type IdentityConfigService
- func (r *IdentityConfigService) Get(ctx context.Context, identityID string, templateID string, ...) (res *IdentityConfig, err error)
- func (r *IdentityConfigService) GetEffective(ctx context.Context, identityID string, templateID string, ...) (res *EffectiveConfig, err error)
- func (r *IdentityConfigService) List(ctx context.Context, identityID string, params IdentityConfigListParams, ...) (res *pagination.Page[IdentityConfig], err error)
- func (r *IdentityConfigService) ListAutoPaging(ctx context.Context, identityID string, params IdentityConfigListParams, ...) *pagination.PageAutoPager[IdentityConfig]
- func (r *IdentityConfigService) Upsert(ctx context.Context, identityID string, templateID string, ...) (res *IdentityConfig, err error)
- type IdentityConfigSpec
- type IdentityConfigSpecParam
- type IdentityConfigUpsertParams
- type IdentityListParams
- type IdentityListTemplatesResponse
- type IdentityMemoryStoreListParams
- type IdentityMemoryStoreListResponse
- type IdentityMemoryStoreMountParams
- type IdentityMemoryStoreService
- func (r *IdentityMemoryStoreService) Detach(ctx context.Context, identityID string, templateID string, ...) (res *DeletedMemoryStoreMount, err error)
- func (r *IdentityMemoryStoreService) List(ctx context.Context, identityID string, templateID string, ...) (res *pagination.Page[MemoryStoreMount], err error)
- func (r *IdentityMemoryStoreService) ListAutoPaging(ctx context.Context, identityID, templateID string, ...) *pagination.PageAutoPager[MemoryStoreMount]
- func (r *IdentityMemoryStoreService) Mount(ctx context.Context, identityID string, templateID string, ...) (res *MemoryStoreMount, err error)
- type IdentityNewParams
- type IdentityService
- func (r *IdentityService) Clear(ctx context.Context, identityID string, params IdentityClearParams, ...) (res *IdentityClearResponse, err error)
- func (r *IdentityService) Delete(ctx context.Context, identityID string, opts ...option.RequestOption) (res *DeletedIdentity, err error)
- func (r *IdentityService) Disable(ctx context.Context, identityID string, opts ...option.RequestOption) (res *Identity, err error)
- func (r *IdentityService) Enable(ctx context.Context, identityID string, opts ...option.RequestOption) (res *Identity, err error)
- func (r *IdentityService) EnsureAdmin(ctx context.Context, opts ...option.RequestOption) (res *Identity, err error)
- func (r *IdentityService) Get(ctx context.Context, identityID string, opts ...option.RequestOption) (res *Identity, err error)
- func (r *IdentityService) List(ctx context.Context, params IdentityListParams, opts ...option.RequestOption) (res *pagination.Page[Identity], err error)
- func (r *IdentityService) ListAutoPaging(ctx context.Context, params IdentityListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Identity]
- func (r *IdentityService) ListTemplates(ctx context.Context, identityID string, opts ...option.RequestOption) (res *IdentityListTemplatesResponse, err error)
- func (r *IdentityService) New(ctx context.Context, params IdentityNewParams, opts ...option.RequestOption) (res *Identity, err error)
- func (r *IdentityService) Stats(ctx context.Context, opts ...option.RequestOption) (res *IdentityStats, err error)
- func (r *IdentityService) Update(ctx context.Context, identityID string, params IdentityUpdateParams, ...) (res *Identity, err error)
- type IdentityServiceAccountTokenService
- type IdentityStats
- type IdentityTemplate
- type IdentityToolsUnion
- type IdentityToolsUnionParam
- type IdentityUpdateParams
- type IdentityUsage
- type ImageSource
- type ImageSourceParam
- type MCPOAuthRefreshUpdateParam
- type MCPOAuthUpdateParam
- type MCPServer
- type MCPServerOverride
- type MCPServerOverrideParam
- type MCPServerParam
- type ManagedCapabilityOverride
- type ManagedCapabilityOverrideParam
- type ManagedToolConfig
- type ManagedToolConfigParam
- type Memory
- type MemoryStore
- type MemoryStoreListParams
- type MemoryStoreMemoryListParams
- type MemoryStoreMemoryNewParams
- type MemoryStoreMemoryService
- func (r *MemoryStoreMemoryService) Delete(ctx context.Context, memoryStoreID string, memoryID string, ...) (res *DeletedMemory, err error)
- func (r *MemoryStoreMemoryService) Get(ctx context.Context, memoryStoreID string, memoryID string, ...) (res *Memory, err error)
- func (r *MemoryStoreMemoryService) List(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryListParams, ...) (res *pagination.Page[Memory], err error)
- func (r *MemoryStoreMemoryService) ListAutoPaging(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryListParams, ...) *pagination.PageAutoPager[Memory]
- func (r *MemoryStoreMemoryService) New(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryNewParams, ...) (res *Memory, err error)
- func (r *MemoryStoreMemoryService) Update(ctx context.Context, memoryStoreID string, memoryID string, ...) (res *Memory, err error)
- type MemoryStoreMemoryUpdateParams
- type MemoryStoreMemoryVersionListParams
- type MemoryStoreMemoryVersionService
- func (r *MemoryStoreMemoryVersionService) Get(ctx context.Context, memoryStoreID string, memoryVersionID string, ...) (res *MemoryVersion, err error)
- func (r *MemoryStoreMemoryVersionService) List(ctx context.Context, memoryStoreID string, ...) (res *pagination.Page[MemoryVersion], err error)
- func (r *MemoryStoreMemoryVersionService) ListAutoPaging(ctx context.Context, memoryStoreID string, ...) *pagination.PageAutoPager[MemoryVersion]
- func (r *MemoryStoreMemoryVersionService) Redact(ctx context.Context, memoryStoreID string, memoryVersionID string, ...) (res *MemoryVersion, err error)
- type MemoryStoreMount
- type MemoryStoreNewParams
- type MemoryStoreNewParamsMount
- type MemoryStoreService
- func (r *MemoryStoreService) Archive(ctx context.Context, memoryStoreID string, opts ...option.RequestOption) (res *MemoryStore, err error)
- func (r *MemoryStoreService) Delete(ctx context.Context, memoryStoreID string, opts ...option.RequestOption) (res *DeletedMemoryStore, err error)
- func (r *MemoryStoreService) Get(ctx context.Context, memoryStoreID string, opts ...option.RequestOption) (res *MemoryStore, err error)
- func (r *MemoryStoreService) List(ctx context.Context, params MemoryStoreListParams, ...) (res *pagination.Page[MemoryStore], err error)
- func (r *MemoryStoreService) ListAutoPaging(ctx context.Context, params MemoryStoreListParams, ...) *pagination.PageAutoPager[MemoryStore]
- func (r *MemoryStoreService) New(ctx context.Context, params MemoryStoreNewParams, opts ...option.RequestOption) (res *MemoryStore, err error)
- func (r *MemoryStoreService) Update(ctx context.Context, memoryStoreID string, params MemoryStoreUpdateParams, ...) (res *MemoryStore, err error)
- type MemoryStoreUpdateParams
- type MemoryVersion
- type Model
- type ModelConfig
- type ModelConfigParam
- type ModelConfigUnionParam
- type ModelListResponse
- type ModelService
- type MultiagentConfig
- type MultiagentConfigParam
- type MultiagentEntry
- type MultiagentEntryParam
- type OutcomeRubric
- type OutcomeRubricParam
- type PermissionPolicy
- type PermissionPolicyParam
- type RealtimeAudioConfig
- type RealtimeAudioConfigParam
- type RealtimeAudioFormat
- type RealtimeAudioOutputConfig
- type RealtimeAudioOutputConfigParam
- type RealtimeAudioPayload
- type RealtimeCapabilities
- type RealtimeClientEvent
- type RealtimeClosedPayload
- type RealtimeConfig
- type RealtimeConfigParam
- type RealtimeConnectParams
- type RealtimeConnection
- func (c *RealtimeConnection) AppendAudio(ctx context.Context, pcm []byte) error
- func (c *RealtimeConnection) Close() error
- func (c *RealtimeConnection) CloseGracefully(ctx context.Context) (*RealtimeClosedPayload, error)
- func (c *RealtimeConnection) Err() error
- func (c *RealtimeConnection) Interrupt(ctx context.Context) error
- func (c *RealtimeConnection) Ping(ctx context.Context) error
- func (c *RealtimeConnection) PlaybackCancelled(ctx context.Context, r RealtimePlaybackReceipt) error
- func (c *RealtimeConnection) PlaybackEnded(ctx context.Context, r RealtimePlaybackReceipt) error
- func (c *RealtimeConnection) PlaybackStarted(ctx context.Context, r RealtimePlaybackReceipt) error
- func (c *RealtimeConnection) Recv(ctx context.Context) (RealtimeEvent, error)
- func (c *RealtimeConnection) SendEvent(ctx context.Context, event RealtimeClientEvent) error
- func (c *RealtimeConnection) SendText(ctx context.Context, text string) error
- type RealtimeConversation
- type RealtimeConversationHistoryParams
- type RealtimeConversationNewParams
- type RealtimeConversationService
- func (r *RealtimeConversationService) History(ctx context.Context, conversationID string, ...) (res *RealtimeHistoryPage, err error)
- func (r *RealtimeConversationService) HistoryAutoPaging(ctx context.Context, conversationID string, ...) *RealtimeHistoryAutoPager
- func (r *RealtimeConversationService) New(ctx context.Context, params RealtimeConversationNewParams, ...) (res *RealtimeConversation, err error)
- type RealtimeErrorPayload
- type RealtimeEvent
- type RealtimeHistoryAutoPager
- type RealtimeHistoryConversation
- type RealtimeHistoryEvent
- type RealtimeHistoryPage
- type RealtimeHistoryPageInfo
- type RealtimePlaybackReceipt
- type RealtimeProtocolError
- type RealtimeReadyPayload
- type RealtimeReasonPayload
- type RealtimeServerError
- type RealtimeService
- type RealtimeStatePayload
- type RealtimeTranscriptPayload
- type RealtimeTransportError
- type RealtimeWorkAcceptedPayload
- type RealtimeWorkCompletedPayload
- type RealtimeWorkError
- type RealtimeWorkFailedPayload
- type RealtimeWorkMilestonePayload
- type RealtimeWorkProgressPayload
- type RealtimeWorkRunningPayload
- type ResourceBinding
- type ResourceBindingParam
- type ResumableSessionEventStream
- type ResumableSessionThreadEventStream
- func (s *ResumableSessionThreadEventStream) Close() error
- func (s *ResumableSessionThreadEventStream) Current() SessionEvent
- func (s *ResumableSessionThreadEventStream) Err() error
- func (s *ResumableSessionThreadEventStream) LastEventID() string
- func (s *ResumableSessionThreadEventStream) Next() bool
- type Schedule
- type ScheduleArchiveManyParams
- type ScheduleArchiveManyResponse
- type ScheduleArchiveParams
- type ScheduleExecution
- type ScheduleFileResource
- type ScheduleFileResourceParam
- type ScheduleInitialEventsItem
- type ScheduleListParams
- type ScheduleNewParams
- type SchedulePauseParams
- type SchedulePausedReason
- type ScheduleRun
- type ScheduleRunGetParams
- type ScheduleRunListParams
- type ScheduleRunParams
- type ScheduleRunService
- func (r *ScheduleRunService) Get(ctx context.Context, runID string, params ScheduleRunGetParams, ...) (res *ScheduleRun, err error)
- func (r *ScheduleRunService) List(ctx context.Context, params ScheduleRunListParams, ...) (res *pagination.Page[ScheduleRun], err error)
- func (r *ScheduleRunService) ListAutoPaging(ctx context.Context, params ScheduleRunListParams, ...) *pagination.PageAutoPager[ScheduleRun]
- type ScheduleRunTriggerContext
- type ScheduleService
- func (r *ScheduleService) Archive(ctx context.Context, scheduleID string, params ScheduleArchiveParams, ...) (res *Schedule, err error)
- func (r *ScheduleService) ArchiveMany(ctx context.Context, params ScheduleArchiveManyParams, ...) (res *ScheduleArchiveManyResponse, err error)
- func (r *ScheduleService) Get(ctx context.Context, scheduleID string, opts ...option.RequestOption) (res *Schedule, err error)
- func (r *ScheduleService) List(ctx context.Context, params ScheduleListParams, opts ...option.RequestOption) (res *pagination.Page[Schedule], err error)
- func (r *ScheduleService) ListAutoPaging(ctx context.Context, params ScheduleListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Schedule]
- func (r *ScheduleService) New(ctx context.Context, params ScheduleNewParams, opts ...option.RequestOption) (res *Schedule, err error)
- func (r *ScheduleService) Pause(ctx context.Context, scheduleID string, params SchedulePauseParams, ...) (res *Schedule, err error)
- func (r *ScheduleService) Run(ctx context.Context, scheduleID string, params ScheduleRunParams, ...) (res *ScheduleRun, err error)
- func (r *ScheduleService) Unpause(ctx context.Context, scheduleID string, params ScheduleUnpauseParams, ...) (res *Schedule, err error)
- func (r *ScheduleService) Update(ctx context.Context, scheduleID string, params ScheduleUpdateParams, ...) (res *Schedule, err error)
- type ScheduleSinksItem
- type ScheduleSinksItemTarget
- type ScheduleTriggerPolicy
- type ScheduleUnpauseParams
- type ScheduleUpdateParams
- type ServiceAccountToken
- type ServiceAccountTokenNewParams
- type ServiceAccountTokenRevokeParams
- type ServiceAccountTokenRevokeResponse
- type ServiceAccountTokenService
- type Session
- type SessionArchiveParams
- type SessionCancelParams
- type SessionConfig
- type SessionEvent
- type SessionEventListParams
- type SessionEventParam
- type SessionEventSendParams
- type SessionEventSendResponse
- type SessionEventService
- func (r *SessionEventService) List(ctx context.Context, sessionID string, params SessionEventListParams, ...) (res *pagination.Page[SessionEvent], err error)
- func (r *SessionEventService) ListAutoPaging(ctx context.Context, sessionID string, params SessionEventListParams, ...) *pagination.PageAutoPager[SessionEvent]
- func (r *SessionEventService) NewResumableStream(ctx context.Context, sessionID string, params SessionEventStreamParams, ...) *ResumableSessionEventStream
- func (r *SessionEventService) Send(ctx context.Context, sessionID string, params SessionEventSendParams, ...) (res *SessionEventSendResponse, err error)
- func (r *SessionEventService) StreamEvents(ctx context.Context, sessionID string, params SessionEventStreamParams, ...) *ssestream.Stream[SessionEvent]
- type SessionEventStreamParams
- type SessionListParams
- type SessionNewParams
- type SessionNewParamsConfigParam
- type SessionOutcomeEvaluation
- type SessionResource
- type SessionResourceAddParams
- type SessionResourceService
- type SessionResourceSpec
- type SessionResourceSpecParam
- type SessionService
- func (r *SessionService) Archive(ctx context.Context, sessionID string, params SessionArchiveParams, ...) (res *Session, err error)
- func (r *SessionService) Cancel(ctx context.Context, sessionID string, params SessionCancelParams, ...) (res *Session, err error)
- func (r *SessionService) Get(ctx context.Context, sessionID string, opts ...option.RequestOption) (res *Session, err error)
- func (r *SessionService) List(ctx context.Context, params SessionListParams, opts ...option.RequestOption) (res *pagination.Page[Session], err error)
- func (r *SessionService) ListAutoPaging(ctx context.Context, params SessionListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Session]
- func (r *SessionService) New(ctx context.Context, params SessionNewParams, opts ...option.RequestOption) (res *Session, err error)
- func (r *SessionService) Update(ctx context.Context, sessionID string, params SessionUpdateParams, ...) (res *Session, err error)
- type SessionStats
- type SessionTemplate
- type SessionThread
- type SessionThreadArchiveParams
- type SessionThreadEventListParams
- type SessionThreadEventService
- func (r *SessionThreadEventService) List(ctx context.Context, sessionID string, threadID string, ...) (res *pagination.Page[SessionEvent], err error)
- func (r *SessionThreadEventService) ListAutoPaging(ctx context.Context, sessionID string, threadID string, ...) *pagination.PageAutoPager[SessionEvent]
- func (r *SessionThreadEventService) NewResumableStream(ctx context.Context, sessionID string, threadID string, ...) *ResumableSessionThreadEventStream
- func (r *SessionThreadEventService) StreamEvents(ctx context.Context, sessionID string, threadID string, ...) *ssestream.Stream[SessionEvent]
- type SessionThreadEventStreamParams
- type SessionThreadListParams
- type SessionThreadService
- func (r *SessionThreadService) Archive(ctx context.Context, sessionID string, threadID string, ...) (res *SessionThread, err error)
- func (r *SessionThreadService) Get(ctx context.Context, sessionID string, threadID string, ...) (res *SessionThread, err error)
- func (r *SessionThreadService) List(ctx context.Context, sessionID string, params SessionThreadListParams, ...) (res *pagination.Page[SessionThread], err error)
- func (r *SessionThreadService) ListAutoPaging(ctx context.Context, sessionID string, params SessionThreadListParams, ...) *pagination.PageAutoPager[SessionThread]
- type SessionThreadStats
- type SessionThreadStopReason
- type SessionThreadUsage
- type SessionUpdateParams
- type SessionUpdateParamsConfigParam
- type SessionUsage
- type Skill
- type SkillBinding
- type SkillBindingParam
- type SkillGetParams
- type SkillListParams
- type SkillNewParams
- type SkillOverride
- type SkillOverrideParam
- type SkillSearchParams
- type SkillService
- func (r *SkillService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *SkillService) Get(ctx context.Context, id string, params SkillGetParams, ...) (res *Skill, err error)
- func (r *SkillService) List(ctx context.Context, params SkillListParams, opts ...option.RequestOption) (res *pagination.PageCursor[Skill], err error)
- func (r *SkillService) ListAutoPaging(ctx context.Context, params SkillListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Skill]
- func (r *SkillService) New(ctx context.Context, params SkillNewParams, opts ...option.RequestOption) (res *Skill, err error)
- func (r *SkillService) Search(ctx context.Context, params SkillSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[Skill], error)
- func (r *SkillService) SearchAutoPaging(ctx context.Context, params SkillSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Skill]
- func (r *SkillService) Update(ctx context.Context, id string, params SkillUpdateParams, ...) (res *Skill, err error)
- type SkillUpdateParams
- type SkillVersion
- type SkillVersionListParams
- type SkillVersionNewParams
- type SkillVersionService
- func (r *SkillVersionService) Delete(ctx context.Context, id string, version string, opts ...option.RequestOption) (res *DeletedSkillVersion, err error)
- func (r *SkillVersionService) Download(ctx context.Context, id string, version string, opts ...option.RequestOption) (res *http.Response, err error)
- func (r *SkillVersionService) Get(ctx context.Context, id string, version string, opts ...option.RequestOption) (res *SkillVersion, err error)
- func (r *SkillVersionService) List(ctx context.Context, id string, params SkillVersionListParams, ...) (res *pagination.PageCursor[SkillVersion], err error)
- func (r *SkillVersionService) ListAutoPaging(ctx context.Context, id string, params SkillVersionListParams, ...) *pagination.PageCursorAutoPager[SkillVersion]
- func (r *SkillVersionService) New(ctx context.Context, id string, params SkillVersionNewParams, ...) (res *SkillVersion, err error)
- type StaticBearerUpdateParam
- type SystemOverride
- type SystemOverrideParam
- type Template
- type TemplateArchiveParams
- type TemplateCloneParams
- type TemplateListParams
- type TemplateNewParams
- type TemplateService
- func (r *TemplateService) Archive(ctx context.Context, templateID string, params TemplateArchiveParams, ...) (res *Template, err error)
- func (r *TemplateService) Clone(ctx context.Context, templateID string, params TemplateCloneParams, ...) (res *Template, err error)
- func (r *TemplateService) Get(ctx context.Context, templateID string, opts ...option.RequestOption) (res *Template, err error)
- func (r *TemplateService) List(ctx context.Context, params TemplateListParams, opts ...option.RequestOption) (res *pagination.Page[Template], err error)
- func (r *TemplateService) ListAutoPaging(ctx context.Context, params TemplateListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Template]
- func (r *TemplateService) New(ctx context.Context, params TemplateNewParams, opts ...option.RequestOption) (res *Template, err error)
- func (r *TemplateService) Update(ctx context.Context, templateID string, params TemplateUpdateParams, ...) (res *Template, err error)
- type TemplateUpdateParams
- type TemplateUsage
- type Tool
- type ToolConfig
- type ToolConfigParam
- type ToolOverride
- type ToolOverrideParam
- type ToolParam
- type UsageListParams
- type UsageService
- func (r *UsageService) ListIdentities(ctx context.Context, params UsageListParams, opts ...option.RequestOption) (res *pagination.Page[IdentityUsage], err error)
- func (r *UsageService) ListIdentitiesAutoPaging(ctx context.Context, params UsageListParams, opts ...option.RequestOption) *pagination.PageAutoPager[IdentityUsage]
- func (r *UsageService) ListTemplates(ctx context.Context, params UsageListParams, opts ...option.RequestOption) (res *pagination.Page[TemplateUsage], err error)
- func (r *UsageService) ListTemplatesAutoPaging(ctx context.Context, params UsageListParams, opts ...option.RequestOption) *pagination.PageAutoPager[TemplateUsage]
- type Vault
- type VaultCredential
- type VaultCredentialAuth
- type VaultCredentialListParams
- type VaultCredentialNewParams
- type VaultCredentialService
- func (r *VaultCredentialService) Delete(ctx context.Context, id string, credID string, opts ...option.RequestOption) (err error)
- func (r *VaultCredentialService) Get(ctx context.Context, id string, credID string, opts ...option.RequestOption) (res *VaultCredential, err error)
- func (r *VaultCredentialService) List(ctx context.Context, id string, params VaultCredentialListParams, ...) (res *pagination.PageCursor[VaultCredential], err error)
- func (r *VaultCredentialService) ListAutoPaging(ctx context.Context, id string, params VaultCredentialListParams, ...) *pagination.PageCursorAutoPager[VaultCredential]
- func (r *VaultCredentialService) New(ctx context.Context, id string, params VaultCredentialNewParams, ...) (res *VaultCredential, err error)
- func (r *VaultCredentialService) Update(ctx context.Context, id string, credID string, ...) (res *VaultCredential, err error)
- type VaultCredentialUpdateAuthUnionParam
- type VaultCredentialUpdateParams
- type VaultListParams
- type VaultNewParams
- type VaultSearchParams
- type VaultService
- func (r *VaultService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *VaultService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Vault, err error)
- func (r *VaultService) List(ctx context.Context, params VaultListParams, opts ...option.RequestOption) (res *pagination.PageCursor[Vault], err error)
- func (r *VaultService) ListAutoPaging(ctx context.Context, params VaultListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Vault]
- func (r *VaultService) New(ctx context.Context, params VaultNewParams, opts ...option.RequestOption) (res *Vault, err error)
- func (r *VaultService) Search(ctx context.Context, params VaultSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[Vault], error)
- func (r *VaultService) SearchAutoPaging(ctx context.Context, params VaultSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Vault]
- type WebhookEndpoint
- type WebhookEndpointCreateResponse
- type WebhookEndpointListParams
- type WebhookEndpointNewParams
- type WebhookEndpointService
- func (r *WebhookEndpointService) Delete(ctx context.Context, endpointID string, opts ...option.RequestOption) (err error)
- func (r *WebhookEndpointService) Disable(ctx context.Context, endpointID string, opts ...option.RequestOption) (res *WebhookEndpoint, err error)
- func (r *WebhookEndpointService) Enable(ctx context.Context, endpointID string, opts ...option.RequestOption) (res *WebhookEndpoint, err error)
- func (r *WebhookEndpointService) Get(ctx context.Context, endpointID string, opts ...option.RequestOption) (res *WebhookEndpoint, err error)
- func (r *WebhookEndpointService) List(ctx context.Context, params WebhookEndpointListParams, ...) (res *pagination.Page[WebhookEndpoint], err error)
- func (r *WebhookEndpointService) ListAutoPaging(ctx context.Context, params WebhookEndpointListParams, ...) *pagination.PageAutoPager[WebhookEndpoint]
- func (r *WebhookEndpointService) New(ctx context.Context, params WebhookEndpointNewParams, ...) (res *WebhookEndpointCreateResponse, err error)
- func (r *WebhookEndpointService) Test(ctx context.Context, endpointID string, opts ...option.RequestOption) (res *WebhookEndpointTestResponse, err error)
- func (r *WebhookEndpointService) Update(ctx context.Context, endpointID string, params WebhookEndpointUpdateParams, ...) (res *WebhookEndpoint, err error)
- type WebhookEndpointTestResponse
- type WebhookEndpointUpdateParams
- type WebhookService
Constants ¶
const DefaultBaseURL = "https://api.qoder.com/api/v1/forward/"
const RealtimeMaxClientMessageBytes = 256 * 1024
const RealtimeProtocolVersion = "voice.realtime.v1"
Variables ¶
var ErrWebhookVerification = errors.New("webhook signature verification failed")
ErrWebhookVerification indicates missing, invalid, expired or mismatched delivery authentication.
Functions ¶
func VerifyWebhookSignature ¶ added in v0.9.0
VerifyWebhookSignature authenticates the original request bytes with the endpoint's whsec_ secret. It accepts any matching v1 signature within 300 seconds of now. Verify before parsing JSON; deduplicate accepted events using Webhook-ID.
func WithIdentityID ¶ added in v0.7.0
func WithIdentityID(identityID string) option.RequestOption
WithIdentityID selects identity ownership for Forward resources using a PAT. Omit this option when using a SAT; its identity is inferred by the server. Use it on retrieval, deletion, archive, and download methods without params.
Types ¶
type Batch ¶
type Batch struct {
IgnoreIdleWindow bool `json:"ignore_idle_window"`
// Dynamic queue reason, present only when applicable to validating or queued Batches.
QueueReason string `json:"queue_reason"`
// Batch ID, prefixed with `batch_`.
ID string `json:"id"`
// Always `batch`.
Object string `json:"object"`
// Batch status; see the status descriptions.
Status string `json:"status"`
// Input JSONL file ID.
InputFileID string `json:"input_file_id"`
// File ID of successful results; omitted while incomplete or not yet generated.
OutputFileID string `json:"output_file_id"`
// Completion window: `24h`, `48h` or `72h`.
CompletionWindow string `json:"completion_window"`
// Creation time in RFC 3339.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Expiration time, `created_at` + `completion_window`.
ExpiresAt time.Time `json:"expires_at" format:"date-time"`
// Aggregated task counts.
RequestCounts BatchRequestCounts `json:"request_counts"`
// `null` on the create response; on later Batch get, list and cancel responses it returns
// the Credit total once at least one subtask has valid CAS Session usage.
Usage BatchUsage `json:"usage" api:"nullable"`
// Caller business metadata.
Metadata map[string]any `json:"metadata"`
// Total number of lines, including lines that failed validation.
Total int64 `json:"total"`
// Number of lines waiting to run.
Pending int64 `json:"pending"`
// Number of lines currently running.
Running int64 `json:"running"`
// Number of lines that completed successfully.
Completed int64 `json:"completed"`
// Number of permanently failed lines, including validation failures.
Failed int64 `json:"failed"`
// Number of lines terminated by cancellation.
Cancelled int64 `json:"cancelled"`
// Number of lines terminated by expiration.
Expired int64 `json:"expired"`
// File ID of failed-line results; omitted when there are no failed lines.
ErrorFileID string `json:"error_file_id"`
// Batch-level error description; present only in the `failed` status.
ErrorMessage string `json:"error_message"`
JSON struct {
IgnoreIdleWindow respjson.Field
QueueReason respjson.Field
ID respjson.Field
Object respjson.Field
Status respjson.Field
InputFileID respjson.Field
OutputFileID respjson.Field
CompletionWindow respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
RequestCounts respjson.Field
Usage respjson.Field
Metadata respjson.Field
Total respjson.Field
Pending respjson.Field
Running respjson.Field
Completed respjson.Field
Failed respjson.Field
Cancelled respjson.Field
Expired respjson.Field
ErrorFileID respjson.Field
ErrorMessage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Batch) UnmarshalJSON ¶
type BatchCancelParams ¶
type BatchFile ¶
type BatchFile struct {
// Pre-signed OSS download URL with `Expires` / `OSSAccessKeyId` / `Signature` and
// `response-content-disposition`; the file downloads as `batch-<batch_id>-output.jsonl`.
URL string `json:"url"`
// Link expiration time in RFC 3339; the download must finish before it.
ExpiresAt time.Time `json:"expires_at" format:"date-time"`
JSON struct {
URL respjson.Field
ExpiresAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*BatchFile) UnmarshalJSON ¶
type BatchListParams ¶
type BatchListParams struct {
// Filter by status.
Status param.Opt[string] `query:"status,omitzero" json:"-"`
// Page size, up to 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the next page.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type BatchNewParams ¶
type BatchNewParams struct {
// Ignore the scheduling time window; does not change capacity or FIFO priority.
IgnoreIdleWindow param.Opt[bool] `json:"ignore_idle_window,omitzero"`
// ID of a JSONL file uploaded through the Files API.
InputFileID string `json:"input_file_id" api:"required"`
// Completion window: `24h`, `48h` or `72h`. The Batch moves to `expired` when it elapses.
CompletionWindow string `json:"completion_window" api:"required"`
// Caller business metadata, up to 16 keys; values may be any JSON type; the serialized
// object must be ≤ 2KB, keys ≤ 64 characters, and must not contain NUL (U+0000).
Metadata map[string]any `json:"metadata,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BatchNewParams) MarshalJSON ¶
func (r BatchNewParams) MarshalJSON() ([]byte, error)
func (*BatchNewParams) UnmarshalJSON ¶
func (r *BatchNewParams) UnmarshalJSON(data []byte) error
type BatchRequestCounts ¶
type BatchRequestCounts struct {
Total int64 `json:"total"`
Pending int64 `json:"pending"`
Running int64 `json:"running"`
Completed int64 `json:"completed"`
Failed int64 `json:"failed"`
Cancelled int64 `json:"cancelled"`
Expired int64 `json:"expired"`
JSON struct {
Total respjson.Field
Pending respjson.Field
Running respjson.Field
Completed respjson.Field
Failed respjson.Field
Cancelled respjson.Field
Expired respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BatchRequestCounts) RawJSON ¶
func (r BatchRequestCounts) RawJSON() string
func (*BatchRequestCounts) UnmarshalJSON ¶
func (r *BatchRequestCounts) UnmarshalJSON(data []byte) error
type BatchService ¶
type BatchService struct {
Options []option.RequestOption
Tasks BatchTaskService
}
BatchService provides Forward Batch operations.
func NewBatchService ¶
func NewBatchService(opts ...option.RequestOption) BatchService
func (*BatchService) Cancel ¶
func (r *BatchService) Cancel(ctx context.Context, batchID string, params BatchCancelParams, opts ...option.RequestOption) (res *Batch, err error)
Cancel Batch
func (*BatchService) Get ¶
func (r *BatchService) Get(ctx context.Context, batchID string, opts ...option.RequestOption) (res *Batch, err error)
Get Batch
func (*BatchService) GetError ¶
func (r *BatchService) GetError(ctx context.Context, batchID string, opts ...option.RequestOption) (res *BatchFile, err error)
Get error file
func (*BatchService) GetOutput ¶
func (r *BatchService) GetOutput(ctx context.Context, batchID string, opts ...option.RequestOption) (res *BatchFile, err error)
Get output file
func (*BatchService) List ¶
func (r *BatchService) List(ctx context.Context, params BatchListParams, opts ...option.RequestOption) (res *pagination.Page[Batch], err error)
List Batches
func (*BatchService) ListAutoPaging ¶
func (r *BatchService) ListAutoPaging(ctx context.Context, params BatchListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Batch]
func (*BatchService) New ¶
func (r *BatchService) New(ctx context.Context, params BatchNewParams, opts ...option.RequestOption) (res *Batch, err error)
Create Batch
type BatchTask ¶
type BatchTask struct {
CustomID string `json:"custom_id"`
Status string `json:"status"`
StartedAt time.Time `json:"started_at" format:"date-time"`
CompletedAt time.Time `json:"completed_at" format:"date-time"`
OutputSummary string `json:"output_summary"`
Usage BatchTaskUsage `json:"usage"`
Artifacts []BatchTaskArtifactsItem `json:"artifacts"`
Error BatchTaskError `json:"error"`
JSON struct {
CustomID respjson.Field
Status respjson.Field
StartedAt respjson.Field
CompletedAt respjson.Field
OutputSummary respjson.Field
Usage respjson.Field
Artifacts respjson.Field
Error respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*BatchTask) UnmarshalJSON ¶
type BatchTaskArtifactsItem ¶
type BatchTaskArtifactsItem struct {
FileID string `json:"file_id"`
Name string `json:"name"`
Size int64 `json:"size"`
ContentType string `json:"content_type"`
JSON struct {
FileID respjson.Field
Name respjson.Field
Size respjson.Field
ContentType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BatchTaskArtifactsItem) RawJSON ¶
func (r BatchTaskArtifactsItem) RawJSON() string
func (*BatchTaskArtifactsItem) UnmarshalJSON ¶
func (r *BatchTaskArtifactsItem) UnmarshalJSON(data []byte) error
type BatchTaskError ¶
type BatchTaskError struct {
Code string `json:"code"`
Message string `json:"message"`
JSON struct {
Code respjson.Field
Message respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BatchTaskError) RawJSON ¶
func (r BatchTaskError) RawJSON() string
func (*BatchTaskError) UnmarshalJSON ¶
func (r *BatchTaskError) UnmarshalJSON(data []byte) error
type BatchTaskListParams ¶
type BatchTaskListParams struct {
// Filter by task status: `pending`, `running`, `completed`, `failed`, `cancelled` or
// `expired`.
Status param.Opt[string] `query:"status,omitzero" json:"-"`
// Exact filter on the caller's task identifier; a single value only, and an unmatched
// value returns an empty list.
CustomID param.Opt[string] `query:"custom_id,omitzero" json:"-"`
// Page size, maximum 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the next page; pass `last_id` from the previous response. The cursor must
// belong to the current Batch.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type BatchTaskService ¶
type BatchTaskService struct {
Options []option.RequestOption
}
BatchTaskService provides Forward BatchTask operations.
func NewBatchTaskService ¶
func NewBatchTaskService(opts ...option.RequestOption) BatchTaskService
func (*BatchTaskService) List ¶
func (r *BatchTaskService) List(ctx context.Context, batchID string, params BatchTaskListParams, opts ...option.RequestOption) (res *pagination.Page[BatchTask], err error)
List Batch tasks
func (*BatchTaskService) ListAutoPaging ¶
func (r *BatchTaskService) ListAutoPaging(ctx context.Context, batchID string, params BatchTaskListParams, opts ...option.RequestOption) *pagination.PageAutoPager[BatchTask]
type BatchTaskUsage ¶
type BatchTaskUsage struct {
TotalCredits float64 `json:"total_credits"`
JSON struct {
TotalCredits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BatchTaskUsage) RawJSON ¶
func (r BatchTaskUsage) RawJSON() string
func (*BatchTaskUsage) UnmarshalJSON ¶
func (r *BatchTaskUsage) UnmarshalJSON(data []byte) error
type BatchUsage ¶
type BatchUsage struct {
TotalCredits float64 `json:"total_credits"`
JSON struct {
TotalCredits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BatchUsage) RawJSON ¶
func (r BatchUsage) RawJSON() string
func (*BatchUsage) UnmarshalJSON ¶
func (r *BatchUsage) UnmarshalJSON(data []byte) error
type Channel ¶
type Channel struct {
// Channel ID, prefixed with `channel_` in examples.
ID string `json:"id"`
// Always `channel`.
Type string `json:"type"`
// Bound Forward Identity ID in `fixed` mode; `null` in `pairing` mode.
IdentityID string `json:"identity_id" api:"nullable"`
IdentityResolution ChannelIdentityResolution `json:"identity_resolution"`
// Bound Forward Template ID in `fixed` mode; `null` in `pairing` mode.
TemplateID string `json:"template_id" api:"nullable"`
// External channel type.
ChannelType string `json:"channel_type"`
Name string `json:"name"`
// Manual enable/disable switch.
Enabled bool `json:"enabled"`
// `unbound`, `bound` or `expired`.
BindingStatus string `json:"binding_status"`
ChannelConfig ChannelChannelConfig `json:"channel_config"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON struct {
ID respjson.Field
Type respjson.Field
IdentityID respjson.Field
IdentityResolution respjson.Field
TemplateID respjson.Field
ChannelType respjson.Field
Name respjson.Field
Enabled respjson.Field
BindingStatus respjson.Field
ChannelConfig respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Channel) UnmarshalJSON ¶
type ChannelChannelConfig ¶
type ChannelChannelConfig struct {
ResponseOptions ChannelChannelConfigResponseOptions `json:"response_options"`
JSON struct {
ResponseOptions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ChannelChannelConfig) RawJSON ¶
func (r ChannelChannelConfig) RawJSON() string
func (*ChannelChannelConfig) UnmarshalJSON ¶
func (r *ChannelChannelConfig) UnmarshalJSON(data []byte) error
type ChannelChannelConfigResponseOptions ¶
type ChannelChannelConfigResponseOptions struct {
IncludeToolCalls bool `json:"include_tool_calls"`
IncludeThinking bool `json:"include_thinking"`
JSON struct {
IncludeToolCalls respjson.Field
IncludeThinking respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ChannelChannelConfigResponseOptions) RawJSON ¶
func (r ChannelChannelConfigResponseOptions) RawJSON() string
func (*ChannelChannelConfigResponseOptions) UnmarshalJSON ¶
func (r *ChannelChannelConfigResponseOptions) UnmarshalJSON(data []byte) error
type ChannelIdentityResolution ¶
type ChannelIdentityResolution struct {
Mode string `json:"mode"`
JSON struct {
Mode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ChannelIdentityResolution) RawJSON ¶
func (r ChannelIdentityResolution) RawJSON() string
func (*ChannelIdentityResolution) UnmarshalJSON ¶
func (r *ChannelIdentityResolution) UnmarshalJSON(data []byte) error
type ChannelListParams ¶
type ChannelListParams struct {
// Filter by `wechat`, `wecom`, `feishu`, `dingtalk` or `teams` (Global).
ChannelType param.Opt[string] `query:"channel_type,omitzero" json:"-"`
// Filter by the manual enable/disable state.
Enabled param.Opt[bool] `query:"enabled,omitzero" json:"-"`
// Filter by `unbound`, `bound` or `expired`.
BindingStatus param.Opt[string] `query:"binding_status,omitzero" json:"-"`
// Filter by Forward Identity ID.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Filter by Forward Template ID.
TemplateID param.Opt[string] `query:"template_id,omitzero" json:"-"`
// Page size, up to 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the next page.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type ChannelNewParams ¶
type ChannelNewParams struct {
// Required in `fixed` mode; omit in `pairing` mode.
IdentityID param.Opt[string] `json:"identity_id,omitzero"`
IdentityResolution map[string]any `json:"identity_resolution,omitzero"`
// Required in `fixed` mode; omit in `pairing` mode.
TemplateID param.Opt[string] `json:"template_id,omitzero"`
// Channel type; currently `wechat`, `wecom`, `feishu`, `dingtalk` and `teams` (Global).
ChannelType string `json:"channel_type" api:"required"`
// Channel display name.
Name param.Opt[string] `json:"name,omitzero"`
// Manual enable/disable switch, defaults to `true`. Pass `false` to create the Channel
// without handling inbound messages yet.
Enabled param.Opt[bool] `json:"enabled,omitzero"`
ChannelConfig map[string]any `json:"channel_config,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ChannelNewParams) MarshalJSON ¶
func (r ChannelNewParams) MarshalJSON() ([]byte, error)
func (*ChannelNewParams) UnmarshalJSON ¶
func (r *ChannelNewParams) UnmarshalJSON(data []byte) error
type ChannelPairing ¶
type ChannelPairing struct {
ScopeType string `json:"scope_type"`
ScopeExternalID string `json:"scope_external_id"`
ScopeDisplayName string `json:"scope_display_name"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
// Pairing ID, used when removing the pairing.
ID string `json:"id"`
// Always `channel_pairing`.
Type string `json:"type"`
// Channel ID.
ChannelID string `json:"channel_id"`
// Bound Forward Identity ID.
IdentityID string `json:"identity_id"`
// Bound Forward Template ID.
TemplateID string `json:"template_id"`
// `active` when the pairing succeeded.
Status string `json:"status"`
// Time the pairing completed.
PairedAt string `json:"paired_at"`
JSON struct {
ScopeType respjson.Field
ScopeExternalID respjson.Field
ScopeDisplayName respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ID respjson.Field
Type respjson.Field
ChannelID respjson.Field
IdentityID respjson.Field
TemplateID respjson.Field
Status respjson.Field
PairedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ChannelPairing) RawJSON ¶
func (r ChannelPairing) RawJSON() string
func (*ChannelPairing) UnmarshalJSON ¶
func (r *ChannelPairing) UnmarshalJSON(data []byte) error
type ChannelPairingListParams ¶ added in v0.13.0
type ChannelPairingListParams struct {
ChannelID param.Opt[string] `query:"channel_id,omitzero" json:"-"`
Status param.Opt[string] `query:"status,omitzero" json:"-"`
TargetType param.Opt[string] `query:"target_type,omitzero" json:"-"`
TargetExternalID param.Opt[string] `query:"target_external_id,omitzero" json:"-"`
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
TemplateID param.Opt[string] `query:"template_id,omitzero" json:"-"`
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type ChannelPairingNewParams ¶
type ChannelPairingNewParams struct {
// Pairing code. Supply exactly one of Code or ChannelPairingID.
Code string `json:"code,omitzero"`
// Pending pairing ID. Supply exactly one of Code or ChannelPairingID.
ChannelPairingID string `json:"channel_pairing_id,omitzero"`
// Forward Identity ID to bind.
IdentityID string `json:"identity_id" api:"required"`
// Forward Template ID to bind.
TemplateID string `json:"template_id" api:"required"`
// Client-generated unique idempotency key, used to safely retry the same pairing
// request.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ChannelPairingNewParams) MarshalJSON ¶
func (r ChannelPairingNewParams) MarshalJSON() ([]byte, error)
func (*ChannelPairingNewParams) UnmarshalJSON ¶
func (r *ChannelPairingNewParams) UnmarshalJSON(data []byte) error
type ChannelPairingService ¶
type ChannelPairingService struct {
Options []option.RequestOption
}
ChannelPairingService provides Forward ChannelPairing operations.
func NewChannelPairingService ¶
func NewChannelPairingService(opts ...option.RequestOption) ChannelPairingService
func (*ChannelPairingService) Delete ¶
func (r *ChannelPairingService) Delete(ctx context.Context, pairingID string, opts ...option.RequestOption) (res *DeletedChannelPairing, err error)
Remove Channel pairing
func (*ChannelPairingService) Get ¶ added in v0.13.0
func (r *ChannelPairingService) Get(ctx context.Context, pairingID string, opts ...option.RequestOption) (res *ChannelPairing, err error)
func (*ChannelPairingService) List ¶ added in v0.13.0
func (r *ChannelPairingService) List(ctx context.Context, params ChannelPairingListParams, opts ...option.RequestOption) (res *pagination.Page[ChannelPairing], err error)
func (*ChannelPairingService) ListAutoPaging ¶ added in v0.13.0
func (r *ChannelPairingService) ListAutoPaging(ctx context.Context, params ChannelPairingListParams, opts ...option.RequestOption) *pagination.PageAutoPager[ChannelPairing]
func (*ChannelPairingService) New ¶
func (r *ChannelPairingService) New(ctx context.Context, params ChannelPairingNewParams, opts ...option.RequestOption) (res *ChannelPairing, err error)
Complete Channel pairing
func (*ChannelPairingService) Update ¶ added in v0.13.0
func (r *ChannelPairingService) Update(ctx context.Context, pairingID string, params ChannelPairingUpdateParams, opts ...option.RequestOption) (res *ChannelPairing, err error)
Update changes an active binding. Supply at least one nonempty field.
type ChannelPairingUpdateParams ¶ added in v0.13.0
type ChannelPairingUpdateParams struct {
IdentityID param.Opt[string] `json:"identity_id,omitzero"`
TemplateID param.Opt[string] `json:"template_id,omitzero"`
// contains filtered or unexported fields
}
func (ChannelPairingUpdateParams) MarshalJSON ¶ added in v0.13.0
func (r ChannelPairingUpdateParams) MarshalJSON() ([]byte, error)
func (*ChannelPairingUpdateParams) UnmarshalJSON ¶ added in v0.13.0
func (r *ChannelPairingUpdateParams) UnmarshalJSON(data []byte) error
type ChannelQRSession ¶
type ChannelQRSession struct {
// Opaque QR session key used to poll the status.
SessionKey string `json:"session_key"`
// ID of the associated Channel.
ChannelID string `json:"channel_id"`
// `wechat`, `feishu`, `dingtalk` or `wecom`.
ChannelType string `json:"channel_type"`
// Initial status, usually `waiting`.
Status string `json:"status"`
// Raw QR code content, usually a third-party authorization URL.
QRCodeContent string `json:"qr_code_content"`
// QR code image generated by the server.
QRCodeImageBase64 string `json:"qr_code_image_base64"`
// Expiration time.
ExpiresAt string `json:"expires_at"`
// null|Channel error code on failure.
ErrCode string `json:"err_code"`
// null|Channel error message on failure.
ErrMsg string `json:"err_msg"`
JSON struct {
SessionKey respjson.Field
ChannelID respjson.Field
ChannelType respjson.Field
Status respjson.Field
QRCodeContent respjson.Field
QRCodeImageBase64 respjson.Field
ExpiresAt respjson.Field
ErrCode respjson.Field
ErrMsg respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ChannelQRSession) RawJSON ¶
func (r ChannelQRSession) RawJSON() string
func (*ChannelQRSession) UnmarshalJSON ¶
func (r *ChannelQRSession) UnmarshalJSON(data []byte) error
type ChannelQRSessionNewParams ¶
type ChannelQRSessionService ¶
type ChannelQRSessionService struct {
Options []option.RequestOption
}
ChannelQRSessionService provides Forward ChannelQRSession operations.
func NewChannelQRSessionService ¶
func NewChannelQRSessionService(opts ...option.RequestOption) ChannelQRSessionService
func (*ChannelQRSessionService) Get ¶
func (r *ChannelQRSessionService) Get(ctx context.Context, sessionKey string, opts ...option.RequestOption) (res *ChannelQRSession, err error)
Get Channel QR Session
func (*ChannelQRSessionService) New ¶
func (r *ChannelQRSessionService) New(ctx context.Context, channelID string, params ChannelQRSessionNewParams, opts ...option.RequestOption) (res *ChannelQRSession, err error)
Create Channel QR Session
type ChannelService ¶
type ChannelService struct {
Options []option.RequestOption
QRSessions ChannelQRSessionService
}
ChannelService provides Forward Channel operations.
func NewChannelService ¶
func NewChannelService(opts ...option.RequestOption) ChannelService
func (*ChannelService) Delete ¶
func (r *ChannelService) Delete(ctx context.Context, channelID string, opts ...option.RequestOption) (res *DeletedChannel, err error)
Delete Channel
func (*ChannelService) Get ¶
func (r *ChannelService) Get(ctx context.Context, channelID string, opts ...option.RequestOption) (res *Channel, err error)
Get Channel
func (*ChannelService) List ¶
func (r *ChannelService) List(ctx context.Context, params ChannelListParams, opts ...option.RequestOption) (res *pagination.Page[Channel], err error)
List Channels
func (*ChannelService) ListAutoPaging ¶
func (r *ChannelService) ListAutoPaging(ctx context.Context, params ChannelListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Channel]
func (*ChannelService) New ¶
func (r *ChannelService) New(ctx context.Context, params ChannelNewParams, opts ...option.RequestOption) (res *Channel, err error)
Create Channel
func (*ChannelService) Update ¶
func (r *ChannelService) Update(ctx context.Context, channelID string, params ChannelUpdateParams, opts ...option.RequestOption) (res *Channel, err error)
Update Channel
type ChannelUpdateParams ¶
type ChannelUpdateParams struct {
// Channel display name.
Name param.Opt[string] `json:"name,omitzero"`
// New Forward Identity ID in `fixed` mode.
IdentityID param.Opt[string] `json:"identity_id,omitzero"`
// New Forward Template ID in `fixed` mode.
TemplateID param.Opt[string] `json:"template_id,omitzero"`
// Manual enable/disable switch.
Enabled param.Opt[bool] `json:"enabled,omitzero"`
ChannelConfig map[string]any `json:"channel_config,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ChannelUpdateParams) MarshalJSON ¶
func (r ChannelUpdateParams) MarshalJSON() ([]byte, error)
func (*ChannelUpdateParams) UnmarshalJSON ¶
func (r *ChannelUpdateParams) UnmarshalJSON(data []byte) error
type Client ¶
type Client struct {
Dreams DreamService
Webhooks WebhookService
Options []option.RequestOption
Templates TemplateService
Identities IdentityService
Sessions SessionService
Decisions DecisionService
Schedules ScheduleService
ScheduleRuns ScheduleRunService
Batches BatchService
Channels ChannelService
ChannelPairings ChannelPairingService
Environments EnvironmentService
Drives DriveService
Files FileService
Skills SkillService
Vaults VaultService
MemoryStores MemoryStoreService
Usage UsageService
Models ModelService
ServiceAccountTokens ServiceAccountTokenService
Realtime RealtimeService
}
Client exposes Forward resources. Configure options before sharing a client.
func NewClient ¶
func NewClient(opts ...option.RequestOption) Client
NewClient uses common authentication defaults and QODER_FORWARD_BASE_URL. Explicit options win.
type ContentBlock ¶
type ContentBlock struct {
Type string `json:"type" api:"required"`
Text string `json:"text"`
Thinking string `json:"thinking"`
Source ImageSource `json:"source"`
JSON struct {
Type respjson.Field
Text respjson.Field
Thinking respjson.Field
Source respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContentBlock) RawJSON ¶
func (r ContentBlock) RawJSON() string
func (*ContentBlock) UnmarshalJSON ¶
func (r *ContentBlock) UnmarshalJSON(data []byte) error
type ContentBlockParam ¶
type ContentBlockParam struct {
Type string `json:"type" api:"required"`
Text param.Opt[string] `json:"text,omitzero"`
Thinking param.Opt[string] `json:"thinking,omitzero"`
Source ImageSourceParam `json:"source,omitzero"`
// contains filtered or unexported fields
}
func (ContentBlockParam) MarshalJSON ¶
func (r ContentBlockParam) MarshalJSON() ([]byte, error)
func (*ContentBlockParam) UnmarshalJSON ¶
func (r *ContentBlockParam) UnmarshalJSON(data []byte) error
type Decision ¶ added in v0.10.0
type Decision struct {
ID string `json:"id"`
// Null for explicit-state input.
SessionID string `json:"session_id" api:"nullable"`
Source string `json:"source"`
// "running", "completed", or "failed".
Status string `json:"status"`
Questions []DecisionQuestion `json:"questions"`
Answers []DecisionAnswer `json:"answers"`
Context DecisionContext `json:"context"`
Error DecisionError `json:"error" api:"nullable"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
CompletedAt time.Time `json:"completed_at" format:"date-time" api:"nullable"`
JSON struct {
ID, SessionID, Source, Status, Questions, Answers, Context, Error, CreatedAt, CompletedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Decision is a stored evaluation. GET and List may also return running or failed records.
func (*Decision) UnmarshalJSON ¶ added in v0.10.0
type DecisionAnswer ¶ added in v0.10.0
type DecisionAnswer struct {
// "choice" or "score".
Type string `json:"type"`
Name string `json:"name"`
// A string or boolean for choice answers; absent for scores.
Value any `json:"value"`
// Selected numeric level for score answers. Inspect JSON.Score for presence.
Score float64 `json:"score"`
JSON struct {
Type, Name, Value, Score respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DecisionAnswer) RawJSON ¶ added in v0.10.0
func (r DecisionAnswer) RawJSON() string
func (*DecisionAnswer) UnmarshalJSON ¶ added in v0.10.0
func (r *DecisionAnswer) UnmarshalJSON(data []byte) error
type DecisionChoice ¶ added in v0.10.0
type DecisionChoice struct {
// The original string or boolean value, including false.
Value any `json:"value"`
Description string `json:"description"`
JSON struct {
Value, Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DecisionChoice) RawJSON ¶ added in v0.10.0
func (r DecisionChoice) RawJSON() string
func (*DecisionChoice) UnmarshalJSON ¶ added in v0.10.0
func (r *DecisionChoice) UnmarshalJSON(data []byte) error
type DecisionChoiceParam ¶ added in v0.10.0
type DecisionChoiceParam struct {
// A nonempty string or boolean. Values must be distinct within a question.
Value any `json:"value" api:"required"`
Description param.Opt[string] `json:"description,omitzero"`
// contains filtered or unexported fields
}
func (DecisionChoiceParam) MarshalJSON ¶ added in v0.10.0
func (r DecisionChoiceParam) MarshalJSON() ([]byte, error)
func (*DecisionChoiceParam) UnmarshalJSON ¶ added in v0.10.0
func (r *DecisionChoiceParam) UnmarshalJSON(data []byte) error
type DecisionContext ¶ added in v0.10.0
type DecisionContext struct {
Mode string `json:"mode"`
AnchorEventID string `json:"anchor_event_id"`
FirstEventID string `json:"first_event_id"`
LastEventID string `json:"last_event_id"`
IncludedSegmentCount int64 `json:"included_segment_count"`
IncludedEventCount int64 `json:"included_event_count"`
JSON struct {
Mode, AnchorEventID, FirstEventID, LastEventID, IncludedSegmentCount, IncludedEventCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
DecisionContext describes the input mode and Session events used. Session-only fields may be absent for explicit state or when preparation fails; inspect JSON for presence.
func (DecisionContext) RawJSON ¶ added in v0.10.0
func (r DecisionContext) RawJSON() string
func (*DecisionContext) UnmarshalJSON ¶ added in v0.10.0
func (r *DecisionContext) UnmarshalJSON(data []byte) error
type DecisionError ¶ added in v0.10.0
type DecisionError struct {
Code string `json:"code"`
Message string `json:"message"`
JSON struct {
Code, Message respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DecisionError) RawJSON ¶ added in v0.10.0
func (r DecisionError) RawJSON() string
func (*DecisionError) UnmarshalJSON ¶ added in v0.10.0
func (r *DecisionError) UnmarshalJSON(data []byte) error
type DecisionLevel ¶ added in v0.10.0
type DecisionLevel struct {
Label string `json:"label"`
Score float64 `json:"score"`
Description string `json:"description"`
JSON struct {
Label, Score, Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DecisionLevel) RawJSON ¶ added in v0.10.0
func (r DecisionLevel) RawJSON() string
func (*DecisionLevel) UnmarshalJSON ¶ added in v0.10.0
func (r *DecisionLevel) UnmarshalJSON(data []byte) error
type DecisionLevelParam ¶ added in v0.10.0
type DecisionLevelParam struct {
Label string `json:"label" api:"required"`
// A finite numeric score, including zero. The result selects a configured level.
Score float64 `json:"score" api:"required"`
Description param.Opt[string] `json:"description,omitzero"`
// contains filtered or unexported fields
}
func (DecisionLevelParam) MarshalJSON ¶ added in v0.10.0
func (r DecisionLevelParam) MarshalJSON() ([]byte, error)
func (*DecisionLevelParam) UnmarshalJSON ¶ added in v0.10.0
func (r *DecisionLevelParam) UnmarshalJSON(data []byte) error
type DecisionListParams ¶ added in v0.10.0
type DecisionListParams struct {
SessionID param.Opt[string] `query:"session_id,omitzero" json:"-"`
// Page size from 1 to 100; defaults to 20.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the next page. Mutually exclusive with BeforeID.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type DecisionNewParams ¶ added in v0.10.0
type DecisionNewParams struct {
// An accessible Session ID. Mutually exclusive with State.
SessionID param.Opt[string] `json:"session_id,omitzero"`
// A nonempty JSON object to evaluate. Mutually exclusive with SessionID.
// The top-level state.session_context key is reserved for server-built history.
State map[string]any `json:"state,omitzero"`
// One to 32 choice or score questions.
Questions []DecisionQuestionParam `json:"questions" api:"required"`
// Reusing a key with identical request bytes replays the stored result.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DecisionNewParams) MarshalJSON ¶ added in v0.10.0
func (r DecisionNewParams) MarshalJSON() ([]byte, error)
func (*DecisionNewParams) UnmarshalJSON ¶ added in v0.10.0
func (r *DecisionNewParams) UnmarshalJSON(data []byte) error
type DecisionQuestion ¶ added in v0.10.0
type DecisionQuestion struct {
Type string `json:"type"`
Name string `json:"name"`
Instructions string `json:"instructions"`
Choices []DecisionChoice `json:"choices"`
Levels []DecisionLevel `json:"levels"`
JSON struct {
Type, Name, Instructions, Choices, Levels respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DecisionQuestion) RawJSON ¶ added in v0.10.0
func (r DecisionQuestion) RawJSON() string
func (*DecisionQuestion) UnmarshalJSON ¶ added in v0.10.0
func (r *DecisionQuestion) UnmarshalJSON(data []byte) error
type DecisionQuestionParam ¶ added in v0.10.0
type DecisionQuestionParam struct {
// Either "choice" or "score".
Type string `json:"type" api:"required"`
// Optional unique, nonempty question name, up to 128 bytes.
Name param.Opt[string] `json:"name,omitzero"`
// Nonempty instructions for evaluating this question.
Instructions string `json:"instructions" api:"required"`
// Two to 32 options for a choice question; omit for score questions.
Choices []DecisionChoiceParam `json:"choices,omitzero"`
// Two to 32 discrete levels for a score question; omit for choice questions.
Levels []DecisionLevelParam `json:"levels,omitzero"`
// contains filtered or unexported fields
}
func (DecisionQuestionParam) MarshalJSON ¶ added in v0.10.0
func (r DecisionQuestionParam) MarshalJSON() ([]byte, error)
func (*DecisionQuestionParam) UnmarshalJSON ¶ added in v0.10.0
func (r *DecisionQuestionParam) UnmarshalJSON(data []byte) error
type DecisionService ¶ added in v0.10.0
type DecisionService struct {
Options []option.RequestOption
}
DecisionService evaluates explicit state or an accessible Session's recent history. The Decision API is in Beta. Its behavior may change in future updates.
func NewDecisionService ¶ added in v0.10.0
func NewDecisionService(opts ...option.RequestOption) DecisionService
func (*DecisionService) Get ¶ added in v0.10.0
func (r *DecisionService) Get(ctx context.Context, decisionID string, opts ...option.RequestOption) (res *Decision, err error)
Get retrieves a Decision accessible to the current caller.
func (*DecisionService) List ¶ added in v0.10.0
func (r *DecisionService) List(ctx context.Context, params DecisionListParams, opts ...option.RequestOption) (res *pagination.Page[Decision], err error)
List retrieves Decisions, optionally restricted to an accessible Session.
func (*DecisionService) ListAutoPaging ¶ added in v0.10.0
func (r *DecisionService) ListAutoPaging(ctx context.Context, params DecisionListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Decision]
func (*DecisionService) New ¶ added in v0.10.0
func (r *DecisionService) New(ctx context.Context, params DecisionNewParams, opts ...option.RequestOption) (res *Decision, err error)
New synchronously evaluates questions and stores the resulting Decision. Provide exactly one of SessionID and State. Session context is selected and truncated by Forward; explicit State and Questions are never truncated.
type DeletedChannel ¶
type DeletedChannel struct {
// ID of the deleted Channel.
ID string `json:"id"`
// Whether the deletion succeeded; always `true` on success.
Deleted bool `json:"deleted"`
JSON struct {
ID respjson.Field
Deleted respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DeletedChannel) RawJSON ¶
func (r DeletedChannel) RawJSON() string
func (*DeletedChannel) UnmarshalJSON ¶
func (r *DeletedChannel) UnmarshalJSON(data []byte) error
type DeletedChannelPairing ¶
type DeletedChannelPairing struct {
// Pairing ID.
ID string `json:"id"`
// Whether the pairing was removed; `true` on success.
Deleted bool `json:"deleted"`
JSON struct {
ID respjson.Field
Deleted respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DeletedChannelPairing) RawJSON ¶
func (r DeletedChannelPairing) RawJSON() string
func (*DeletedChannelPairing) UnmarshalJSON ¶
func (r *DeletedChannelPairing) UnmarshalJSON(data []byte) error
type DeletedIdentity ¶
type DeletedIdentity struct {
// ID of the deleted Identity.
ID string `json:"id"`
// Whether the deletion completed. `true` in a successful response.
Deleted bool `json:"deleted"`
JSON struct {
ID respjson.Field
Deleted respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DeletedIdentity) RawJSON ¶
func (r DeletedIdentity) RawJSON() string
func (*DeletedIdentity) UnmarshalJSON ¶
func (r *DeletedIdentity) UnmarshalJSON(data []byte) error
type DeletedMemory ¶
type DeletedMemory struct {
// ID of the deleted Memory.
ID string `json:"id"`
// Always `memory_deleted`.
Type string `json:"type"`
// Whether the Memory was deleted.
Deleted bool `json:"deleted"`
JSON struct {
ID respjson.Field
Type respjson.Field
Deleted respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DeletedMemory) RawJSON ¶
func (r DeletedMemory) RawJSON() string
func (*DeletedMemory) UnmarshalJSON ¶
func (r *DeletedMemory) UnmarshalJSON(data []byte) error
type DeletedMemoryStore ¶
type DeletedMemoryStore struct {
// ID of the deleted Memory Store.
ID string `json:"id"`
// Always `memory_store_deleted`.
Type string `json:"type"`
// Whether the Memory Store was deleted.
Deleted bool `json:"deleted"`
JSON struct {
ID respjson.Field
Type respjson.Field
Deleted respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DeletedMemoryStore) RawJSON ¶
func (r DeletedMemoryStore) RawJSON() string
func (*DeletedMemoryStore) UnmarshalJSON ¶
func (r *DeletedMemoryStore) UnmarshalJSON(data []byte) error
type DeletedMemoryStoreMount ¶
type DeletedMemoryStoreMount struct {
// ID of the unmounted Memory Store.
ID string `json:"id"`
// Always `memory_store_binding_deleted`, as distinct from the `memory_store_deleted`
// returned when deleting a Store: this endpoint only removes the mount, and the Store
// itself continues to exist.
Type string `json:"type"`
// Whether the mount was removed.
Deleted bool `json:"deleted"`
JSON struct {
ID respjson.Field
Type respjson.Field
Deleted respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DeletedMemoryStoreMount) RawJSON ¶
func (r DeletedMemoryStoreMount) RawJSON() string
func (*DeletedMemoryStoreMount) UnmarshalJSON ¶
func (r *DeletedMemoryStoreMount) UnmarshalJSON(data []byte) error
type DeletedSkillVersion ¶
type DeletedSkillVersion struct {
// The deleted version number.
ID string `json:"id"`
// Always `"skill_version_deleted"`
Type string `json:"type"`
// Always `true`
Deleted bool `json:"deleted"`
JSON struct {
ID respjson.Field
Type respjson.Field
Deleted respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DeletedSkillVersion) RawJSON ¶
func (r DeletedSkillVersion) RawJSON() string
func (*DeletedSkillVersion) UnmarshalJSON ¶
func (r *DeletedSkillVersion) UnmarshalJSON(data []byte) error
type Dream ¶ added in v0.13.0
type Dream struct {
ID string `json:"id"`
Type string `json:"type"`
Status string `json:"status"`
Inputs []DreamInput `json:"inputs"`
Outputs []DreamOutput `json:"outputs"`
Model DreamModelConfig `json:"model"`
Instructions string `json:"instructions"`
Usage DreamUsage `json:"usage"`
Error DreamError `json:"error"`
CreatedAt time.Time `json:"created_at"`
EndedAt time.Time `json:"ended_at"`
ArchivedAt time.Time `json:"archived_at"`
JSON struct {
ID respjson.Field
Type respjson.Field
Status respjson.Field
Inputs respjson.Field
Outputs respjson.Field
Model respjson.Field
Instructions respjson.Field
Usage respjson.Field
Error respjson.Field
CreatedAt respjson.Field
EndedAt respjson.Field
ArchivedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Dream) UnmarshalJSON ¶ added in v0.13.0
type DreamError ¶ added in v0.13.0
type DreamError struct {
Type string `json:"type"`
Code string `json:"code"`
Message string `json:"message"`
JSON struct {
Type respjson.Field
Code respjson.Field
Message respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DreamError) RawJSON ¶ added in v0.13.0
func (r DreamError) RawJSON() string
func (*DreamError) UnmarshalJSON ¶ added in v0.13.0
func (r *DreamError) UnmarshalJSON(data []byte) error
type DreamInput ¶ added in v0.13.0
type DreamInput struct {
Type string `json:"type"`
MemoryStoreID string `json:"memory_store_id"`
IdentityID string `json:"identity_id"`
TemplateID string `json:"template_id"`
SessionIDs []string `json:"session_ids"`
JSON struct {
Type respjson.Field
MemoryStoreID respjson.Field
IdentityID respjson.Field
TemplateID respjson.Field
SessionIDs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DreamInput) RawJSON ¶ added in v0.13.0
func (r DreamInput) RawJSON() string
func (*DreamInput) UnmarshalJSON ¶ added in v0.13.0
func (r *DreamInput) UnmarshalJSON(data []byte) error
type DreamInputParam ¶ added in v0.13.0
type DreamInputParam struct {
Type string `json:"type"`
MemoryStoreID param.Opt[string] `json:"memory_store_id,omitzero"`
IdentityID param.Opt[string] `json:"identity_id,omitzero"`
TemplateID param.Opt[string] `json:"template_id,omitzero"`
SessionIDs []string `json:"session_ids,omitzero"`
// contains filtered or unexported fields
}
func (DreamInputParam) MarshalJSON ¶ added in v0.13.0
func (r DreamInputParam) MarshalJSON() ([]byte, error)
func (*DreamInputParam) UnmarshalJSON ¶ added in v0.13.0
func (r *DreamInputParam) UnmarshalJSON(data []byte) error
type DreamListParams ¶ added in v0.13.0
type DreamListParams struct {
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
// contains filtered or unexported fields
}
type DreamModelConfig ¶ added in v0.13.0
type DreamModelConfig struct {
ID string `json:"id"`
Effort string `json:"effort"`
ContextWindow int64 `json:"context_window"`
JSON struct {
ID respjson.Field
Effort respjson.Field
ContextWindow respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DreamModelConfig) RawJSON ¶ added in v0.13.0
func (r DreamModelConfig) RawJSON() string
func (*DreamModelConfig) UnmarshalJSON ¶ added in v0.13.0
func (r *DreamModelConfig) UnmarshalJSON(data []byte) error
type DreamModelConfigParam ¶ added in v0.13.0
type DreamModelConfigParam struct {
ID string `json:"id"`
Effort param.Opt[string] `json:"effort,omitzero"`
ContextWindow param.Opt[int64] `json:"context_window,omitzero"`
// contains filtered or unexported fields
}
func (DreamModelConfigParam) MarshalJSON ¶ added in v0.13.0
func (r DreamModelConfigParam) MarshalJSON() ([]byte, error)
func (*DreamModelConfigParam) UnmarshalJSON ¶ added in v0.13.0
func (r *DreamModelConfigParam) UnmarshalJSON(data []byte) error
type DreamNewParams ¶ added in v0.13.0
type DreamNewParams struct {
Inputs []DreamInputParam `json:"inputs,omitzero"`
Model DreamNewParamsModelUnion `json:"model,omitzero"`
Instructions param.Opt[string] `json:"instructions,omitzero"`
// contains filtered or unexported fields
}
func (DreamNewParams) MarshalJSON ¶ added in v0.13.0
func (r DreamNewParams) MarshalJSON() ([]byte, error)
func (*DreamNewParams) UnmarshalJSON ¶ added in v0.13.0
func (r *DreamNewParams) UnmarshalJSON(data []byte) error
type DreamNewParamsModelUnion ¶ added in v0.13.0
type DreamNewParamsModelUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfConfig *DreamModelConfigParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
DreamNewParamsModelUnion accepts a model ID or tuning object; omit to use auto.
func (DreamNewParamsModelUnion) MarshalJSON ¶ added in v0.13.0
func (r DreamNewParamsModelUnion) MarshalJSON() ([]byte, error)
func (*DreamNewParamsModelUnion) UnmarshalJSON ¶ added in v0.13.0
func (r *DreamNewParamsModelUnion) UnmarshalJSON(data []byte) error
type DreamOutput ¶ added in v0.13.0
type DreamOutput struct {
Type string `json:"type"`
MemoryStoreID string `json:"memory_store_id"`
FilesTouched []string `json:"files_touched"`
JSON struct {
Type respjson.Field
MemoryStoreID respjson.Field
FilesTouched respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DreamOutput) RawJSON ¶ added in v0.13.0
func (r DreamOutput) RawJSON() string
func (*DreamOutput) UnmarshalJSON ¶ added in v0.13.0
func (r *DreamOutput) UnmarshalJSON(data []byte) error
type DreamService ¶ added in v0.13.0
type DreamService struct{ Options []option.RequestOption }
DreamService consolidates Forward memory; requires PAT or an admin SAT.
func NewDreamService ¶ added in v0.13.0
func NewDreamService(opts ...option.RequestOption) DreamService
func (*DreamService) Archive ¶ added in v0.13.0
func (r *DreamService) Archive(ctx context.Context, dreamID string, opts ...option.RequestOption) (res *Dream, err error)
func (*DreamService) Cancel ¶ added in v0.13.0
func (r *DreamService) Cancel(ctx context.Context, dreamID string, opts ...option.RequestOption) (res *Dream, err error)
func (*DreamService) Get ¶ added in v0.13.0
func (r *DreamService) Get(ctx context.Context, dreamID string, opts ...option.RequestOption) (res *Dream, err error)
func (*DreamService) List ¶ added in v0.13.0
func (r *DreamService) List(ctx context.Context, params DreamListParams, opts ...option.RequestOption) (res *pagination.Page[Dream], err error)
func (*DreamService) ListAutoPaging ¶ added in v0.13.0
func (r *DreamService) ListAutoPaging(ctx context.Context, params DreamListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Dream]
func (*DreamService) New ¶ added in v0.13.0
func (r *DreamService) New(ctx context.Context, params DreamNewParams, opts ...option.RequestOption) (res *Dream, err error)
type DreamUsage ¶ added in v0.13.0
type DreamUsage struct {
InputTokens int64 `json:"input_tokens"`
OutputTokens int64 `json:"output_tokens"`
CacheCreationInputTokens int64 `json:"cache_creation_input_tokens"`
CacheReadInputTokens int64 `json:"cache_read_input_tokens"`
JSON struct {
InputTokens respjson.Field
OutputTokens respjson.Field
CacheCreationInputTokens respjson.Field
CacheReadInputTokens respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DreamUsage) RawJSON ¶ added in v0.13.0
func (r DreamUsage) RawJSON() string
func (*DreamUsage) UnmarshalJSON ¶ added in v0.13.0
func (r *DreamUsage) UnmarshalJSON(data []byte) error
type DriveClearParams ¶ added in v0.6.0
type DriveClearParams struct {
IdentityID string `query:"identity_id" json:"-" api:"required"`
// contains filtered or unexported fields
}
func (DriveClearParams) URLQuery ¶ added in v0.6.0
func (r DriveClearParams) URLQuery() (url.Values, error)
func (*DriveClearParams) UnmarshalJSON ¶ added in v0.6.0
func (r *DriveClearParams) UnmarshalJSON(data []byte) error
type DriveClearResponse ¶ added in v0.6.0
type DriveClearResponse struct {
DeletedCount int64 `json:"deleted_count"`
JSON struct {
DeletedCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DriveClearResponse) RawJSON ¶ added in v0.6.0
func (r DriveClearResponse) RawJSON() string
func (*DriveClearResponse) UnmarshalJSON ¶ added in v0.6.0
func (r *DriveClearResponse) UnmarshalJSON(data []byte) error
type DriveCreateDownloadURLParams ¶ added in v0.6.0
type DriveCreateDownloadURLParams struct {
IdentityID string `query:"identity_id" json:"-" api:"required"`
Path string `json:"path" api:"required"`
// contains filtered or unexported fields
}
func (DriveCreateDownloadURLParams) MarshalJSON ¶ added in v0.6.0
func (r DriveCreateDownloadURLParams) MarshalJSON() ([]byte, error)
func (DriveCreateDownloadURLParams) URLQuery ¶ added in v0.6.0
func (r DriveCreateDownloadURLParams) URLQuery() (url.Values, error)
func (*DriveCreateDownloadURLParams) UnmarshalJSON ¶ added in v0.6.0
func (r *DriveCreateDownloadURLParams) UnmarshalJSON(data []byte) error
type DriveCreateUploadURLParams ¶ added in v0.6.0
type DriveCreateUploadURLParams struct {
IdentityID string `query:"identity_id" json:"-" api:"required"`
Path string `json:"path" api:"required"`
ContentType param.Opt[string] `json:"content_type,omitzero"`
// contains filtered or unexported fields
}
func (DriveCreateUploadURLParams) MarshalJSON ¶ added in v0.6.0
func (r DriveCreateUploadURLParams) MarshalJSON() ([]byte, error)
func (DriveCreateUploadURLParams) URLQuery ¶ added in v0.6.0
func (r DriveCreateUploadURLParams) URLQuery() (url.Values, error)
func (*DriveCreateUploadURLParams) UnmarshalJSON ¶ added in v0.6.0
func (r *DriveCreateUploadURLParams) UnmarshalJSON(data []byte) error
type DriveDeleteEntryParams ¶ added in v0.6.0
type DriveDeleteEntryParams struct {
IdentityID string `query:"identity_id" json:"-" api:"required"`
Path string `json:"path" api:"required"`
Recursive param.Opt[bool] `json:"recursive,omitzero"`
// contains filtered or unexported fields
}
func (DriveDeleteEntryParams) MarshalJSON ¶ added in v0.6.0
func (r DriveDeleteEntryParams) MarshalJSON() ([]byte, error)
func (DriveDeleteEntryParams) URLQuery ¶ added in v0.6.0
func (r DriveDeleteEntryParams) URLQuery() (url.Values, error)
func (*DriveDeleteEntryParams) UnmarshalJSON ¶ added in v0.6.0
func (r *DriveDeleteEntryParams) UnmarshalJSON(data []byte) error
type DriveDeleteEntryResponse ¶ added in v0.6.0
type DriveDeleteEntryResponse struct {
DeletedCount int64 `json:"deleted_count"`
JSON struct {
DeletedCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DriveDeleteEntryResponse) RawJSON ¶ added in v0.6.0
func (r DriveDeleteEntryResponse) RawJSON() string
func (*DriveDeleteEntryResponse) UnmarshalJSON ¶ added in v0.6.0
func (r *DriveDeleteEntryResponse) UnmarshalJSON(data []byte) error
type DriveDownloadURL ¶ added in v0.6.0
type DriveDownloadURL struct {
URL string `json:"url"`
Method string `json:"method"`
Headers map[string]string `json:"headers"`
ExpiresAt time.Time `json:"expires_at" format:"date-time"`
Size int64 `json:"size"`
ETag string `json:"etag"`
ContentType string `json:"content_type"`
JSON struct {
URL respjson.Field
Method respjson.Field
Headers respjson.Field
ExpiresAt respjson.Field
Size respjson.Field
ETag respjson.Field
ContentType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DriveDownloadURL) RawJSON ¶ added in v0.6.0
func (r DriveDownloadURL) RawJSON() string
func (*DriveDownloadURL) UnmarshalJSON ¶ added in v0.6.0
func (r *DriveDownloadURL) UnmarshalJSON(data []byte) error
type DriveEntry ¶ added in v0.6.0
type DriveEntry struct {
Path string `json:"path"`
Name string `json:"name"`
Type string `json:"type"`
Size int64 `json:"size"`
ETag string `json:"etag"`
LastModified time.Time `json:"last_modified" format:"date-time"`
JSON struct {
Path respjson.Field
Name respjson.Field
Type respjson.Field
Size respjson.Field
ETag respjson.Field
LastModified respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
DriveEntry represents a file or directory. JSON.Size.Valid() distinguishes a zero-byte file from a directory.
func (DriveEntry) RawJSON ¶ added in v0.6.0
func (r DriveEntry) RawJSON() string
func (*DriveEntry) UnmarshalJSON ¶ added in v0.6.0
func (r *DriveEntry) UnmarshalJSON(data []byte) error
type DriveListEntriesParams ¶ added in v0.6.0
type DriveListEntriesParams struct {
IdentityID string `query:"identity_id" json:"-" api:"required"`
Path param.Opt[string] `query:"path,omitzero" json:"-"`
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DriveListEntriesParams) URLQuery ¶ added in v0.6.0
func (r DriveListEntriesParams) URLQuery() (url.Values, error)
func (*DriveListEntriesParams) UnmarshalJSON ¶ added in v0.6.0
func (r *DriveListEntriesParams) UnmarshalJSON(data []byte) error
type DriveListEntriesResponse ¶ added in v0.6.0
type DriveListEntriesResponse struct {
Entries []DriveEntry `json:"entries"`
NextPageToken string `json:"next_page_token"`
JSON struct {
Entries respjson.Field
NextPageToken respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DriveListEntriesResponse) RawJSON ¶ added in v0.6.0
func (r DriveListEntriesResponse) RawJSON() string
func (*DriveListEntriesResponse) UnmarshalJSON ¶ added in v0.6.0
func (r *DriveListEntriesResponse) UnmarshalJSON(data []byte) error
type DriveService ¶ added in v0.6.0
type DriveService struct{ Options []option.RequestOption }
DriveService manages persistent Identity files. Drive is a Beta API. Every method requires IdentityID, including when using an Identity SAT.
func NewDriveService ¶ added in v0.6.0
func NewDriveService(opts ...option.RequestOption) DriveService
func (*DriveService) Clear ¶ added in v0.6.0
func (r *DriveService) Clear(ctx context.Context, params DriveClearParams, opts ...option.RequestOption) (res *DriveClearResponse, err error)
Clear clears the selected Identity Drive. Use only with an Identity whose files you intend to delete.
func (*DriveService) CreateDownloadURL ¶ added in v0.6.0
func (r *DriveService) CreateDownloadURL(ctx context.Context, params DriveCreateDownloadURLParams, opts ...option.RequestOption) (res *DriveDownloadURL, err error)
CreateDownloadURL returns a short-lived GET URL. Use a new Idempotency-Key or omit it to refresh an expired URL.
func (*DriveService) CreateUploadURL ¶ added in v0.6.0
func (r *DriveService) CreateUploadURL(ctx context.Context, params DriveCreateUploadURLParams, opts ...option.RequestOption) (res *DriveUploadURL, err error)
CreateUploadURL returns a short-lived PUT URL. Use only its returned headers for the storage request. Replaying an Idempotency-Key does not renew expiry.
func (*DriveService) DeleteEntry ¶ added in v0.6.0
func (r *DriveService) DeleteEntry(ctx context.Context, params DriveDeleteEntryParams, opts ...option.RequestOption) (res *DriveDeleteEntryResponse, err error)
DeleteEntry deletes a file or directory. Recursive must be true for a nonempty directory. Partial failures retain deleted_count in the API error raw body.
func (*DriveService) ListEntries ¶ added in v0.6.0
func (r *DriveService) ListEntries(ctx context.Context, params DriveListEntriesParams, opts ...option.RequestOption) (res *DriveListEntriesResponse, err error)
ListEntries returns one directory page in service order. Pass NextPageToken unchanged as PageToken to continue within the same Identity and directory.
type DriveUploadURL ¶ added in v0.6.0
type DriveUploadURL struct {
URL string `json:"url"`
Method string `json:"method"`
Headers map[string]string `json:"headers"`
ExpiresAt time.Time `json:"expires_at" format:"date-time"`
JSON struct {
URL respjson.Field
Method respjson.Field
Headers respjson.Field
ExpiresAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DriveUploadURL) RawJSON ¶ added in v0.6.0
func (r DriveUploadURL) RawJSON() string
func (*DriveUploadURL) UnmarshalJSON ¶ added in v0.6.0
func (r *DriveUploadURL) UnmarshalJSON(data []byte) error
type EffectiveConfig ¶
type EffectiveConfig struct {
// Always `effective_spec`.
Type string `json:"type"`
// Hash of the compiled Agent section.
AgentEffectiveHash string `json:"agent_effective_hash"`
// Hash of the compiled Session section.
SessionEffectiveHash string `json:"session_effective_hash"`
// Hash of the full effective configuration.
EffectiveHash string `json:"effective_hash"`
// Compiled Agent configuration.
Agent EffectiveConfigAgent `json:"agent"`
// Compiled Session defaults.
Session EffectiveConfigSession `json:"session"`
ID string `json:"id"`
IdentityID string `json:"identity_id"`
TemplateID string `json:"template_id"`
JSON struct {
Type respjson.Field
AgentEffectiveHash respjson.Field
SessionEffectiveHash respjson.Field
EffectiveHash respjson.Field
Agent respjson.Field
Session respjson.Field
ID respjson.Field
IdentityID respjson.Field
TemplateID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EffectiveConfig) RawJSON ¶
func (r EffectiveConfig) RawJSON() string
func (*EffectiveConfig) UnmarshalJSON ¶
func (r *EffectiveConfig) UnmarshalJSON(data []byte) error
type EffectiveConfigAgent ¶
type EffectiveConfigAgent struct {
Model ModelConfig `json:"model"`
System string `json:"system"`
Tools []EffectiveConfigAgentToolsItem `json:"tools"`
MCPServers []map[string]any `json:"mcp_servers"`
Skills []map[string]any `json:"skills"`
JSON struct {
Model respjson.Field
System respjson.Field
Tools respjson.Field
MCPServers respjson.Field
Skills respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EffectiveConfigAgent) RawJSON ¶
func (r EffectiveConfigAgent) RawJSON() string
func (*EffectiveConfigAgent) UnmarshalJSON ¶
func (r *EffectiveConfigAgent) UnmarshalJSON(data []byte) error
type EffectiveConfigAgentToolsItem ¶
type EffectiveConfigAgentToolsItem struct {
Type string `json:"type"`
Configs []EffectiveConfigAgentToolsItemConfigsItem `json:"configs"`
JSON struct {
Type respjson.Field
Configs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EffectiveConfigAgentToolsItem) RawJSON ¶
func (r EffectiveConfigAgentToolsItem) RawJSON() string
func (*EffectiveConfigAgentToolsItem) UnmarshalJSON ¶
func (r *EffectiveConfigAgentToolsItem) UnmarshalJSON(data []byte) error
type EffectiveConfigAgentToolsItemConfigsItem ¶
type EffectiveConfigAgentToolsItemConfigsItem struct {
Name string `json:"name"`
Enabled bool `json:"enabled"`
JSON struct {
Name respjson.Field
Enabled respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EffectiveConfigAgentToolsItemConfigsItem) RawJSON ¶
func (r EffectiveConfigAgentToolsItemConfigsItem) RawJSON() string
func (*EffectiveConfigAgentToolsItemConfigsItem) UnmarshalJSON ¶
func (r *EffectiveConfigAgentToolsItemConfigsItem) UnmarshalJSON(data []byte) error
type EffectiveConfigSession ¶
type EffectiveConfigSession struct {
EnvironmentID string `json:"environment_id"`
EnvironmentVariables map[string]string `json:"environment_variables"`
VaultIDs []string `json:"vault_ids"`
Resources []EffectiveConfigSessionResourcesItem `json:"resources"`
JSON struct {
EnvironmentID respjson.Field
EnvironmentVariables respjson.Field
VaultIDs respjson.Field
Resources respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EffectiveConfigSession) RawJSON ¶
func (r EffectiveConfigSession) RawJSON() string
func (*EffectiveConfigSession) UnmarshalJSON ¶
func (r *EffectiveConfigSession) UnmarshalJSON(data []byte) error
type EffectiveConfigSessionResourcesItem ¶
type EffectiveConfigSessionResourcesItem struct {
Type string `json:"type"`
FileID string `json:"file_id"`
URL string `json:"url"`
MountPath string `json:"mount_path"`
JSON struct {
Type respjson.Field
FileID respjson.Field
URL respjson.Field
MountPath respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EffectiveConfigSessionResourcesItem) RawJSON ¶
func (r EffectiveConfigSessionResourcesItem) RawJSON() string
func (*EffectiveConfigSessionResourcesItem) UnmarshalJSON ¶
func (r *EffectiveConfigSessionResourcesItem) UnmarshalJSON(data []byte) error
type Environment ¶
type Environment struct {
IconURL string `json:"icon_url" api:"nullable"`
BindingInfo EnvironmentBindingInfo `json:"binding_info"`
ID string `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
Description string `json:"description"`
Config EnvironmentConfig `json:"config"`
Metadata map[string]any `json:"metadata"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
IdentityID string `json:"identity_id" api:"nullable"`
ArchivedAt time.Time `json:"archived_at" api:"nullable" format:"date-time"`
JSON struct {
IconURL respjson.Field
BindingInfo respjson.Field
ID respjson.Field
Type respjson.Field
Name respjson.Field
Description respjson.Field
Config respjson.Field
Metadata respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
IdentityID respjson.Field
ArchivedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (Environment) RawJSON ¶
func (r Environment) RawJSON() string
func (*Environment) UnmarshalJSON ¶
func (r *Environment) UnmarshalJSON(data []byte) error
type EnvironmentBindingInfo ¶ added in v0.8.0
type EnvironmentBindingInfo struct {
AgentTemplateCount int64 `json:"agent_template_count"`
JSON struct {
AgentTemplateCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EnvironmentBindingInfo) RawJSON ¶ added in v0.8.0
func (r EnvironmentBindingInfo) RawJSON() string
func (*EnvironmentBindingInfo) UnmarshalJSON ¶ added in v0.8.0
func (r *EnvironmentBindingInfo) UnmarshalJSON(data []byte) error
type EnvironmentConfig ¶
type EnvironmentConfig struct {
SetupScript string `json:"setup_script"`
Type string `json:"type"`
Packages EnvironmentConfigPackages `json:"packages"`
JSON struct {
SetupScript respjson.Field
Type respjson.Field
Packages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EnvironmentConfig) RawJSON ¶
func (r EnvironmentConfig) RawJSON() string
func (*EnvironmentConfig) UnmarshalJSON ¶
func (r *EnvironmentConfig) UnmarshalJSON(data []byte) error
type EnvironmentConfigPackages ¶
type EnvironmentConfigPackages struct {
Type string `json:"type"`
Apt []string `json:"apt"`
Cargo []string `json:"cargo"`
Gem []string `json:"gem"`
Go []string `json:"go"`
Npm []string `json:"npm"`
Pip []string `json:"pip"`
JSON struct {
Type respjson.Field
Apt respjson.Field
Cargo respjson.Field
Gem respjson.Field
Go respjson.Field
Npm respjson.Field
Pip respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EnvironmentConfigPackages) RawJSON ¶
func (r EnvironmentConfigPackages) RawJSON() string
func (*EnvironmentConfigPackages) UnmarshalJSON ¶
func (r *EnvironmentConfigPackages) UnmarshalJSON(data []byte) error
type EnvironmentListParams ¶
type EnvironmentListParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Page size, maximum 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Pagination cursor (recommended); take the value from `next_page` in the previous
// response. Mutually exclusive with `after_id` and `before_id`.
Page param.Opt[string] `query:"page,omitzero" json:"-"`
// Cursor for paging forward; mutually exclusive with `page` and `before_id`.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for paging backward; mutually exclusive with `page` and `after_id`.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type EnvironmentNewParams ¶
type EnvironmentNewParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Environment name; must not be empty after trimming surrounding whitespace.
Name string `json:"name" api:"required"`
// Description.
Description param.Opt[string] `json:"description,omitzero"`
// Environment runtime configuration; defaults to `{"type":"cloud"}` when omitted.
// When passed explicitly it must not be `null` or an empty object. See the schemas
// for the available fields.
Config map[string]any `json:"config,omitzero"`
// [Environment metadata](./schemas.md#environment-metadata); defaults to `{}` when
// omitted and must not be `null` when passed explicitly.
Metadata map[string]any `json:"metadata,omitzero"`
// Recommended on create requests. The same key with the same request is safe to
// retry.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (EnvironmentNewParams) MarshalJSON ¶
func (r EnvironmentNewParams) MarshalJSON() ([]byte, error)
func (EnvironmentNewParams) URLQuery ¶ added in v0.7.0
func (r EnvironmentNewParams) URLQuery() (url.Values, error)
func (*EnvironmentNewParams) UnmarshalJSON ¶
func (r *EnvironmentNewParams) UnmarshalJSON(data []byte) error
type EnvironmentSearchParams ¶ added in v0.12.0
type EnvironmentSearchParams struct {
// Exact string metadata filters combined with AND (at most 16 entries).
Metadata map[string]string `json:"metadata,omitzero"`
// Page size; default 20, maximum 100.
Limit param.Opt[int64] `json:"limit,omitzero"`
// Opaque next_page cursor returned by the previous search response.
Page param.Opt[string] `json:"page,omitzero"`
// Case-insensitive name substring filter.
Name param.Opt[string] `json:"name,omitzero"`
// Include archived resources; defaults to false.
IncludeArchived param.Opt[bool] `json:"include_archived,omitzero"`
// Inclusive creation-time bound (RFC 3339).
CreatedAtGte param.Opt[time.Time] `json:"created_at[gte],omitzero" format:"date-time"`
// Inclusive creation-time bound (RFC 3339).
CreatedAtLte param.Opt[time.Time] `json:"created_at[lte],omitzero" format:"date-time"`
// Select Identity ownership with a PAT; omit with any SAT. Sent in the query only.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Additional beta features; search-2026-08-31 is always included.
Betas []string `header:"x-qoder-beta,omitzero" json:"-"`
// contains filtered or unexported fields
}
EnvironmentSearchParams contains JSON body filters for Search.
func (EnvironmentSearchParams) MarshalJSON ¶ added in v0.12.0
func (r EnvironmentSearchParams) MarshalJSON() ([]byte, error)
func (EnvironmentSearchParams) URLQuery ¶ added in v0.12.0
func (r EnvironmentSearchParams) URLQuery() (url.Values, error)
func (*EnvironmentSearchParams) UnmarshalJSON ¶ added in v0.12.0
func (r *EnvironmentSearchParams) UnmarshalJSON(data []byte) error
type EnvironmentService ¶
type EnvironmentService struct {
Options []option.RequestOption
}
EnvironmentService provides Forward Environment operations.
func NewEnvironmentService ¶
func NewEnvironmentService(opts ...option.RequestOption) EnvironmentService
func (*EnvironmentService) Archive ¶
func (r *EnvironmentService) Archive(ctx context.Context, id string, opts ...option.RequestOption) (res *Environment, err error)
Archive an environment retained by historical sessions or tool calls.
func (*EnvironmentService) Delete ¶
func (r *EnvironmentService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete Environment
func (*EnvironmentService) Get ¶
func (r *EnvironmentService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Environment, err error)
Get Environment
func (*EnvironmentService) List ¶
func (r *EnvironmentService) List(ctx context.Context, params EnvironmentListParams, opts ...option.RequestOption) (res *pagination.PageCursor[Environment], err error)
List Environments
func (*EnvironmentService) ListAutoPaging ¶
func (r *EnvironmentService) ListAutoPaging(ctx context.Context, params EnvironmentListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Environment]
func (*EnvironmentService) New ¶
func (r *EnvironmentService) New(ctx context.Context, params EnvironmentNewParams, opts ...option.RequestOption) (res *Environment, err error)
Create Environment
func (*EnvironmentService) Search ¶ added in v0.12.0
func (r *EnvironmentService) Search(ctx context.Context, params EnvironmentSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[Environment], error)
Search environments by metadata and resource filters. Adds the required search Beta header.
func (*EnvironmentService) SearchAutoPaging ¶ added in v0.12.0
func (r *EnvironmentService) SearchAutoPaging(ctx context.Context, params EnvironmentSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Environment]
SearchAutoPaging iterates all matching environments using opaque body cursors.
func (*EnvironmentService) Update ¶
func (r *EnvironmentService) Update(ctx context.Context, id string, params EnvironmentUpdateParams, opts ...option.RequestOption) (res *Environment, err error)
Update Environment
type EnvironmentUpdateParams ¶
type EnvironmentUpdateParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// New name.
Name param.Opt[string] `json:"name,omitzero"`
// New description.
Description param.Opt[string] `json:"description,omitzero"`
// New configuration; must not be `null` when passed, an explicit `null` returns 400.
// See the schemas for the available fields.
Config map[string]any `json:"config,omitzero"`
// [Environment metadata](./schemas.md#environment-metadata) to merge; must not be
// `null` when passed, an explicit `null` returns 400.
Metadata map[string]any `json:"metadata,omitzero"`
// contains filtered or unexported fields
}
func (EnvironmentUpdateParams) MarshalJSON ¶
func (r EnvironmentUpdateParams) MarshalJSON() ([]byte, error)
func (EnvironmentUpdateParams) URLQuery ¶ added in v0.7.0
func (r EnvironmentUpdateParams) URLQuery() (url.Values, error)
func (*EnvironmentUpdateParams) UnmarshalJSON ¶
func (r *EnvironmentUpdateParams) UnmarshalJSON(data []byte) error
type EnvironmentVariableOverride ¶
type EnvironmentVariableOverride struct {
Op string `json:"op" api:"required"`
Value string `json:"value"`
JSON struct {
Op respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EnvironmentVariableOverride) RawJSON ¶
func (r EnvironmentVariableOverride) RawJSON() string
func (*EnvironmentVariableOverride) UnmarshalJSON ¶
func (r *EnvironmentVariableOverride) UnmarshalJSON(data []byte) error
type EnvironmentVariableOverrideParam ¶
type EnvironmentVariableOverrideParam struct {
Op string `json:"op" api:"required"`
Value param.Opt[string] `json:"value,omitzero"`
// contains filtered or unexported fields
}
func (EnvironmentVariableOverrideParam) MarshalJSON ¶
func (r EnvironmentVariableOverrideParam) MarshalJSON() ([]byte, error)
func (*EnvironmentVariableOverrideParam) UnmarshalJSON ¶
func (r *EnvironmentVariableOverrideParam) UnmarshalJSON(data []byte) error
type EnvironmentVariableUpdateParam ¶ added in v0.3.0
type EnvironmentVariableUpdateParam struct {
Type string `json:"type" api:"required"`
SecretValue param.Opt[string] `json:"secret_value,omitzero"`
// contains filtered or unexported fields
}
func (EnvironmentVariableUpdateParam) MarshalJSON ¶ added in v0.3.0
func (r EnvironmentVariableUpdateParam) MarshalJSON() ([]byte, error)
func (*EnvironmentVariableUpdateParam) UnmarshalJSON ¶ added in v0.3.0
func (r *EnvironmentVariableUpdateParam) UnmarshalJSON(data []byte) error
type EnvironmentVariablesUnionParam ¶
type EnvironmentVariablesUnionParam struct {
OfMap map[string]any `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
EnvironmentVariablesUnionParam accepts an environment map or the legacy string form. Map values may be nil to express an explicit null during updates.
func (EnvironmentVariablesUnionParam) MarshalJSON ¶
func (r EnvironmentVariablesUnionParam) MarshalJSON() ([]byte, error)
func (*EnvironmentVariablesUnionParam) UnmarshalJSON ¶
func (r *EnvironmentVariablesUnionParam) UnmarshalJSON(data []byte) error
type Error ¶
type Error = convention.Error
type EventContentUnionParam ¶
type EventContentUnionParam struct {
OfBlocks []ContentBlockParam `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfObject map[string]any `json:",omitzero,inline"`
// contains filtered or unexported fields
}
EventContentUnionParam represents message blocks or a tool result payload.
func (EventContentUnionParam) MarshalJSON ¶
func (r EventContentUnionParam) MarshalJSON() ([]byte, error)
func (*EventContentUnionParam) UnmarshalJSON ¶
func (r *EventContentUnionParam) UnmarshalJSON(data []byte) error
type FileListParams ¶
type FileListParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Page size, maximum 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Pagination cursor (recommended), taken from `next_page` in the previous response;
// mutually exclusive with `after_id` and `before_id`.
Page param.Opt[string] `query:"page,omitzero" json:"-"`
// Cursor for the next page; mutually exclusive with `page` and `before_id`.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page; mutually exclusive with `page` and `after_id`.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// Search by filename.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Filter by resource scope ID, commonly used to look up Session resource files. Do
// not combine it with `before_id` or `after_id`; cursor parameters currently have no
// effect in this filter mode.
ScopeID param.Opt[string] `query:"scope_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type FileMetadata ¶
type FileMetadata struct {
// File ID.
ID string `json:"id"`
// Always `file`.
Type string `json:"type"`
// Filename.
Filename string `json:"filename"`
// File size in bytes.
SizeBytes int64 `json:"size_bytes"`
// MIME type.
MIMEType string `json:"mime_type"`
// Creation time in RFC 3339 format.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Last update time in RFC 3339 format.
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
// Whether the file can be downloaded.
Downloadable bool `json:"downloadable"`
// Resource scope the file belongs to, such as a Session.
Scope map[string]any `json:"scope" api:"nullable"`
// File metadata.
Metadata map[string]any `json:"metadata"`
// Owning Forward Identity.
IdentityID string `json:"identity_id" api:"nullable"`
JSON struct {
ID respjson.Field
Type respjson.Field
Filename respjson.Field
SizeBytes respjson.Field
MIMEType respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
Downloadable respjson.Field
Scope respjson.Field
Metadata respjson.Field
IdentityID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FileMetadata) RawJSON ¶
func (r FileMetadata) RawJSON() string
func (*FileMetadata) UnmarshalJSON ¶
func (r *FileMetadata) UnmarshalJSON(data []byte) error
type FileSearchParams ¶ added in v0.12.0
type FileSearchParams struct {
// Exact string metadata filters combined with AND (at most 16 entries).
Metadata map[string]string `json:"metadata,omitzero"`
// Page size; default 20, maximum 100.
Limit param.Opt[int64] `json:"limit,omitzero"`
// Opaque next_page cursor returned by the previous search response.
Page param.Opt[string] `json:"page,omitzero"`
// Case-insensitive name substring filter.
Name param.Opt[string] `json:"name,omitzero"`
// Resource scope ID, currently a Session ID.
ScopeID param.Opt[string] `json:"scope_id,omitzero"`
// Select Identity ownership with a PAT; omit with any SAT. Sent in the query only.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Additional beta features; search-2026-08-31 is always included.
Betas []string `header:"x-qoder-beta,omitzero" json:"-"`
// contains filtered or unexported fields
}
FileSearchParams contains JSON body filters for Search.
func (FileSearchParams) MarshalJSON ¶ added in v0.12.0
func (r FileSearchParams) MarshalJSON() ([]byte, error)
func (FileSearchParams) URLQuery ¶ added in v0.12.0
func (r FileSearchParams) URLQuery() (url.Values, error)
func (*FileSearchParams) UnmarshalJSON ¶ added in v0.12.0
func (r *FileSearchParams) UnmarshalJSON(data []byte) error
type FileService ¶
type FileService struct {
Options []option.RequestOption
}
FileService provides Forward File operations.
func NewFileService ¶
func NewFileService(opts ...option.RequestOption) FileService
func (*FileService) Delete ¶
func (r *FileService) Delete(ctx context.Context, fileID string, opts ...option.RequestOption) (err error)
Delete File
func (*FileService) Download ¶
func (r *FileService) Download(ctx context.Context, fileID string, opts ...option.RequestOption) (res *http.Response, err error)
Download File
func (*FileService) GetMetadata ¶
func (r *FileService) GetMetadata(ctx context.Context, fileID string, opts ...option.RequestOption) (res *FileMetadata, err error)
Get File
func (*FileService) List ¶
func (r *FileService) List(ctx context.Context, params FileListParams, opts ...option.RequestOption) (res *pagination.PageCursor[FileMetadata], err error)
List Files
func (*FileService) ListAutoPaging ¶
func (r *FileService) ListAutoPaging(ctx context.Context, params FileListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[FileMetadata]
func (*FileService) Search ¶ added in v0.12.0
func (r *FileService) Search(ctx context.Context, params FileSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[FileMetadata], error)
Search files by metadata and resource filters. Adds the required search Beta header.
func (*FileService) SearchAutoPaging ¶ added in v0.12.0
func (r *FileService) SearchAutoPaging(ctx context.Context, params FileSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[FileMetadata]
SearchAutoPaging iterates all matching files using opaque body cursors.
func (*FileService) Upload ¶
func (r *FileService) Upload(ctx context.Context, params FileUploadParams, opts ...option.RequestOption) (res *FileMetadata, err error)
Upload File
type FileUploadParams ¶
type FileUploadParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Content of the file to upload. For accepted types see
// [Supported upload file types](./schemas.md).
File io.Reader `json:"file" api:"required" format:"binary"`
// Display name for the file; the multipart filename is used when omitted. After
// normalization the length must be 1-255 bytes.
Name param.Opt[string] `json:"name,omitzero"`
// Purpose of the file, defaults to `user_upload`; must be `session_resource` when the
// file is used as Batch input.
Purpose param.Opt[string] `json:"purpose,omitzero"`
// Metadata object. `created_by` is reserved and must not be sent (sending it returns
// 400).
Metadata map[string]any `json:"metadata,omitzero" api:"metadata"`
// Optional idempotency key for the create request. When set, the same key may only be
// reused for an identical request; when omitted no local idempotent replay protection
// is provided.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (FileUploadParams) MarshalMultipart ¶
func (r FileUploadParams) MarshalMultipart() ([]byte, string, error)
type GitHubRepository ¶
type GitHubRepository struct {
URL string `json:"url"`
MountPath string `json:"mount_path"`
Enabled bool `json:"enabled"`
JSON struct {
URL respjson.Field
MountPath respjson.Field
Enabled respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GitHubRepository) RawJSON ¶
func (r GitHubRepository) RawJSON() string
func (*GitHubRepository) UnmarshalJSON ¶
func (r *GitHubRepository) UnmarshalJSON(data []byte) error
type GitHubRepositoryParam ¶
type GitHubRepositoryParam struct {
URL param.Opt[string] `json:"url,omitzero"`
MountPath param.Opt[string] `json:"mount_path,omitzero"`
Enabled param.Opt[bool] `json:"enabled,omitzero"`
AuthorizationToken param.Opt[string] `json:"authorization_token,omitzero"`
// contains filtered or unexported fields
}
func (GitHubRepositoryParam) MarshalJSON ¶
func (r GitHubRepositoryParam) MarshalJSON() ([]byte, error)
func (*GitHubRepositoryParam) UnmarshalJSON ¶
func (r *GitHubRepositoryParam) UnmarshalJSON(data []byte) error
type Identity ¶
type Identity struct {
AutoMemoryStore bool `json:"auto_memory_store"`
// Forward Identity ID; the `idn_` prefix is recommended.
ID string `json:"id"`
// End-user ID in the integrator's system.
ExternalID string `json:"external_id"`
// Identity display name.
Name string `json:"name"`
// Identity type. A regular Identity returns `normal`.
IdentityType string `json:"identity_type"`
// Whether the Identity may continue to be used.
Enabled bool `json:"enabled"`
// Business metadata.
Metadata map[string]any `json:"metadata"`
// Creation time, in RFC 3339 format.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Last update time, in RFC 3339 format.
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON struct {
AutoMemoryStore respjson.Field
ID respjson.Field
ExternalID respjson.Field
Name respjson.Field
IdentityType respjson.Field
Enabled respjson.Field
Metadata respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Identity) UnmarshalJSON ¶
type IdentityClearParams ¶
type IdentityClearParams struct {
// Reason for clearing; recorded only to capture the caller's intent.
Reason param.Opt[string] `json:"reason,omitzero"`
// contains filtered or unexported fields
}
func (IdentityClearParams) MarshalJSON ¶
func (r IdentityClearParams) MarshalJSON() ([]byte, error)
func (*IdentityClearParams) UnmarshalJSON ¶
func (r *IdentityClearParams) UnmarshalJSON(data []byte) error
type IdentityClearResponse ¶
type IdentityClearResponse struct {
// ID of the cleared Identity.
IdentityID string `json:"identity_id"`
// Clear status; `completed` on success.
Status string `json:"status"`
// Time the Forward-side cleanup completed, in RFC 3339 format.
CompletedAt time.Time `json:"completed_at" format:"date-time"`
Summary IdentityClearResponseSummary `json:"summary"`
JSON struct {
IdentityID respjson.Field
Status respjson.Field
CompletedAt respjson.Field
Summary respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityClearResponse) RawJSON ¶
func (r IdentityClearResponse) RawJSON() string
func (*IdentityClearResponse) UnmarshalJSON ¶
func (r *IdentityClearResponse) UnmarshalJSON(data []byte) error
type IdentityClearResponseSummary ¶
type IdentityClearResponseSummary struct {
IdentityConfigsArchived int64 `json:"identity_configs_archived"`
ResourceBindingsArchived int64 `json:"resource_bindings_archived"`
IdentityOwnedResourcesArchived int64 `json:"identity_owned_resources_archived"`
SchedulesArchived int64 `json:"schedules_archived"`
ScheduleRunsSkipped int64 `json:"schedule_runs_skipped"`
SessionsArchived int64 `json:"sessions_archived"`
JSON struct {
IdentityConfigsArchived respjson.Field
ResourceBindingsArchived respjson.Field
IdentityOwnedResourcesArchived respjson.Field
SchedulesArchived respjson.Field
ScheduleRunsSkipped respjson.Field
SessionsArchived respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityClearResponseSummary) RawJSON ¶
func (r IdentityClearResponseSummary) RawJSON() string
func (*IdentityClearResponseSummary) UnmarshalJSON ¶
func (r *IdentityClearResponseSummary) UnmarshalJSON(data []byte) error
type IdentityConfig ¶
type IdentityConfig struct {
// Always `config`.
Type string `json:"type"`
ID string `json:"id"`
// Forward Identity ID.
IdentityID string `json:"identity_id"`
// Forward Template ID.
TemplateID string `json:"template_id"`
Name string `json:"name"`
Status string `json:"status"`
// Hash of the compiled Effective Config.
EffectiveHash string `json:"effective_hash"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
IdentityConfig IdentityConfigSpec `json:"identity_config"`
// Business metadata.
Metadata map[string]any `json:"metadata"`
JSON struct {
Type respjson.Field
ID respjson.Field
IdentityID respjson.Field
TemplateID respjson.Field
Name respjson.Field
Status respjson.Field
EffectiveHash respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
IdentityConfig respjson.Field
Metadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityConfig) RawJSON ¶
func (r IdentityConfig) RawJSON() string
func (*IdentityConfig) UnmarshalJSON ¶
func (r *IdentityConfig) UnmarshalJSON(data []byte) error
type IdentityConfigListParams ¶
type IdentityConfigListParams struct {
// Filter by Forward Template ID.
TemplateID param.Opt[string] `query:"template_id,omitzero" json:"-"`
// Filter by `active` or `archived`.
Status param.Opt[string] `query:"status,omitzero" json:"-"`
// Page size, maximum 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the next page, taken from `last_id` in the previous response.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page, taken from `first_id` in the previous response.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type IdentityConfigService ¶
type IdentityConfigService struct {
Options []option.RequestOption
}
IdentityConfigService provides Forward IdentityConfig operations.
func NewIdentityConfigService ¶
func NewIdentityConfigService(opts ...option.RequestOption) IdentityConfigService
func (*IdentityConfigService) Get ¶
func (r *IdentityConfigService) Get(ctx context.Context, identityID string, templateID string, opts ...option.RequestOption) (res *IdentityConfig, err error)
Get Identity Config
func (*IdentityConfigService) GetEffective ¶
func (r *IdentityConfigService) GetEffective(ctx context.Context, identityID string, templateID string, opts ...option.RequestOption) (res *EffectiveConfig, err error)
Get Effective Config
func (*IdentityConfigService) List ¶
func (r *IdentityConfigService) List(ctx context.Context, identityID string, params IdentityConfigListParams, opts ...option.RequestOption) (res *pagination.Page[IdentityConfig], err error)
List Identity Configs
func (*IdentityConfigService) ListAutoPaging ¶
func (r *IdentityConfigService) ListAutoPaging(ctx context.Context, identityID string, params IdentityConfigListParams, opts ...option.RequestOption) *pagination.PageAutoPager[IdentityConfig]
func (*IdentityConfigService) Upsert ¶
func (r *IdentityConfigService) Upsert(ctx context.Context, identityID string, templateID string, params IdentityConfigUpsertParams, opts ...option.RequestOption) (res *IdentityConfig, err error)
Create or update Identity Config
type IdentityConfigSpec ¶
type IdentityConfigSpec struct {
ManagedToolConfig map[string]*ManagedCapabilityOverride `json:"managed_tool_config"`
System SystemOverride `json:"system"`
Model ModelConfig `json:"model"`
Tools IdentityToolsUnion `json:"tools"`
MCPServers map[string]MCPServerOverride `json:"mcp_servers"`
Skills map[string]SkillOverride `json:"skills"`
Toolsets map[string]any `json:"toolsets"`
AgentMetadata map[string]any `json:"agent_metadata"`
Vaults map[string]ResourceBinding `json:"vaults"`
Files map[string]ResourceBinding `json:"files"`
GitHubRepositories map[string]GitHubRepository `json:"github_repositories"`
EnvironmentVariables map[string]EnvironmentVariableOverride `json:"environment_variables"`
JSON struct {
ManagedToolConfig respjson.Field
System respjson.Field
Model respjson.Field
Tools respjson.Field
MCPServers respjson.Field
Skills respjson.Field
Toolsets respjson.Field
AgentMetadata respjson.Field
Vaults respjson.Field
Files respjson.Field
GitHubRepositories respjson.Field
EnvironmentVariables respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityConfigSpec) RawJSON ¶
func (r IdentityConfigSpec) RawJSON() string
func (*IdentityConfigSpec) UnmarshalJSON ¶
func (r *IdentityConfigSpec) UnmarshalJSON(data []byte) error
type IdentityConfigSpecParam ¶
type IdentityConfigSpecParam struct {
ManagedToolConfig map[string]ManagedCapabilityOverrideParam `json:"managed_tool_config,omitzero"`
System SystemOverrideParam `json:"system,omitzero"`
Model ModelConfigUnionParam `json:"model,omitzero"`
Tools IdentityToolsUnionParam `json:"tools,omitzero"`
MCPServers map[string]MCPServerOverrideParam `json:"mcp_servers,omitzero"`
Skills map[string]SkillOverrideParam `json:"skills,omitzero"`
Toolsets map[string]any `json:"toolsets,omitzero"`
AgentMetadata map[string]any `json:"agent_metadata,omitzero"`
Vaults map[string]ResourceBindingParam `json:"vaults,omitzero"`
Files map[string]ResourceBindingParam `json:"files,omitzero"`
GitHubRepositories map[string]GitHubRepositoryParam `json:"github_repositories,omitzero"`
EnvironmentVariables map[string]EnvironmentVariableOverrideParam `json:"environment_variables,omitzero"`
// contains filtered or unexported fields
}
func (IdentityConfigSpecParam) MarshalJSON ¶
func (r IdentityConfigSpecParam) MarshalJSON() ([]byte, error)
func (*IdentityConfigSpecParam) UnmarshalAPIJSON ¶ added in v0.13.0
func (r *IdentityConfigSpecParam) UnmarshalAPIJSON(data []byte) error
func (*IdentityConfigSpecParam) UnmarshalJSON ¶
func (r *IdentityConfigSpecParam) UnmarshalJSON(data []byte) error
type IdentityConfigUpsertParams ¶
type IdentityConfigUpsertParams struct {
// Display name for the Config.
Name param.Opt[string] `json:"name,omitzero"`
// User-level configuration overrides.
IdentityConfig IdentityConfigSpecParam `json:"identity_config" api:"required"`
// Business metadata; when sent it replaces the existing metadata entirely.
Metadata map[string]any `json:"metadata,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IdentityConfigUpsertParams) MarshalJSON ¶
func (r IdentityConfigUpsertParams) MarshalJSON() ([]byte, error)
func (*IdentityConfigUpsertParams) UnmarshalJSON ¶
func (r *IdentityConfigUpsertParams) UnmarshalJSON(data []byte) error
type IdentityListParams ¶
type IdentityListParams struct {
// Filter by the integrator's end-user ID.
ExternalID param.Opt[string] `query:"external_id,omitzero" json:"-"`
// Filter by multiple Identity IDs; accepts a comma-separated list or repeated
// query parameters, up to 100 after deduplication.
IdentityIDs []string `query:"identity_ids,omitzero" json:"-"`
// Matches the Identity ID, name or external ID.
Search param.Opt[string] `query:"search,omitzero" json:"-"`
// Filter by enabled state; a non-boolean value returns 400.
Enabled param.Opt[bool] `query:"enabled,omitzero" json:"-"`
// Page size, maximum 100; larger values are clamped to the maximum.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the next page; cannot be combined with `before_id`.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page; cannot be combined with `after_id`.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type IdentityListTemplatesResponse ¶
type IdentityListTemplatesResponse struct {
Data []IdentityTemplate `json:"data"`
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityListTemplatesResponse) RawJSON ¶
func (r IdentityListTemplatesResponse) RawJSON() string
func (*IdentityListTemplatesResponse) UnmarshalJSON ¶
func (r *IdentityListTemplatesResponse) UnmarshalJSON(data []byte) error
type IdentityMemoryStoreListParams ¶ added in v0.13.0
type IdentityMemoryStoreListResponse ¶
type IdentityMemoryStoreListResponse struct {
FirstID string `json:"first_id"`
LastID string `json:"last_id"`
Data []MemoryStoreMount `json:"data"`
HasMore bool `json:"has_more"`
JSON struct {
FirstID respjson.Field
LastID respjson.Field
Data respjson.Field
HasMore respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityMemoryStoreListResponse) RawJSON ¶
func (r IdentityMemoryStoreListResponse) RawJSON() string
func (*IdentityMemoryStoreListResponse) UnmarshalJSON ¶
func (r *IdentityMemoryStoreListResponse) UnmarshalJSON(data []byte) error
type IdentityMemoryStoreMountParams ¶
type IdentityMemoryStoreMountParams struct {
Access param.Opt[string] `json:"access,omitzero"`
// ID of the Memory Store to mount (`memstore_...`). It must be an active Store
// visible to the caller.
MemoryStoreID string `json:"memory_store_id" api:"required"`
// contains filtered or unexported fields
}
func (IdentityMemoryStoreMountParams) MarshalJSON ¶
func (r IdentityMemoryStoreMountParams) MarshalJSON() ([]byte, error)
func (*IdentityMemoryStoreMountParams) UnmarshalJSON ¶
func (r *IdentityMemoryStoreMountParams) UnmarshalJSON(data []byte) error
type IdentityMemoryStoreService ¶
type IdentityMemoryStoreService struct {
Options []option.RequestOption
}
IdentityMemoryStoreService provides Forward IdentityMemoryStore operations.
func NewIdentityMemoryStoreService ¶
func NewIdentityMemoryStoreService(opts ...option.RequestOption) IdentityMemoryStoreService
func (*IdentityMemoryStoreService) Detach ¶
func (r *IdentityMemoryStoreService) Detach(ctx context.Context, identityID string, templateID string, memoryStoreID string, opts ...option.RequestOption) (res *DeletedMemoryStoreMount, err error)
Unmount Memory Store from an Identity
func (*IdentityMemoryStoreService) List ¶
func (r *IdentityMemoryStoreService) List(ctx context.Context, identityID string, templateID string, params IdentityMemoryStoreListParams, opts ...option.RequestOption) (res *pagination.Page[MemoryStoreMount], err error)
List Memory Store mounts on an Identity
func (*IdentityMemoryStoreService) ListAutoPaging ¶ added in v0.13.0
func (r *IdentityMemoryStoreService) ListAutoPaging(ctx context.Context, identityID, templateID string, params IdentityMemoryStoreListParams, opts ...option.RequestOption) *pagination.PageAutoPager[MemoryStoreMount]
func (*IdentityMemoryStoreService) Mount ¶
func (r *IdentityMemoryStoreService) Mount(ctx context.Context, identityID string, templateID string, params IdentityMemoryStoreMountParams, opts ...option.RequestOption) (res *MemoryStoreMount, err error)
Mount Memory Store on an Identity
type IdentityNewParams ¶
type IdentityNewParams struct {
AutoMemoryStore param.Opt[bool] `json:"auto_memory_store,omitzero"`
// End-user ID in the integrator's system; cannot be empty or whitespace only.
ExternalID string `json:"external_id" api:"required"`
// Display name; when provided it cannot be empty or whitespace only.
Name param.Opt[string] `json:"name,omitzero"`
// Whether the Identity is enabled; defaults to `true`.
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// Business metadata; at most 16 keys is recommended.
Metadata map[string]any `json:"metadata,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IdentityNewParams) MarshalJSON ¶
func (r IdentityNewParams) MarshalJSON() ([]byte, error)
func (*IdentityNewParams) UnmarshalJSON ¶
func (r *IdentityNewParams) UnmarshalJSON(data []byte) error
type IdentityService ¶
type IdentityService struct {
Options []option.RequestOption
Configs IdentityConfigService
MemoryStores IdentityMemoryStoreService
ServiceAccountTokens IdentityServiceAccountTokenService
}
IdentityService provides Forward Identity operations.
func NewIdentityService ¶
func NewIdentityService(opts ...option.RequestOption) IdentityService
func (*IdentityService) Clear ¶
func (r *IdentityService) Clear(ctx context.Context, identityID string, params IdentityClearParams, opts ...option.RequestOption) (res *IdentityClearResponse, err error)
Clear Identity
func (*IdentityService) Delete ¶
func (r *IdentityService) Delete(ctx context.Context, identityID string, opts ...option.RequestOption) (res *DeletedIdentity, err error)
Delete Identity
func (*IdentityService) Disable ¶
func (r *IdentityService) Disable(ctx context.Context, identityID string, opts ...option.RequestOption) (res *Identity, err error)
Disable Identity
func (*IdentityService) Enable ¶
func (r *IdentityService) Enable(ctx context.Context, identityID string, opts ...option.RequestOption) (res *Identity, err error)
Enable Identity
func (*IdentityService) EnsureAdmin ¶
func (r *IdentityService) EnsureAdmin(ctx context.Context, opts ...option.RequestOption) (res *Identity, err error)
Ensure the admin Identity
func (*IdentityService) Get ¶
func (r *IdentityService) Get(ctx context.Context, identityID string, opts ...option.RequestOption) (res *Identity, err error)
Get Identity
func (*IdentityService) List ¶
func (r *IdentityService) List(ctx context.Context, params IdentityListParams, opts ...option.RequestOption) (res *pagination.Page[Identity], err error)
List Identities
func (*IdentityService) ListAutoPaging ¶
func (r *IdentityService) ListAutoPaging(ctx context.Context, params IdentityListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Identity]
func (*IdentityService) ListTemplates ¶
func (r *IdentityService) ListTemplates(ctx context.Context, identityID string, opts ...option.RequestOption) (res *IdentityListTemplatesResponse, err error)
List Templates used by an Identity
func (*IdentityService) New ¶
func (r *IdentityService) New(ctx context.Context, params IdentityNewParams, opts ...option.RequestOption) (res *Identity, err error)
Create Identity
func (*IdentityService) Stats ¶
func (r *IdentityService) Stats(ctx context.Context, opts ...option.RequestOption) (res *IdentityStats, err error)
Get Identity stats
func (*IdentityService) Update ¶
func (r *IdentityService) Update(ctx context.Context, identityID string, params IdentityUpdateParams, opts ...option.RequestOption) (res *Identity, err error)
Update Identity
type IdentityServiceAccountTokenService ¶ added in v0.5.0
type IdentityServiceAccountTokenService struct {
Options []option.RequestOption
}
IdentityServiceAccountTokenService issues SATs bound to a Forward Identity.
func NewIdentityServiceAccountTokenService ¶ added in v0.5.0
func NewIdentityServiceAccountTokenService(opts ...option.RequestOption) IdentityServiceAccountTokenService
func (*IdentityServiceAccountTokenService) New ¶ added in v0.5.0
func (r *IdentityServiceAccountTokenService) New(ctx context.Context, identityID string, params ServiceAccountTokenNewParams, opts ...option.RequestOption) (res *ServiceAccountToken, err error)
New issues an Identity SAT using the explicit SA Key. Automatic retries are disabled.
type IdentityStats ¶
type IdentityStats struct {
// Total number of Identities for the current account.
TotalIdentities int64 `json:"total_identities"`
// Number of recently active Identities.
ActiveIdentities int64 `json:"active_identities"`
// Total number of Templates the current account has used.
TotalAgents int64 `json:"total_agents"`
// Total number of Sessions for the current account.
TotalSessions int64 `json:"total_sessions"`
JSON struct {
TotalIdentities respjson.Field
ActiveIdentities respjson.Field
TotalAgents respjson.Field
TotalSessions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityStats) RawJSON ¶
func (r IdentityStats) RawJSON() string
func (*IdentityStats) UnmarshalJSON ¶
func (r *IdentityStats) UnmarshalJSON(data []byte) error
type IdentityTemplate ¶
type IdentityTemplate struct {
TemplateID string `json:"template_id"`
TemplateName string `json:"template_name"`
SessionCount int64 `json:"session_count"`
LastActiveAt time.Time `json:"last_active_at" format:"date-time"`
JSON struct {
TemplateID respjson.Field
TemplateName respjson.Field
SessionCount respjson.Field
LastActiveAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityTemplate) RawJSON ¶
func (r IdentityTemplate) RawJSON() string
func (*IdentityTemplate) UnmarshalJSON ¶
func (r *IdentityTemplate) UnmarshalJSON(data []byte) error
type IdentityToolsUnion ¶ added in v0.13.0
type IdentityToolsUnion struct {
OfOverrides map[string]*ToolOverride
OfArray []Tool
// contains filtered or unexported fields
}
func (IdentityToolsUnion) RawJSON ¶ added in v0.13.0
func (r IdentityToolsUnion) RawJSON() string
func (*IdentityToolsUnion) UnmarshalJSON ¶ added in v0.13.0
func (r *IdentityToolsUnion) UnmarshalJSON(data []byte) error
type IdentityToolsUnionParam ¶ added in v0.13.0
type IdentityToolsUnionParam struct {
OfOverrides map[string]ToolOverrideParam `json:",omitzero,inline"`
OfArray []ToolParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
IdentityToolsUnionParam overrides individual tools or replaces the complete tools array.
func (IdentityToolsUnionParam) MarshalJSON ¶ added in v0.13.0
func (r IdentityToolsUnionParam) MarshalJSON() ([]byte, error)
func (*IdentityToolsUnionParam) UnmarshalAPIJSON ¶ added in v0.13.0
func (r *IdentityToolsUnionParam) UnmarshalAPIJSON(data []byte) error
func (*IdentityToolsUnionParam) UnmarshalJSON ¶ added in v0.13.0
func (r *IdentityToolsUnionParam) UnmarshalJSON(data []byte) error
type IdentityUpdateParams ¶
type IdentityUpdateParams struct {
AutoMemoryStore param.Opt[bool] `json:"auto_memory_store,omitzero"`
// Replaces the existing end-user ID.
ExternalID param.Opt[string] `json:"external_id,omitzero"`
// Replaces the display name.
Name param.Opt[string] `json:"name,omitzero"`
// Updates whether the Identity is usable.
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// Merges updates into the business metadata; an empty string value deletes the
// corresponding key.
Metadata map[string]any `json:"metadata,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IdentityUpdateParams) MarshalJSON ¶
func (r IdentityUpdateParams) MarshalJSON() ([]byte, error)
func (*IdentityUpdateParams) UnmarshalJSON ¶
func (r *IdentityUpdateParams) UnmarshalJSON(data []byte) error
type IdentityUsage ¶ added in v0.3.0
type IdentityUsage struct {
Type string `json:"type"`
IdentityID string `json:"identity_id"`
SessionCount int64 `json:"session_count"`
ActiveSeconds float64 `json:"active_seconds"`
Credits float64 `json:"credits"`
JSON struct {
Type respjson.Field
IdentityID respjson.Field
SessionCount respjson.Field
ActiveSeconds respjson.Field
Credits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityUsage) RawJSON ¶ added in v0.3.0
func (r IdentityUsage) RawJSON() string
func (*IdentityUsage) UnmarshalJSON ¶ added in v0.3.0
func (r *IdentityUsage) UnmarshalJSON(data []byte) error
type ImageSource ¶
type ImageSource struct {
Type string `json:"type" api:"required"`
MediaType string `json:"media_type"`
Data string `json:"data"`
URL string `json:"url"`
FileID string `json:"file_id"`
JSON struct {
Type respjson.Field
MediaType respjson.Field
Data respjson.Field
URL respjson.Field
FileID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ImageSource) RawJSON ¶
func (r ImageSource) RawJSON() string
func (*ImageSource) UnmarshalJSON ¶
func (r *ImageSource) UnmarshalJSON(data []byte) error
type ImageSourceParam ¶
type ImageSourceParam struct {
Type string `json:"type" api:"required"`
MediaType param.Opt[string] `json:"media_type,omitzero"`
Data param.Opt[string] `json:"data,omitzero"`
URL param.Opt[string] `json:"url,omitzero"`
FileID param.Opt[string] `json:"file_id,omitzero"`
// contains filtered or unexported fields
}
func (ImageSourceParam) MarshalJSON ¶
func (r ImageSourceParam) MarshalJSON() ([]byte, error)
func (*ImageSourceParam) UnmarshalJSON ¶
func (r *ImageSourceParam) UnmarshalJSON(data []byte) error
type MCPOAuthRefreshUpdateParam ¶ added in v0.3.0
type MCPOAuthRefreshUpdateParam struct {
RefreshToken param.Opt[string] `json:"refresh_token,omitzero"`
Scope param.Opt[string] `json:"scope,omitzero"`
TokenEndpointAuth map[string]any `json:"token_endpoint_auth,omitzero"`
// contains filtered or unexported fields
}
func (MCPOAuthRefreshUpdateParam) MarshalJSON ¶ added in v0.3.0
func (r MCPOAuthRefreshUpdateParam) MarshalJSON() ([]byte, error)
func (*MCPOAuthRefreshUpdateParam) UnmarshalJSON ¶ added in v0.3.0
func (r *MCPOAuthRefreshUpdateParam) UnmarshalJSON(data []byte) error
type MCPOAuthUpdateParam ¶ added in v0.3.0
type MCPOAuthUpdateParam struct {
Type string `json:"type" api:"required"`
AccessToken param.Opt[string] `json:"access_token,omitzero"`
ExpiresAt param.Opt[string] `json:"expires_at,omitzero"`
Refresh MCPOAuthRefreshUpdateParam `json:"refresh,omitzero"`
// contains filtered or unexported fields
}
func (MCPOAuthUpdateParam) MarshalJSON ¶ added in v0.3.0
func (r MCPOAuthUpdateParam) MarshalJSON() ([]byte, error)
func (*MCPOAuthUpdateParam) UnmarshalJSON ¶ added in v0.3.0
func (r *MCPOAuthUpdateParam) UnmarshalJSON(data []byte) error
type MCPServer ¶
type MCPServer struct {
Type string `json:"type"`
Name string `json:"name" api:"required"`
URL string `json:"url" api:"required"`
JSON struct {
Type respjson.Field
Name respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*MCPServer) UnmarshalJSON ¶
type MCPServerOverride ¶
type MCPServerOverride struct {
Enabled bool `json:"enabled"`
Type string `json:"type"`
URL string `json:"url"`
JSON struct {
Enabled respjson.Field
Type respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MCPServerOverride) RawJSON ¶
func (r MCPServerOverride) RawJSON() string
func (*MCPServerOverride) UnmarshalJSON ¶
func (r *MCPServerOverride) UnmarshalJSON(data []byte) error
type MCPServerOverrideParam ¶
type MCPServerOverrideParam struct {
Enabled param.Opt[bool] `json:"enabled,omitzero"`
Type param.Opt[string] `json:"type,omitzero"`
URL param.Opt[string] `json:"url,omitzero"`
// contains filtered or unexported fields
}
func (MCPServerOverrideParam) MarshalJSON ¶
func (r MCPServerOverrideParam) MarshalJSON() ([]byte, error)
func (*MCPServerOverrideParam) UnmarshalJSON ¶
func (r *MCPServerOverrideParam) UnmarshalJSON(data []byte) error
type MCPServerParam ¶
type MCPServerParam struct {
Type param.Opt[string] `json:"type,omitzero"`
Name string `json:"name" api:"required"`
URL string `json:"url" api:"required"`
// contains filtered or unexported fields
}
func (MCPServerParam) MarshalJSON ¶
func (r MCPServerParam) MarshalJSON() ([]byte, error)
func (*MCPServerParam) UnmarshalJSON ¶
func (r *MCPServerParam) UnmarshalJSON(data []byte) error
type ManagedCapabilityOverride ¶ added in v0.13.0
type ManagedCapabilityOverride struct {
Enabled bool `json:"enabled"`
JSON struct {
Enabled respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ManagedCapabilityOverride) RawJSON ¶ added in v0.13.0
func (r ManagedCapabilityOverride) RawJSON() string
func (*ManagedCapabilityOverride) UnmarshalJSON ¶ added in v0.13.0
func (r *ManagedCapabilityOverride) UnmarshalJSON(data []byte) error
type ManagedCapabilityOverrideParam ¶ added in v0.13.0
type ManagedCapabilityOverrideParam struct {
Enabled bool `json:"enabled" api:"required"`
// contains filtered or unexported fields
}
ManagedCapabilityOverrideParam is a sparse Identity capability switch. Use param.NullStruct to restore inheritance for one selector.
func (ManagedCapabilityOverrideParam) MarshalJSON ¶ added in v0.13.0
func (r ManagedCapabilityOverrideParam) MarshalJSON() ([]byte, error)
func (*ManagedCapabilityOverrideParam) UnmarshalJSON ¶ added in v0.13.0
func (r *ManagedCapabilityOverrideParam) UnmarshalJSON(data []byte) error
type ManagedToolConfig ¶ added in v0.6.0
type ManagedToolConfig struct {
EnabledTools []string `json:"enabled_tools"`
JSON struct {
EnabledTools respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ManagedToolConfig) RawJSON ¶ added in v0.6.0
func (r ManagedToolConfig) RawJSON() string
func (*ManagedToolConfig) UnmarshalJSON ¶ added in v0.6.0
func (r *ManagedToolConfig) UnmarshalJSON(data []byte) error
type ManagedToolConfigParam ¶ added in v0.6.0
type ManagedToolConfigParam struct {
EnabledTools []string `json:"enabled_tools" api:"required"`
// contains filtered or unexported fields
}
ManagedToolConfigParam replaces the complete enabled tool list. Include other tools you want to keep. An empty list disables all managed tools.
func (ManagedToolConfigParam) MarshalJSON ¶ added in v0.6.0
func (r ManagedToolConfigParam) MarshalJSON() ([]byte, error)
func (*ManagedToolConfigParam) UnmarshalJSON ¶ added in v0.6.0
func (r *ManagedToolConfigParam) UnmarshalJSON(data []byte) error
type Memory ¶
type Memory struct {
ID string `json:"id"`
Type string `json:"type"`
MemoryStoreID string `json:"memory_store_id"`
Path string `json:"path"`
ContentSizeBytes int64 `json:"content_size_bytes"`
ContentSHA256 string `json:"content_sha256"`
Metadata map[string]any `json:"metadata"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
Content string `json:"content"`
JSON struct {
ID respjson.Field
Type respjson.Field
MemoryStoreID respjson.Field
Path respjson.Field
ContentSizeBytes respjson.Field
ContentSHA256 respjson.Field
Metadata respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
Content respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Memory) UnmarshalJSON ¶
type MemoryStore ¶
type MemoryStore struct {
ID string `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status"`
EntryCount int64 `json:"entry_count"`
TotalSize int64 `json:"total_size"`
Metadata map[string]any `json:"metadata"`
SystemManaged bool `json:"system_managed"`
IdentityID string `json:"identity_id" api:"nullable"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
ArchivedAt time.Time `json:"archived_at" api:"nullable" format:"date-time"`
BindingInfo map[string]int64 `json:"binding_info"`
JSON struct {
ID respjson.Field
Type respjson.Field
Name respjson.Field
Description respjson.Field
Status respjson.Field
EntryCount respjson.Field
TotalSize respjson.Field
Metadata respjson.Field
SystemManaged respjson.Field
IdentityID respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ArchivedAt respjson.Field
BindingInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MemoryStore) RawJSON ¶
func (r MemoryStore) RawJSON() string
func (*MemoryStore) UnmarshalJSON ¶
func (r *MemoryStore) UnmarshalJSON(data []byte) error
type MemoryStoreListParams ¶
type MemoryStoreListParams struct {
// Maximum number of items per page, 1..100, defaults to 20.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the previous page, mutually exclusive with `after_id`.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// Cursor for the next page, mutually exclusive with `before_id`.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Three-state filter: `true` returns only system default stores; `false` returns only
// user-created stores; omit it to apply no filter.
SystemManaged param.Opt[bool] `query:"system_managed,omitzero" json:"-"`
// contains filtered or unexported fields
}
type MemoryStoreMemoryListParams ¶
type MemoryStoreMemoryListParams struct {
// Maximum number of entries per page, 1..100, default 20.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the previous page; mutually exclusive with `after_id`.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// Cursor for the next page; mutually exclusive with `before_id`.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Filter by `path` prefix. **This is a plain string prefix match, not directory
// semantics** — `path_prefix=a/b` also matches `a/bc.md`.
PathPrefix param.Opt[string] `query:"path_prefix,omitzero" json:"-"`
// contains filtered or unexported fields
}
type MemoryStoreMemoryNewParams ¶
type MemoryStoreMemoryNewParams struct {
// Path relative to the store root, case-sensitive; it must be relative, with no
// leading `/`.
Path string `json:"path" api:"required"`
// UTF-8 plain text content, not base64; at most 100 KiB of raw bytes.
Content string `json:"content" api:"required"`
// Key-value metadata whose values must be strings, up to **16** keys.
Metadata map[string]any `json:"metadata,omitzero"`
// contains filtered or unexported fields
}
func (MemoryStoreMemoryNewParams) MarshalJSON ¶
func (r MemoryStoreMemoryNewParams) MarshalJSON() ([]byte, error)
func (*MemoryStoreMemoryNewParams) UnmarshalJSON ¶
func (r *MemoryStoreMemoryNewParams) UnmarshalJSON(data []byte) error
type MemoryStoreMemoryService ¶
type MemoryStoreMemoryService struct {
Options []option.RequestOption
}
MemoryStoreMemoryService provides Forward MemoryStoreMemory operations.
func NewMemoryStoreMemoryService ¶
func NewMemoryStoreMemoryService(opts ...option.RequestOption) MemoryStoreMemoryService
func (*MemoryStoreMemoryService) Delete ¶
func (r *MemoryStoreMemoryService) Delete(ctx context.Context, memoryStoreID string, memoryID string, opts ...option.RequestOption) (res *DeletedMemory, err error)
Delete Memory
func (*MemoryStoreMemoryService) Get ¶
func (r *MemoryStoreMemoryService) Get(ctx context.Context, memoryStoreID string, memoryID string, opts ...option.RequestOption) (res *Memory, err error)
Get Memory
func (*MemoryStoreMemoryService) List ¶
func (r *MemoryStoreMemoryService) List(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryListParams, opts ...option.RequestOption) (res *pagination.Page[Memory], err error)
List Memories
func (*MemoryStoreMemoryService) ListAutoPaging ¶
func (r *MemoryStoreMemoryService) ListAutoPaging(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Memory]
func (*MemoryStoreMemoryService) New ¶
func (r *MemoryStoreMemoryService) New(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryNewParams, opts ...option.RequestOption) (res *Memory, err error)
Create Memory
func (*MemoryStoreMemoryService) Update ¶
func (r *MemoryStoreMemoryService) Update(ctx context.Context, memoryStoreID string, memoryID string, params MemoryStoreMemoryUpdateParams, opts ...option.RequestOption) (res *Memory, err error)
Update Memory
type MemoryStoreMemoryUpdateParams ¶
type MemoryStoreMemoryUpdateParams struct {
// New content as UTF-8 plain text; at most 100 KiB of raw bytes.
Content string `json:"content" api:"required"`
// Expected SHA-256 of the current content, for optimistic concurrency control.
// Returns `409` when it does not match.
ContentSHA256 param.Opt[string] `json:"content_sha256,omitzero"`
// New metadata, which **replaces** the current metadata wholesale rather than
// merging into it. Omit to leave the existing metadata unchanged.
Metadata map[string]any `json:"metadata,omitzero"`
// contains filtered or unexported fields
}
func (MemoryStoreMemoryUpdateParams) MarshalJSON ¶
func (r MemoryStoreMemoryUpdateParams) MarshalJSON() ([]byte, error)
func (*MemoryStoreMemoryUpdateParams) UnmarshalJSON ¶
func (r *MemoryStoreMemoryUpdateParams) UnmarshalJSON(data []byte) error
type MemoryStoreMemoryVersionListParams ¶
type MemoryStoreMemoryVersionListParams struct {
// Maximum number of entries per page, 1..100, default 20.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the previous page; mutually exclusive with `after_id`.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// Cursor for the next page; mutually exclusive with `before_id`.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Return only versions of this memory (`mem_...`), to inspect the change history of
// a single entry.
MemoryID param.Opt[string] `query:"memory_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type MemoryStoreMemoryVersionService ¶
type MemoryStoreMemoryVersionService struct {
Options []option.RequestOption
}
MemoryStoreMemoryVersionService provides Forward MemoryStoreMemoryVersion operations.
func NewMemoryStoreMemoryVersionService ¶
func NewMemoryStoreMemoryVersionService(opts ...option.RequestOption) MemoryStoreMemoryVersionService
func (*MemoryStoreMemoryVersionService) Get ¶
func (r *MemoryStoreMemoryVersionService) Get(ctx context.Context, memoryStoreID string, memoryVersionID string, opts ...option.RequestOption) (res *MemoryVersion, err error)
Get Memory version
func (*MemoryStoreMemoryVersionService) List ¶
func (r *MemoryStoreMemoryVersionService) List(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryVersionListParams, opts ...option.RequestOption) (res *pagination.Page[MemoryVersion], err error)
List Memory versions
func (*MemoryStoreMemoryVersionService) ListAutoPaging ¶
func (r *MemoryStoreMemoryVersionService) ListAutoPaging(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryVersionListParams, opts ...option.RequestOption) *pagination.PageAutoPager[MemoryVersion]
func (*MemoryStoreMemoryVersionService) Redact ¶
func (r *MemoryStoreMemoryVersionService) Redact(ctx context.Context, memoryStoreID string, memoryVersionID string, opts ...option.RequestOption) (res *MemoryVersion, err error)
Redact Memory version
type MemoryStoreMount ¶
type MemoryStoreMount struct {
MemoryStoreID string `json:"memory_store_id"`
IdentityID string `json:"identity_id"`
TemplateID string `json:"template_id"`
Access string `json:"access"`
SystemManaged bool `json:"system_managed"`
Name string `json:"name"`
Status string `json:"status"`
EntryCount int64 `json:"entry_count"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
JSON struct {
MemoryStoreID respjson.Field
IdentityID respjson.Field
TemplateID respjson.Field
Access respjson.Field
SystemManaged respjson.Field
Name respjson.Field
Status respjson.Field
EntryCount respjson.Field
CreatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MemoryStoreMount) RawJSON ¶
func (r MemoryStoreMount) RawJSON() string
func (*MemoryStoreMount) UnmarshalJSON ¶
func (r *MemoryStoreMount) UnmarshalJSON(data []byte) error
type MemoryStoreNewParams ¶
type MemoryStoreNewParams struct {
// Establish this mount before returning. Retry with the same key and body to resume creation.
Mount MemoryStoreNewParamsMount `json:"mount,omitzero"`
// Display name for the store, non-empty. Non-printable control characters
// (`U+0000`–`U+001F`, `U+007F`) are not allowed, except newline `\n`, carriage return
// `\r` and tab `\t`.
Name string `json:"name" api:"required"`
// Free-text description. Non-printable control characters are not allowed.
Description param.Opt[string] `json:"description,omitzero"`
// Key-value metadata whose values must be strings. At most **15** keys; keys 1..64
// characters; values ≤512 characters. `created_by` is a Forward reserved key that the
// server fills in with `"forward"`; sending `created_by` returns
// `400 invalid_request_error`. See the Store metadata constraints in the MemoryStore
// data structure reference for details.
Metadata map[string]any `json:"metadata,omitzero"`
// Idempotency key for the create request. The same key may only be reused with an
// identical request body; omitting it returns `400`.
IdempotencyKey string `header:"Idempotency-Key,omitzero" json:"-" api:"required"`
// contains filtered or unexported fields
}
func (MemoryStoreNewParams) MarshalJSON ¶
func (r MemoryStoreNewParams) MarshalJSON() ([]byte, error)
func (*MemoryStoreNewParams) UnmarshalJSON ¶
func (r *MemoryStoreNewParams) UnmarshalJSON(data []byte) error
type MemoryStoreNewParamsMount ¶ added in v0.8.0
type MemoryStoreNewParamsMount struct {
IdentityID string `json:"identity_id" api:"required"`
TemplateID string `json:"template_id" api:"required"`
// read_only (default) or read_write.
Access param.Opt[string] `json:"access,omitzero"`
// contains filtered or unexported fields
}
func (MemoryStoreNewParamsMount) MarshalJSON ¶ added in v0.8.0
func (r MemoryStoreNewParamsMount) MarshalJSON() ([]byte, error)
func (*MemoryStoreNewParamsMount) UnmarshalJSON ¶ added in v0.8.0
func (r *MemoryStoreNewParamsMount) UnmarshalJSON(data []byte) error
type MemoryStoreService ¶
type MemoryStoreService struct {
Options []option.RequestOption
Memories MemoryStoreMemoryService
MemoryVersions MemoryStoreMemoryVersionService
}
MemoryStoreService provides Forward MemoryStore operations.
func NewMemoryStoreService ¶
func NewMemoryStoreService(opts ...option.RequestOption) MemoryStoreService
func (*MemoryStoreService) Archive ¶
func (r *MemoryStoreService) Archive(ctx context.Context, memoryStoreID string, opts ...option.RequestOption) (res *MemoryStore, err error)
Archive Memory Store
func (*MemoryStoreService) Delete ¶
func (r *MemoryStoreService) Delete(ctx context.Context, memoryStoreID string, opts ...option.RequestOption) (res *DeletedMemoryStore, err error)
Delete Memory Store
func (*MemoryStoreService) Get ¶
func (r *MemoryStoreService) Get(ctx context.Context, memoryStoreID string, opts ...option.RequestOption) (res *MemoryStore, err error)
Get Memory Store
func (*MemoryStoreService) List ¶
func (r *MemoryStoreService) List(ctx context.Context, params MemoryStoreListParams, opts ...option.RequestOption) (res *pagination.Page[MemoryStore], err error)
List Memory Stores
func (*MemoryStoreService) ListAutoPaging ¶
func (r *MemoryStoreService) ListAutoPaging(ctx context.Context, params MemoryStoreListParams, opts ...option.RequestOption) *pagination.PageAutoPager[MemoryStore]
func (*MemoryStoreService) New ¶
func (r *MemoryStoreService) New(ctx context.Context, params MemoryStoreNewParams, opts ...option.RequestOption) (res *MemoryStore, err error)
Create Memory Store
func (*MemoryStoreService) Update ¶
func (r *MemoryStoreService) Update(ctx context.Context, memoryStoreID string, params MemoryStoreUpdateParams, opts ...option.RequestOption) (res *MemoryStore, err error)
Update Memory Store
type MemoryStoreUpdateParams ¶
type MemoryStoreUpdateParams struct {
// New name. Must be non-empty and free of non-printable control characters when sent.
Name param.Opt[string] `json:"name,omitzero"`
// New description. Must be free of non-printable control characters when sent.
Description param.Opt[string] `json:"description,omitzero"`
// New metadata that **replaces** the current metadata entirely (not a merge). See the
// Store metadata constraints in the MemoryStore data structure reference for details.
Metadata map[string]any `json:"metadata,omitzero"`
// contains filtered or unexported fields
}
func (MemoryStoreUpdateParams) MarshalJSON ¶
func (r MemoryStoreUpdateParams) MarshalJSON() ([]byte, error)
func (*MemoryStoreUpdateParams) UnmarshalJSON ¶
func (r *MemoryStoreUpdateParams) UnmarshalJSON(data []byte) error
type MemoryVersion ¶
type MemoryVersion struct {
ID string `json:"id"`
Type string `json:"type"`
MemoryStoreID string `json:"memory_store_id"`
MemoryID string `json:"memory_id"`
Path string `json:"path"`
ContentSizeBytes int64 `json:"content_size_bytes"`
ContentSHA256 string `json:"content_sha256"`
Operation string `json:"operation"`
Redacted bool `json:"redacted"`
RedactedAt time.Time `json:"redacted_at" api:"nullable" format:"date-time"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
Content json.RawMessage `json:"content"`
JSON struct {
ID respjson.Field
Type respjson.Field
MemoryStoreID respjson.Field
MemoryID respjson.Field
Path respjson.Field
ContentSizeBytes respjson.Field
ContentSHA256 respjson.Field
Operation respjson.Field
Redacted respjson.Field
RedactedAt respjson.Field
CreatedAt respjson.Field
Content respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MemoryVersion) RawJSON ¶
func (r MemoryVersion) RawJSON() string
func (*MemoryVersion) UnmarshalJSON ¶
func (r *MemoryVersion) UnmarshalJSON(data []byte) error
type Model ¶
type Model struct {
ID string `json:"id"`
DisplayName string `json:"display_name"`
IsEnabled bool `json:"is_enabled"`
IsNew bool `json:"is_new"`
IsVl bool `json:"is_vl"`
SupportDisableReasoning bool `json:"support_disable_reasoning"`
PriceFactor float64 `json:"price_factor"`
Efforts []string `json:"efforts"`
DefaultEffort string `json:"default_effort"`
Speed []string `json:"speed"`
MaxInputTokens int64 `json:"max_input_tokens"`
DefaultContextWindow int64 `json:"default_context_window"`
AvailableContextWindows []int64 `json:"available_context_windows"`
JSON struct {
ID respjson.Field
DisplayName respjson.Field
IsEnabled respjson.Field
IsNew respjson.Field
IsVl respjson.Field
SupportDisableReasoning respjson.Field
PriceFactor respjson.Field
Efforts respjson.Field
DefaultEffort respjson.Field
Speed respjson.Field
MaxInputTokens respjson.Field
DefaultContextWindow respjson.Field
AvailableContextWindows respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Model) UnmarshalJSON ¶
type ModelConfig ¶
type ModelConfig struct {
ID string `json:"id"`
Effort string `json:"effort"`
ContextWindow int64 `json:"context_window"`
JSON struct {
ID respjson.Field
Effort respjson.Field
ContextWindow respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ModelConfig preserves either a model ID string or an object from the API. ID is populated for both shapes; RawJSON retains the original representation.
func (ModelConfig) RawJSON ¶
func (r ModelConfig) RawJSON() string
func (*ModelConfig) UnmarshalJSON ¶
func (r *ModelConfig) UnmarshalJSON(data []byte) error
type ModelConfigParam ¶
type ModelConfigParam struct {
ID string `json:"id" api:"required"`
Effort param.Opt[string] `json:"effort,omitzero"`
ContextWindow param.Opt[int64] `json:"context_window,omitzero"`
// contains filtered or unexported fields
}
func (ModelConfigParam) MarshalJSON ¶
func (r ModelConfigParam) MarshalJSON() ([]byte, error)
func (*ModelConfigParam) UnmarshalJSON ¶
func (r *ModelConfigParam) UnmarshalJSON(data []byte) error
type ModelConfigUnionParam ¶
type ModelConfigUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfConfig *ModelConfigParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
ModelConfigUnionParam accepts one of a model ID or model configuration.
func (ModelConfigUnionParam) MarshalJSON ¶
func (r ModelConfigUnionParam) MarshalJSON() ([]byte, error)
func (*ModelConfigUnionParam) UnmarshalJSON ¶
func (r *ModelConfigUnionParam) UnmarshalJSON(data []byte) error
type ModelListResponse ¶
type ModelListResponse struct {
Data []Model `json:"data"`
HasMore bool `json:"has_more"`
JSON struct {
Data respjson.Field
HasMore respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ModelListResponse) RawJSON ¶
func (r ModelListResponse) RawJSON() string
func (*ModelListResponse) UnmarshalJSON ¶
func (r *ModelListResponse) UnmarshalJSON(data []byte) error
type ModelService ¶
type ModelService struct {
Options []option.RequestOption
}
ModelService provides Forward Model operations.
func NewModelService ¶
func NewModelService(opts ...option.RequestOption) ModelService
func (*ModelService) List ¶
func (r *ModelService) List(ctx context.Context, opts ...option.RequestOption) (res *ModelListResponse, err error)
List models
type MultiagentConfig ¶
type MultiagentConfig struct {
Type string `json:"type" api:"required"`
Agents []MultiagentEntry `json:"agents" api:"required"`
JSON struct {
Type respjson.Field
Agents respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MultiagentConfig) RawJSON ¶
func (r MultiagentConfig) RawJSON() string
func (*MultiagentConfig) UnmarshalJSON ¶
func (r *MultiagentConfig) UnmarshalJSON(data []byte) error
type MultiagentConfigParam ¶
type MultiagentConfigParam struct {
Type string `json:"type" api:"required"`
Agents []MultiagentEntryParam `json:"agents" api:"required"`
// contains filtered or unexported fields
}
func (MultiagentConfigParam) MarshalJSON ¶
func (r MultiagentConfigParam) MarshalJSON() ([]byte, error)
func (*MultiagentConfigParam) UnmarshalJSON ¶
func (r *MultiagentConfigParam) UnmarshalJSON(data []byte) error
type MultiagentEntry ¶
type MultiagentEntry struct {
OfString string `json:"-"`
Model string `json:"model"`
Type string `json:"type" api:"required"`
TemplateID string `json:"template_id"`
Name string `json:"name"`
JSON struct {
Model respjson.Field
Type respjson.Field
TemplateID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MultiagentEntry) RawJSON ¶
func (r MultiagentEntry) RawJSON() string
func (*MultiagentEntry) UnmarshalAPIJSON ¶ added in v0.13.0
func (r *MultiagentEntry) UnmarshalAPIJSON(data []byte) error
UnmarshalAPIJSON keeps string roster entries intact when nested in a Template.
func (*MultiagentEntry) UnmarshalJSON ¶
func (r *MultiagentEntry) UnmarshalJSON(data []byte) error
type MultiagentEntryParam ¶
type MultiagentEntryParam struct {
OfString param.Opt[string] `json:"-"`
Model param.Opt[string] `json:"model,omitzero"`
Type string `json:"type" api:"required"`
TemplateID param.Opt[string] `json:"template_id,omitzero"`
Name param.Opt[string] `json:"name,omitzero"`
// contains filtered or unexported fields
}
func (MultiagentEntryParam) MarshalJSON ¶
func (r MultiagentEntryParam) MarshalJSON() ([]byte, error)
func (*MultiagentEntryParam) UnmarshalAPIJSON ¶ added in v0.13.0
func (r *MultiagentEntryParam) UnmarshalAPIJSON(data []byte) error
func (*MultiagentEntryParam) UnmarshalJSON ¶
func (r *MultiagentEntryParam) UnmarshalJSON(data []byte) error
type OutcomeRubric ¶ added in v0.13.0
type OutcomeRubric struct {
Type string `json:"type"`
Content string `json:"content"`
FileID string `json:"file_id"`
JSON struct {
Type respjson.Field
Content respjson.Field
FileID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OutcomeRubric contains the text or file reference used to evaluate an Outcome.
func (OutcomeRubric) RawJSON ¶ added in v0.13.0
func (r OutcomeRubric) RawJSON() string
func (*OutcomeRubric) UnmarshalJSON ¶ added in v0.13.0
func (r *OutcomeRubric) UnmarshalJSON(data []byte) error
type OutcomeRubricParam ¶ added in v0.13.0
type OutcomeRubricParam struct {
Type string `json:"type" api:"required"`
Content param.Opt[string] `json:"content,omitzero"`
FileID param.Opt[string] `json:"file_id,omitzero"`
// contains filtered or unexported fields
}
OutcomeRubricParam defines acceptance criteria as inline text or an uploaded file. Set Type to "text" with Content, or "file" with FileID.
func (OutcomeRubricParam) MarshalJSON ¶ added in v0.13.0
func (r OutcomeRubricParam) MarshalJSON() ([]byte, error)
func (*OutcomeRubricParam) UnmarshalJSON ¶ added in v0.13.0
func (r *OutcomeRubricParam) UnmarshalJSON(data []byte) error
type PermissionPolicy ¶
type PermissionPolicy struct {
Type string `json:"type" api:"required"`
JSON struct {
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PermissionPolicy) RawJSON ¶
func (r PermissionPolicy) RawJSON() string
func (*PermissionPolicy) UnmarshalJSON ¶
func (r *PermissionPolicy) UnmarshalJSON(data []byte) error
type PermissionPolicyParam ¶
type PermissionPolicyParam struct {
Type string `json:"type" api:"required"`
// contains filtered or unexported fields
}
func (PermissionPolicyParam) MarshalJSON ¶
func (r PermissionPolicyParam) MarshalJSON() ([]byte, error)
func (*PermissionPolicyParam) UnmarshalJSON ¶
func (r *PermissionPolicyParam) UnmarshalJSON(data []byte) error
type RealtimeAudioConfig ¶ added in v0.5.0
type RealtimeAudioConfig struct {
Output RealtimeAudioOutputConfig `json:"output"`
}
type RealtimeAudioConfigParam ¶ added in v0.5.0
type RealtimeAudioConfigParam struct {
Output RealtimeAudioOutputConfigParam `json:"output,omitzero"`
// contains filtered or unexported fields
}
func (RealtimeAudioConfigParam) MarshalJSON ¶ added in v0.5.0
func (r RealtimeAudioConfigParam) MarshalJSON() ([]byte, error)
type RealtimeAudioFormat ¶ added in v0.5.0
type RealtimeAudioOutputConfig ¶ added in v0.5.0
type RealtimeAudioOutputConfig struct {
Voice string `json:"voice"`
}
type RealtimeAudioOutputConfigParam ¶ added in v0.5.0
type RealtimeAudioOutputConfigParam struct {
Voice param.Opt[string] `json:"voice,omitzero"`
// contains filtered or unexported fields
}
func (RealtimeAudioOutputConfigParam) MarshalJSON ¶ added in v0.5.0
func (r RealtimeAudioOutputConfigParam) MarshalJSON() ([]byte, error)
type RealtimeAudioPayload ¶ added in v0.5.0
type RealtimeAudioPayload struct {
Audio string `json:"audio"`
}
type RealtimeCapabilities ¶ added in v0.5.0
type RealtimeCapabilities struct {
GracefulClose bool `json:"graceful_close"`
}
type RealtimeClientEvent ¶ added in v0.5.0
type RealtimeClientEvent struct {
Version string `json:"version"`
Type string `json:"type"`
Payload map[string]any `json:"payload"`
}
RealtimeClientEvent is always encoded as a JSON text frame. Use SendEvent for protocol extensions; convenience methods provide validated public events.
type RealtimeClosedPayload ¶ added in v0.5.0
type RealtimeConfig ¶ added in v0.5.0
type RealtimeConfig struct {
Audio RealtimeAudioConfig `json:"audio"`
}
type RealtimeConfigParam ¶ added in v0.5.0
type RealtimeConfigParam struct {
Audio RealtimeAudioConfigParam `json:"audio,omitzero"`
// contains filtered or unexported fields
}
func (RealtimeConfigParam) MarshalJSON ¶ added in v0.5.0
func (r RealtimeConfigParam) MarshalJSON() ([]byte, error)
type RealtimeConnectParams ¶ added in v0.5.0
type RealtimeConnectParams struct {
HandshakeTimeout time.Duration // Default 30s.
ReadyTimeout time.Duration // Default 60s.
SendTimeout time.Duration // Default 30s.
CloseTimeout time.Duration // Default 10s.
QueueCapacity int // Default 256 events.
QueueBytes int64 // Default 4 MiB.
ReadLimit int64 // Default 1 MiB per server message.
}
RealtimeConnectParams controls per-stage timeouts and bounded buffering. Zero values select defaults; negative values are rejected. The caller's ctx spans the connection lifetime, independently of ordinary HTTP timeouts.
type RealtimeConnection ¶ added in v0.5.0
type RealtimeConnection struct {
ConversationID string
RequestID string
Ready RealtimeReadyPayload
// contains filtered or unexported fields
}
RealtimeConnection has one receiver and serializes sends. Ready is immutable after Connect returns. Applications own audio playback and its receipts.
func (*RealtimeConnection) AppendAudio ¶ added in v0.5.0
func (c *RealtimeConnection) AppendAudio(ctx context.Context, pcm []byte) error
AppendAudio sends nonempty 16 kHz mono PCM16 little-endian bytes. It does not resample, decode WAV or send binary WebSocket frames.
func (*RealtimeConnection) Close ¶ added in v0.5.0
func (c *RealtimeConnection) Close() error
Close releases transport resources without confirming history persistence.
func (*RealtimeConnection) CloseGracefully ¶ added in v0.5.0
func (c *RealtimeConnection) CloseGracefully(ctx context.Context) (*RealtimeClosedPayload, error)
CloseGracefully sends a unique close request, waits for matching persistence acknowledgement, then closes the transport. Ordinary Close does not confirm persistence. Repeated successful calls return the same acknowledgement.
func (*RealtimeConnection) Err ¶ added in v0.5.0
func (c *RealtimeConnection) Err() error
Err returns the terminal receive/transport error, if any.
func (*RealtimeConnection) Interrupt ¶ added in v0.5.0
func (c *RealtimeConnection) Interrupt(ctx context.Context) error
func (*RealtimeConnection) Ping ¶ added in v0.5.0
func (c *RealtimeConnection) Ping(ctx context.Context) error
func (*RealtimeConnection) PlaybackCancelled ¶ added in v0.5.0
func (c *RealtimeConnection) PlaybackCancelled(ctx context.Context, r RealtimePlaybackReceipt) error
func (*RealtimeConnection) PlaybackEnded ¶ added in v0.5.0
func (c *RealtimeConnection) PlaybackEnded(ctx context.Context, r RealtimePlaybackReceipt) error
func (*RealtimeConnection) PlaybackStarted ¶ added in v0.5.0
func (c *RealtimeConnection) PlaybackStarted(ctx context.Context, r RealtimePlaybackReceipt) error
func (*RealtimeConnection) Recv ¶ added in v0.5.0
func (c *RealtimeConnection) Recv(ctx context.Context) (RealtimeEvent, error)
Recv preserves receive order and drains buffered events before reporting a terminal error. Cancelling this wait does not close the connection.
func (*RealtimeConnection) SendEvent ¶ added in v0.5.0
func (c *RealtimeConnection) SendEvent(ctx context.Context, event RealtimeClientEvent) error
type RealtimeConversation ¶ added in v0.5.0
type RealtimeConversation struct {
ID string `json:"id"`
Type string `json:"type"`
Status string `json:"status"`
Title *string `json:"title"`
Metadata map[string]any `json:"metadata"`
Config RealtimeConfig `json:"config"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
RealtimeConversation timestamps remain text to preserve the wire precision.
type RealtimeConversationHistoryParams ¶ added in v0.5.0
type RealtimeConversationHistoryParams struct {
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
Before param.Opt[string] `query:"before,omitzero" json:"-"`
// "message", "work", or "message,work"; the default includes both.
Types param.Opt[string] `query:"types,omitzero" json:"-"`
// contains filtered or unexported fields
}
type RealtimeConversationNewParams ¶ added in v0.5.0
type RealtimeConversationNewParams struct {
IdentityID string `json:"identity_id" api:"required"`
TemplateID string `json:"template_id" api:"required"`
Title param.Opt[string] `json:"title,omitzero"`
Metadata map[string]any `json:"metadata,omitzero"`
Config RealtimeConfigParam `json:"config,omitzero"`
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (RealtimeConversationNewParams) MarshalJSON ¶ added in v0.5.0
func (r RealtimeConversationNewParams) MarshalJSON() ([]byte, error)
type RealtimeConversationService ¶ added in v0.5.0
type RealtimeConversationService struct{ Options []option.RequestOption }
RealtimeConversationService creates Realtime Conversations and queries their persisted history. Realtime is Beta; a Template must already have it enabled.
func NewRealtimeConversationService ¶ added in v0.5.0
func NewRealtimeConversationService(opts ...option.RequestOption) RealtimeConversationService
func (*RealtimeConversationService) History ¶ added in v0.5.0
func (r *RealtimeConversationService) History(ctx context.Context, conversationID string, params RealtimeConversationHistoryParams, opts ...option.RequestOption) (res *RealtimeHistoryPage, err error)
History fetches a page of persisted events. Its cursor points towards older history, and is unrelated to WebSocket event IDs or sequence numbers.
func (*RealtimeConversationService) HistoryAutoPaging ¶ added in v0.5.0
func (r *RealtimeConversationService) HistoryAutoPaging(ctx context.Context, conversationID string, params RealtimeConversationHistoryParams, opts ...option.RequestOption) *RealtimeHistoryAutoPager
HistoryAutoPaging iterates persisted history towards older records.
func (*RealtimeConversationService) New ¶ added in v0.5.0
func (r *RealtimeConversationService) New(ctx context.Context, params RealtimeConversationNewParams, opts ...option.RequestOption) (res *RealtimeConversation, err error)
New creates a Conversation. Supply a stable Idempotency-Key for this operation with IdempotencyKey or option.WithHeader; it is required by the service.
type RealtimeErrorPayload ¶ added in v0.5.0
type RealtimeEvent ¶ added in v0.5.0
type RealtimeEvent struct {
Version string `json:"version"`
Type string `json:"type"`
EventID string `json:"event_id"`
Sequence int64 `json:"sequence"`
ConversationID string `json:"conversation_id"`
Timestamp string `json:"timestamp"`
WorkID string `json:"work_id,omitempty"`
AnnouncementID string `json:"announcement_id,omitempty"`
Payload json.RawMessage `json:"payload"`
// contains filtered or unexported fields
}
RealtimeEvent is a server event. Payload and RawJSON preserve Beta extension fields; Timestamp preserves nanosecond precision. Sequence is not a cursor.
func (RealtimeEvent) Audio ¶ added in v0.5.0
func (e RealtimeEvent) Audio() ([]byte, error)
Audio decodes audio.delta PCM16. It does not decode WAV or play audio.
func (RealtimeEvent) DecodePayload ¶ added in v0.5.0
func (e RealtimeEvent) DecodePayload(dst any) error
DecodePayload decodes a known typed payload or an application's extension.
func (RealtimeEvent) RawJSON ¶ added in v0.5.0
func (e RealtimeEvent) RawJSON() string
type RealtimeHistoryAutoPager ¶ added in v0.5.0
type RealtimeHistoryAutoPager struct {
// contains filtered or unexported fields
}
func (*RealtimeHistoryAutoPager) Current ¶ added in v0.5.0
func (p *RealtimeHistoryAutoPager) Current() RealtimeHistoryEvent
func (*RealtimeHistoryAutoPager) Err ¶ added in v0.5.0
func (p *RealtimeHistoryAutoPager) Err() error
func (*RealtimeHistoryAutoPager) Next ¶ added in v0.5.0
func (p *RealtimeHistoryAutoPager) Next() bool
type RealtimeHistoryConversation ¶ added in v0.5.0
type RealtimeHistoryEvent ¶ added in v0.5.0
type RealtimeHistoryEvent struct {
ID string `json:"id"`
Type string `json:"type"`
Status string `json:"status"`
OccurredAt string `json:"occurred_at"`
Role string `json:"role,omitempty"`
Text string `json:"text,omitempty"`
WorkID string `json:"work_id,omitempty"`
Objective string `json:"objective,omitempty"`
Result string `json:"result,omitempty"`
Error *RealtimeWorkError `json:"error,omitempty"`
TurnID string `json:"turn_id,omitempty"`
UserMessageEventID string `json:"user_message_event_id,omitempty"`
AnnouncementID string `json:"announcement_id,omitempty"`
MilestoneType string `json:"milestone_type,omitempty"`
// contains filtered or unexported fields
}
RealtimeHistoryEvent retains unknown fields through RawJSON. ID is a history ID (vevt_*), not an ephemeral WebSocket event_id.
func (RealtimeHistoryEvent) RawJSON ¶ added in v0.5.0
func (e RealtimeHistoryEvent) RawJSON() string
func (*RealtimeHistoryEvent) UnmarshalJSON ¶ added in v0.5.0
func (e *RealtimeHistoryEvent) UnmarshalJSON(b []byte) error
type RealtimeHistoryPage ¶ added in v0.5.0
type RealtimeHistoryPage struct {
Conversation RealtimeHistoryConversation `json:"conversation"`
Events []RealtimeHistoryEvent `json:"events"`
Page RealtimeHistoryPageInfo `json:"page"`
// contains filtered or unexported fields
}
func (*RealtimeHistoryPage) GetNextPage ¶ added in v0.5.0
func (p *RealtimeHistoryPage) GetNextPage(ctx context.Context) (*RealtimeHistoryPage, error)
GetNextPage returns older history, or nil at the end.
func (*RealtimeHistoryPage) HasNextPage ¶ added in v0.5.0
func (p *RealtimeHistoryPage) HasNextPage() bool
type RealtimeHistoryPageInfo ¶ added in v0.5.0
type RealtimePlaybackReceipt ¶ added in v0.5.0
type RealtimeProtocolError ¶ added in v0.5.0
type RealtimeProtocolError struct{ Message string }
func (*RealtimeProtocolError) Error ¶ added in v0.5.0
func (e *RealtimeProtocolError) Error() string
type RealtimeReadyPayload ¶ added in v0.5.0
type RealtimeReadyPayload struct {
Config RealtimeConfig `json:"config"`
Provider string `json:"provider"`
InputAudio RealtimeAudioFormat `json:"input_audio"`
OutputAudio RealtimeAudioFormat `json:"output_audio"`
Capabilities RealtimeCapabilities `json:"capabilities"`
}
type RealtimeReasonPayload ¶ added in v0.5.0
type RealtimeReasonPayload struct {
Reason string `json:"reason"`
}
type RealtimeServerError ¶ added in v0.5.0
type RealtimeServerError struct {
RealtimeErrorPayload
ConversationID string
}
func (*RealtimeServerError) Error ¶ added in v0.5.0
func (e *RealtimeServerError) Error() string
type RealtimeService ¶ added in v0.5.0
type RealtimeService struct {
Options []option.RequestOption
Conversations RealtimeConversationService
}
func NewRealtimeService ¶ added in v0.5.0
func NewRealtimeService(opts ...option.RequestOption) RealtimeService
func (*RealtimeService) Connect ¶ added in v0.5.0
func (r *RealtimeService) Connect(ctx context.Context, conversationID string, params RealtimeConnectParams, opts ...option.RequestOption) (*RealtimeConnection, error)
Connect upgrades once and waits for a validated voice.ready. It never follows redirects or automatically reconnects/replays input. Events received while waiting for ready, including ready itself, remain available through Recv.
type RealtimeStatePayload ¶ added in v0.5.0
type RealtimeStatePayload struct {
State string `json:"state"`
}
type RealtimeTranscriptPayload ¶ added in v0.5.0
type RealtimeTransportError ¶ added in v0.5.0
func (*RealtimeTransportError) Error ¶ added in v0.5.0
func (e *RealtimeTransportError) Error() string
func (*RealtimeTransportError) Unwrap ¶ added in v0.5.0
func (e *RealtimeTransportError) Unwrap() error
type RealtimeWorkAcceptedPayload ¶ added in v0.5.0
type RealtimeWorkCompletedPayload ¶ added in v0.5.0
type RealtimeWorkError ¶ added in v0.5.0
type RealtimeWorkError struct {
Code string `json:"code"`
}
type RealtimeWorkFailedPayload ¶ added in v0.5.0
type RealtimeWorkFailedPayload struct {
Status string `json:"status"`
Error RealtimeWorkError `json:"error"`
EventID string `json:"event_id,omitempty"`
}
type RealtimeWorkMilestonePayload ¶ added in v0.5.0
type RealtimeWorkProgressPayload ¶ added in v0.5.0
type RealtimeWorkRunningPayload ¶ added in v0.5.0
type RealtimeWorkRunningPayload struct {
Status string `json:"status"`
}
type ResourceBinding ¶
type ResourceBinding struct {
Enabled bool `json:"enabled"`
JSON struct {
Enabled respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ResourceBinding) RawJSON ¶
func (r ResourceBinding) RawJSON() string
func (*ResourceBinding) UnmarshalJSON ¶
func (r *ResourceBinding) UnmarshalJSON(data []byte) error
type ResourceBindingParam ¶
type ResourceBindingParam struct {
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// contains filtered or unexported fields
}
func (ResourceBindingParam) MarshalJSON ¶
func (r ResourceBindingParam) MarshalJSON() ([]byte, error)
func (*ResourceBindingParam) UnmarshalJSON ¶
func (r *ResourceBindingParam) UnmarshalJSON(data []byte) error
type ResumableSessionEventStream ¶
type ResumableSessionEventStream struct {
// contains filtered or unexported fields
}
ResumableSessionEventStream is a Session Event stream that reconnects after retryable HTTP, transport, read, and unexpected EOF failures.
func (*ResumableSessionEventStream) Close ¶
func (s *ResumableSessionEventStream) Close() error
func (*ResumableSessionEventStream) Current ¶
func (s *ResumableSessionEventStream) Current() SessionEvent
func (*ResumableSessionEventStream) Err ¶
func (s *ResumableSessionEventStream) Err() error
func (*ResumableSessionEventStream) LastEventID ¶
func (s *ResumableSessionEventStream) LastEventID() string
func (*ResumableSessionEventStream) Next ¶
func (s *ResumableSessionEventStream) Next() bool
type ResumableSessionThreadEventStream ¶ added in v0.14.0
type ResumableSessionThreadEventStream struct {
// contains filtered or unexported fields
}
ResumableSessionThreadEventStream reconnects a single thread's event stream. A thread/session termination or session deletion event ends the stream normally.
func (*ResumableSessionThreadEventStream) Close ¶ added in v0.14.0
func (s *ResumableSessionThreadEventStream) Close() error
func (*ResumableSessionThreadEventStream) Current ¶ added in v0.14.0
func (s *ResumableSessionThreadEventStream) Current() SessionEvent
func (*ResumableSessionThreadEventStream) Err ¶ added in v0.14.0
func (s *ResumableSessionThreadEventStream) Err() error
func (*ResumableSessionThreadEventStream) LastEventID ¶ added in v0.14.0
func (s *ResumableSessionThreadEventStream) LastEventID() string
func (*ResumableSessionThreadEventStream) Next ¶ added in v0.14.0
func (s *ResumableSessionThreadEventStream) Next() bool
type Schedule ¶
type Schedule struct {
Resources []ScheduleFileResource `json:"resources"`
// Authoritative creation method of the Schedule: api or tool.
Source string `json:"source"`
SourceSessionID string `json:"source_session_id" api:"nullable"`
// Server-maintained input version, incremented when initial_events changes.
InitialEventsVersion int64 `json:"initial_events_version"`
ID string `json:"id"`
IdentityID string `json:"identity_id"`
TemplateID string `json:"template_id"`
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status"`
InitialEvents []ScheduleInitialEventsItem `json:"initial_events"`
Execution ScheduleExecution `json:"execution"`
TriggerPolicy ScheduleTriggerPolicy `json:"trigger_policy"`
EnvironmentID string `json:"environment_id"`
Sinks []ScheduleSinksItem `json:"sinks"`
Metadata map[string]any `json:"metadata"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
ArchivedAt time.Time `json:"archived_at" format:"date-time"`
PausedReason SchedulePausedReason `json:"paused_reason"`
JSON struct {
Resources respjson.Field
Source respjson.Field
SourceSessionID respjson.Field
InitialEventsVersion respjson.Field
ID respjson.Field
IdentityID respjson.Field
TemplateID respjson.Field
Name respjson.Field
Description respjson.Field
Status respjson.Field
InitialEvents respjson.Field
Execution respjson.Field
TriggerPolicy respjson.Field
EnvironmentID respjson.Field
Sinks respjson.Field
Metadata respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ArchivedAt respjson.Field
PausedReason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Schedule) UnmarshalJSON ¶
type ScheduleArchiveManyParams ¶
type ScheduleArchiveManyParams struct {
// Archive scope; currently only by_schedule_ids is supported.
Scope string `json:"scope" api:"required"`
// Must contain 1-50 non-empty Schedule IDs after deduplication.
ScheduleIDs []string `json:"schedule_ids" api:"required"`
// Optional idempotency key for requests with side effects; the same owner, path
// and body can be replayed safely.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ScheduleArchiveManyParams) MarshalJSON ¶
func (r ScheduleArchiveManyParams) MarshalJSON() ([]byte, error)
func (*ScheduleArchiveManyParams) UnmarshalJSON ¶
func (r *ScheduleArchiveManyParams) UnmarshalJSON(data []byte) error
type ScheduleArchiveManyResponse ¶
type ScheduleArchiveManyResponse struct {
// Number of Schedules that moved from unarchived to archived in this call;
// targets that were already archived are not counted again.
ArchivedCount int64 `json:"archived_count"`
JSON struct {
ArchivedCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ScheduleArchiveManyResponse) RawJSON ¶
func (r ScheduleArchiveManyResponse) RawJSON() string
func (*ScheduleArchiveManyResponse) UnmarshalJSON ¶
func (r *ScheduleArchiveManyResponse) UnmarshalJSON(data []byte) error
type ScheduleArchiveParams ¶
type ScheduleExecution ¶
type ScheduleExecution struct {
SessionMode string `json:"session_mode"`
MaxConcurrentRuns int64 `json:"max_concurrent_runs"`
MaxAttempts int64 `json:"max_attempts"`
TimeoutMs int64 `json:"timeout_ms"`
JSON struct {
SessionMode respjson.Field
MaxConcurrentRuns respjson.Field
MaxAttempts respjson.Field
TimeoutMs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ScheduleExecution) RawJSON ¶
func (r ScheduleExecution) RawJSON() string
func (*ScheduleExecution) UnmarshalJSON ¶
func (r *ScheduleExecution) UnmarshalJSON(data []byte) error
type ScheduleFileResource ¶ added in v0.13.0
type ScheduleFileResource struct {
Type string `json:"type"`
FileID string `json:"file_id"`
MountPath string `json:"mount_path"`
JSON struct {
Type respjson.Field
FileID respjson.Field
MountPath respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ScheduleFileResource) RawJSON ¶ added in v0.13.0
func (r ScheduleFileResource) RawJSON() string
func (*ScheduleFileResource) UnmarshalJSON ¶ added in v0.13.0
func (r *ScheduleFileResource) UnmarshalJSON(data []byte) error
type ScheduleFileResourceParam ¶ added in v0.13.0
type ScheduleFileResourceParam struct {
Type string `json:"type" api:"required"`
FileID string `json:"file_id" api:"required"`
MountPath param.Opt[string] `json:"mount_path,omitzero"`
// contains filtered or unexported fields
}
ScheduleFileResourceParam attaches a Forward file to each Schedule run.
func (ScheduleFileResourceParam) MarshalJSON ¶ added in v0.13.0
func (r ScheduleFileResourceParam) MarshalJSON() ([]byte, error)
func (*ScheduleFileResourceParam) UnmarshalJSON ¶ added in v0.13.0
func (r *ScheduleFileResourceParam) UnmarshalJSON(data []byte) error
type ScheduleInitialEventsItem ¶
type ScheduleInitialEventsItem struct {
Type string `json:"type"`
Content string `json:"content"`
JSON struct {
Type respjson.Field
Content respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ScheduleInitialEventsItem) RawJSON ¶
func (r ScheduleInitialEventsItem) RawJSON() string
func (*ScheduleInitialEventsItem) UnmarshalJSON ¶
func (r *ScheduleInitialEventsItem) UnmarshalJSON(data []byte) error
type ScheduleListParams ¶
type ScheduleListParams struct {
// Optional for a PAT or an admin SAT; when omitted, all Identities of the
// current owner are queried. An Identity-bound SAT binds to itself when this is
// omitted, and returns 403 if another Identity is passed explicitly.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Filter by Forward Template ID.
TemplateID param.Opt[string] `query:"template_id,omitzero" json:"-"`
// Filter by `active` or `paused`.
Status param.Opt[string] `query:"status,omitzero" json:"-"`
// Whether to include archived Schedules.
IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
// Page size, maximum 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the next page.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// Sort field: `created_at` or `upcoming_runs_at`.
SortBy param.Opt[string] `query:"sort_by,omitzero" json:"-"`
// Sort direction: `asc` or `desc`.
Order param.Opt[string] `query:"order,omitzero" json:"-"`
// contains filtered or unexported fields
}
type ScheduleNewParams ¶
type ScheduleNewParams struct {
Resources []ScheduleFileResourceParam `json:"resources,omitzero"`
// Forward Identity ID the Schedule belongs to.
IdentityID string `json:"identity_id" api:"required"`
// Forward Template ID to execute.
TemplateID string `json:"template_id" api:"required"`
// Schedule name.
Name string `json:"name" api:"required"`
// Schedule description.
Description param.Opt[string] `json:"description,omitzero"`
// Initial events injected on every run; currently `user.message` is supported.
InitialEvents []map[string]any `json:"initial_events" api:"required"`
// Execution policy; server-side defaults apply when omitted.
Execution map[string]any `json:"execution,omitzero"`
// Trigger policy; treated as `manual` when omitted or `null`.
TriggerPolicy map[string]any `json:"trigger_policy,omitzero" api:"nullable"`
// Environment used for execution.
EnvironmentID string `json:"environment_id" api:"required"`
// Destinations the run result is pushed to; kept as an array for compatibility,
// currently at most one element is allowed.
Sinks []map[string]any `json:"sinks,omitzero" api:"nullable"`
// Business metadata, used only for labeling or pass-through.
Metadata map[string]any `json:"metadata,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ScheduleNewParams) MarshalJSON ¶
func (r ScheduleNewParams) MarshalJSON() ([]byte, error)
func (*ScheduleNewParams) UnmarshalJSON ¶
func (r *ScheduleNewParams) UnmarshalJSON(data []byte) error
type SchedulePauseParams ¶
type SchedulePausedReason ¶
type SchedulePausedReason struct {
Type string `json:"type"`
JSON struct {
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SchedulePausedReason) RawJSON ¶
func (r SchedulePausedReason) RawJSON() string
func (*SchedulePausedReason) UnmarshalJSON ¶
func (r *SchedulePausedReason) UnmarshalJSON(data []byte) error
type ScheduleRun ¶
type ScheduleRun struct {
InitialEvents []SessionEvent `json:"initial_events"`
// Authoritative creation method of the Schedule: api or tool.
Source string `json:"source"`
SourceSessionID string `json:"source_session_id" api:"nullable"`
// Server-selected input version; a missing Run version is unknown.
InitialEventsVersion int64 `json:"initial_events_version"`
// Schedule Run ID.
ID string `json:"id"`
// ID of the owning Schedule.
ScheduleID string `json:"schedule_id"`
// Forward Identity ID.
IdentityID string `json:"identity_id"`
// Forward Template ID.
TemplateID string `json:"template_id"`
// null|Session created or reused by this run.
SessionID string `json:"session_id"`
// `pending`, `running`, `completed`, `failed` or `skipped`.
Status string `json:"status"`
// Trigger source.
TriggerContext ScheduleRunTriggerContext `json:"trigger_context"`
// null|Text result of the main flow.
ResultPayload string `json:"result_payload"`
// null|Sink type used for this IM delivery; `null` when no delivery is configured.
PushSink string `json:"push_sink"`
// IM delivery status: `pending`, `succeeded`, `failed` or `skipped`. The main flow
// status and the delivery status are independent.
PushStatus string `json:"push_status"`
// null|Time the IM delivery finished.
PushFinishedAt time.Time `json:"push_finished_at" format:"date-time"`
// Current or final attempt number, starting at `1`; may return `2` when the Schedule sets
// `execution.max_attempts=2` and the server has performed an automatic retry.
Attempt int64 `json:"attempt"`
// Trigger time.
TriggeredAt time.Time `json:"triggered_at" format:"date-time"`
// null|Time execution started.
StartedAt time.Time `json:"started_at" format:"date-time"`
// null|Completion time.
CompletedAt time.Time `json:"completed_at" format:"date-time"`
// null|Execution duration in milliseconds.
DurationMs int64 `json:"duration_ms"`
// Record creation time.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// null|Structured error when the Run failed or was skipped.
Error map[string]any `json:"error"`
// null|Human-readable error message; structured details stay in `error`.
ErrorMessage string `json:"error_message"`
JSON struct {
InitialEvents respjson.Field
Source respjson.Field
SourceSessionID respjson.Field
InitialEventsVersion respjson.Field
ID respjson.Field
ScheduleID respjson.Field
IdentityID respjson.Field
TemplateID respjson.Field
SessionID respjson.Field
Status respjson.Field
TriggerContext respjson.Field
ResultPayload respjson.Field
PushSink respjson.Field
PushStatus respjson.Field
PushFinishedAt respjson.Field
Attempt respjson.Field
TriggeredAt respjson.Field
StartedAt respjson.Field
CompletedAt respjson.Field
DurationMs respjson.Field
CreatedAt respjson.Field
Error respjson.Field
ErrorMessage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ScheduleRun) RawJSON ¶
func (r ScheduleRun) RawJSON() string
func (*ScheduleRun) UnmarshalJSON ¶
func (r *ScheduleRun) UnmarshalJSON(data []byte) error
type ScheduleRunGetParams ¶
type ScheduleRunListParams ¶
type ScheduleRunListParams struct {
// Forward Identity ID that owns the Run.
IdentityID string `query:"identity_id,omitzero" json:"-" api:"required"`
// Filter by Schedule ID.
ScheduleID param.Opt[string] `query:"schedule_id,omitzero" json:"-"`
// Filter by `pending`, `running`, `completed`, `failed` or `skipped`.
Status param.Opt[string] `query:"status,omitzero" json:"-"`
// Filter by `schedule` or `manual`.
TriggerType param.Opt[string] `query:"trigger_type,omitzero" json:"-"`
// Whether to return only Runs with or without an error.
HasError param.Opt[bool] `query:"has_error,omitzero" json:"-"`
// Page size, up to 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the next page.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// Sort field: `created_at` or `triggered_at`.
SortBy param.Opt[string] `query:"sort_by,omitzero" json:"-"`
// Sort direction: `asc` or `desc`.
Order param.Opt[string] `query:"order,omitzero" json:"-"`
// contains filtered or unexported fields
}
type ScheduleRunParams ¶
type ScheduleRunService ¶
type ScheduleRunService struct {
Options []option.RequestOption
}
ScheduleRunService provides Forward ScheduleRun operations.
func NewScheduleRunService ¶
func NewScheduleRunService(opts ...option.RequestOption) ScheduleRunService
func (*ScheduleRunService) Get ¶
func (r *ScheduleRunService) Get(ctx context.Context, runID string, params ScheduleRunGetParams, opts ...option.RequestOption) (res *ScheduleRun, err error)
Get Schedule Run
func (*ScheduleRunService) List ¶
func (r *ScheduleRunService) List(ctx context.Context, params ScheduleRunListParams, opts ...option.RequestOption) (res *pagination.Page[ScheduleRun], err error)
List Schedule Runs
func (*ScheduleRunService) ListAutoPaging ¶
func (r *ScheduleRunService) ListAutoPaging(ctx context.Context, params ScheduleRunListParams, opts ...option.RequestOption) *pagination.PageAutoPager[ScheduleRun]
type ScheduleRunTriggerContext ¶
type ScheduleRunTriggerContext struct {
Type string `json:"type"`
ScheduledAt time.Time `json:"scheduled_at" format:"date-time"`
JSON struct {
Type respjson.Field
ScheduledAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ScheduleRunTriggerContext) RawJSON ¶
func (r ScheduleRunTriggerContext) RawJSON() string
func (*ScheduleRunTriggerContext) UnmarshalJSON ¶
func (r *ScheduleRunTriggerContext) UnmarshalJSON(data []byte) error
type ScheduleService ¶
type ScheduleService struct {
Options []option.RequestOption
}
ScheduleService provides Forward Schedule operations.
func NewScheduleService ¶
func NewScheduleService(opts ...option.RequestOption) ScheduleService
func (*ScheduleService) Archive ¶
func (r *ScheduleService) Archive(ctx context.Context, scheduleID string, params ScheduleArchiveParams, opts ...option.RequestOption) (res *Schedule, err error)
Archive Schedule
func (*ScheduleService) ArchiveMany ¶
func (r *ScheduleService) ArchiveMany(ctx context.Context, params ScheduleArchiveManyParams, opts ...option.RequestOption) (res *ScheduleArchiveManyResponse, err error)
Archive Schedules in bulk
func (*ScheduleService) Get ¶
func (r *ScheduleService) Get(ctx context.Context, scheduleID string, opts ...option.RequestOption) (res *Schedule, err error)
Get Schedule
func (*ScheduleService) List ¶
func (r *ScheduleService) List(ctx context.Context, params ScheduleListParams, opts ...option.RequestOption) (res *pagination.Page[Schedule], err error)
List Schedules
func (*ScheduleService) ListAutoPaging ¶
func (r *ScheduleService) ListAutoPaging(ctx context.Context, params ScheduleListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Schedule]
func (*ScheduleService) New ¶
func (r *ScheduleService) New(ctx context.Context, params ScheduleNewParams, opts ...option.RequestOption) (res *Schedule, err error)
Create Schedule
func (*ScheduleService) Pause ¶
func (r *ScheduleService) Pause(ctx context.Context, scheduleID string, params SchedulePauseParams, opts ...option.RequestOption) (res *Schedule, err error)
Pause Schedule
func (*ScheduleService) Run ¶
func (r *ScheduleService) Run(ctx context.Context, scheduleID string, params ScheduleRunParams, opts ...option.RequestOption) (res *ScheduleRun, err error)
Run Schedule
func (*ScheduleService) Unpause ¶
func (r *ScheduleService) Unpause(ctx context.Context, scheduleID string, params ScheduleUnpauseParams, opts ...option.RequestOption) (res *Schedule, err error)
Unpause Schedule
func (*ScheduleService) Update ¶
func (r *ScheduleService) Update(ctx context.Context, scheduleID string, params ScheduleUpdateParams, opts ...option.RequestOption) (res *Schedule, err error)
Update Schedule
type ScheduleSinksItem ¶
type ScheduleSinksItem struct {
Type string `json:"type"`
ChannelID string `json:"channel_id"`
Target ScheduleSinksItemTarget `json:"target"`
JSON struct {
Type respjson.Field
ChannelID respjson.Field
Target respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ScheduleSinksItem) RawJSON ¶
func (r ScheduleSinksItem) RawJSON() string
func (*ScheduleSinksItem) UnmarshalJSON ¶
func (r *ScheduleSinksItem) UnmarshalJSON(data []byte) error
type ScheduleSinksItemTarget ¶
type ScheduleSinksItemTarget struct {
Type string `json:"type"`
ExternalID string `json:"external_id"`
JSON struct {
Type respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ScheduleSinksItemTarget) RawJSON ¶
func (r ScheduleSinksItemTarget) RawJSON() string
func (*ScheduleSinksItemTarget) UnmarshalJSON ¶
func (r *ScheduleSinksItemTarget) UnmarshalJSON(data []byte) error
type ScheduleTriggerPolicy ¶
type ScheduleTriggerPolicy struct {
StartAt time.Time `json:"start_at" format:"date-time"`
StopAt time.Time `json:"stop_at" format:"date-time"`
LastRunAt time.Time `json:"last_run_at" api:"nullable" format:"date-time"`
Type string `json:"type"`
Expression string `json:"expression"`
Timezone string `json:"timezone"`
UpcomingRunsAt []time.Time `json:"upcoming_runs_at"`
JSON struct {
StartAt respjson.Field
StopAt respjson.Field
LastRunAt respjson.Field
Type respjson.Field
Expression respjson.Field
Timezone respjson.Field
UpcomingRunsAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ScheduleTriggerPolicy) RawJSON ¶
func (r ScheduleTriggerPolicy) RawJSON() string
func (*ScheduleTriggerPolicy) UnmarshalJSON ¶
func (r *ScheduleTriggerPolicy) UnmarshalJSON(data []byte) error
type ScheduleUnpauseParams ¶
type ScheduleUpdateParams ¶
type ScheduleUpdateParams struct {
Resources []ScheduleFileResourceParam `json:"resources,omitzero"`
// New Schedule name.
Name param.Opt[string] `json:"name,omitzero"`
// New Schedule description.
Description param.Opt[string] `json:"description,omitzero"`
// New Forward Template ID.
TemplateID param.Opt[string] `json:"template_id,omitzero"`
// Replaces the initial event list.
InitialEvents []map[string]any `json:"initial_events,omitzero"`
// Merges updates into the execution policy.
Execution map[string]any `json:"execution,omitzero"`
// Updates the trigger policy; `null` switches it to manual.
TriggerPolicy map[string]any `json:"trigger_policy,omitzero" api:"nullable"`
// New Environment used for execution.
EnvironmentID param.Opt[string] `json:"environment_id,omitzero"`
// Destinations the run result is pushed to; kept as an array for compatibility,
// currently at most one element is allowed.
Sinks []map[string]any `json:"sinks,omitzero" api:"nullable"`
// Merges updates into metadata; a `null` value deletes the key.
Metadata map[string]any `json:"metadata,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ScheduleUpdateParams) MarshalJSON ¶
func (r ScheduleUpdateParams) MarshalJSON() ([]byte, error)
func (*ScheduleUpdateParams) UnmarshalJSON ¶
func (r *ScheduleUpdateParams) UnmarshalJSON(data []byte) error
type ServiceAccountToken ¶ added in v0.5.0
type ServiceAccountToken struct {
Type string `json:"type"`
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
ExpiresIn int64 `json:"expires_in"`
ExpiresAt time.Time `json:"expires_at" format:"date-time"`
AuthTokenID string `json:"auth_token_id"`
ServiceAccountID string `json:"service_account_id"`
CredentialID string `json:"credential_id"`
// admin or identity. IdentityID is absent for admin tokens.
SubjectType string `json:"subject_type"`
IdentityID string `json:"identity_id"`
JSON struct {
Type respjson.Field
AccessToken respjson.Field
TokenType respjson.Field
ExpiresIn respjson.Field
ExpiresAt respjson.Field
AuthTokenID respjson.Field
ServiceAccountID respjson.Field
CredentialID respjson.Field
SubjectType respjson.Field
IdentityID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ServiceAccountToken contains a newly issued Forward SAT. Treat AccessToken and RawJSON as secrets. Use WithAuthMode("sa") and WithAuthToken(AccessToken) for business calls; renewal is caller-owned.
func (ServiceAccountToken) GoString ¶ added in v0.5.0
func (r ServiceAccountToken) GoString() string
func (ServiceAccountToken) RawJSON ¶ added in v0.5.0
func (r ServiceAccountToken) RawJSON() string
func (ServiceAccountToken) String ¶ added in v0.5.0
func (r ServiceAccountToken) String() string
func (*ServiceAccountToken) UnmarshalJSON ¶ added in v0.5.0
func (r *ServiceAccountToken) UnmarshalJSON(data []byte) error
type ServiceAccountTokenNewParams ¶ added in v0.5.0
type ServiceAccountTokenNewParams struct {
// SA Key used only in this request's Authorization header; never serialized as JSON.
SAKey string `json:"-"`
// Lifetime in seconds, 1-43200. Omit to use the issuer's default.
TTLSeconds param.Opt[int64] `json:"ttl_seconds,omitzero"`
// Business audit metadata; do not include credentials or other secrets.
Metadata map[string]any `json:"metadata,omitzero"`
// contains filtered or unexported fields
}
func (ServiceAccountTokenNewParams) GoString ¶ added in v0.5.0
func (r ServiceAccountTokenNewParams) GoString() string
func (ServiceAccountTokenNewParams) MarshalJSON ¶ added in v0.5.0
func (r ServiceAccountTokenNewParams) MarshalJSON() ([]byte, error)
func (ServiceAccountTokenNewParams) String ¶ added in v0.5.0
func (r ServiceAccountTokenNewParams) String() string
func (*ServiceAccountTokenNewParams) UnmarshalJSON ¶ added in v0.5.0
func (r *ServiceAccountTokenNewParams) UnmarshalJSON(data []byte) error
type ServiceAccountTokenRevokeParams ¶ added in v0.5.0
type ServiceAccountTokenRevokeParams struct {
SAKey string `json:"-"`
TargetCredentialID param.Opt[string] `json:"target_credential_id,omitzero"`
TargetExpiresAt param.Opt[time.Time] `json:"target_expires_at,omitzero" format:"date-time"`
Reason param.Opt[string] `json:"reason,omitzero"`
// contains filtered or unexported fields
}
func (ServiceAccountTokenRevokeParams) GoString ¶ added in v0.5.0
func (r ServiceAccountTokenRevokeParams) GoString() string
func (ServiceAccountTokenRevokeParams) MarshalJSON ¶ added in v0.5.0
func (r ServiceAccountTokenRevokeParams) MarshalJSON() ([]byte, error)
func (ServiceAccountTokenRevokeParams) String ¶ added in v0.5.0
func (r ServiceAccountTokenRevokeParams) String() string
func (*ServiceAccountTokenRevokeParams) UnmarshalJSON ¶ added in v0.5.0
func (r *ServiceAccountTokenRevokeParams) UnmarshalJSON(data []byte) error
type ServiceAccountTokenRevokeResponse ¶ added in v0.5.0
type ServiceAccountTokenRevokeResponse struct {
Revoked bool `json:"revoked"`
JSON struct {
Revoked respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ServiceAccountTokenRevokeResponse) RawJSON ¶ added in v0.5.0
func (r ServiceAccountTokenRevokeResponse) RawJSON() string
func (*ServiceAccountTokenRevokeResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *ServiceAccountTokenRevokeResponse) UnmarshalJSON(data []byte) error
type ServiceAccountTokenService ¶ added in v0.5.0
type ServiceAccountTokenService struct {
Options []option.RequestOption
}
ServiceAccountTokenService issues admin SATs and revokes Forward SAT bindings. These methods require a per-call SA Key, rather than the client's PAT or SAT.
func NewServiceAccountTokenService ¶ added in v0.5.0
func NewServiceAccountTokenService(opts ...option.RequestOption) ServiceAccountTokenService
func (*ServiceAccountTokenService) New ¶ added in v0.5.0
func (r *ServiceAccountTokenService) New(ctx context.Context, params ServiceAccountTokenNewParams, opts ...option.RequestOption) (res *ServiceAccountToken, err error)
New issues an admin SAT. Automatic retries are disabled to avoid duplicate issuance.
func (*ServiceAccountTokenService) Revoke ¶ added in v0.5.0
func (r *ServiceAccountTokenService) Revoke(ctx context.Context, authTokenID string, params ServiceAccountTokenRevokeParams, opts ...option.RequestOption) (res *ServiceAccountTokenRevokeResponse, err error)
Revoke revokes a Forward SAT binding belonging to the same Service Account. Use the issuance response's CredentialID and ExpiresAt to disambiguate the target.
type Session ¶
type Session struct {
OutcomeEvaluations []SessionOutcomeEvaluation `json:"outcome_evaluations"`
// Session ID.
ID string `json:"id"`
// Always `session`.
Type string `json:"type"`
// Forward Identity ID.
IdentityID string `json:"identity_id"`
// Template summary.
Template SessionTemplate `json:"template"`
// Session source; `api` when created directly through the API.
SourceType string `json:"source_type"`
// `idle`, `running`, `rescheduling`, `canceling` or `terminated`.
Status string `json:"status"`
Title string `json:"title"`
Metadata map[string]any `json:"metadata"`
Config SessionConfig `json:"config"`
Resources []SessionResource `json:"resources"`
Stats SessionStats `json:"stats"`
Usage SessionUsage `json:"usage"`
ArchivedAt time.Time `json:"archived_at" api:"nullable" format:"date-time"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON struct {
OutcomeEvaluations respjson.Field
ID respjson.Field
Type respjson.Field
IdentityID respjson.Field
Template respjson.Field
SourceType respjson.Field
Status respjson.Field
Title respjson.Field
Metadata respjson.Field
Config respjson.Field
Resources respjson.Field
Stats respjson.Field
Usage respjson.Field
ArchivedAt respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Session) UnmarshalJSON ¶
type SessionArchiveParams ¶
type SessionCancelParams ¶
type SessionConfig ¶
type SessionConfig struct {
EnvironmentVariables map[string]string `json:"environment_variables"`
JSON struct {
EnvironmentVariables respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionConfig) RawJSON ¶
func (r SessionConfig) RawJSON() string
func (*SessionConfig) UnmarshalJSON ¶
func (r *SessionConfig) UnmarshalJSON(data []byte) error
type SessionEvent ¶
type SessionEvent struct {
ID string `json:"id"`
Type string `json:"type"`
SessionID string `json:"session_id"`
Content json.RawMessage `json:"content"`
ProcessedAt time.Time `json:"processed_at" format:"date-time"`
SessionThreadID string `json:"session_thread_id"`
Thinking string `json:"thinking"`
Text string `json:"text"`
ToolUseID string `json:"tool_use_id"`
CustomToolUseID string `json:"custom_tool_use_id"`
MCPToolUseID string `json:"mcp_tool_use_id"`
Name string `json:"name"`
MCPServerName string `json:"mcp_server_name"`
Input map[string]any `json:"input"`
IsError bool `json:"is_error"`
Result string `json:"result"`
DenyMessage string `json:"deny_message"`
Description string `json:"description"`
Rubric OutcomeRubric `json:"rubric"`
OutcomeID string `json:"outcome_id"`
MaxIterations int64 `json:"max_iterations"`
MessageID string `json:"message_id"`
Message json.RawMessage `json:"message"`
Index int64 `json:"index"`
ContentBlock json.RawMessage `json:"content_block"`
Delta json.RawMessage `json:"delta"`
Event json.RawMessage `json:"event"`
EventID string `json:"event_id"`
Usage map[string]any `json:"usage"`
StopReason map[string]any `json:"stop_reason"`
Error map[string]any `json:"error"`
EvaluatedPermission map[string]any `json:"evaluated_permission"`
FileID string `json:"file_id"`
OriginalFilename string `json:"original_filename"`
Size int64 `json:"size"`
ContentType string `json:"content_type"`
Agent map[string]any `json:"agent"`
Metadata map[string]any `json:"metadata"`
Title string `json:"title"`
ModelRequestStartID string `json:"model_request_start_id"`
ModelUsage map[string]any `json:"model_usage"`
JSON struct {
ID respjson.Field
Type respjson.Field
SessionID respjson.Field
Content respjson.Field
ProcessedAt respjson.Field
SessionThreadID respjson.Field
Thinking respjson.Field
Text respjson.Field
ToolUseID respjson.Field
CustomToolUseID respjson.Field
MCPToolUseID respjson.Field
Name respjson.Field
MCPServerName respjson.Field
Input respjson.Field
IsError respjson.Field
Result respjson.Field
DenyMessage respjson.Field
Description respjson.Field
Rubric respjson.Field
OutcomeID respjson.Field
MaxIterations respjson.Field
MessageID respjson.Field
Message respjson.Field
Index respjson.Field
ContentBlock respjson.Field
Delta respjson.Field
Event respjson.Field
EventID respjson.Field
Usage respjson.Field
StopReason respjson.Field
Error respjson.Field
EvaluatedPermission respjson.Field
FileID respjson.Field
OriginalFilename respjson.Field
Size respjson.Field
ContentType respjson.Field
Agent respjson.Field
Metadata respjson.Field
Title respjson.Field
ModelRequestStartID respjson.Field
ModelUsage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionEvent) ContentBlocks ¶
func (r SessionEvent) ContentBlocks() ([]ContentBlock, error)
ContentBlocks decodes block content; non-block event payloads remain in Content and RawJSON.
func (SessionEvent) RawJSON ¶
func (r SessionEvent) RawJSON() string
func (*SessionEvent) UnmarshalJSON ¶
func (r *SessionEvent) UnmarshalJSON(data []byte) error
type SessionEventListParams ¶
type SessionEventListParams struct {
// Page size, maximum 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Return events after this Event ID.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Return events before this Event ID.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// Sort direction: `asc` or `desc`.
Order param.Opt[string] `query:"order,omitzero" json:"-"`
// Filter by Event type; accepts a comma-separated list.
Type param.Opt[string] `query:"type,omitzero" json:"-"`
// Event type filter in array form.
Types []string `query:"types[],omitzero" json:"-"`
// Whether to include tool call events.
IncludeToolCalls param.Opt[bool] `query:"include_tool_calls,omitzero" json:"-"`
// Whether to include thinking events.
IncludeThinking param.Opt[bool] `query:"include_thinking,omitzero" json:"-"`
// contains filtered or unexported fields
}
type SessionEventParam ¶
type SessionEventParam struct {
Type string `json:"type" api:"required"`
Content EventContentUnionParam `json:"content,omitzero"`
ToolUseID param.Opt[string] `json:"tool_use_id,omitzero"`
CustomToolUseID param.Opt[string] `json:"custom_tool_use_id,omitzero"`
Result param.Opt[string] `json:"result,omitzero"`
DenyMessage param.Opt[string] `json:"deny_message,omitzero"`
IsError param.Opt[bool] `json:"is_error,omitzero"`
Description param.Opt[string] `json:"description,omitzero"`
Rubric OutcomeRubricParam `json:"rubric,omitzero"`
OutcomeID param.Opt[string] `json:"outcome_id,omitzero"`
MaxIterations param.Opt[int64] `json:"max_iterations,omitzero"`
// contains filtered or unexported fields
}
func (SessionEventParam) MarshalJSON ¶
func (r SessionEventParam) MarshalJSON() ([]byte, error)
func (*SessionEventParam) UnmarshalJSON ¶
func (r *SessionEventParam) UnmarshalJSON(data []byte) error
type SessionEventSendParams ¶
type SessionEventSendParams struct {
Events []SessionEventParam `json:"events" api:"required"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SessionEventSendParams) MarshalJSON ¶
func (r SessionEventSendParams) MarshalJSON() ([]byte, error)
func (*SessionEventSendParams) UnmarshalJSON ¶
func (r *SessionEventSendParams) UnmarshalJSON(data []byte) error
type SessionEventSendResponse ¶
type SessionEventSendResponse struct {
Data []SessionEvent `json:"data"`
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionEventSendResponse) RawJSON ¶
func (r SessionEventSendResponse) RawJSON() string
func (*SessionEventSendResponse) UnmarshalJSON ¶
func (r *SessionEventSendResponse) UnmarshalJSON(data []byte) error
type SessionEventService ¶
type SessionEventService struct {
Options []option.RequestOption
}
SessionEventService provides Forward SessionEvent operations.
func NewSessionEventService ¶
func NewSessionEventService(opts ...option.RequestOption) SessionEventService
func (*SessionEventService) List ¶
func (r *SessionEventService) List(ctx context.Context, sessionID string, params SessionEventListParams, opts ...option.RequestOption) (res *pagination.Page[SessionEvent], err error)
List Session Events
func (*SessionEventService) ListAutoPaging ¶
func (r *SessionEventService) ListAutoPaging(ctx context.Context, sessionID string, params SessionEventListParams, opts ...option.RequestOption) *pagination.PageAutoPager[SessionEvent]
func (*SessionEventService) NewResumableStream ¶
func (r *SessionEventService) NewResumableStream(ctx context.Context, sessionID string, params SessionEventStreamParams, opts ...option.RequestOption) *ResumableSessionEventStream
NewResumableStream subscribes to Session Events and reconnects retryable failures with the latest yielded Last-Event-ID cursor.
func (*SessionEventService) Send ¶
func (r *SessionEventService) Send(ctx context.Context, sessionID string, params SessionEventSendParams, opts ...option.RequestOption) (res *SessionEventSendResponse, err error)
Send Session Events
func (*SessionEventService) StreamEvents ¶
func (r *SessionEventService) StreamEvents(ctx context.Context, sessionID string, params SessionEventStreamParams, opts ...option.RequestOption) *ssestream.Stream[SessionEvent]
Subscribe to the Session Event stream
type SessionEventStreamParams ¶
type SessionEventStreamParams struct {
// Subscribe to streaming delta events for the given public event types. May be
// repeated; see the streaming delta events section of the Session & Event data
// structure documentation for the accepted values.
EventDeltas []string `query:"event_deltas[],omitzero" json:"-"`
// Whether to include tool call events.
IncludeToolCalls param.Opt[bool] `query:"include_tool_calls,omitzero" json:"-"`
// Whether to include thinking events.
IncludeThinking param.Opt[bool] `query:"include_thinking,omitzero" json:"-"`
// Resume the subscription after this Event ID.
LastEventID param.Opt[string] `header:"Last-Event-ID,omitzero" json:"-"`
// contains filtered or unexported fields
}
type SessionListParams ¶
type SessionListParams struct {
// Match an exact sess_ ID or search Session titles.
Search param.Opt[string] `query:"search,omitzero" json:"-"`
// Filter by one or more Identity IDs, comma-separated.
IdentityIDs []string `query:"identity_ids,omitzero" json:"-"`
// Filter by Forward Template ID.
TemplateID param.Opt[string] `query:"template_id,omitzero" json:"-"`
// Filter by `api`, `im`, `schedule` or `batch`.
SourceType param.Opt[string] `query:"source_type,omitzero" json:"-"`
// Creation time strictly after this RFC 3339 timestamp.
CreatedAtGt param.Opt[time.Time] `query:"created_at[gt],omitzero" json:"-" format:"date-time"`
// Creation time at or after this RFC 3339 timestamp.
CreatedAtGte param.Opt[time.Time] `query:"created_at[gte],omitzero" json:"-" format:"date-time"`
// Creation time strictly before this RFC 3339 timestamp.
CreatedAtLt param.Opt[time.Time] `query:"created_at[lt],omitzero" json:"-" format:"date-time"`
// Creation time at or before this RFC 3339 timestamp.
CreatedAtLte param.Opt[time.Time] `query:"created_at[lte],omitzero" json:"-" format:"date-time"`
// Update time strictly after this RFC 3339 timestamp.
UpdatedAtGt param.Opt[time.Time] `query:"updated_at[gt],omitzero" json:"-" format:"date-time"`
// Update time at or after this RFC 3339 timestamp.
UpdatedAtGte param.Opt[time.Time] `query:"updated_at[gte],omitzero" json:"-" format:"date-time"`
// Update time strictly before this RFC 3339 timestamp.
UpdatedAtLt param.Opt[time.Time] `query:"updated_at[lt],omitzero" json:"-" format:"date-time"`
// Update time at or before this RFC 3339 timestamp.
UpdatedAtLte param.Opt[time.Time] `query:"updated_at[lte],omitzero" json:"-" format:"date-time"`
// Page size, up to 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the next page; pass the `last_id` from the previous response.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page; pass the `first_id` from the current response.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// Sort direction by creation time: `desc` or `asc`.
Order param.Opt[string] `query:"order,omitzero" json:"-"`
// Whether to include archived Sessions.
IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
// contains filtered or unexported fields
}
type SessionNewParams ¶
type SessionNewParams struct {
// Forward Identity ID.
IdentityID string `json:"identity_id" api:"required"`
// Forward Template ID.
TemplateID string `json:"template_id" api:"required"`
// Session title.
Title param.Opt[string] `json:"title,omitzero"`
// Business metadata.
Metadata map[string]any `json:"metadata,omitzero"`
Config SessionNewParamsConfigParam `json:"config,omitzero"`
Resources []SessionResourceSpecParam `json:"resources,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SessionNewParams) MarshalJSON ¶
func (r SessionNewParams) MarshalJSON() ([]byte, error)
func (*SessionNewParams) UnmarshalJSON ¶
func (r *SessionNewParams) UnmarshalJSON(data []byte) error
type SessionNewParamsConfigParam ¶
type SessionNewParamsConfigParam struct {
EnvironmentVariables map[string]any `json:"environment_variables,omitzero"`
// contains filtered or unexported fields
}
func (SessionNewParamsConfigParam) MarshalJSON ¶
func (r SessionNewParamsConfigParam) MarshalJSON() ([]byte, error)
func (*SessionNewParamsConfigParam) UnmarshalJSON ¶
func (r *SessionNewParamsConfigParam) UnmarshalJSON(data []byte) error
type SessionOutcomeEvaluation ¶ added in v0.8.0
type SessionOutcomeEvaluation struct {
Type string `json:"type"`
OutcomeID string `json:"outcome_id"`
Description string `json:"description"`
Iteration int64 `json:"iteration"`
Result string `json:"result"`
Explanation string `json:"explanation" api:"nullable"`
CompletedAt time.Time `json:"completed_at" api:"nullable" format:"date-time"`
JSON struct {
Type respjson.Field
OutcomeID respjson.Field
Description respjson.Field
Iteration respjson.Field
Result respjson.Field
Explanation respjson.Field
CompletedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionOutcomeEvaluation) RawJSON ¶ added in v0.8.0
func (r SessionOutcomeEvaluation) RawJSON() string
func (*SessionOutcomeEvaluation) UnmarshalJSON ¶ added in v0.8.0
func (r *SessionOutcomeEvaluation) UnmarshalJSON(data []byte) error
type SessionResource ¶
type SessionResource struct {
// Session resource ID, prefixed with `sesr_`.
ID string `json:"id"`
// Resource type, always `file`.
Type string `json:"type"`
// ID of the mounted File.
FileID string `json:"file_id"`
// Actual mount path of the file inside the Agent container.
MountPath string `json:"mount_path"`
// Resource creation time, RFC3339.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Resource update time, RFC3339.
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON struct {
ID respjson.Field
Type respjson.Field
FileID respjson.Field
MountPath respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionResource) RawJSON ¶
func (r SessionResource) RawJSON() string
func (*SessionResource) UnmarshalJSON ¶
func (r *SessionResource) UnmarshalJSON(data []byte) error
type SessionResourceAddParams ¶
type SessionResourceAddParams struct {
// Resource type; must be `file`.
Type string `json:"type" api:"required"`
// File ID returned by the Files API; the file must already be fully uploaded.
FileID string `json:"file_id" api:"required"`
// Mount path inside the Agent container; when omitted, Forward derives one from the
// file name and mounts it at `/data/workspace/<file name>`.
MountPath param.Opt[string] `json:"mount_path,omitzero"`
// contains filtered or unexported fields
}
func (SessionResourceAddParams) MarshalJSON ¶
func (r SessionResourceAddParams) MarshalJSON() ([]byte, error)
func (*SessionResourceAddParams) UnmarshalJSON ¶
func (r *SessionResourceAddParams) UnmarshalJSON(data []byte) error
type SessionResourceService ¶
type SessionResourceService struct {
Options []option.RequestOption
}
SessionResourceService provides Forward SessionResource operations.
func NewSessionResourceService ¶
func NewSessionResourceService(opts ...option.RequestOption) SessionResourceService
func (*SessionResourceService) Add ¶
func (r *SessionResourceService) Add(ctx context.Context, sessionID string, params SessionResourceAddParams, opts ...option.RequestOption) (res *SessionResource, err error)
Add Session resource
type SessionResourceSpec ¶
type SessionResourceSpec struct {
Type string `json:"type" api:"required"`
FileID string `json:"file_id" api:"required"`
MountPath string `json:"mount_path"`
JSON struct {
Type respjson.Field
FileID respjson.Field
MountPath respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionResourceSpec) RawJSON ¶
func (r SessionResourceSpec) RawJSON() string
func (*SessionResourceSpec) UnmarshalJSON ¶
func (r *SessionResourceSpec) UnmarshalJSON(data []byte) error
type SessionResourceSpecParam ¶
type SessionResourceSpecParam struct {
Type string `json:"type" api:"required"`
FileID string `json:"file_id" api:"required"`
MountPath param.Opt[string] `json:"mount_path,omitzero"`
// contains filtered or unexported fields
}
func (SessionResourceSpecParam) MarshalJSON ¶
func (r SessionResourceSpecParam) MarshalJSON() ([]byte, error)
func (*SessionResourceSpecParam) UnmarshalJSON ¶
func (r *SessionResourceSpecParam) UnmarshalJSON(data []byte) error
type SessionService ¶
type SessionService struct {
Options []option.RequestOption
Events SessionEventService
Resources SessionResourceService
Threads SessionThreadService
}
SessionService provides Forward Session operations.
func NewSessionService ¶
func NewSessionService(opts ...option.RequestOption) SessionService
func (*SessionService) Archive ¶
func (r *SessionService) Archive(ctx context.Context, sessionID string, params SessionArchiveParams, opts ...option.RequestOption) (res *Session, err error)
Archive Session
func (*SessionService) Cancel ¶
func (r *SessionService) Cancel(ctx context.Context, sessionID string, params SessionCancelParams, opts ...option.RequestOption) (res *Session, err error)
Cancel the current Turn
func (*SessionService) Get ¶
func (r *SessionService) Get(ctx context.Context, sessionID string, opts ...option.RequestOption) (res *Session, err error)
Get Session
func (*SessionService) List ¶
func (r *SessionService) List(ctx context.Context, params SessionListParams, opts ...option.RequestOption) (res *pagination.Page[Session], err error)
List Sessions
func (*SessionService) ListAutoPaging ¶
func (r *SessionService) ListAutoPaging(ctx context.Context, params SessionListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Session]
func (*SessionService) New ¶
func (r *SessionService) New(ctx context.Context, params SessionNewParams, opts ...option.RequestOption) (res *Session, err error)
Create Session. Adds __qca_sdk_ metadata; conflicting reserved values fail before sending.
func (*SessionService) Update ¶
func (r *SessionService) Update(ctx context.Context, sessionID string, params SessionUpdateParams, opts ...option.RequestOption) (res *Session, err error)
Update Session
type SessionStats ¶
type SessionStats struct {
ActiveSeconds int64 `json:"active_seconds"`
DurationSeconds int64 `json:"duration_seconds"`
JSON struct {
ActiveSeconds respjson.Field
DurationSeconds respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionStats) RawJSON ¶
func (r SessionStats) RawJSON() string
func (*SessionStats) UnmarshalJSON ¶
func (r *SessionStats) UnmarshalJSON(data []byte) error
type SessionTemplate ¶
type SessionTemplate struct {
ID string `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
Model ModelConfig `json:"model"`
Version int64 `json:"version"`
JSON struct {
ID respjson.Field
Type respjson.Field
Name respjson.Field
Model respjson.Field
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionTemplate) RawJSON ¶
func (r SessionTemplate) RawJSON() string
func (*SessionTemplate) UnmarshalJSON ¶
func (r *SessionTemplate) UnmarshalJSON(data []byte) error
type SessionThread ¶
type SessionThread struct {
Stats SessionThreadStats `json:"stats"`
Usage SessionThreadUsage `json:"usage"`
ID string `json:"id"`
Type string `json:"type"`
SessionID string `json:"session_id"`
TemplateID string `json:"template_id"`
Role string `json:"role"`
Status string `json:"status"`
StopReason SessionThreadStopReason `json:"stop_reason"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
ParentThreadID string `json:"parent_thread_id"`
Name string `json:"name"`
CreatedByToolUseID string `json:"created_by_tool_use_id"`
ArchivedAt time.Time `json:"archived_at" format:"date-time"`
JSON struct {
Stats respjson.Field
Usage respjson.Field
ID respjson.Field
Type respjson.Field
SessionID respjson.Field
TemplateID respjson.Field
Role respjson.Field
Status respjson.Field
StopReason respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ParentThreadID respjson.Field
Name respjson.Field
CreatedByToolUseID respjson.Field
ArchivedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionThread) RawJSON ¶
func (r SessionThread) RawJSON() string
func (*SessionThread) UnmarshalJSON ¶
func (r *SessionThread) UnmarshalJSON(data []byte) error
type SessionThreadArchiveParams ¶
type SessionThreadEventListParams ¶
type SessionThreadEventListParams struct {
// Page size, 1–100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Return records after this Event ID.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Return records before this Event ID.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type SessionThreadEventService ¶
type SessionThreadEventService struct {
Options []option.RequestOption
}
SessionThreadEventService provides Forward SessionThreadEvent operations.
func NewSessionThreadEventService ¶
func NewSessionThreadEventService(opts ...option.RequestOption) SessionThreadEventService
func (*SessionThreadEventService) List ¶
func (r *SessionThreadEventService) List(ctx context.Context, sessionID string, threadID string, params SessionThreadEventListParams, opts ...option.RequestOption) (res *pagination.Page[SessionEvent], err error)
List Session Thread Events
func (*SessionThreadEventService) ListAutoPaging ¶
func (r *SessionThreadEventService) ListAutoPaging(ctx context.Context, sessionID string, threadID string, params SessionThreadEventListParams, opts ...option.RequestOption) *pagination.PageAutoPager[SessionEvent]
func (*SessionThreadEventService) NewResumableStream ¶ added in v0.14.0
func (r *SessionThreadEventService) NewResumableStream(ctx context.Context, sessionID string, threadID string, params SessionThreadEventStreamParams, opts ...option.RequestOption) *ResumableSessionThreadEventStream
NewResumableStream subscribes to Thread Events and reconnects retryable failures with the latest yielded Last-Event-ID cursor. Thread idle events do not stop it.
func (*SessionThreadEventService) StreamEvents ¶
func (r *SessionThreadEventService) StreamEvents(ctx context.Context, sessionID string, threadID string, params SessionThreadEventStreamParams, opts ...option.RequestOption) *ssestream.Stream[SessionEvent]
Subscribe to the Session Thread Event stream
type SessionThreadEventStreamParams ¶
type SessionThreadListParams ¶
type SessionThreadListParams struct {
// Page size, 1–100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Return records after this Thread ID.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Return records before this Thread ID.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type SessionThreadService ¶
type SessionThreadService struct {
Options []option.RequestOption
Events SessionThreadEventService
}
SessionThreadService provides Forward SessionThread operations.
func NewSessionThreadService ¶
func NewSessionThreadService(opts ...option.RequestOption) SessionThreadService
func (*SessionThreadService) Archive ¶
func (r *SessionThreadService) Archive(ctx context.Context, sessionID string, threadID string, params SessionThreadArchiveParams, opts ...option.RequestOption) (res *SessionThread, err error)
Archive Session Thread
func (*SessionThreadService) Get ¶
func (r *SessionThreadService) Get(ctx context.Context, sessionID string, threadID string, opts ...option.RequestOption) (res *SessionThread, err error)
Get Session Thread
func (*SessionThreadService) List ¶
func (r *SessionThreadService) List(ctx context.Context, sessionID string, params SessionThreadListParams, opts ...option.RequestOption) (res *pagination.Page[SessionThread], err error)
List Session Threads
func (*SessionThreadService) ListAutoPaging ¶
func (r *SessionThreadService) ListAutoPaging(ctx context.Context, sessionID string, params SessionThreadListParams, opts ...option.RequestOption) *pagination.PageAutoPager[SessionThread]
type SessionThreadStats ¶ added in v0.8.0
type SessionThreadStats struct {
ActiveSeconds int64 `json:"active_seconds"`
DurationSeconds int64 `json:"duration_seconds"`
StartupSeconds int64 `json:"startup_seconds"`
JSON struct {
ActiveSeconds respjson.Field
DurationSeconds respjson.Field
StartupSeconds respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionThreadStats) RawJSON ¶ added in v0.8.0
func (r SessionThreadStats) RawJSON() string
func (*SessionThreadStats) UnmarshalJSON ¶ added in v0.8.0
func (r *SessionThreadStats) UnmarshalJSON(data []byte) error
type SessionThreadStopReason ¶
type SessionThreadStopReason struct {
Type string `json:"type"`
JSON struct {
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionThreadStopReason) RawJSON ¶
func (r SessionThreadStopReason) RawJSON() string
func (*SessionThreadStopReason) UnmarshalJSON ¶
func (r *SessionThreadStopReason) UnmarshalJSON(data []byte) error
type SessionThreadUsage ¶ added in v0.8.0
type SessionThreadUsage struct {
TotalCredits float64 `json:"total_credits"`
JSON struct {
TotalCredits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionThreadUsage) RawJSON ¶ added in v0.8.0
func (r SessionThreadUsage) RawJSON() string
func (*SessionThreadUsage) UnmarshalJSON ¶ added in v0.8.0
func (r *SessionThreadUsage) UnmarshalJSON(data []byte) error
type SessionUpdateParams ¶
type SessionUpdateParams struct {
// New Session title.
Title param.Opt[string] `json:"title,omitzero"`
// Metadata merge patch; supplied keys overwrite existing keys, omitted keys are kept.
Metadata map[string]any `json:"metadata,omitzero"`
Config SessionUpdateParamsConfigParam `json:"config,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SessionUpdateParams) MarshalJSON ¶
func (r SessionUpdateParams) MarshalJSON() ([]byte, error)
func (*SessionUpdateParams) UnmarshalJSON ¶
func (r *SessionUpdateParams) UnmarshalJSON(data []byte) error
type SessionUpdateParamsConfigParam ¶
type SessionUpdateParamsConfigParam struct {
EnvironmentVariables map[string]any `json:"environment_variables,omitzero"`
// contains filtered or unexported fields
}
func (SessionUpdateParamsConfigParam) MarshalJSON ¶
func (r SessionUpdateParamsConfigParam) MarshalJSON() ([]byte, error)
func (*SessionUpdateParamsConfigParam) UnmarshalJSON ¶
func (r *SessionUpdateParamsConfigParam) UnmarshalJSON(data []byte) error
type SessionUsage ¶
type SessionUsage struct {
TotalCredits float64 `json:"total_credits"`
ModelCredits float64 `json:"model_credits"`
SandboxRuntimeCredits float64 `json:"sandbox_runtime_credits"`
JSON struct {
ModelCredits respjson.Field
SandboxRuntimeCredits respjson.Field
TotalCredits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionUsage) RawJSON ¶
func (r SessionUsage) RawJSON() string
func (*SessionUsage) UnmarshalJSON ¶
func (r *SessionUsage) UnmarshalJSON(data []byte) error
type Skill ¶
type Skill struct {
ID string `json:"id"`
Type string `json:"type"`
DisplayTitle string `json:"display_title"`
Description string `json:"description"`
Source string `json:"source"`
LatestVersion string `json:"latest_version"`
Metadata map[string]any `json:"metadata"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
IdentityID string `json:"identity_id" api:"nullable"`
IconURL string `json:"icon_url" api:"nullable"`
BindingInfo map[string]int64 `json:"binding_info"`
JSON struct {
ID respjson.Field
Type respjson.Field
DisplayTitle respjson.Field
Description respjson.Field
Source respjson.Field
LatestVersion respjson.Field
Metadata respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
IdentityID respjson.Field
IconURL respjson.Field
BindingInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Skill) UnmarshalJSON ¶
type SkillBinding ¶
type SkillBinding struct {
Type string `json:"type" api:"required"`
SkillID string `json:"skill_id" api:"required"`
Version string `json:"version"`
Enabled bool `json:"enabled"`
JSON struct {
Type respjson.Field
SkillID respjson.Field
Version respjson.Field
Enabled respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SkillBinding) RawJSON ¶
func (r SkillBinding) RawJSON() string
func (*SkillBinding) UnmarshalJSON ¶
func (r *SkillBinding) UnmarshalJSON(data []byte) error
type SkillBindingParam ¶
type SkillBindingParam struct {
Type string `json:"type" api:"required"`
SkillID string `json:"skill_id" api:"required"`
Version param.Opt[string] `json:"version,omitzero"`
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// contains filtered or unexported fields
}
func (SkillBindingParam) MarshalJSON ¶
func (r SkillBindingParam) MarshalJSON() ([]byte, error)
func (*SkillBindingParam) UnmarshalJSON ¶
func (r *SkillBindingParam) UnmarshalJSON(data []byte) error
type SkillGetParams ¶
type SkillGetParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// ⚠️ **Deprecated**: when `true`, the response also carries `content` and
// `content_encoding` (a base64 zip). Responses carry the `Deprecation: true` header
// when it is used. Use [Download Skill version content](./Versions/download.md)
// instead.
IncludeContent param.Opt[bool] `query:"include_content,omitzero" json:"-"`
// contains filtered or unexported fields
}
type SkillListParams ¶
type SkillListParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Page size, maximum 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Pagination cursor (recommended), taken from `next_page` in the previous response;
// mutually exclusive with `after_id` and `before_id`.
Page param.Opt[string] `query:"page,omitzero" json:"-"`
// Cursor for the next page; mutually exclusive with `page` and `before_id`.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page; mutually exclusive with `page` and `after_id`.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// Search by Skill display title prefix, case-insensitive.
DisplayTitle param.Opt[string] `query:"display_title,omitzero" json:"-"`
// Filter by Skill source, one of `custom`, `qoder`. `before_id` is not supported
// when `source` is set.
Source param.Opt[string] `query:"source,omitzero" json:"-"`
// ⚠️ **Deprecated**: compatibility alias for `display_title` with identical
// semantics. Use `display_title` instead.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// contains filtered or unexported fields
}
type SkillNewParams ¶
type SkillNewParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Recommended upload field, which may **repeat** several times. Two shapes are
// supported: (1) a single `.zip` archive; (2) a bare file tree — each part uploads
// one file and carries its relative path in `filename` (such as
// `code-review/SKILL.md`, `code-review/scripts/run.sh`). Neither the archive itself
// nor its uncompressed total size may exceed 50 MB.
Files []io.Reader `json:"files,omitzero" format:"binary"`
// Caller metadata object, at most 15 keys. `created_by` is reserved and must not be
// sent (sending it returns 400).
Metadata map[string]any `json:"metadata,omitzero" api:"metadata"`
// Public ID of the Forward Resource icon.
IconID param.Opt[string] `json:"icon_id,omitzero"`
// ⚠️ **Deprecated**: a single `.zip` archive with relaxed packaging rules. Responses
// carry the `Deprecation: true` header when it is used. Migrate to `files`.
File io.Reader `json:"file,omitzero" format:"binary"`
// ⚠️ **Deprecated**: the final name is always parsed from the `name` in the
// `SKILL.md` frontmatter of the uploaded package. The field is kept for
// compatibility only and is ignored when sent.
Name param.Opt[string] `json:"name,omitzero"`
// ⚠️ **Deprecated**: the final description is always parsed from `SKILL.md`.
Description param.Opt[string] `json:"description,omitzero"`
// ⚠️ **Deprecated**: Skill creation type, one of `custom`, `prebuilt`, defaults to
// `custom`. `prebuilt` makes the response `source` field return `qoder` (everything
// else returns `custom`).
Type param.Opt[string] `json:"type,omitzero"`
// Recommended. Retrying is safe when the same key is paired with an identical
// normalized `files` fingerprint.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SkillNewParams) MarshalMultipart ¶
func (r SkillNewParams) MarshalMultipart() ([]byte, string, error)
type SkillOverride ¶
type SkillOverride struct {
Enabled bool `json:"enabled"`
Type string `json:"type"`
Version string `json:"version"`
JSON struct {
Enabled respjson.Field
Type respjson.Field
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SkillOverride) RawJSON ¶
func (r SkillOverride) RawJSON() string
func (*SkillOverride) UnmarshalJSON ¶
func (r *SkillOverride) UnmarshalJSON(data []byte) error
type SkillOverrideParam ¶
type SkillOverrideParam struct {
Enabled param.Opt[bool] `json:"enabled,omitzero"`
Type param.Opt[string] `json:"type,omitzero"`
Version param.Opt[string] `json:"version,omitzero"`
// contains filtered or unexported fields
}
func (SkillOverrideParam) MarshalJSON ¶
func (r SkillOverrideParam) MarshalJSON() ([]byte, error)
func (*SkillOverrideParam) UnmarshalJSON ¶
func (r *SkillOverrideParam) UnmarshalJSON(data []byte) error
type SkillSearchParams ¶ added in v0.12.0
type SkillSearchParams struct {
// Exact string metadata filters combined with AND (at most 16 entries).
Metadata map[string]string `json:"metadata,omitzero"`
// Page size; default 20, maximum 100.
Limit param.Opt[int64] `json:"limit,omitzero"`
// Opaque next_page cursor returned by the previous search response.
Page param.Opt[string] `json:"page,omitzero"`
// Skill source: custom or qoder.
Source param.Opt[string] `json:"source,omitzero"`
// Case-insensitive Skill display-title substring filter.
DisplayTitle param.Opt[string] `json:"display_title,omitzero"`
// Select Identity ownership with a PAT; omit with any SAT. Sent in the query only.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Additional beta features; search-2026-08-31 is always included.
Betas []string `header:"x-qoder-beta,omitzero" json:"-"`
// contains filtered or unexported fields
}
SkillSearchParams contains JSON body filters for Search.
func (SkillSearchParams) MarshalJSON ¶ added in v0.12.0
func (r SkillSearchParams) MarshalJSON() ([]byte, error)
func (SkillSearchParams) URLQuery ¶ added in v0.12.0
func (r SkillSearchParams) URLQuery() (url.Values, error)
func (*SkillSearchParams) UnmarshalJSON ¶ added in v0.12.0
func (r *SkillSearchParams) UnmarshalJSON(data []byte) error
type SkillService ¶
type SkillService struct {
Options []option.RequestOption
Versions SkillVersionService
}
SkillService provides Forward Skill operations.
func NewSkillService ¶
func NewSkillService(opts ...option.RequestOption) SkillService
func (*SkillService) Delete ¶
func (r *SkillService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete Skill
func (*SkillService) Get ¶
func (r *SkillService) Get(ctx context.Context, id string, params SkillGetParams, opts ...option.RequestOption) (res *Skill, err error)
Get Skill
func (*SkillService) List ¶
func (r *SkillService) List(ctx context.Context, params SkillListParams, opts ...option.RequestOption) (res *pagination.PageCursor[Skill], err error)
List Skills
func (*SkillService) ListAutoPaging ¶
func (r *SkillService) ListAutoPaging(ctx context.Context, params SkillListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Skill]
func (*SkillService) New ¶
func (r *SkillService) New(ctx context.Context, params SkillNewParams, opts ...option.RequestOption) (res *Skill, err error)
Create Skill
func (*SkillService) Search ¶ added in v0.12.0
func (r *SkillService) Search(ctx context.Context, params SkillSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[Skill], error)
Search skills by metadata and resource filters. Adds the required search Beta header.
func (*SkillService) SearchAutoPaging ¶ added in v0.12.0
func (r *SkillService) SearchAutoPaging(ctx context.Context, params SkillSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Skill]
SearchAutoPaging iterates all matching skills using opaque body cursors.
func (*SkillService) Update ¶
func (r *SkillService) Update(ctx context.Context, id string, params SkillUpdateParams, opts ...option.RequestOption) (res *Skill, err error)
Update Skill
type SkillUpdateParams ¶
type SkillUpdateParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// New description.
Description param.Opt[string] `json:"description,omitzero"`
// New content (the contents of a zip archive). Neither the archive itself nor its
// uncompressed total size may exceed 50 MB, otherwise 400 is returned. The request
// body as a whole (including base64 encoding and the JSON envelope) is capped at
// about 67.7 MB, beyond which 413 is returned.
Content param.Opt[string] `json:"content,omitzero"`
// Encoding of `content`. Supports `base64`, `utf-8`, `utf8`, `plain`, `text`; when
// omitted the value is treated as UTF-8 text. Sending this field requires a
// non-empty `content` as well.
ContentEncoding param.Opt[string] `json:"content_encoding,omitzero"`
// Metadata object that **replaces** the current metadata (not a merge). It must not
// be `null` when sent, and each value must be a string. `created_by` is reserved and
// must not be sent (sending it returns 400).
Metadata map[string]any `json:"metadata,omitzero"`
// Update or clear the Forward icon.
IconID param.Opt[string] `json:"icon_id,omitzero" api:"nullable"`
// ⚠️ **Deprecated**: the Skill name cannot be changed. A value sent must match the
// current canonical name exactly, otherwise 400 is returned; a matching value is a
// no-op.
Name param.Opt[string] `json:"name,omitzero"`
// contains filtered or unexported fields
}
func (SkillUpdateParams) MarshalJSON ¶
func (r SkillUpdateParams) MarshalJSON() ([]byte, error)
func (SkillUpdateParams) URLQuery ¶ added in v0.7.0
func (r SkillUpdateParams) URLQuery() (url.Values, error)
func (*SkillUpdateParams) UnmarshalJSON ¶
func (r *SkillUpdateParams) UnmarshalJSON(data []byte) error
type SkillVersion ¶
type SkillVersion struct {
ID string `json:"id"`
SkillID string `json:"skill_id"`
Version string `json:"version"`
Name string `json:"name"`
Description string `json:"description"`
Directory string `json:"directory"`
ContentSize int64 `json:"content_size"`
ContentSHA256 string `json:"content_sha256"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
Metadata map[string]any `json:"metadata"`
JSON struct {
ID respjson.Field
SkillID respjson.Field
Version respjson.Field
Name respjson.Field
Description respjson.Field
Directory respjson.Field
ContentSize respjson.Field
ContentSHA256 respjson.Field
Status respjson.Field
CreatedAt respjson.Field
Metadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SkillVersion) RawJSON ¶
func (r SkillVersion) RawJSON() string
func (*SkillVersion) UnmarshalJSON ¶
func (r *SkillVersion) UnmarshalJSON(data []byte) error
type SkillVersionListParams ¶
type SkillVersionListParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Page size, maximum 100, default 20.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for paging forward; take the value from `next_page` in the previous
// response. Omit to start from the first page.
Page param.Opt[string] `query:"page,omitzero" json:"-"`
// contains filtered or unexported fields
}
type SkillVersionNewParams ¶
type SkillVersionNewParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Upload field, which may appear **multiple** times. Two shapes are supported: • a
// single `.zip` archive; • a bare file tree, where every part uploads one file and
// `filename` carries its relative path (e.g. `customer-reply/SKILL.md`,
// `customer-reply/scripts/run.sh`). Neither the archive itself nor the total
// uncompressed size may exceed 50 MB.
Files []io.Reader `json:"files" api:"required" format:"binary"`
// contains filtered or unexported fields
}
func (SkillVersionNewParams) MarshalMultipart ¶
func (r SkillVersionNewParams) MarshalMultipart() ([]byte, string, error)
type SkillVersionService ¶
type SkillVersionService struct {
Options []option.RequestOption
}
SkillVersionService provides Forward SkillVersion operations.
func NewSkillVersionService ¶
func NewSkillVersionService(opts ...option.RequestOption) SkillVersionService
func (*SkillVersionService) Delete ¶
func (r *SkillVersionService) Delete(ctx context.Context, id string, version string, opts ...option.RequestOption) (res *DeletedSkillVersion, err error)
Delete Skill version
func (*SkillVersionService) Download ¶
func (r *SkillVersionService) Download(ctx context.Context, id string, version string, opts ...option.RequestOption) (res *http.Response, err error)
Download Skill version content
func (*SkillVersionService) Get ¶
func (r *SkillVersionService) Get(ctx context.Context, id string, version string, opts ...option.RequestOption) (res *SkillVersion, err error)
Get Skill version
func (*SkillVersionService) List ¶
func (r *SkillVersionService) List(ctx context.Context, id string, params SkillVersionListParams, opts ...option.RequestOption) (res *pagination.PageCursor[SkillVersion], err error)
List Skill versions
func (*SkillVersionService) ListAutoPaging ¶
func (r *SkillVersionService) ListAutoPaging(ctx context.Context, id string, params SkillVersionListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[SkillVersion]
func (*SkillVersionService) New ¶
func (r *SkillVersionService) New(ctx context.Context, id string, params SkillVersionNewParams, opts ...option.RequestOption) (res *SkillVersion, err error)
Create Skill version
type StaticBearerUpdateParam ¶ added in v0.3.0
type StaticBearerUpdateParam struct {
Type string `json:"type" api:"required"`
Token param.Opt[string] `json:"token,omitzero"`
// contains filtered or unexported fields
}
func (StaticBearerUpdateParam) MarshalJSON ¶ added in v0.3.0
func (r StaticBearerUpdateParam) MarshalJSON() ([]byte, error)
func (*StaticBearerUpdateParam) UnmarshalJSON ¶ added in v0.3.0
func (r *StaticBearerUpdateParam) UnmarshalJSON(data []byte) error
type SystemOverride ¶
type SystemOverride struct {
Mode string `json:"mode"`
Content string `json:"content"`
JSON struct {
Mode respjson.Field
Content respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SystemOverride) RawJSON ¶
func (r SystemOverride) RawJSON() string
func (*SystemOverride) UnmarshalJSON ¶
func (r *SystemOverride) UnmarshalJSON(data []byte) error
type SystemOverrideParam ¶
type SystemOverrideParam struct {
Mode param.Opt[string] `json:"mode,omitzero"`
Content param.Opt[string] `json:"content,omitzero"`
// contains filtered or unexported fields
}
func (SystemOverrideParam) MarshalJSON ¶
func (r SystemOverrideParam) MarshalJSON() ([]byte, error)
func (*SystemOverrideParam) UnmarshalJSON ¶
func (r *SystemOverrideParam) UnmarshalJSON(data []byte) error
type Template ¶
type Template struct {
// Maximum tool-call rounds per Turn; omitted when unset.
MaxToolRounds int64 `json:"max_tool_rounds"`
ManagedToolConfig ManagedToolConfig `json:"managed_tool_config"`
// Always `template`.
Type string `json:"type"`
// Template ID.
ID string `json:"id"`
// Template name.
Name string `json:"name"`
Description string `json:"description"`
// Either `active` or `archived`.
Status string `json:"status"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
// Mirrors the shape submitted in the request; the object form keeps `id`,
// `effort` and `context_window`.
Model ModelConfig `json:"model"`
Multiagent MultiagentConfig `json:"multiagent"`
// Default Environment ID.
EnvironmentID string `json:"environment_id"`
Vaults map[string]ResourceBinding `json:"vaults"`
Files map[string]ResourceBinding `json:"files"`
GitHubRepositories map[string]GitHubRepository `json:"github_repositories"`
System string `json:"system"`
Tools []Tool `json:"tools"`
MCPServers []MCPServer `json:"mcp_servers"`
Skills []SkillBinding `json:"skills"`
EnvironmentVariables map[string]string `json:"environment_variables"`
// Custom metadata.
Metadata map[string]any `json:"metadata"`
JSON struct {
MaxToolRounds respjson.Field
ManagedToolConfig respjson.Field
Type respjson.Field
ID respjson.Field
Name respjson.Field
Description respjson.Field
Status respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
Model respjson.Field
Multiagent respjson.Field
EnvironmentID respjson.Field
Vaults respjson.Field
Files respjson.Field
GitHubRepositories respjson.Field
System respjson.Field
Tools respjson.Field
MCPServers respjson.Field
Skills respjson.Field
EnvironmentVariables respjson.Field
Metadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Template) UnmarshalJSON ¶
type TemplateArchiveParams ¶
type TemplateCloneParams ¶
type TemplateCloneParams struct {
// Name of the new Template; defaults to `<source name> Copy <random short ID>`.
Name param.Opt[string] `json:"name,omitzero"`
// Description of the new Template; defaults to the source description.
Description param.Opt[string] `json:"description,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (TemplateCloneParams) MarshalJSON ¶
func (r TemplateCloneParams) MarshalJSON() ([]byte, error)
func (*TemplateCloneParams) UnmarshalJSON ¶
func (r *TemplateCloneParams) UnmarshalJSON(data []byte) error
type TemplateListParams ¶
type TemplateListParams struct {
// Filter by `active` or `archived`.
Status param.Opt[string] `query:"status,omitzero" json:"-"`
// Page size, maximum 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Cursor for the next page; cannot be combined with `before_id`.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page; cannot be combined with `after_id`.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
type TemplateNewParams ¶
type TemplateNewParams struct {
// Maximum tool-call rounds per Turn; must be positive. Omit or pass null to use the platform default.
MaxToolRounds param.Opt[int64] `json:"max_tool_rounds,omitzero" api:"nullable"`
// Replaces the complete managed tool list; use an empty list to disable all.
ManagedToolConfig ManagedToolConfigParam `json:"managed_tool_config,omitzero" api:"nullable"`
// Template name, 1-256 characters, unique per user.
Name string `json:"name" api:"required"`
// Model identifier. Accepts a string (such as `"ultimate"`), or an Agent model
// object to configure `effort` or `context_window` at the same time. Use the
// list models endpoint to discover the available values.
Model ModelConfigUnionParam `json:"model" api:"required"`
// Environment ID used by default when creating a Session.
EnvironmentID string `json:"environment_id" api:"required"`
// Template description, up to 2048 characters.
Description param.Opt[string] `json:"description,omitzero"`
// System Prompt, up to 100,000 characters.
System param.Opt[string] `json:"system,omitzero"`
// Tool configuration list, up to 128 entries.
Tools []ToolParam `json:"tools,omitzero"`
// MCP Server configuration list, up to 20 entries.
MCPServers []MCPServerParam `json:"mcp_servers,omitzero"`
// Skill binding list, up to 20 entries.
Skills []SkillBindingParam `json:"skills,omitzero"`
// Multi-agent collaboration configuration. `type` must be `coordinator`; omit
// it or pass `null` to leave it disabled.
Multiagent MultiagentConfigParam `json:"multiagent,omitzero"`
// Default Vault configuration, keyed by Vault ID.
Vaults map[string]ResourceBindingParam `json:"vaults,omitzero"`
// Default file resource configuration, keyed by file ID.
Files map[string]ResourceBindingParam `json:"files,omitzero"`
// Default GitHub repository configuration, keyed by a caller-chosen binding
// key, up to 20 entries.
GitHubRepositories map[string]GitHubRepositoryParam `json:"github_repositories,omitzero"`
// Default Session environment variables.
EnvironmentVariables EnvironmentVariablesUnionParam `json:"environment_variables,omitzero"`
// Custom metadata.
Metadata map[string]any `json:"metadata,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// Must be set to `browser-use-2026-07-14` when Browser Use is enabled.
QoderBeta param.Opt[string] `header:"X-Qoder-Beta,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (TemplateNewParams) MarshalJSON ¶
func (r TemplateNewParams) MarshalJSON() ([]byte, error)
func (*TemplateNewParams) UnmarshalJSON ¶
func (r *TemplateNewParams) UnmarshalJSON(data []byte) error
type TemplateService ¶
type TemplateService struct {
Options []option.RequestOption
}
TemplateService provides Forward Template operations.
func NewTemplateService ¶
func NewTemplateService(opts ...option.RequestOption) TemplateService
func (*TemplateService) Archive ¶
func (r *TemplateService) Archive(ctx context.Context, templateID string, params TemplateArchiveParams, opts ...option.RequestOption) (res *Template, err error)
Archive Template
func (*TemplateService) Clone ¶
func (r *TemplateService) Clone(ctx context.Context, templateID string, params TemplateCloneParams, opts ...option.RequestOption) (res *Template, err error)
Clone Template
func (*TemplateService) Get ¶
func (r *TemplateService) Get(ctx context.Context, templateID string, opts ...option.RequestOption) (res *Template, err error)
Get Template
func (*TemplateService) List ¶
func (r *TemplateService) List(ctx context.Context, params TemplateListParams, opts ...option.RequestOption) (res *pagination.Page[Template], err error)
List Templates
func (*TemplateService) ListAutoPaging ¶
func (r *TemplateService) ListAutoPaging(ctx context.Context, params TemplateListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Template]
func (*TemplateService) New ¶
func (r *TemplateService) New(ctx context.Context, params TemplateNewParams, opts ...option.RequestOption) (res *Template, err error)
Create Template
func (*TemplateService) Update ¶
func (r *TemplateService) Update(ctx context.Context, templateID string, params TemplateUpdateParams, opts ...option.RequestOption) (res *Template, err error)
Update Template
type TemplateUpdateParams ¶
type TemplateUpdateParams struct {
// Maximum tool-call rounds per Turn; must be positive. Omit to preserve the limit; pass null to clear it.
MaxToolRounds param.Opt[int64] `json:"max_tool_rounds,omitzero" api:"nullable"`
// Replaces the complete managed tool list; use an empty list to disable all.
ManagedToolConfig ManagedToolConfigParam `json:"managed_tool_config,omitzero" api:"nullable"`
// New Template name.
Name param.Opt[string] `json:"name,omitzero"`
// New Template description.
Description param.Opt[string] `json:"description,omitzero"`
// New model identifier. Accepts a string, or an Agent model object to configure
// `effort` or `context_window` at the same time. Use the list models endpoint
// to discover the available values.
Model ModelConfigUnionParam `json:"model,omitzero"`
// New System Prompt.
System param.Opt[string] `json:"system,omitzero"`
// Replaces the tool configuration list wholesale.
Tools []ToolParam `json:"tools,omitzero"`
// Replaces the MCP Server list wholesale.
MCPServers []MCPServerParam `json:"mcp_servers,omitzero"`
// Replaces the Skill binding list wholesale.
Skills []SkillBindingParam `json:"skills,omitzero"`
// Replaces the Multi-agent collaboration configuration wholesale; `null` clears
// it, omitting it keeps the current configuration.
Multiagent MultiagentConfigParam `json:"multiagent,omitzero"`
// Replaces the default Environment ID; `null` or an empty string clears it.
EnvironmentID param.Opt[string] `json:"environment_id,omitzero" api:"nullable"`
// Replaces the default Vault configuration wholesale, keyed by Vault ID;
// `null` clears it.
Vaults map[string]ResourceBindingParam `json:"vaults,omitzero"`
// Replaces the default file resource configuration wholesale; `null` clears it.
Files map[string]ResourceBindingParam `json:"files,omitzero"`
// Replaces the default GitHub repository configuration wholesale, keyed by
// binding key; `null` or an empty object clears it.
GitHubRepositories map[string]GitHubRepositoryParam `json:"github_repositories,omitzero"`
// Replaces the default environment variables wholesale; `null` clears it.
EnvironmentVariables EnvironmentVariablesUnionParam `json:"environment_variables,omitzero"`
// Merges updates into the custom metadata.
Metadata map[string]any `json:"metadata,omitzero"`
// Optional idempotency key for requests with side effects.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// Must be set to `browser-use-2026-07-14` when the updated `tools` include the
// Browser Use toolset.
QoderBeta param.Opt[string] `header:"X-Qoder-Beta,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (TemplateUpdateParams) MarshalJSON ¶
func (r TemplateUpdateParams) MarshalJSON() ([]byte, error)
func (*TemplateUpdateParams) UnmarshalJSON ¶
func (r *TemplateUpdateParams) UnmarshalJSON(data []byte) error
type TemplateUsage ¶ added in v0.3.0
type TemplateUsage struct {
Type string `json:"type"`
TemplateID string `json:"template_id"`
ActiveIdentities int64 `json:"active_identities"`
SessionCount int64 `json:"session_count"`
ActiveSeconds float64 `json:"active_seconds"`
Credits float64 `json:"credits"`
JSON struct {
Type respjson.Field
TemplateID respjson.Field
ActiveIdentities respjson.Field
SessionCount respjson.Field
ActiveSeconds respjson.Field
Credits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TemplateUsage) RawJSON ¶ added in v0.3.0
func (r TemplateUsage) RawJSON() string
func (*TemplateUsage) UnmarshalJSON ¶ added in v0.3.0
func (r *TemplateUsage) UnmarshalJSON(data []byte) error
type Tool ¶
type Tool struct {
Type string `json:"type" api:"required"`
EnabledTools []string `json:"enabled_tools"`
DisallowedTools []string `json:"disallowed_tools"`
Configs []ToolConfig `json:"configs"`
MCPServerName string `json:"mcp_server_name"`
Name string `json:"name"`
Description string `json:"description"`
InputSchema map[string]any `json:"input_schema"`
JSON struct {
Type respjson.Field
EnabledTools respjson.Field
DisallowedTools respjson.Field
Configs respjson.Field
MCPServerName respjson.Field
Name respjson.Field
Description respjson.Field
InputSchema respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Tool) UnmarshalJSON ¶
type ToolConfig ¶
type ToolConfig struct {
Name string `json:"name" api:"required"`
Enabled bool `json:"enabled"`
PermissionPolicy PermissionPolicy `json:"permission_policy"`
JSON struct {
Name respjson.Field
Enabled respjson.Field
PermissionPolicy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ToolConfig) RawJSON ¶
func (r ToolConfig) RawJSON() string
func (*ToolConfig) UnmarshalJSON ¶
func (r *ToolConfig) UnmarshalJSON(data []byte) error
type ToolConfigParam ¶
type ToolConfigParam struct {
Name string `json:"name" api:"required"`
Enabled param.Opt[bool] `json:"enabled,omitzero"`
PermissionPolicy PermissionPolicyParam `json:"permission_policy,omitzero"`
// contains filtered or unexported fields
}
func (ToolConfigParam) MarshalJSON ¶
func (r ToolConfigParam) MarshalJSON() ([]byte, error)
func (*ToolConfigParam) UnmarshalJSON ¶
func (r *ToolConfigParam) UnmarshalJSON(data []byte) error
type ToolOverride ¶
type ToolOverride struct {
Enabled bool `json:"enabled"`
PermissionPolicy PermissionPolicy `json:"permission_policy"`
JSON struct {
Enabled respjson.Field
PermissionPolicy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ToolOverride) RawJSON ¶
func (r ToolOverride) RawJSON() string
func (*ToolOverride) UnmarshalJSON ¶
func (r *ToolOverride) UnmarshalJSON(data []byte) error
type ToolOverrideParam ¶
type ToolOverrideParam struct {
Enabled param.Opt[bool] `json:"enabled,omitzero"`
PermissionPolicy PermissionPolicyParam `json:"permission_policy,omitzero"`
// contains filtered or unexported fields
}
func (ToolOverrideParam) MarshalJSON ¶
func (r ToolOverrideParam) MarshalJSON() ([]byte, error)
func (*ToolOverrideParam) UnmarshalJSON ¶
func (r *ToolOverrideParam) UnmarshalJSON(data []byte) error
type ToolParam ¶
type ToolParam struct {
Type string `json:"type" api:"required"`
EnabledTools []string `json:"enabled_tools,omitzero"`
DisallowedTools []string `json:"disallowed_tools,omitzero"`
Configs []ToolConfigParam `json:"configs,omitzero"`
MCPServerName param.Opt[string] `json:"mcp_server_name,omitzero"`
Name param.Opt[string] `json:"name,omitzero"`
Description param.Opt[string] `json:"description,omitzero"`
InputSchema map[string]any `json:"input_schema,omitzero"`
// contains filtered or unexported fields
}
func (ToolParam) MarshalJSON ¶
func (*ToolParam) UnmarshalJSON ¶
type UsageListParams ¶ added in v0.3.0
type UsageListParams struct {
StartAt string `query:"start_at" json:"-" api:"required"`
EndAt string `query:"end_at" json:"-" api:"required"`
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Repeated query values; an entry may also contain comma-separated IDs.
IdentityIDs []string `query:"identity_ids,omitzero" json:"-"`
TemplateID param.Opt[string] `query:"template_id,omitzero" json:"-"`
// Repeated query values; an entry may also contain comma-separated IDs.
TemplateIDs []string `query:"template_ids,omitzero" json:"-"`
// contains filtered or unexported fields
}
UsageListParams accepts only hourly parameters. StartAt is inclusive; EndAt is exclusive, with a maximum span of 744 hours. Both use YYYY-MM-DDTHH:00:00 in Asia/Shanghai for CN and Global.
func (UsageListParams) URLQuery ¶ added in v0.3.0
func (r UsageListParams) URLQuery() (url.Values, error)
func (*UsageListParams) UnmarshalJSON ¶ added in v0.3.0
func (r *UsageListParams) UnmarshalJSON(data []byte) error
type UsageService ¶ added in v0.3.0
type UsageService struct{ Options []option.RequestOption }
func NewUsageService ¶ added in v0.3.0
func NewUsageService(opts ...option.RequestOption) UsageService
func (*UsageService) ListIdentities ¶ added in v0.3.0
func (r *UsageService) ListIdentities(ctx context.Context, params UsageListParams, opts ...option.RequestOption) (res *pagination.Page[IdentityUsage], err error)
ListIdentities aggregates an hourly Asia/Shanghai window. PAT or Admin SAT required.
func (*UsageService) ListIdentitiesAutoPaging ¶ added in v0.3.0
func (r *UsageService) ListIdentitiesAutoPaging(ctx context.Context, params UsageListParams, opts ...option.RequestOption) *pagination.PageAutoPager[IdentityUsage]
func (*UsageService) ListTemplates ¶ added in v0.3.0
func (r *UsageService) ListTemplates(ctx context.Context, params UsageListParams, opts ...option.RequestOption) (res *pagination.Page[TemplateUsage], err error)
ListTemplates aggregates an hourly Asia/Shanghai window. PAT or Admin SAT required.
func (*UsageService) ListTemplatesAutoPaging ¶ added in v0.3.0
func (r *UsageService) ListTemplatesAutoPaging(ctx context.Context, params UsageListParams, opts ...option.RequestOption) *pagination.PageAutoPager[TemplateUsage]
type Vault ¶
type Vault struct {
// Vault ID。
ID string `json:"id"`
// Always `vault`.
Type string `json:"type"`
// Vault display name.
DisplayName string `json:"display_name"`
// Vault metadata.
Metadata map[string]any `json:"metadata"`
// Creation time in RFC 3339 format.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Last update time in RFC 3339 format.
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
// Owning Forward identity.
IdentityID string `json:"identity_id" api:"nullable"`
JSON struct {
ID respjson.Field
Type respjson.Field
DisplayName respjson.Field
Metadata respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
IdentityID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Vault) UnmarshalJSON ¶
type VaultCredential ¶
type VaultCredential struct {
// Credential ID.
ID string `json:"id"`
// Always `vault_credential`.
Type string `json:"type"`
// ID of the owning Vault.
VaultID string `json:"vault_id"`
// Redacted authentication material.
Auth VaultCredentialAuth `json:"auth"`
// Currently always an empty string.
DisplayName string `json:"display_name"`
// Credential metadata.
Metadata map[string]any `json:"metadata"`
// Archive time, null while active.
ArchivedAt time.Time `json:"archived_at" api:"nullable" format:"date-time"`
// Creation time in RFC 3339 format.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Last update time in RFC 3339 format.
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON struct {
ID respjson.Field
Type respjson.Field
VaultID respjson.Field
Auth respjson.Field
DisplayName respjson.Field
Metadata respjson.Field
ArchivedAt respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (VaultCredential) RawJSON ¶
func (r VaultCredential) RawJSON() string
func (*VaultCredential) UnmarshalJSON ¶
func (r *VaultCredential) UnmarshalJSON(data []byte) error
type VaultCredentialAuth ¶
type VaultCredentialAuth struct {
Type string `json:"type"`
MCPServerURL string `json:"mcp_server_url"`
SecretName string `json:"secret_name"`
JSON struct {
Type respjson.Field
MCPServerURL respjson.Field
SecretName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (VaultCredentialAuth) RawJSON ¶
func (r VaultCredentialAuth) RawJSON() string
func (*VaultCredentialAuth) UnmarshalJSON ¶
func (r *VaultCredentialAuth) UnmarshalJSON(data []byte) error
type VaultCredentialListParams ¶
type VaultCredentialListParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Page size, maximum 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Pagination cursor (recommended), taken from `next_page` in the previous response;
// mutually exclusive with `after_id` and `before_id`.
Page param.Opt[string] `query:"page,omitzero" json:"-"`
// Cursor for the next page; mutually exclusive with `page` and `before_id`.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page; mutually exclusive with `page` and `after_id`.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// Search by `mcp_server_url`.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// contains filtered or unexported fields
}
type VaultCredentialNewParams ¶
type VaultCredentialNewParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Credential authentication material; supports `static_bearer` and `mcp_oauth`. The
// response only returns redacted, non-secret fields.
Auth map[string]any `json:"auth" api:"required"`
// Compatibility field; currently not persisted, and Forward always returns an empty
// string.
DisplayName param.Opt[string] `json:"display_name,omitzero"`
// Metadata object. `created_by` is reserved and must not be sent (sending it returns
// 400).
Metadata map[string]any `json:"metadata,omitzero"`
// Optional idempotency key for the create request. The same key may only be reused
// for an identical request.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (VaultCredentialNewParams) MarshalJSON ¶
func (r VaultCredentialNewParams) MarshalJSON() ([]byte, error)
func (VaultCredentialNewParams) URLQuery ¶ added in v0.7.0
func (r VaultCredentialNewParams) URLQuery() (url.Values, error)
func (*VaultCredentialNewParams) UnmarshalJSON ¶
func (r *VaultCredentialNewParams) UnmarshalJSON(data []byte) error
type VaultCredentialService ¶
type VaultCredentialService struct {
Options []option.RequestOption
}
VaultCredentialService provides Forward VaultCredential operations.
func NewVaultCredentialService ¶
func NewVaultCredentialService(opts ...option.RequestOption) VaultCredentialService
func (*VaultCredentialService) Delete ¶
func (r *VaultCredentialService) Delete(ctx context.Context, id string, credID string, opts ...option.RequestOption) (err error)
Delete Credential
func (*VaultCredentialService) Get ¶
func (r *VaultCredentialService) Get(ctx context.Context, id string, credID string, opts ...option.RequestOption) (res *VaultCredential, err error)
Get Credential
func (*VaultCredentialService) List ¶
func (r *VaultCredentialService) List(ctx context.Context, id string, params VaultCredentialListParams, opts ...option.RequestOption) (res *pagination.PageCursor[VaultCredential], err error)
List Credentials
func (*VaultCredentialService) ListAutoPaging ¶
func (r *VaultCredentialService) ListAutoPaging(ctx context.Context, id string, params VaultCredentialListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[VaultCredential]
func (*VaultCredentialService) New ¶
func (r *VaultCredentialService) New(ctx context.Context, id string, params VaultCredentialNewParams, opts ...option.RequestOption) (res *VaultCredential, err error)
Create Credential
func (*VaultCredentialService) Update ¶ added in v0.3.0
func (r *VaultCredentialService) Update(ctx context.Context, id string, credID string, params VaultCredentialUpdateParams, opts ...option.RequestOption) (res *VaultCredential, err error)
Update merges auth or metadata. Write-only secret rotation is never automatically retried.
type VaultCredentialUpdateAuthUnionParam ¶ added in v0.3.0
type VaultCredentialUpdateAuthUnionParam struct {
OfStaticBearer *StaticBearerUpdateParam `json:",omitzero,inline"`
OfMCPOAuth *MCPOAuthUpdateParam `json:",omitzero,inline"`
OfEnvironmentVariable *EnvironmentVariableUpdateParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
func (VaultCredentialUpdateAuthUnionParam) MarshalJSON ¶ added in v0.3.0
func (r VaultCredentialUpdateAuthUnionParam) MarshalJSON() ([]byte, error)
func (*VaultCredentialUpdateAuthUnionParam) UnmarshalJSON ¶ added in v0.3.0
func (r *VaultCredentialUpdateAuthUnionParam) UnmarshalJSON(data []byte) error
type VaultCredentialUpdateParams ¶ added in v0.3.0
type VaultCredentialUpdateParams struct {
Auth VaultCredentialUpdateAuthUnionParam `json:"auth,omitzero"`
Metadata map[string]any `json:"metadata,omitzero"`
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (VaultCredentialUpdateParams) MarshalJSON ¶ added in v0.3.0
func (r VaultCredentialUpdateParams) MarshalJSON() ([]byte, error)
func (VaultCredentialUpdateParams) URLQuery ¶ added in v0.3.0
func (r VaultCredentialUpdateParams) URLQuery() (url.Values, error)
func (*VaultCredentialUpdateParams) UnmarshalJSON ¶ added in v0.3.0
func (r *VaultCredentialUpdateParams) UnmarshalJSON(data []byte) error
type VaultListParams ¶
type VaultListParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Page size, maximum 100.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Pagination cursor (recommended), taken from `next_page` in the previous
// response; mutually exclusive with `after_id` and `before_id`.
Page param.Opt[string] `query:"page,omitzero" json:"-"`
// Cursor for the next page; mutually exclusive with `page` and `before_id`.
AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
// Cursor for the previous page; mutually exclusive with `page` and `after_id`.
BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
// Search by `display_name`.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// contains filtered or unexported fields
}
type VaultNewParams ¶
type VaultNewParams struct {
// Select identity ownership with a PAT. Omit when using a SAT.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Vault display name.
DisplayName string `json:"display_name" api:"required"`
// Metadata object; `created_by` is reserved and cannot be supplied (supplying it
// returns 400).
Metadata map[string]any `json:"metadata,omitzero"`
// Optional idempotency key for the create request. A given key may only be reused
// for an identical request; when omitted, no local replay protection applies.
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (VaultNewParams) MarshalJSON ¶
func (r VaultNewParams) MarshalJSON() ([]byte, error)
func (VaultNewParams) URLQuery ¶ added in v0.7.0
func (r VaultNewParams) URLQuery() (url.Values, error)
func (*VaultNewParams) UnmarshalJSON ¶
func (r *VaultNewParams) UnmarshalJSON(data []byte) error
type VaultSearchParams ¶ added in v0.12.0
type VaultSearchParams struct {
// Exact string metadata filters combined with AND (at most 16 entries).
Metadata map[string]string `json:"metadata,omitzero"`
// Page size; default 20, maximum 100.
Limit param.Opt[int64] `json:"limit,omitzero"`
// Opaque next_page cursor returned by the previous search response.
Page param.Opt[string] `json:"page,omitzero"`
// Include archived resources; defaults to false.
IncludeArchived param.Opt[bool] `json:"include_archived,omitzero"`
// Case-insensitive name substring filter.
Name param.Opt[string] `json:"name,omitzero"`
// Select Identity ownership with a PAT; omit with any SAT. Sent in the query only.
IdentityID param.Opt[string] `query:"identity_id,omitzero" json:"-"`
// Additional beta features; search-2026-08-31 is always included.
Betas []string `header:"x-qoder-beta,omitzero" json:"-"`
// contains filtered or unexported fields
}
VaultSearchParams contains JSON body filters for Search.
func (VaultSearchParams) MarshalJSON ¶ added in v0.12.0
func (r VaultSearchParams) MarshalJSON() ([]byte, error)
func (VaultSearchParams) URLQuery ¶ added in v0.12.0
func (r VaultSearchParams) URLQuery() (url.Values, error)
func (*VaultSearchParams) UnmarshalJSON ¶ added in v0.12.0
func (r *VaultSearchParams) UnmarshalJSON(data []byte) error
type VaultService ¶
type VaultService struct {
Options []option.RequestOption
Credentials VaultCredentialService
}
VaultService provides Forward Vault operations.
func NewVaultService ¶
func NewVaultService(opts ...option.RequestOption) VaultService
func (*VaultService) Delete ¶
func (r *VaultService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete Vault
func (*VaultService) Get ¶
func (r *VaultService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Vault, err error)
Get Vault
func (*VaultService) List ¶
func (r *VaultService) List(ctx context.Context, params VaultListParams, opts ...option.RequestOption) (res *pagination.PageCursor[Vault], err error)
List Vaults
func (*VaultService) ListAutoPaging ¶
func (r *VaultService) ListAutoPaging(ctx context.Context, params VaultListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Vault]
func (*VaultService) New ¶
func (r *VaultService) New(ctx context.Context, params VaultNewParams, opts ...option.RequestOption) (res *Vault, err error)
Create Vault
func (*VaultService) Search ¶ added in v0.12.0
func (r *VaultService) Search(ctx context.Context, params VaultSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[Vault], error)
Search vaults by metadata and resource filters. Adds the required search Beta header.
func (*VaultService) SearchAutoPaging ¶ added in v0.12.0
func (r *VaultService) SearchAutoPaging(ctx context.Context, params VaultSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Vault]
SearchAutoPaging iterates all matching vaults using opaque body cursors.
type WebhookEndpoint ¶ added in v0.9.0
type WebhookEndpoint struct {
ID string `json:"id"`
URL string `json:"url"`
Description string `json:"description"`
Events []string `json:"events"`
Metadata map[string]any `json:"metadata"`
Active bool `json:"active"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
LastSuccessAt time.Time `json:"last_success_at" format:"date-time" api:"nullable"`
LastFailureAt time.Time `json:"last_failure_at" format:"date-time" api:"nullable"`
DisabledReason string `json:"disabled_reason"`
ConsecutiveFail int64 `json:"consecutive_fail"`
JSON struct {
ID respjson.Field
URL respjson.Field
Description respjson.Field
Events respjson.Field
Metadata respjson.Field
Active respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
LastSuccessAt respjson.Field
LastFailureAt respjson.Field
DisabledReason respjson.Field
ConsecutiveFail respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WebhookEndpoint preserves unknown response fields.
func (WebhookEndpoint) RawJSON ¶ added in v0.9.0
func (r WebhookEndpoint) RawJSON() string
func (*WebhookEndpoint) UnmarshalJSON ¶ added in v0.9.0
func (r *WebhookEndpoint) UnmarshalJSON(data []byte) error
type WebhookEndpointCreateResponse ¶ added in v0.9.0
type WebhookEndpointCreateResponse struct {
ID string `json:"id"`
URL string `json:"url"`
Description string `json:"description"`
Events []string `json:"events"`
Metadata map[string]any `json:"metadata"`
Active bool `json:"active"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Returned only at creation. Store securely; do not log.
SigningSecret string `json:"signing_secret"`
JSON struct {
ID respjson.Field
URL respjson.Field
Description respjson.Field
Events respjson.Field
Metadata respjson.Field
Active respjson.Field
CreatedAt respjson.Field
SigningSecret respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WebhookEndpointCreateResponse preserves unknown response fields.
func (WebhookEndpointCreateResponse) RawJSON ¶ added in v0.9.0
func (r WebhookEndpointCreateResponse) RawJSON() string
func (*WebhookEndpointCreateResponse) UnmarshalJSON ¶ added in v0.9.0
func (r *WebhookEndpointCreateResponse) UnmarshalJSON(data []byte) error
type WebhookEndpointListParams ¶ added in v0.9.0
type WebhookEndpointNewParams ¶ added in v0.9.0
type WebhookEndpointNewParams struct {
URL string `json:"url" api:"required"`
// Full event names or "*". Unknown event names are passed to the server.
Events []string `json:"events" api:"required"`
Description param.Opt[string] `json:"description,omitzero"`
Metadata map[string]string `json:"metadata,omitzero"`
IdempotencyKey param.Opt[string] `header:"Idempotency-Key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (WebhookEndpointNewParams) MarshalJSON ¶ added in v0.9.0
func (r WebhookEndpointNewParams) MarshalJSON() ([]byte, error)
func (*WebhookEndpointNewParams) UnmarshalJSON ¶ added in v0.9.0
func (r *WebhookEndpointNewParams) UnmarshalJSON(data []byte) error
type WebhookEndpointService ¶ added in v0.9.0
type WebhookEndpointService struct{ Options []option.RequestOption }
func NewWebhookEndpointService ¶ added in v0.9.0
func NewWebhookEndpointService(opts ...option.RequestOption) WebhookEndpointService
func (*WebhookEndpointService) Delete ¶ added in v0.9.0
func (r *WebhookEndpointService) Delete(ctx context.Context, endpointID string, opts ...option.RequestOption) (err error)
Delete a webhook endpoint.
func (*WebhookEndpointService) Disable ¶ added in v0.9.0
func (r *WebhookEndpointService) Disable(ctx context.Context, endpointID string, opts ...option.RequestOption) (res *WebhookEndpoint, err error)
Disable a webhook endpoint.
func (*WebhookEndpointService) Enable ¶ added in v0.9.0
func (r *WebhookEndpointService) Enable(ctx context.Context, endpointID string, opts ...option.RequestOption) (res *WebhookEndpoint, err error)
Enable a webhook endpoint.
func (*WebhookEndpointService) Get ¶ added in v0.9.0
func (r *WebhookEndpointService) Get(ctx context.Context, endpointID string, opts ...option.RequestOption) (res *WebhookEndpoint, err error)
Get a webhook endpoint.
func (*WebhookEndpointService) List ¶ added in v0.9.0
func (r *WebhookEndpointService) List(ctx context.Context, params WebhookEndpointListParams, opts ...option.RequestOption) (res *pagination.Page[WebhookEndpoint], err error)
List a webhook endpoint page.
func (*WebhookEndpointService) ListAutoPaging ¶ added in v0.9.0
func (r *WebhookEndpointService) ListAutoPaging(ctx context.Context, params WebhookEndpointListParams, opts ...option.RequestOption) *pagination.PageAutoPager[WebhookEndpoint]
func (*WebhookEndpointService) New ¶ added in v0.9.0
func (r *WebhookEndpointService) New(ctx context.Context, params WebhookEndpointNewParams, opts ...option.RequestOption) (res *WebhookEndpointCreateResponse, err error)
New a webhook endpoint.
func (*WebhookEndpointService) Test ¶ added in v0.9.0
func (r *WebhookEndpointService) Test(ctx context.Context, endpointID string, opts ...option.RequestOption) (res *WebhookEndpointTestResponse, err error)
Test queues a synthetic event; acceptance does not confirm delivery.
func (*WebhookEndpointService) Update ¶ added in v0.9.0
func (r *WebhookEndpointService) Update(ctx context.Context, endpointID string, params WebhookEndpointUpdateParams, opts ...option.RequestOption) (res *WebhookEndpoint, err error)
Update a webhook endpoint.
type WebhookEndpointTestResponse ¶ added in v0.9.0
type WebhookEndpointTestResponse struct {
EventID int64 `json:"event_id"`
DeliveryRows int64 `json:"delivery_rows"`
JSON struct {
EventID respjson.Field
DeliveryRows respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WebhookEndpointTestResponse preserves unknown response fields.
func (WebhookEndpointTestResponse) RawJSON ¶ added in v0.9.0
func (r WebhookEndpointTestResponse) RawJSON() string
func (*WebhookEndpointTestResponse) UnmarshalJSON ¶ added in v0.9.0
func (r *WebhookEndpointTestResponse) UnmarshalJSON(data []byte) error
type WebhookEndpointUpdateParams ¶ added in v0.9.0
type WebhookEndpointUpdateParams struct {
URL param.Opt[string] `json:"url,omitzero"`
Description param.Opt[string] `json:"description,omitzero"`
Events []string `json:"events,omitzero"`
Active param.Opt[bool] `json:"active,omitzero"`
// Values are merged; param.Null[string]() removes a key.
Metadata map[string]param.Opt[string] `json:"metadata,omitzero"`
// contains filtered or unexported fields
}
func (WebhookEndpointUpdateParams) MarshalJSON ¶ added in v0.9.0
func (r WebhookEndpointUpdateParams) MarshalJSON() ([]byte, error)
func (*WebhookEndpointUpdateParams) UnmarshalJSON ¶ added in v0.9.0
func (r *WebhookEndpointUpdateParams) UnmarshalJSON(data []byte) error
type WebhookService ¶ added in v0.9.0
type WebhookService struct{ Endpoints WebhookEndpointService }
WebhookService manages account webhook subscriptions using a PAT or administrator SAT.
func NewWebhookService ¶ added in v0.9.0
func NewWebhookService(opts ...option.RequestOption) WebhookService
Source Files
¶
- batch.go
- batchtask.go
- channel.go
- channelpairing.go
- channelqrsession.go
- client.go
- configuration_types.go
- decision.go
- dream.go
- drive.go
- environment.go
- file.go
- identity.go
- identityconfig.go
- identitymemorystore.go
- identityserviceaccounttoken.go
- memorystore.go
- memorystorememory.go
- memorystorememoryversion.go
- model.go
- outcomerubric.go
- params.go
- realtime.go
- realtimeconversation.go
- realtimeevent.go
- resumablestream.go
- schedule.go
- schedulerun.go
- serviceaccounttoken.go
- session.go
- sessionevent.go
- sessionresource.go
- sessionthread.go
- sessionthreadevent.go
- skill.go
- skillversion.go
- template.go
- usage.go
- vault.go
- vaultcredential.go
- webhook.go
- webhook_signature.go