Documentation
¶
Overview ¶
Coverage resource definitions shared by validation and storage.
Package api is the HTTP API server.
Index ¶
- Constants
- Variables
- func CheckAITool(t AITool) error
- func ClientIP(r *http.Request) string
- func NormalizeTag(v any) (any, error)
- func RequestID(ctx context.Context) string
- func WriteError(w http.ResponseWriter, r *http.Request, status int, code, message string)
- func WriteJSON(w http.ResponseWriter, status int, v any)
- type AIConnection
- type AITool
- type Accounts
- func (a *Accounts) CreateAccount(ctx context.Context, tx pgx.Tx, w http.ResponseWriter, r *http.Request, ...) (userID, workspaceID string, err error)
- func (a *Accounts) DeleteUser(ctx context.Context, tx pgx.Tx, userID string) (UserDeletion, error)
- func (a *Accounts) DeleteWorkspace(ctx context.Context, tx pgx.Tx, workspaceID string) error
- func (a *Accounts) EndSupportViews(ctx context.Context, q interface{ ... }, viewerID string) error
- func (a *Accounts) FinishSignup(ctx context.Context, tx pgx.Tx, w http.ResponseWriter, r *http.Request, ...) (userID, workspaceID string, err error)
- func (a *Accounts) PlanUserDeletion(ctx context.Context, tx pgx.Tx, userID string) (UserDeletion, error)
- func (a *Accounts) SendPasswordReset(ctx context.Context, userID string) (string, error)
- func (a *Accounts) SendVerification(ctx context.Context, userID string) error
- func (a *Accounts) SessionUser(r *http.Request) (userID, email string, err error)
- func (a *Accounts) StartSignup(ctx context.Context, w http.ResponseWriter, r *http.Request, in NewAccount) error
- func (a *Accounts) StartSupportView(ctx context.Context, w http.ResponseWriter, viewerID, userID string) (SupportView, error)
- func (a *Accounts) VerifyAgentApp(ctx context.Context, clientID string, verified bool) (bool, error)
- type AgentRunDraft
- type AgentSpec
- type BlobStore
- type BrandKnowledge
- type Caller
- func (c *Caller) AddLinkProspects(ctx context.Context, tx pgx.Tx, site seosync.ProspectSite, source string, ...) (seosync.ProspectsAdded, error)
- func (c *Caller) Decode(w http.ResponseWriter, r *http.Request, v any) bool
- func (c *Caller) Has(scope string) bool
- func (c *Caller) Internal(w http.ResponseWriter, r *http.Request, err error)
- func (c *Caller) Record(ctx context.Context, tx pgx.Tx, action, targetType, targetID string, ...) error
- func (c *Caller) Sees(brand *string) bool
- func (c *Caller) StartAgentRun(ctx context.Context, tx pgx.Tx, d AgentRunDraft) (string, error)
- func (c *Caller) StartMission(ctx context.Context, tx pgx.Tx, d MissionDraft) (string, error)
- func (c *Caller) Writes(brand *string) bool
- type CertState
- type ClickHouseArchive
- type DeletionWorkspace
- type InputError
- type KnowledgeItem
- type MCPUpstream
- type MenuBadges
- type MenuLink
- type MenuLinks
- type MissionDraft
- type NewAccount
- type Options
- type Server
- func (s *Server) AIConnectionsOf(ctx context.Context, ws string) ([]AIConnection, error)
- func (s *Server) AIModelOn(ctx context.Context, ws, task, integrationID, model string, cents int64) (research.Choice, error)
- func (s *Server) AIModels() research.Models
- func (s *Server) AIModelsOn(ctx context.Context, ws, integrationID string) (llm.Provider, []llm.ModelInfo, error)
- func (s *Server) AIVisibilityModels() aivis.Models
- func (s *Server) AIVisibilityScreens() aivis.Screens
- func (s *Server) ActAsAgent(ctx context.Context, ws, brand, agentID, method, path string, ...) (int, []byte, error)
- func (s *Server) AdvanceVideo(ctx context.Context, ws, id string) error
- func (s *Server) CallAsAgent(ctx context.Context, tokenID, method, path string, body json.RawMessage, ...) (int, []byte, error)
- func (s *Server) CheckInstalls(ctx context.Context)
- func (s *Server) CheckRedditAction(ctx context.Context, ws, id string) error
- func (s *Server) CheckSocialWatch(ctx context.Context, ws, id string) error
- func (s *Server) CheckTrackerPages(ctx context.Context, pause time.Duration) (int, error)
- func (s *Server) CheckTrackingDomainExpiry(ctx context.Context, pause time.Duration) (int, error)
- func (s *Server) ConvertTransactions(ctx context.Context) (int, error)
- func (s *Server) CountUnassigned(ctx context.Context) error
- func (s *Server) CreateAgentToken(ctx context.Context, tx pgx.Tx, spec AgentSpec) (string, error)
- func (s *Server) DiscoverBrandLinks(ctx context.Context, ws, brandID string) error
- func (s *Server) DiscoverReviewPages(ctx context.Context, ws, brandID string) error
- func (s *Server) DraftReviewReply(ctx context.Context, ws, id string, last bool) error
- func (s *Server) DraftSocialAction(ctx context.Context, ws, id string, last bool) error
- func (s *Server) DraftSocialPublication(ctx context.Context, ws, id string, last bool) error
- func (s *Server) DrainSiteInbox(ctx context.Context) (int, error)
- func (s *Server) ExpireHandEdits(ctx context.Context) (int, error)
- func (s *Server) ExpirePrivacyExports(ctx context.Context) (int, error)
- func (s *Server) FlushClicks(ctx context.Context) error
- func (s *Server) FlushLogs(ctx context.Context) error
- func (s *Server) Handler() http.Handler
- func (s *Server) JourneyAI() journeys.AI
- func (s *Server) KeepForecasts(ctx context.Context, now time.Time) (int, error)
- func (s *Server) LookUpDueAddresses(ctx context.Context) (int, error)
- func (s *Server) MoveDeal(ctx context.Context, tx pgx.Tx, ws, recordID string, d journeys.DealMove, ...) (string, string, error)
- func (s *Server) OpenRenewalDeals(ctx context.Context, tx pgx.Tx, ws, recordID, stage string, within int, ...) (string, string, error)
- func (s *Server) ProductEventSink(ctx context.Context, ws, brand string) (track.Sink, error)
- func (s *Server) PruneClickAddresses(ctx context.Context) (int64, error)
- func (s *Server) PruneEventInbox(ctx context.Context) (int, error)
- func (s *Server) PruneIdempotencyKeys(ctx context.Context) (int64, error)
- func (s *Server) PruneInboundWebhookIDs(ctx context.Context) (int64, error)
- func (s *Server) PruneJobs(ctx context.Context) (int64, error)
- func (s *Server) PruneKnowledgeBin(ctx context.Context) (int64, error)
- func (s *Server) PruneOAuthCodes(ctx context.Context) (int64, error)
- func (s *Server) PrunePageVitals(ctx context.Context) (int64, error)
- func (s *Server) PrunePartnerConversionLog(ctx context.Context) (int64, error)
- func (s *Server) PruneQueryEndpointCalls(ctx context.Context) (int64, error)
- func (s *Server) PruneRequestLogs(ctx context.Context, keep time.Duration) (int64, error)
- func (s *Server) PruneTrackerConversionLog(ctx context.Context) (int64, error)
- func (s *Server) PruneWebhookDeliveries(ctx context.Context) (int64, error)
- func (s *Server) PublishSocialPublication(ctx context.Context, ws, id string, last bool) error
- func (s *Server) PurgeAICalls(ctx context.Context) int64
- func (s *Server) PurgeDeletions(ctx context.Context) (int, error)
- func (s *Server) QueueDueABTestChecks(ctx context.Context) (int, error)
- func (s *Server) QueueDueBrandKnowledge(ctx context.Context) (int, error)
- func (s *Server) QueueDueCoverage(ctx context.Context) (int, error)
- func (s *Server) QueueDueInsightAlertChecks(ctx context.Context) (int, error)
- func (s *Server) QueueDueMentionScans(ctx context.Context) (int, error)
- func (s *Server) QueueDueNewsSearches(ctx context.Context) (int, error)
- func (s *Server) QueueDuePricingReads(ctx context.Context) (int, error)
- func (s *Server) QueueDueReddit(ctx context.Context) (int, error)
- func (s *Server) QueueDueReviewReads(ctx context.Context) (int, error)
- func (s *Server) QueueDueSocialChecks(ctx context.Context) (int, error)
- func (s *Server) QueueDueSocialPublications(ctx context.Context) (int, error)
- func (s *Server) QueueDueSocialSyncs(ctx context.Context) (int, error)
- func (s *Server) QueueSemanticEmbeds(ctx context.Context) (int, error)
- func (s *Server) QueueSupportImports(ctx context.Context) (int, error)
- func (s *Server) QueueWebsiteRechecks(ctx context.Context) (int, error)
- func (s *Server) ReadBrandKnowledge(ctx context.Context, ws, brandID string) error
- func (s *Server) ReadBrandLook(ctx context.Context, ws, brandID string) error
- func (s *Server) ReadMentionEpisode(ctx context.Context, ws, id string) error
- func (s *Server) ReadMentionVideo(ctx context.Context, ws, id string) error
- func (s *Server) ReadPricingPages(ctx context.Context, ws, integrationID string) error
- func (s *Server) ReadReviewPages(ctx context.Context, ws, integrationID string) error
- func (s *Server) RegisterJobs(q *jobs.Queue)
- func (s *Server) RevokeAgentToken(ctx context.Context, tx pgx.Tx, workspaceID, tokenID, byUserID string) error
- func (s *Server) RunABTestAI(ctx context.Context, ws, id string, last bool) error
- func (s *Server) RunABTests(ctx context.Context, every time.Duration)
- func (s *Server) RunAIUsage(ctx context.Context, every time.Duration)
- func (s *Server) RunAgentRuns(ctx context.Context, every time.Duration)
- func (s *Server) RunAutomations(ctx context.Context, every time.Duration)
- func (s *Server) RunBrandKnowledgeRefresh(ctx context.Context, every time.Duration)
- func (s *Server) RunClicks(ctx context.Context)
- func (s *Server) RunConnectionBrands(ctx context.Context)
- func (s *Server) RunCreativeSkillDraft(ctx context.Context, ws, id string, last bool) error
- func (s *Server) RunDueAgentTurns(ctx context.Context) (int, error)
- func (s *Server) RunDueAutomations(ctx context.Context) (int, error)
- func (s *Server) RunEventInbox(ctx context.Context)
- func (s *Server) RunForecastHistory(ctx context.Context, every time.Duration)
- func (s *Server) RunGeneration(ctx context.Context, ws, id string) error
- func (s *Server) RunHandEditExpiry(ctx context.Context, every time.Duration)
- func (s *Server) RunIPLookups(ctx context.Context, every time.Duration)
- func (s *Server) RunInsightAlerts(ctx context.Context, every time.Duration)
- func (s *Server) RunInsightQuestion(ctx context.Context, ws, id string, last bool) error
- func (s *Server) RunNetworkCosts(ctx context.Context, every time.Duration)
- func (s *Server) RunNewsSearch(ctx context.Context, ws, searchID string) error
- func (s *Server) RunPageChecks(ctx context.Context, every time.Duration)
- func (s *Server) RunPartnerRewards(ctx context.Context)
- func (s *Server) RunPayments(ctx context.Context)
- func (s *Server) RunPrivacyExports(ctx context.Context)
- func (s *Server) RunQueryQuestion(ctx context.Context, ws, id string, last bool) error
- func (s *Server) RunRecoveryWindow(ctx context.Context)
- func (s *Server) RunReplaySweep(ctx context.Context)
- func (s *Server) RunSalesFeeds(ctx context.Context, every time.Duration)
- func (s *Server) RunSemanticSearch(ctx context.Context, every time.Duration)
- func (s *Server) RunSetup(ctx context.Context, every time.Duration)
- func (s *Server) RunSiteInbox(ctx context.Context, poll time.Duration)
- func (s *Server) RunSmartListDraft(ctx context.Context, ws, id string, last bool) error
- func (s *Server) RunSocial(ctx context.Context, every time.Duration)
- func (s *Server) RunSocialAction(ctx context.Context, ws, id string, last bool) error
- func (s *Server) RunSupportImports(ctx context.Context, every time.Duration)
- func (s *Server) RunTrackingDomainExpiry(ctx context.Context, every time.Duration)
- func (s *Server) RunTransactionRates(ctx context.Context, every time.Duration)
- func (s *Server) RunWebsiteRechecks(ctx context.Context, every time.Duration)
- func (s *Server) ScanBrandMentions(ctx context.Context, ws, brand string) (int, error)
- func (s *Server) SendRedditAction(ctx context.Context, ws, id string) error
- func (s *Server) SetAdAutoApprove(fn func(ctx context.Context, workspaceID, brandID, kind string) bool)
- func (s *Server) SetSupportAuto(fn func(ctx context.Context, workspaceID string) bool)
- func (s *Server) SmartListQueryIDs(ctx context.Context, ws, listID string) ([]string, error)
- func (s *Server) StartTrackingHTTPS(ctx context.Context) error
- func (s *Server) SweepReplay(ctx context.Context) (int, error)
- func (s *Server) SyncNetworkCosts(ctx context.Context) (int, error)
- func (s *Server) SyncSocialAccounts(ctx context.Context, ws, integrationID string) error
- func (s *Server) WriteField(ctx context.Context, tx pgx.Tx, ws, recordID, field, change string, value any, ...) (string, string, error)
- type SupportView
- type TrackingCerts
- type UserDeletion
- type VideoTool
- type WorkspaceRoute
Constants ¶
AIAnswerShareNote is returned on every payload. The figures are counted from already-stored AI visibility runs only.
const AlertErrorIssue = "error.new_issue"
AlertErrorIssue is the alert kind.
const AlertInsightThreshold = "insight.threshold"
AlertInsightThreshold is the alert kind.
const AlertTeamMailSharing = "crm_mail.team_sharing"
AlertTeamMailSharing tells a member their brand's work mail will be shared with the brand.
const AlertTrackerLinkBroken = "tracker.link_broken"
AlertTrackerLinkBroken is the alert for a page a tracker link sends to that stopped answering.
const AlertTrackingDomainExpiring = "tracking_domain.expiring"
AlertTrackingDomainExpiring is the alert for a tracking domain whose registration runs out soon or has run out.
const ( // CreditDays is how long after a signal revenue still counts as its // credit. CreditDays = 90 )
const DefaultLogRetention = 30 * 24 * time.Hour
DefaultLogRetention is how long request logs are kept unless the operator sets OUTFLARE_LOG_RETENTION_DAYS.
const MaxSavedPeople = 10_000
MaxSavedPeople is how many people one saved list takes from a funnel.
const ( // SignupConfirmPath is where the confirmation link points, with the // token in its #fragment; the host serves the page that finishes there. SignupConfirmPath = "/signup/confirm" )
Variables ¶
var ( ErrMissionInvalid = errors.New("invalid mission") ErrMissionDenied = errors.New("not allowed to start missions") // ErrMissionRetired is every StartMission's error now: missions are // retired (410 mission_retired over the API). ErrMissionRetired = errors.New("missions retired") )
ErrMissionInvalid is a draft the API would refuse with 400; its message says why. ErrMissionDenied is a caller who may not start missions (403).
var ( ErrAgentRunInvalid = errors.New("invalid agent run") ErrAgentRunDenied = errors.New("not allowed to start agent runs") )
ErrAgentRunInvalid is a draft the API would refuse with 400; its message says why. ErrAgentRunDenied is a caller who may not start runs (403).
var ErrAgentGone = errors.New("the agent's token was revoked or expired")
ErrAgentGone means the agent's token was revoked or expired, or its person disabled, so it can't act any more.
var ErrAgentSpec = errors.New("invalid agent")
ErrAgentSpec is a spec the engine refuses; the message says why.
var ErrBadSignupLink = errors.New("this sign-up link is invalid, already used or expired")
ErrBadSignupLink is a sign-up link that is unknown, used or expired.
var ErrChoosePassword = errors.New("choose a password to finish signing up")
ErrChoosePassword is returned by FinishSignup when the link is opened in another browser than the one that filled in the form: the person must choose a password there, since the form's may have been a stranger's.
var ErrEmailTaken = errors.New("an account with this email already exists")
ErrEmailTaken is returned by CreateAccount when a user already has the email.
var ErrSupportAccessOff = errors.New("this person has turned support access off")
ErrSupportAccessOff is StartSupportView's answer for a person who turned support access off, or whose account is disabled.
var Version = "dev"
Version is set at build time with -ldflags "-X .../api.Version=...".
Functions ¶
func CheckAITool ¶ added in v0.8.0
CheckAITool says what is wrong with an extension's tool, or nil: its id must be a tool id the engine has no tool of its own under, and its model task one a workspace can choose a model for.
func ClientIP ¶
ClientIP is the visitor's address, for rate limits and session records. Behind a proxy (Fly.io, Cloudflare) every connection comes from the proxy, so set Options.ClientIPHeader to the header it sends, such as Fly-Client-IP or CF-Connecting-IP. Only do that behind such a proxy: a direct visitor could send the header themselves.
func NormalizeTag ¶ added in v0.28.0
NormalizeTag makes a tag lowercase, trimmed and at most 50 characters, so "VIP " and "vip" are one tag.
func WriteError ¶
WriteError writes the standard error body: {"error": {"code", "message", "request_id"}}.
Types ¶
type AIConnection ¶ added in v0.80.0
AIConnection is one of the workspace's connected AI model connections.
type AITool ¶ added in v0.8.0
type AITool struct {
ID, Name, Description, ModelTask string
}
AITool is an extension's own AI tool: a name for its calls on the usage page, so a workspace sees what they cost and can give them a limit. Its calls use the model the workspace chose for ModelTask, a model task such as classify_domain, so they need no model setting of their own.
type Accounts ¶
type Accounts struct {
Pool *pgxpool.Pool
PublicURL string
Box *secrets.Box // opens Google sign-ins (NewAccount.Identity)
Mailer sysmail.Sender
Log *slog.Logger
// SignedInCookieDomain is Options.SignedInCookieDomain.
SignedInCookieDomain string
}
Accounts lets builds on top of the engine, such as the hosted Cloud, sign people up and recognise them with the engine's own users and sessions, without copying its password or token formats. Reached through outflare.Host.Accounts.
func (*Accounts) CreateAccount ¶
func (a *Accounts) CreateAccount(ctx context.Context, tx pgx.Tx, w http.ResponseWriter, r *http.Request, in NewAccount) (userID, workspaceID string, err error)
CreateAccount creates a user who owns a new workspace and signs them in on w, in one transaction with tx's other writes (pass nil for its own). Bad input returns an error whose message can be shown to the person.
func (*Accounts) DeleteUser ¶
DeleteUser deletes a person for good, in tx: their workspaces that nobody else uses, their sign-ins (sessions, passwords, Google, passkeys), their memberships and pending account emails. In shared workspaces their past actions stay but are shown as "Deleted user", and an owner is promoted if they were the only one.
func (*Accounts) DeleteWorkspace ¶
DeleteWorkspace deletes a workspace and everything in it, in tx. Its members keep their accounts. It returns pgx.ErrNoRows when there is no such workspace.
func (*Accounts) EndSupportViews ¶ added in v0.8.0
func (a *Accounts) EndSupportViews(ctx context.Context, q interface { Exec(context.Context, string, ...any) (pgconn.CommandTag, error) }, viewerID string) error
EndSupportViews ends every view by viewerID, such as when they stop being staff.
func (*Accounts) FinishSignup ¶
func (a *Accounts) FinishSignup(ctx context.Context, tx pgx.Tx, w http.ResponseWriter, r *http.Request, token, password string) (userID, workspaceID string, err error)
FinishSignup opens a sign-up link: it makes the account (its email confirmed) and its first workspace, and signs the person in on w, in tx with tx's other writes (nil for its own). password is needed only when the link is opened in another browser (ErrChoosePassword).
func (*Accounts) PlanUserDeletion ¶
func (a *Accounts) PlanUserDeletion(ctx context.Context, tx pgx.Tx, userID string) (UserDeletion, error)
PlanUserDeletion works out what DeleteUser would do, without changing anything. It returns pgx.ErrNoRows when there is no such user.
func (*Accounts) SendPasswordReset ¶
SendPasswordReset emails userID a link to choose a new password, the same email as "Forgot password". It returns the address it went to.
func (*Accounts) SendVerification ¶
SendVerification emails userID a link to confirm their address, unless it is confirmed already (as with a Google sign-up). Call it after the transaction that created the account commits.
func (*Accounts) SessionUser ¶
SessionUser is the signed-in person behind r's session, as a user id and email. Both are empty for an anonymous request or an API token.
func (*Accounts) StartSignup ¶
func (a *Accounts) StartSignup(ctx context.Context, w http.ResponseWriter, r *http.Request, in NewAccount) error
StartSignup checks a password sign-up and emails a confirmation link. It returns an *InputError for bad input and otherwise nil, whatever the address: an existing account gets a different email, not a different answer. Asking again sends at most one email a minute and five an hour.
func (*Accounts) StartSupportView ¶ added in v0.8.0
func (a *Accounts) StartSupportView(ctx context.Context, w http.ResponseWriter, viewerID, userID string) (SupportView, error)
StartSupportView lets viewerID, a staff member the caller has already checked, see userID's account read-only in this browser, by setting the view's cookie on w. It ends any other view by the same staff member. The caller records who started it and why.
func (*Accounts) VerifyAgentApp ¶
func (a *Accounts) VerifyAgentApp(ctx context.Context, clientID string, verified bool) (bool, error)
VerifyAgentApp marks a self-registered app as checked by the operator, so people can give it more than reading; verified false takes that back (its connections drop to reading on their next refresh). It answers false when there is no such app.
type AgentRunDraft ¶ added in v0.81.0
type AgentRunDraft struct {
Name, Goal, Instructions, Plan string
// BrandID keeps the run and its token to one brand; required for a
// brand-limited caller.
BrandID *string
// Mode is copilot (the default: every change waits for a person),
// autonomous (changes run within MaxSpendCents) or dry_run.
Mode string
MaxSpendCents *int64
// Note is the run's first update; empty for "Started by …".
Note string
}
AgentRunDraft is an agent run an extension starts for the caller, such as a loop's brief, as POST /v1/workspaces/{ws}/playbooks/{id}/agent-runs does for a playbook: Outflare's agent carries it out in turns as an agent token of its own on the action layer, and the mode sets what it may do on its own. It replaces MissionDraft for new loops.
type AgentSpec ¶ added in v0.80.0
type AgentSpec struct {
WorkspaceID string
// Name shows in the audit log and on the Agents page, such as "Brand
// agent: Acme". Up to 200 characters.
Name string
// Scopes the agent holds: never more than an operator's, and never one
// only a person may hold.
Scopes []string
// BrandID keeps the token to one brand, or nil for every brand.
BrandID *string
// CreatedBy is the id of the person on whose say-so the loop runs, or
// "". A disabled person's agents stop with them.
CreatedBy string
}
AgentSpec describes the agent token an extension creates for a loop.
type BlobStore ¶ added in v0.110.0
type BlobStore interface {
Put(ctx context.Context, key, contentType string, body []byte) error
Get(ctx context.Context, key string) ([]byte, error)
Delete(ctx context.Context, key string) error
}
BlobStore keeps a recording's parts: the server's bucket.
type BrandKnowledge ¶ added in v0.86.0
type BrandKnowledge struct {
Summary string `json:"summary"`
Industry string `json:"industry"`
Lists map[string][]KnowledgeItem `json:"lists"`
// Pages are the addresses the last read took it from.
Pages []string `json:"pages"`
}
BrandKnowledge is what the website says, as a person may edit it.
func (BrandKnowledge) Empty ¶ added in v0.86.0
func (k BrandKnowledge) Empty() bool
Empty reports whether nothing was read or written yet.
func (BrandKnowledge) Text ¶ added in v0.86.0
func (k BrandKnowledge) Text() string
Text writes the knowledge for a model's prompt, "" when empty.
func (*BrandKnowledge) UnmarshalJSON ¶ added in v0.86.0
func (k *BrandKnowledge) UnmarshalJSON(b []byte) error
UnmarshalJSON reads the model's answer (bullets by page number) and a stored or edited knowledge (bullets by URL) alike.
type Caller ¶
type Caller struct {
WorkspaceID string
// ActorID is the person's or token's actor; ActorType "human" or
// "api_token".
ActorID, ActorType string
// UserID is the person, also for their API tokens; empty for a token
// whose maker has left.
UserID string
// Role is the person's workspace role, empty for tokens.
Role string
// Brands limits the caller to some brands; nil is every brand.
Brands []string
// Brand is the brand a brand route is on (WorkspaceRoute.Brand), and
// empty on a workspace route.
Brand string
// Test is true in a test workspace.
Test bool
// contains filtered or unexported fields
}
Caller is who is making a workspace request, and what they may do.
func (*Caller) AddLinkProspects ¶ added in v0.78.0
func (c *Caller) AddLinkProspects(ctx context.Context, tx pgx.Tx, site seosync.ProspectSite, source string, list []seosync.Prospect) (seosync.ProspectsAdded, error)
AddLinkProspects adds pages to site's link prospect list in tx, as the caller, recording link_prospect.found for each new one. The caller must be able to change site's brand; the pages are already checked (seosync.ProspectPage, a known method, not on the site itself).
func (*Caller) Decode ¶
Decode reads a JSON body, refusing unknown fields, and answers 400 when it cannot.
func (*Caller) Record ¶
func (c *Caller) Record(ctx context.Context, tx pgx.Tx, action, targetType, targetID string, data map[string]any) error
Record writes an audit event for the caller in tx, which is also the product event of the same name once the request succeeds.
func (*Caller) Sees ¶
Sees reports whether the caller may see something of a brand (nil for shared).
func (*Caller) StartAgentRun ¶ added in v0.81.0
StartAgentRun starts an agent run for the caller in tx: the caller needs agents.run, the run gets a token and grants from its mode, its first turn is due at once, and agent_run.created is recorded. It returns the run's id.
func (*Caller) StartMission ¶ added in v0.37.0
StartMission is retired with missions: it always returns ErrMissionRetired. Loops start agent runs with StartAgentRun instead. It stays so extensions built against it keep compiling until it is removed.
type CertState ¶ added in v0.8.0
type CertState struct {
Status string // pending, active or failed
// Error says what to fix when Status is failed, or why it is still
// pending when the provider knows.
Error string
}
CertState is where a tracking domain's certificate stands.
type ClickHouseArchive ¶ added in v0.81.0
type ClickHouseArchive struct{ CH *eventstore.ClickHouse }
ClickHouseArchive lets rule dry runs read the ClickHouse event store (Options.EventArchive), which keeps every event, beyond Postgres's retention.
func (ClickHouseArchive) RuleEvents ¶ added in v0.81.0
func (c ClickHouseArchive) RuleEvents(ctx context.Context, ws, name string, since time.Time, limit int) ([]rules.ArchivedEvent, error)
RuleEvents implements rules.EventArchive.
type DeletionWorkspace ¶
type DeletionWorkspace struct {
ID string `json:"id"`
Name string `json:"name"`
NewOwner string `json:"new_owner_email,omitempty"`
}
DeletionWorkspace is one workspace in a UserDeletion.
type InputError ¶
type InputError struct{ Msg string }
InputError is a validation failure whose message is safe to show.
func (*InputError) Error ¶
func (e *InputError) Error() string
type KnowledgeItem ¶ added in v0.86.0
type MCPUpstream ¶
MCPUpstream is where the hosted MCP server listens, and the secret that proves a request came through the engine.
type MenuBadges ¶ added in v0.83.0
MenuBadges returns short texts an extension shows next to its own sidebar links for one workspace, by link id, such as {"billing": "$50.00"}.
type MenuLink ¶
type MenuLink struct {
// ID is a stable name for the link, such as "admin".
ID string `json:"id"`
// Label is what the sidebar shows, such as "Admin".
Label string `json:"label"`
// Href is the page it opens: a path on this server, such as "/admin".
Href string `json:"href"`
// Icon names one of the web app's icons, such as "shield".
Icon string `json:"icon"`
}
MenuLink is an extra item an extension adds to one person's sidebar, such as the hosted Cloud's staff console for staff. It arrives in /v1/me as menu_links, so only the people it is for ever see it; the page it opens still checks who is calling.
type MissionDraft ¶ added in v0.37.0
type MissionDraft struct {
Name, Goal, Instructions, Plan string
// Mode is dry_run (the default), approve_writes or autonomous.
Mode string
MaxSpendCents *int64
EndsAt *time.Time
}
MissionDraft is a mission an extension starts for the caller, such as a loop's brief. Like any mission it does nothing until a person approves it, and everything it does goes through the API's gate, limits and audit log.
type NewAccount ¶
type NewAccount struct {
Email, Name, Password, WorkspaceName string
// Identity, instead of Password, is a Google sign-in from
// /v1/auth/google/callback (its identity parameter). Its verified email
// is the account's; Email may be empty or must match it.
Identity string
}
NewAccount is a person signing up with their first workspace.
type Options ¶
type Options struct {
WebDir string // built web app to serve; empty disables
PublicURL string // external base URL, used in links and to decide Secure cookies
Mailboxes *mailbox.Service
Sending *sending.Engine
Inbox *inbox.Syncer
OAuth *oauth.Tokens // "Continue with Google"; nil disables it
// Allocation plans which mailboxes serve which sequences; nil builds one.
Allocation *allocation.Service
Box *secrets.Box // seals OAuth states for connectors
// Connectors and email verification; nil disables them.
Integrations *connectors.Store
Verify *verify.Service
// EmailFinder proposes and verifies addresses from a workspace's learned
// patterns; nil turns the /email-finder endpoints off.
EmailFinder *emailfind.Service
// DataNetwork is the data network's membership and lookups
// (internal/datanetwork); it works without a network registered.
DataNetwork *datanetwork.Service
// InboundEmail receives workspaces' forwarded mail when an extension
// turned it on (package inboundemail); nil leaves it off.
InboundEmail *inboundemail.Service
// Classifier says what kind of email domain an address is; nil builds
// one on the built-in data that asks the system resolver.
Classifier *classify.Classifier
// Research reads an unknown domain's homepage with the workspace's own
// connector and AI key; nil leaves unknown domains unresearched.
Research *research.Service
// Lists builds lead lists from data providers; nil disables builds.
Lists *lists.Service
// Mailbox supplier sync (Cheap Inboxes and the like); nil disables it.
Vendors *vendorsync.Service
// Inbound receives connectors' webhooks (live updates); nil turns
// /v1/hooks and the live update endpoints off.
Inbound *inbound.Service
Imports *imports.Service // moving over from other sequencers
Platforms *platforms.Service // outside sequencers in mailbox allocation; nil disables syncing on demand
// Verifies tracking domains; defaults to the system resolver.
CNAME tracking.CNAMEResolver
// Outcome syncs (calendars, CRMs); nil disables syncing on demand.
Outcomes *outcomes.Syncer
// AnalyticsSync stores analytics history; nil turns the sync endpoints off.
AnalyticsSync *analyticsync.Syncer
// SEOSync keeps weekly SEO snapshots; nil turns POST .../seo/{id}/sync off.
SEOSync *seosync.Syncer
// AdSync reads connected ad accounts; nil turns POST .../ads/sync off.
AdSync *adsync.Syncer
// DomainConnect finds domains' DNS providers for the one-off "apply
// these records?" screen; nil builds one on the public internet and
// the system resolver, signing with a key the server stores.
DomainConnect *domainconnect.Client
// Crawl runs OutflareBot's crawls and ownership checks; nil builds one
// that checks DNS with the system resolver.
Crawl *crawl.Service
// Anonymous usage stats and update checks; nil builds one that sends
// nothing.
Telemetry *telemetry.Reporter
// RateLimit is how many requests an API token may make a minute; 0
// means no limit.
RateLimit int
// Webhooks sends test events and redeliveries; nil builds one that only
// delivers to public https URLs.
Webhooks *webhooks.Service
// EventArchive is the ClickHouse event store, when one is set up: rule
// dry runs replay events from it over up to a year.
EventArchive rules.EventArchive
// Sends account emails (confirmation, password reset); nil only logs
// them.
Mailer sysmail.Sender
// Passkeys turns on passkey sign-in, for PUBLIC_URL's host. Only set it
// once PUBLIC_URL is the address people will always use: passkeys made
// for one address don't work on another.
Passkeys bool
// ClientIPHeader is the header a trusted proxy in front of the server
// puts the visitor's address in, such as Fly-Client-IP. Empty uses the
// connection's address.
ClientIPHeader string
// PostHogKey turns on product analytics in the web app, sent through
// /ingest/ on this server to PostHogHost (https://us.i.posthog.com by
// default). Empty sends nothing.
PostHogKey string
PostHogHost string
// MCP is the hosted MCP server to proxy /mcp to; nil serves no /mcp.
MCP *MCPUpstream
// Emails sends lifecycle and transactional email through the
// workspace's email providers; nil builds one when Integrations and
// Box are set (its jobs run only where the queue registers it).
Emails *emails.Service
// PrivacyURL and TermsURL are the operator's policies, linked from the
// OAuth metadata when set.
PrivacyURL, TermsURL string
// CommunityLinks shows the optional "Star us on GitHub" and "Follow us
// on X" items (GET /v1/me/community); CommunityXURL is the X profile,
// empty to leave that item out. CommunityBuilderURL is the X profile of
// the person building Outflare in public ("Follow the builder"), empty
// to leave it out.
CommunityLinks bool
CommunityXURL string
CommunityBuilderURL string
// SignedInCookieDomain, when set, is a parent domain of PUBLIC_URL's
// host (outflare.ai for app.outflare.ai) where the server keeps an
// outflare_signed_in=1 cookie while someone is signed in, so a website
// on that domain can show a link to the app instead of Sign in. Empty
// sets no such cookie.
SignedInCookieDomain string
// SiteInbox makes POST /v1/site/events only queue browser events in
// site_event_inbox and answer; RunSiteInbox, on a server that works,
// stores them. Off stores them during the request.
SiteInbox bool
// Recordings is the bucket session recordings are kept in
// (OUTFLARE_S3_*). Nil leaves recordings off; heatmaps need none.
Recordings BlobStore
// Files is the bucket brands' files are kept in (logos, fonts,
// product shots; OUTFLARE_S3_*). Nil leaves uploads off.
Files BlobStore
// Video finishes and edits talking videos on the server (ffmpeg).
// Nil leaves those steps out: videos are made without them.
Video VideoTool
// Extension points for builds that add to the open-source engine, such
// as the hosted Cloud. See the outflare package.
Routes func(mux *http.ServeMux) // extra routes, registered before the /v1/ catch-all
// WorkspaceRoutes are extension routes behind the workspace check.
WorkspaceRoutes []WorkspaceRoute
Middleware []func(http.Handler) http.Handler // wrap every request, outermost first, inside request ids and logging
Capabilities []string // added to /v1/meta
// MenuLinks add per-person sidebar items, in /v1/me.
MenuLinks []MenuLinks
// MenuBadges add short per-workspace texts next to extension links
// (GET /v1/workspaces/{ws}/menu-badges).
MenuBadges []MenuBadges
// AITools name extensions' own AI calls on the usage page.
AITools []AITool
// SupportAuto says which workspaces the support assistant may answer
// customers in without a person; nil for none (it only drafts).
SupportAuto func(ctx context.Context, workspaceID string) bool
// AdAutoApprove says whether an agent may approve a paid ads
// suggestion that saves money, for a brand and kind, without a person;
// nil for never (only a person approves).
AdAutoApprove func(ctx context.Context, workspaceID, brandID, kind string) bool
// TrackingTarget is the host tracking domains' CNAME records point at;
// empty for PUBLIC_URL's host.
TrackingTarget string
// PartnersDomain serves partner portals at <subdomain>.<it>; empty for
// /p/<program>/ only.
PartnersDomain string
// TrackingCerts gets HTTPS certificates for tracking domains; nil when
// the operator's own proxy serves them.
TrackingCerts TrackingCerts
// Quota may refuse new brands, mailboxes, tracking domains and records
// (package quota); nil allows everything.
Quota quota.Checker
// EdgeSecret lets an edge in front of tracking domains pass on the
// domain and visitor address it saw (edge.go); empty turns that off.
EdgeSecret string
// QueryConnections is how many queries run at once, each on its own
// database connection; zero means the default (3), below zero turns
// Query off.
QueryConnections int
}
Options configures a Server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AIConnectionsOf ¶ added in v0.80.0
AIConnectionsOf lists the workspace's connected AI model connections, for a feature that calls several models (each with its own way of searching the web) rather than the one the workspace chose.
func (*Server) AIModelOn ¶ added in v0.80.0
func (s *Server) AIModelOn(ctx context.Context, ws, task, integrationID, model string, cents int64) (research.Choice, error)
AIModelOn opens one of the workspace's AI connections with model (empty: the workspace's model when it is that connection, else the provider's default) for task, refusing when the task's or the workspace's monthly AI limit would not cover about cents more. A model whose price Outflare doesn't know runs only on a router that reports what each call cost.
func (*Server) AIModelsOn ¶ added in v0.110.0
func (s *Server) AIModelsOn(ctx context.Context, ws, integrationID string) (llm.Provider, []llm.ModelInfo, error)
AIModelsOn lists the chat models one of the workspace's connected AI connections can use, asked of its provider with the workspace's own key, for a feature that lets the workspace pick a model of that connection.
func (*Server) AIVisibilityModels ¶
AIVisibilityModels is the engine's implementation of aivis.Models.
func (*Server) AIVisibilityScreens ¶ added in v0.86.0
AIVisibilityScreens is the engine's implementation of aivis.Screens.
func (*Server) ActAsAgent ¶ added in v0.97.0
func (s *Server) ActAsAgent(ctx context.Context, ws, brand, agentID, method, path string, body json.RawMessage, reason, key string) (int, []byte, error)
ActAsAgent makes one change in a brand as one of the workspace's agents, for a journey's outflare_action step (journeys.AgentCaller). The agent is an API token of the workspace whose changes go through the action layer, kept to that brand or to none, so its grants decide what runs, what waits for a person and what is refused. path is the part after /v1/brands/{brand}/.
func (*Server) AdvanceVideo ¶ added in v0.110.0
AdvanceVideo takes a video as far as it can go: through the stages done on the server, up to one that waits for a provider. It is safe to call at any time and from several workers: a stage that is already running is waited for, never started twice.
func (*Server) CallAsAgent ¶ added in v0.80.0
func (s *Server) CallAsAgent(ctx context.Context, tokenID, method, path string, body json.RawMessage, reason string) (int, []byte, error)
CallAsAgent makes one API call in process as an agent token: path is a full API path ("/v1/workspaces/{ws}/sequences", "/v1/brands/{id}/rules"), body is JSON or nil, and reason is what the agent says it is doing, kept with the action. The answer is the handler's: a change the gate held answers 202 with the action, one it refused 403 action_refused.
func (*Server) CheckInstalls ¶
CheckInstalls runs one pass of RunSetup now.
func (*Server) CheckRedditAction ¶ added in v0.48.0
CheckRedditAction reads a sent action on Engain and Reddit now.
func (*Server) CheckSocialWatch ¶
CheckSocialWatch searches the watch's channel, stores what matches, has the AI draft replies when the watch asks, and refreshes the results of recent actions.
func (*Server) CheckTrackerPages ¶ added in v0.110.0
CheckTrackerPages asks the landers and offers that are due, up to landerCheckBatch of each, waiting pause between them. It returns how many it asked. Only one worker runs it at a time.
func (*Server) CheckTrackingDomainExpiry ¶ added in v0.110.0
CheckTrackingDomainExpiry reads the registration of the verified tracking domains that are due, up to domainExpiryBatch, waiting pause between reads so the public RDAP service isn't hurried. It returns how many it read. Only one worker runs it at a time.
func (*Server) ConvertTransactions ¶ added in v0.81.0
ConvertTransactions converts what it can of the transactions with no brand amount yet, and says how many it converted.
func (*Server) CountUnassigned ¶ added in v0.83.0
CountUnassigned sets the unassigned connections gauge across every workspace.
func (*Server) CreateAgentToken ¶ added in v0.80.0
CreateAgentToken makes a loop's token in tx: on the action layer, with no secret kept, so only the engine can act as it (CallAsAgent).
func (*Server) DiscoverBrandLinks ¶
DiscoverBrandLinks reads a brand's homepage through the workspace's page reader and stores the profiles and listings it links to as suggestions. A page built in the browser, or one that turned the first read away, is read again with JavaScript on. A bot check or a slow page is the site's own refusal (blocked, slow_page): it is kept on the brand for the Links panel to show, and never retried, since it would only fail the same way.
func (*Server) DiscoverReviewPages ¶ added in v0.8.0
DiscoverReviewPages searches the web for a brand's review pages through the workspace's own web search connection (Geonode) and suggests the ones that match the brand. Nothing is added on its own.
func (*Server) DraftReviewReply ¶ added in v0.8.0
DraftReviewReply has the workspace's own AI write a drafting reply. When the AI can't (no model, no budget, a bad answer on the last try) the draft fails with the reason.
func (*Server) DraftSocialAction ¶
DraftSocialAction has the workspace's own AI write a drafting action. When the AI can't (no model, no budget, a bad answer on the last try) the action fails with the reason, and the post is open for a person.
func (*Server) DraftSocialPublication ¶ added in v0.18.0
DraftSocialPublication has the workspace's own AI write a publication that is drafting. When the AI can't (no model, no budget, a bad answer on the last try) it goes back to a draft with the reason, for a person to write.
func (*Server) DrainSiteInbox ¶
DrainSiteInbox gives every workspace with waiting events one turn and reports how many inbox rows it finished (stored or set aside).
func (*Server) ExpireHandEdits ¶ added in v0.81.0
ExpireHandEdits handles the hand edits whose time ran out, a batch at a time, and reports how many. Each goes in its own transaction: the field takes the value of the best other source that gave one (by the field's precedence, then the newest), as a normal change in the record's history that rules hear of. With no other value it stays, marked expired, and the next source to write the field replaces it.
func (*Server) ExpirePrivacyExports ¶ added in v0.62.0
ExpirePrivacyExports deletes the files of exports past their expiry and fails exports stuck pending, and returns how many expired.
func (*Server) FlushClicks ¶ added in v0.90.0
FlushClicks writes every buffered click now. A batch that fails goes back to wait for the next flush, unless the database refused it for what a click holds: then waiting changes nothing, so the batch is written in halves and only the click at fault is dropped.
func (*Server) Handler ¶
Handler returns the full HTTP handler with middleware applied. It is built once; approved mission actions run through it too.
func (*Server) JourneyAI ¶ added in v0.39.0
JourneyAI is the engine's implementation of journeys.AI.
func (*Server) KeepForecasts ¶ added in v0.110.0
KeepForecasts saves a reading for every brand that has a deal or a forecast target and no reading in the last 20 hours, and reports how many it saved. Each brand goes in its own transaction, so one that fails doesn't hold up the rest.
func (*Server) LookUpDueAddresses ¶ added in v0.95.0
LookUpDueAddresses claims one batch of due addresses and looks them up, and reports how many it claimed.
func (*Server) MoveDeal ¶ added in v0.35.0
func (s *Server) MoveDeal(ctx context.Context, tx pgx.Tx, ws, recordID string, d journeys.DealMove, ref string) (string, string, error)
MoveDeal is the engine's journeys.DealMover: a journey's move_deal step moves the person's open deal the same way a reply rule does, and with the same source, so it never overrides a stage a person set.
func (*Server) OpenRenewalDeals ¶ added in v0.97.0
func (s *Server) OpenRenewalDeals(ctx context.Context, tx pgx.Tx, ws, recordID, stage string, within int, ref string) (string, string, error)
OpenRenewalDeals is the engine's journeys.DealMover for open_renewal_deal: for the company, and for each record that names it as its company (an agreement), whose "Renews on" date is within the next days, it opens a deal at stage (the first stage when empty) with the renewal's value, closing on the renewal date. Where deals have an owner field it is the company's owner; the forecast counts the deal for the company's owner either way. A renewal that has had a deal for that date gets no second one, whatever became of the first.
func (*Server) ProductEventSink ¶
ProductEventSink returns the sink that stores product events in workspace ws, under brand (its id or handle; "" is the workspace's first brand), the one whose website tag counts the operator's own visitors, so people join their visits. It fails when either doesn't exist.
func (*Server) PruneClickAddresses ¶ added in v0.95.0
PruneClickAddresses deletes kept click addresses older than 30 days, and lookup results older than 400.
func (*Server) PruneEventInbox ¶ added in v0.62.0
PruneEventInbox deletes event inbox rows past their retention, a batch at a time, and returns how many it deleted.
func (*Server) PruneIdempotencyKeys ¶
PruneIdempotencyKeys deletes keys older than a day. The engine runs it hourly.
func (*Server) PruneInboundWebhookIDs ¶
PruneInboundWebhookIDs forgets the ids of suppliers' webhook deliveries after 30 days. Suppliers retry for hours, not weeks, so that is long enough to drop every repeat; the table no longer grows forever.
func (*Server) PruneJobs ¶
PruneJobs deletes finished jobs after 14 days, a batch at a time, and returns how many it deleted. Jobs with an idempotency key stay, because the key is what stops that work being queued twice, except the kinds in prunableKeyedJobs: one runs per event or per batch of events, so they grow with traffic, and their keys name an id made in the same transaction (an event, a batch) or a time slot long past, so nothing asks for them again after a day, let alone 14.
func (*Server) PruneKnowledgeBin ¶ added in v0.29.0
PruneKnowledgeBin deletes knowledge that has been in the bin for more than knowledgeBinDays, a batch at a time.
func (*Server) PruneOAuthCodes ¶
PruneOAuthCodes deletes authorization codes an hour after they expire, and apps that registered but were never approved within a day.
func (*Server) PrunePageVitals ¶ added in v0.87.0
PrunePageVitals deletes readings older than 90 days, a batch at a time.
func (*Server) PrunePartnerConversionLog ¶ added in v0.74.0
PrunePartnerConversionLog deletes logged conversion calls older than 30 days.
func (*Server) PruneQueryEndpointCalls ¶ added in v0.81.0
PruneQueryEndpointCalls deletes the call log of query endpoints after 90 days.
func (*Server) PruneRequestLogs ¶
PruneRequestLogs deletes request logs older than keep (DefaultLogRetention when zero), a batch at a time so a large backlog never holds a long lock.
func (*Server) PruneTrackerConversionLog ¶ added in v0.92.0
PruneTrackerConversionLog deletes logged calls older than 30 days.
func (*Server) PruneWebhookDeliveries ¶
PruneWebhookDeliveries deletes deliveries older than 30 days.
func (*Server) PublishSocialPublication ¶ added in v0.18.0
PublishSocialPublication posts an approved publication whose time has come, once. It is marked publishing before the call; only a rate limit the channel answered before posting anything is retried, and a call that may have gone through is never sent again.
func (*Server) PurgeAICalls ¶
PurgeAICalls runs one pass of RunAIUsage now and returns how many calls it deleted.
func (*Server) PurgeDeletions ¶ added in v0.64.0
PurgeDeletions removes deletions past their 7 days for good, and returns how many: what they hold is deleted, and a deleted record is erased as DELETE .../records/{record} would (with the records merged into it). A restored deletion's row goes too.
func (*Server) QueueDueABTestChecks ¶ added in v0.27.0
QueueDueABTestChecks moves each due running test's next check on and queues it, in one transaction, and reports how many it queued.
func (*Server) QueueDueBrandKnowledge ¶ added in v0.93.0
QueueDueBrandKnowledge turns on the daily read for every brand with a connected ad account (whichever path connected it) and queues the reads due: brands with the daily read on, a website, and no read in the last 23 hours. It says how many it queued.
func (*Server) QueueDueCoverage ¶ added in v0.69.0
QueueDueCoverage only observes and creates maintenance work. It never chooses an outreach action, sends a message or purchases a placement.
func (*Server) QueueDueInsightAlertChecks ¶ added in v0.85.0
QueueDueInsightAlertChecks moves each due rule's next check on and queues it, in one transaction, and reports how many it queued.
func (*Server) QueueDueMentionScans ¶ added in v0.110.0
QueueDueMentionScans moves each due brand's next scan on and queues it, in one transaction, and reports how many it queued.
func (*Server) QueueDueNewsSearches ¶ added in v0.21.0
QueueDueNewsSearches moves each due search's next run on and queues it, in one transaction, and reports how many it queued.
func (*Server) QueueDuePricingReads ¶ added in v0.86.0
QueueDuePricingReads queues a read through the first page reader of each workspace with a pricing page due, once an hour. A read only reads the pages that are due.
func (*Server) QueueDueReddit ¶ added in v0.48.0
QueueDueReddit queues the checks that are due, sends approved actions whose job was lost, and settles sends that died mid-call. It reports how many jobs it queued.
func (*Server) QueueDueReviewReads ¶ added in v0.8.0
QueueDueReviewReads queues a read through each page reader in a workspace whose brands link to a review page, once an hour. A read only reads the pages that are due, so this costs nothing until one is.
func (*Server) QueueDueSocialChecks ¶
QueueDueSocialChecks moves each due watch's next check on and queues it, in one transaction, and reports how many it queued.
func (*Server) QueueDueSocialPublications ¶ added in v0.18.0
QueueDueSocialPublications queues approved publications whose time has passed and whose own job has not posted them, and settles ones whose job died mid-call. It reports how many it queued.
func (*Server) QueueDueSocialSyncs ¶
QueueDueSocialSyncs queues a sync for each connection with an account that is due (every hour, so a failed read is tried again the same day), for each connection with no accounts yet (twice a day), and for each page reader in a workspace whose brands link to a profile (every hour, so a profile no read has started for yet, such as one linked before its channel could be read, starts within the hour; a sync reads only the accounts that are due, so this costs no reads), and reports how many it queued.
func (*Server) QueueSemanticEmbeds ¶ added in v0.4.0
QueueSemanticEmbeds runs one tick of RunSemanticSearch and reports how many jobs it queued.
func (*Server) QueueSupportImports ¶ added in v0.110.0
QueueSupportImports runs one tick of RunSupportImports and says how many passes it started. Servers ticking together start each once (the lock).
func (*Server) QueueWebsiteRechecks ¶ added in v0.81.0
QueueWebsiteRechecks runs one tick of RunWebsiteRechecks and says how many re-checks it queued. One workspace gets one at a time, and servers ticking together queue each once (the lock).
func (*Server) ReadBrandKnowledge ¶ added in v0.86.0
ReadBrandKnowledge reads a brand's website through the workspace's page reader and has its AI model write what the brand offers.
func (*Server) ReadBrandLook ¶ added in v0.93.0
ReadBrandLook reads a brand's home page for its logo and theme colour and saves the ones the brand doesn't have yet. A site that can't be read or offers neither leaves the brand as it was.
func (*Server) ReadMentionEpisode ¶ added in v0.110.0
ReadMentionEpisode reads the transcript a found episode's show publishes, keeps it, and keeps each place the brand or a tracked competitor is named in it, with the second when the transcript is timed. A mention already kept from the show notes gets the spoken quote and second.
func (*Server) ReadMentionVideo ¶ added in v0.110.0
ReadMentionVideo reads a found video's watch page (who made it, how many saw it, when) and its captions, keeps them, and keeps each place the brand or a tracked competitor is named in what was said, with the second it was said. A mention already kept from the video's title gets the spoken quote and second. Failures the workspace can fix (no page reading connection, a spent usage limit) set the video aside; a provider outage is tried again.
func (*Server) ReadPricingPages ¶ added in v0.86.0
ReadPricingPages reads the workspace's due pricing pages through one page reader. One page's failure doesn't stop the others; an outage or a used-up quota of the reader stops the round and is retried with the job.
func (*Server) ReadReviewPages ¶ added in v0.8.0
ReadReviewPages reads the review pages that are due through one page reader. One page's failure doesn't stop the others. An outage is retried with the job, and a failure Outflare has to fix (a page it couldn't save) fails the job so it shows in job.failed too.
func (*Server) RegisterJobs ¶
RegisterJobs adds the server's own background work to the queue.
func (*Server) RevokeAgentToken ¶ added in v0.80.0
func (s *Server) RevokeAgentToken(ctx context.Context, tx pgx.Tx, workspaceID, tokenID, byUserID string) error
RevokeAgentToken revokes a loop's token in tx, on the say-so of the person byUserID (or the system when empty), with its audit event. A token already revoked, or not this workspace's, is left as it is.
func (*Server) RunABTestAI ¶ added in v0.21.0
RunABTestAI runs one queued AI run on the workspace's own model. When the AI can't (no model, no budget, a bad answer on the last try), the run fails with the reason in words.
func (*Server) RunABTests ¶ added in v0.27.0
RunABTests queues the checks of running tests that are due, every interval, until ctx ends.
func (*Server) RunAIUsage ¶
RunAIUsage deletes calls older than the retention window, in batches so it never holds a long lock, every interval until ctx ends.
func (*Server) RunAgentRuns ¶ added in v0.83.0
RunAgentRuns takes the due turns of agent runs until ctx ends, looking every interval.
func (*Server) RunAutomations ¶ added in v0.54.1
RunAutomations starts playbook automations' runs as they fall due, until ctx ends.
func (*Server) RunBrandKnowledgeRefresh ¶ added in v0.93.0
RunBrandKnowledgeRefresh queues the daily reads of brands' websites that are due, every interval.
func (*Server) RunClicks ¶ added in v0.90.0
RunClicks writes buffered redirect clicks until ctx ends, then writes what is left. Every process that serves redirect links runs it.
func (*Server) RunConnectionBrands ¶ added in v0.83.0
RunConnectionBrands reports how many connections and accounts have no brand, for the dashboard, until ctx ends.
func (*Server) RunCreativeSkillDraft ¶ added in v0.110.0
RunCreativeSkillDraft drafts a skill for one queued description on the workspace's own model. When the AI can't (no model, no budget, a bad answer on the last try), the draft fails with the reason in words.
func (*Server) RunDueAgentTurns ¶ added in v0.80.0
RunDueAgentTurns runs every agent run turn that is due now, a few at a time, and reports how many ran.
func (*Server) RunDueAutomations ¶ added in v0.54.1
RunDueAutomations looks at every automation that is due, one at a time, and reports how many runs it started.
func (*Server) RunEventInbox ¶ added in v0.62.0
RunEventInbox keeps the event inbox healthy until ctx ends: it reports how many events wait and how long, queues processing for brands whose events have waited too long (a job lost or out of retries), and deletes rows at the end of their retention.
func (*Server) RunForecastHistory ¶ added in v0.110.0
RunForecastHistory keeps each brand's forecast reading every interval, until ctx ends.
func (*Server) RunGeneration ¶ added in v0.110.0
RunGeneration takes a generation one step on: sends it to the provider, or asks how a request the provider is still working on is doing, and keeps the file once there is one. It queues its own next look while the provider works. A request is sent once: when a step dies between sending and noting the answer, the generation fails rather than being sent (and paid for) again.
func (*Server) RunHandEditExpiry ¶ added in v0.81.0
RunHandEditExpiry hands expired hand edits over every interval, until ctx ends.
func (*Server) RunIPLookups ¶ added in v0.95.0
RunIPLookups looks up due click addresses every interval, at once again while a pass finds a full batch, until ctx ends.
func (*Server) RunInsightAlerts ¶ added in v0.85.0
RunInsightAlerts queues the checks of the rules that are due, every interval, until ctx ends.
func (*Server) RunInsightQuestion ¶ added in v0.110.0
RunInsightQuestion answers one queued question on the workspace's own model. When the AI can't (no model, no budget, a bad answer on the last try), the question fails with the reason in words.
func (*Server) RunNetworkCosts ¶ added in v0.97.0
RunNetworkCosts reconciles network cost every interval until ctx ends.
func (*Server) RunNewsSearch ¶ added in v0.21.0
RunNewsSearch runs one search through the workspace's own web search connection, books what it cost, and keeps the articles it found: for a coverage search, those that name the brand's query and aren't on its own site become coverage. A failure is kept on the search (last_error_code) and is an event; the job is retried when the provider was unavailable or rate limited, and the search runs again soon (retry.After) either way.
func (*Server) RunPageChecks ¶ added in v0.110.0
RunPageChecks checks due landers and offers every interval until ctx ends.
func (*Server) RunPartnerRewards ¶ added in v0.22.0
RunPartnerRewards approves held rewards whose hold has ended, in programs that approve on their own, until ctx ends.
func (*Server) RunPayments ¶
RunPayments queues payment syncs until ctx ends.
func (*Server) RunPrivacyExports ¶ added in v0.62.0
RunPrivacyExports expires privacy exports until ctx ends: a ready export past its 7 days loses its file, and one pending far too long (its job is dead) fails.
func (*Server) RunQueryQuestion ¶ added in v0.110.0
RunQueryQuestion answers one queued question on the workspace's own model. When the AI can't (no model, no budget, a bad answer on the last try), the question fails with the reason in words.
func (*Server) RunRecoveryWindow ¶ added in v0.64.0
RunRecoveryWindow purges deletions past their 7 days until ctx ends.
func (*Server) RunReplaySweep ¶ added in v0.110.0
RunReplaySweep deletes recordings a person deleted, that are past their brand's keep_days or that ended shorter than its min_seconds, file first, and heatmap counts past 90 days.
func (*Server) RunSalesFeeds ¶ added in v0.110.0
RunSalesFeeds queues a read of every channel that is due, every interval until ctx ends.
func (*Server) RunSemanticSearch ¶ added in v0.4.0
RunSemanticSearch queues an embedding job for each workspace with meaning-based search on that has none waiting, every tick.
func (*Server) RunSetup ¶
RunSetup keeps looking for the proof of sites waiting on a DNS record, and works out install health, until ctx ends.
func (*Server) RunSiteInbox ¶
RunSiteInbox stores the browser events waiting in site_event_inbox until ctx ends: straight away while there are any, then on a wake from this process's collector or every poll.
func (*Server) RunSmartListDraft ¶ added in v0.110.0
RunSmartListDraft writes rules for one queued description on the workspace's own model. When the AI can't (no model, no budget, a bad answer on the last try), the draft fails with the reason in words.
func (*Server) RunSocialAction ¶
RunSocialAction runs an approved action on its connection. It never runs twice: only a refusal the channel answered before doing anything (a rate limit) is retried, and a call that may have gone through is not sent again.
func (*Server) RunSupportImports ¶ added in v0.110.0
RunSupportImports starts the next pass of each caught-up import every few minutes, retries failed ones, restarts stuck ones, and reports how far behind the imports are.
func (*Server) RunTrackingDomainExpiry ¶ added in v0.110.0
RunTrackingDomainExpiry reads due tracking domains' registrations every interval until ctx ends.
func (*Server) RunTransactionRates ¶ added in v0.81.0
RunTransactionRates fills in the brand amounts of transactions saved before their day's exchange rate was known, every interval.
func (*Server) RunWebsiteRechecks ¶ added in v0.81.0
RunWebsiteRechecks keeps imported websites current: every tick, each website imported into knowledge whose last import finished more than a day ago is read again (a scheduled import with the same settings), so changed pages update, new ones are added and removed ones unpublished.
func (*Server) ScanBrandMentions ¶ added in v0.110.0
ScanBrandMentions reads what the brand's sources found since its last scan, keeps every new place the brand or a tracked competitor is named, and reports how many it kept. A brand with mentions off is skipped.
func (*Server) SendRedditAction ¶ added in v0.48.0
SendRedditAction sends an approved action to Engain, once.
func (*Server) SetAdAutoApprove ¶ added in v0.85.0
func (s *Server) SetAdAutoApprove(fn func(ctx context.Context, workspaceID, brandID, kind string) bool)
SetAdAutoApprove replaces the hook that lets agents approve saving suggestions (Options.AdAutoApprove), for tests.
func (*Server) SetSupportAuto ¶ added in v0.80.0
SetSupportAuto lets an extension decide which workspaces the support assistant may answer customers in without a person (Auto mode).
func (*Server) SmartListQueryIDs ¶ added in v0.81.0
SmartListQueryIDs runs a query list's saved query (its current version) and returns the records in its record_id column, or its id column. It reads customer data only (customers.read), inside the list's brand, as any query on the brand's route does. smartlists.Service calls it.
func (*Server) StartTrackingHTTPS ¶ added in v0.8.0
StartTrackingHTTPS asks for certificates for verified tracking domains that have none yet, such as those verified before the server had a provider, and checks again on pending ones nothing is checking. Their links use the server's own address until each is active.
func (*Server) SweepReplay ¶ added in v0.110.0
SweepReplay does one round of RunReplaySweep and returns how many recordings it removed.
func (*Server) SyncNetworkCosts ¶ added in v0.97.0
SyncNetworkCosts runs one pass over every active traffic source whose network reports spend, and reports how many campaign days it reconciled.
func (*Server) SyncSocialAccounts ¶
SyncSocialAccounts finds the accounts a connection reaches and reads the ones that are due. A failure is kept on the accounts and in the events; an outage is tried again by the accounts' own back-off, and the job itself fails only for what Outflare must fix (a read it couldn't save).
func (*Server) WriteField ¶ added in v0.28.0
func (s *Server) WriteField(ctx context.Context, tx pgx.Tx, ws, recordID, field, change string, value any, overwriteManual bool, ref string) (string, string, error)
WriteField changes one field of a record for a journey step, with the same checks, history and source precedence as PATCH .../records/{id}. change is set, clear or increment, or add and remove for a field that holds a list (tags). The write's source is first_party, so it never overwrites a value a person set by hand, unless overwriteManual; then the step reports it skipped with why. ref is the journey run, kept in the audit data.
It reports done or skipped with a reason, and failed (with a message) for a step that can't work, such as an unknown field or a bad value.
type SupportView ¶ added in v0.8.0
SupportView is a view StartSupportView began.
type TrackingCerts ¶ added in v0.8.0
type TrackingCerts interface {
// Ensure asks for a certificate for domain, or reports on the one
// already asked for. Calling it again for the same domain is safe.
Ensure(ctx context.Context, domain string) (CertState, error)
// Remove stops serving domain and drops its certificate. A domain
// that is already gone is not an error.
Remove(ctx context.Context, domain string) error
}
TrackingCerts gets HTTPS certificates for workspaces' tracking domains, for a server whose own proxy can't (an extension can ask a certificate provider for one per domain). Without one, the operator's proxy serves HTTPS for tracking domains as it does for PUBLIC_URL.
type UserDeletion ¶
type UserDeletion struct {
// Deleted are workspaces nobody else is a member of. They go with
// everything in them: mailboxes, leads, sequences, messages, connections.
Deleted []DeletionWorkspace `json:"workspaces_deleted"`
// Kept are workspaces shared with others. The person leaves them; if
// they were the only owner, NewOwner (the longest-standing admin, else
// the longest-standing member) becomes the owner.
Kept []DeletionWorkspace `json:"workspaces_kept"`
}
UserDeletion says what deleting a person does to their workspaces.
type VideoTool ¶ added in v0.110.0
type VideoTool interface {
Probe(ctx context.Context, data []byte) (videofx.Info, error)
Tighten(ctx context.Context, audio []byte, gap float64) ([]byte, error)
Finish(ctx context.Context, video []byte, look videofx.Look) ([]byte, error)
Cut(ctx context.Context, video []byte, from, to float64) ([]byte, error)
Splice(ctx context.Context, base, part []byte, from, to float64) ([]byte, error)
Frame(ctx context.Context, video []byte, at float64) ([]byte, error)
}
VideoTool finishes and edits videos on the server (videofx.Tool, which runs ffmpeg). Nil on a server without ffmpeg: videos are still made, without the finish and without edits.
type WorkspaceRoute ¶
type WorkspaceRoute struct {
// Pattern is a net/http pattern with {ws}, such as
// "POST /v1/workspaces/{ws}/cloud/lead-finder/runs".
Pattern string
// Scope is what the caller needs, such as "lists.manage".
Scope string
// Handler serves the request. Brand-limited callers are let in, so it
// keeps them to their brands with Caller.Sees and Caller.Writes.
Handler func(w http.ResponseWriter, r *http.Request, c *Caller)
// Brand puts the route under /v1/brands/{brand}/...: the engine finds
// the brand's workspace, answers 404 to a caller who can't see the
// brand, and sets Caller.Brand.
Brand bool
}
WorkspaceRoute is an extension's route under /v1/workspaces/{ws}/...
Source Files
¶
- abtests.go
- abtests_ai.go
- abtests_check.go
- abtests_factorial.go
- abtests_interactions.go
- abtests_launch.go
- abtests_learn.go
- abtests_page_ai.go
- abtests_preview.go
- abtests_registration.go
- abtests_versions.go
- access.go
- account_admin.go
- account_email.go
- accounts.go
- actions.go
- ad_audiences.go
- ad_changes.go
- ad_conversion_check.go
- ad_conversions.go
- ad_draft_checks.go
- ad_drafts.go
- ad_exclusions.go
- ad_feed.go
- ad_findings.go
- ad_item_changes.go
- ad_locations.go
- ad_match_quality.go
- ad_negative_keywords.go
- ad_platform_changes.go
- ad_query.go
- ad_remove_permission.go
- ad_rmf.go
- ad_send_status.go
- ad_signals.go
- ad_suggestions.go
- ad_targeting.go
- ad_targets.go
- ad_tests.go
- ad_tracking.go
- ad_tracking_fix.go
- ad_tracking_health.go
- ads.go
- ads_depth.go
- ads_items.go
- agent_oauth.go
- agent_runner.go
- agent_runs.go
- agent_shared.go
- ai_accounts.go
- ai_bot_hits.go
- ai_bot_reports.go
- ai_desktop.go
- ai_on.go
- ai_receipts.go
- ai_settings.go
- ai_usage.go
- aivisibility.go
- aivisibility_answer_share.go
- aivisibility_benchmark.go
- aivisibility_claims.go
- aivisibility_digest.go
- aivisibility_draft.go
- aivisibility_facts.go
- aivisibility_overview.go
- aivisibility_page.go
- aivisibility_page_reviews.go
- aivisibility_pages.go
- aivisibility_placements.go
- aivisibility_questions.go
- aivisibility_score.go
- aivisibility_screens.go
- aivisibility_series.go
- aivisibility_share.go
- aivisibility_traffic.go
- alerts.go
- allocation.go
- allocation_declines.go
- analytics.go
- analytics_brands.go
- analytics_changes.go
- analytics_history.go
- app_signin.go
- attribution.go
- attribution_accounts.go
- attribution_ads.go
- attribution_customers.go
- attribution_models.go
- authn.go
- automation_map.go
- backlinks.go
- batches.go
- billing_subscriptions.go
- brand_account_takeovers.go
- brand_accounts.go
- brand_activation.go
- brand_assets.go
- brand_coverage.go
- brand_coverage_actions.go
- brand_coverage_ai.go
- brand_coverage_extract.go
- brand_coverage_filters.go
- brand_coverage_jobs.go
- brand_coverage_maintenance.go
- brand_coverage_outcomes.go
- brand_coverage_reader.go
- brand_coverage_reports.go
- brand_coverage_resources.go
- brand_coverage_schema.go
- brand_coverage_sites.go
- brand_delete.go
- brand_dns.go
- brand_events.go
- brand_generations.go
- brand_knowledge.go
- brand_knowledge_review.go
- brand_link_orders.go
- brand_link_orders_actions.go
- brand_link_orders_ahrefs.go
- brand_link_orders_candidates.go
- brand_link_orders_catalog.go
- brand_link_orders_copy.go
- brand_link_orders_find.go
- brand_link_orders_jobs.go
- brand_link_orders_outreach.go
- brand_link_orders_table.go
- brand_link_orders_targets.go
- brand_link_roi.go
- brand_links.go
- brand_look.go
- brand_partnership_actions.go
- brand_partnerships.go
- brand_personas.go
- brand_presence.go
- brand_presence_competitors.go
- brand_presence_discovery.go
- brand_presence_found.go
- brand_presence_opportunities.go
- brand_presence_redirects.go
- brand_presence_verify.go
- brand_presence_watch.go
- brand_profile.go
- brand_rules.go
- brand_timezone.go
- brand_videos.go
- brand_website.go
- brands.go
- browser_tasks.go
- bulk_edits.go
- campaign_links.go
- catalog.go
- catalog_countries.go
- catalog_labels.go
- channels.go
- classify.go
- classify_research.go
- click_actions.go
- community.go
- competition_competitor.go
- competition_discover.go
- competition_refresh.go
- competitor_overview.go
- competitor_pricing.go
- competitor_profiles.go
- competitors.go
- connect_requests.go
- connection_brands.go
- connection_hooks.go
- connection_usage.go
- consent_banner.go
- consent_texts.go
- contact_rules.go
- contactability.go
- content.go
- content_delivery.go
- context.go
- conversation_signals.go
- conversion_definitions.go
- cookie_policy.go
- countrycodes.go
- crawl_ai.go
- creative_skill_drafts.go
- creative_skills.go
- creative_workflows.go
- creatives.go
- crm.go
- crm_calendar_view.go
- crm_calendar_workspace.go
- crm_google.go
- crm_google_sync.go
- crm_import.go
- crm_import_run.go
- crm_mail.go
- crm_mail_contacts.go
- crm_mail_privacy.go
- crm_mail_send.go
- crm_mail_team.go
- crm_mail_workspace.go
- csp.go
- cursor.go
- customer_events.go
- customer_profiles.go
- dashboards.go
- dashboards_digest.go
- dashboards_filters.go
- dashboards_share.go
- data_network.go
- deploys.go
- destinations.go
- developer_setup.go
- digests.go
- direct_clicks.go
- dns_approval.go
- dns_install.go
- domains.go
- drilldown.go
- drilldown_formula.go
- edge.go
- email_broadcasts.go
- email_guardrails.go
- email_preferences.go
- email_topics.go
- email_unsubscribe_all.go
- emailbison_compat.go
- emailfind.go
- emails.go
- error_alerts.go
- error_enrich.go
- error_merges.go
- error_rules.go
- errorcodes.go
- event_archive.go
- event_counts.go
- event_name_check.go
- event_plan.go
- event_usage.go
- experiments.go
- extension_agents.go
- extension_routes.go
- field_sources.go
- fields.go
- findings.go
- fixautonomy.go
- fixes.go
- fixloop.go
- fixtickets.go
- flag_editor.go
- flag_editor_ai.go
- flag_groups.go
- flag_people.go
- flags.go
- google_mail_callback.go
- guard_list_syncs.go
- headers.go
- health.go
- help_centre.go
- help_centre_site.go
- icp.go
- idempotency.go
- ids.go
- imports.go
- inbound_email.go
- inbound_forwarders.go
- inbox.go
- inbox_loop_ins.go
- inbox_presence.go
- inbox_tags.go
- inbox_teamwork.go
- inbox_viewing.go
- indexability.go
- infra.go
- insight_alerts.go
- insights.go
- insights_ask.go
- insights_phase4.go
- insights_run.go
- install_health.go
- integration_signin.go
- integrations.go
- internal_people.go
- item_links.go
- jobs.go
- journey_ai.go
- journey_deals.go
- journey_fields.go
- journey_lift.go
- journey_secrets.go
- journey_trials.go
- journey_versions.go
- journeys.go
- kit_export.go
- kit_flows.go
- kits.go
- knowledge.go
- knowledge_capture.go
- knowledge_insights.go
- knowledge_learn_replies.go
- knowledge_retrieval.go
- knowledge_review.go
- knowledge_website_import.go
- known_domains.go
- leads.go
- lifecycle.go
- link_assets.go
- link_destinations.go
- link_paths.go
- link_pitches.go
- link_prospects.go
- link_reads.go
- lists.go
- login.go
- look.go
- mail_signin.go
- mailbox_activity.go
- mailboxes.go
- mcp_proxy.go
- mentions.go
- mentions_owners.go
- mentions_podcasts.go
- mentions_youtube.go
- menu_items.go
- menu_links.go
- merges.go
- missions.go
- news.go
- news_journalists.go
- news_journalists_write.go
- onboarding.go
- outcomes.go
- own_playbooks.go
- paidads_acquisitions.go
- paidads_economics.go
- paidads_holdouts.go
- paidads_matchcheck.go
- paidads_performance.go
- paidads_setup.go
- paidads_status.go
- partner_offer_settings.go
- partner_proposals.go
- partner_tasks.go
- partner_tasks_jobs.go
- partners.go
- partners_activity.go
- partners_billing.go
- partners_brands.go
- partners_bulk.go
- partners_conversion_log.go
- partners_conversions.go
- partners_coupons.go
- partners_events.go
- partners_fraud.go
- partners_groups.go
- partners_import.go
- partners_leads.go
- partners_ledger.go
- partners_members.go
- partners_notify.go
- partners_portal.go
- partners_portal_analytics.go
- partners_portal_payouts.go
- partners_postbacks.go
- partners_proofs.go
- partners_proofs_export.go
- partners_settings.go
- partners_site.go
- passkeys.go
- payments.go
- payments_link.go
- payments_sync.go
- people_accounts.go
- people_setup.go
- platforms.go
- playbook_automations.go
- playbook_home.go
- playbook_lift.go
- playbooks.go
- posthog.go
- presence_value.go
- privacy_export.go
- product_events.go
- products.go
- products_from_events.go
- query.go
- query_ask.go
- query_brand.go
- query_builder.go
- query_catalog.go
- query_catalog_ads.go
- query_catalog_agents.go
- query_catalog_customers.go
- query_catalog_live.go
- query_catalog_seo.go
- query_endpoint_describe.go
- query_endpoints.go
- query_saved.go
- quota.go
- ratelimit.go
- read_failures.go
- record_editing.go
- record_group.go
- record_metrics.go
- record_summary.go
- records.go
- records_import.go
- recovery_window.go
- reddit_campaigns.go
- reddit_campaigns_jobs.go
- redirect_clicks.go
- redirect_links.go
- redirect_modes.go
- relationship_check.go
- renewal_deals.go
- replay.go
- reply_deals.go
- reply_rules.go
- report_views.go
- reports.go
- request_logs.go
- retired_routes.go
- revenue.go
- revenue_forecast.go
- revenue_forecast_history.go
- revenue_team.go
- review_requests.go
- review_requests_report.go
- reviews.go
- reviews_draft.go
- reviews_jobs.go
- roles.go
- routing.go
- rules.go
- sales.go
- sales_alerts.go
- sales_attribution.go
- sales_collaboration.go
- sales_crm.go
- sales_draft_assist.go
- sales_feed_ai.go
- sales_feed_apply.go
- sales_feed_fields.go
- sales_feed_items.go
- sales_feed_poll.go
- sales_feed_process.go
- sales_feed_sweep.go
- sales_feeds.go
- sales_google.go
- sales_import.go
- sales_previews.go
- sales_recording.go
- sales_reporting.go
- sales_send.go
- sales_slack_search.go
- sales_sync.go
- sales_team_reporting.go
- sandbox.go
- saved_replies.go
- scores.go
- search.go
- search_attribution.go
- search_insights.go
- search_migrations.go
- search_performance.go
- search_results.go
- search_vitals.go
- search_workspace.go
- semantic.go
- seo.go
- seoboard.go
- seocannibal.go
- seoconversions.go
- seocountrypages.go
- seodeclining.go
- seoissues.go
- seoissues_pages.go
- seolinks.go
- seomoney.go
- seoorganic.go
- seooverview.go
- seooverview_success.go
- seoranks.go
- seoregressions.go
- seosearch.go
- seosites.go
- seotargetimport.go
- seotargetreport.go
- seotargets.go
- seotechnical.go
- sequences.go
- server.go
- servers.go
- setup.go
- signals.go
- signup_confirm.go
- site_analytics.go
- site_device.go
- site_errors.go
- site_identify.go
- site_inbox.go
- site_keys.go
- site_live.go
- site_params.go
- site_pixels.go
- site_sessions.go
- site_text.go
- site_vitals.go
- site_zones.go
- smart_list_drafts.go
- smart_list_query.go
- smart_lists.go
- social.go
- social_accounts.go
- social_accounts_jobs.go
- social_jobs.go
- social_public.go
- social_publish.go
- social_publish_jobs.go
- source_maps.go
- source_maps_cache.go
- staff.go
- staff_telegram.go
- staff_telegram_sync.go
- stats.go
- status.go
- stories.go
- stories_ai.go
- story_pitch_sequence.go
- story_pitches.go
- story_quote_approval_page.go
- story_quote_approvals.go
- subsources.go
- support.go
- support_access.go
- support_articles.go
- support_assistant.go
- support_assistant_api.go
- support_assistant_hold.go
- support_chat.go
- support_find_answer.go
- support_forwarding.go
- support_handoff.go
- support_import.go
- support_sla.go
- support_topics.go
- suppression_syncs.go
- table_views.go
- teams.go
- telegram_chats.go
- telemetry.go
- tools.go
- track.go
- tracker_click_filters.go
- tracker_click_log.go
- tracker_conversion_log.go
- tracker_conversion_upload.go
- tracker_conversions.go
- tracker_cost_updates.go
- tracker_flows.go
- tracker_ip_lookup_run.go
- tracker_ip_lookups.go
- tracker_landers.go
- tracker_network_costs.go
- tracker_network_targets.go
- tracker_offers.go
- tracker_page_checks.go
- tracker_preview.go
- tracker_source_postbacks.go
- tracker_weights.go
- tracking.go
- tracking_domain_expiry.go
- tracking_hosts.go
- tracking_https.go
- traffic_sources.go
- transactions.go
- txretry.go
- ui_events.go
- unmerge.go
- vendor_mailboxes.go
- verification.go
- visitor_browsers.go
- visitor_people.go
- visitor_reveal.go
- visitors.go
- warmup.go
- webhooks.go
- whoami.go
- workspace_domains.go
- workspace_slug.go