Documentation
¶
Overview ¶
Package scambus is the official Go client for the SCAMBUS API.
It submits scam reports as journal entries, searches identifiers, cases and entries, manages export streams, and receives live data over SSE or WebSocket.
Authentication ¶
New resolves credentials in this order: explicit options, the SCAMBUS_* environment variables, then ~/.scambus/config.json written by the CLI.
client, err := scambus.New()
An API key takes precedence over a bearer token when both are available.
client, err := scambus.New(
scambus.WithAPIURL("https://scambus.net/api"),
scambus.WithAPIKey(keyID, keySecret),
)
Services ¶
Calls are grouped by resource on the client: Journal, Identifiers, Cases, Queues, Streams, Consume, Views, Tags, Search, Notifications, Sessions, Personas, Reports, Automations, FileExports, Media, Comments and Admin.
entry, err := client.Journal.CreateDetection(ctx, scambus.DetectionInput{
Description: "Automated phishing detection",
Identifiers: []scambus.IdentifierLookup{
{Type: scambus.IdentifierTypePhone, Value: "+12125551234", Confidence: scambus.Ptr(0.9)},
},
})
Errors ¶
Every failure carries an *APIError and matches a sentinel through errors.Is: ErrAuthentication, ErrValidation, ErrNotFound, ErrRateLimited, ErrCursorExpired and ErrServer.
if errors.Is(err, scambus.ErrNotFound) {
// ...
}
Retries ¶
Transient failures retry with full-jitter exponential backoff, honouring Retry-After and bounded by WithMaxRetries and WithRetryMaxTime. A 408, a 429 or a 503 with Retry-After means the server did not process the request, so any method is replayed. Another 5xx or a dropped connection may follow a committed write, so only idempotent methods are replayed there; such a failed POST is reported, never repeated. Cancelling the context stops the retry loop.
The client refuses HTTP redirects. Credentials travel in headers, and Go forwards a custom header such as X-API-Key across a host boundary.
A *Client is safe for concurrent use by any number of goroutines. A *WSClient is not.
Consuming streams ¶
Consume methods take the stream's consumer key, not its id.
err := client.Consume.Subscribe(ctx, consumerKey,
&scambus.SubscribeOptions{Cursor: scambus.CursorEnd, Reconnect: true},
func(m scambus.StreamMessage) error {
msg, err := m.Identifier()
if err != nil {
return err
}
fmt.Println(msg.DisplayValue, msg.Confidence.Score)
return nil
})
Index ¶
- Constants
- Variables
- func DecodeDetails[T any](data map[string]any) (T, error)
- func ParseIdentifierDetails(identifierType string, data map[string]any) (any, error)
- func Ptr[T any](v T) *T
- type APIError
- type ActivityCompleteDetails
- type AdminService
- func (s *AdminService) CancelURLConsolidation(ctx context.Context) error
- func (s *AdminService) CreateSpecialDomainRule(ctx context.Context, in CreateDomainRuleInput) (*SpecialDomainRule, error)
- func (s *AdminService) DeleteSpecialDomainRule(ctx context.Context, ruleID string) error
- func (s *AdminService) ListSpecialDomainRules(ctx context.Context, opts *ListDomainRulesOptions) ([]SpecialDomainRule, error)
- func (s *AdminService) StartURLConsolidation(ctx context.Context) (*URLConsolidationStatus, error)
- func (s *AdminService) URLConsolidationStatus(ctx context.Context) (*URLConsolidationStatus, error)
- func (s *AdminService) UpdateSpecialDomainRule(ctx context.Context, ruleID string, in UpdateDomainRuleInput) (*SpecialDomainRule, error)
- type Automation
- type AutomationAPIKey
- type AutomationService
- func (s *AutomationService) Create(ctx context.Context, in CreateAutomationInput) (*Automation, error)
- func (s *AutomationService) CreateAPIKey(ctx context.Context, automationID, name, expiresAt string) (*AutomationAPIKey, error)
- func (s *AutomationService) DeleteAPIKey(ctx context.Context, automationID, keyID string) error
- func (s *AutomationService) Get(ctx context.Context, automationID string) (*Automation, error)
- func (s *AutomationService) List(ctx context.Context, page *PageRequest) (*ListAutomationsResult, error)
- func (s *AutomationService) ListAPIKeys(ctx context.Context, automationID string) ([]AutomationAPIKey, error)
- func (s *AutomationService) RevokeAPIKey(ctx context.Context, automationID, keyID string) error
- type BankAccountDetails
- type BankAccountInput
- type BatchCreateResult
- type BatchEntryResult
- type BatchSummary
- type CarriedBlock
- type CarriedCheck
- type Case
- type CaseComment
- type CaseHandoffDetails
- type CaseIdentifierLinkDetails
- type CaseService
- func (s *CaseService) CommentCount(ctx context.Context, caseID string) (int, error)
- func (s *CaseService) Create(ctx context.Context, in CreateCaseInput) (*Case, error)
- func (s *CaseService) CreateComment(ctx context.Context, caseID, content, parentCommentID string) (*CaseComment, error)
- func (s *CaseService) Delete(ctx context.Context, caseID string) error
- func (s *CaseService) Get(ctx context.Context, caseID string) (*Case, error)
- func (s *CaseService) List(ctx context.Context, opts *ListCasesOptions) ([]Case, error)
- func (s *CaseService) ListComments(ctx context.Context, caseID string) ([]CaseComment, error)
- func (s *CaseService) Update(ctx context.Context, caseID string, in UpdateCaseInput) (*Case, error)
- type CaseUpdateDetails
- type CheckDetails
- type CheckFailureRecord
- type Client
- type CommentService
- type Confidence
- type ConfidenceOperationDetails
- type ConsumeService
- func (s *ConsumeService) Info(ctx context.Context, consumerKey string) (*StreamInfo, error)
- func (s *ConsumeService) Poll(ctx context.Context, consumerKey string, opts *PollOptions) (*PollResult, error)
- func (s *ConsumeService) Subscribe(ctx context.Context, consumerKey string, opts *SubscribeOptions, ...) error
- type ContactInput
- type ConversationContinuationDetails
- type ConversationContinuationInput
- type ConversationMessage
- type CreateAutomationInput
- type CreateCaseInput
- type CreateDomainRuleInput
- type CreateEntryInput
- type CreateExclusionInput
- type CreateFileExportInput
- type CreatePersonaInput
- type CreateQueueInput
- type CreateStreamInput
- type CreateTagInput
- type CreateTagValue
- type CreateTemporaryStreamInput
- type CreateViewInput
- type CryptoWalletDetails
- type CustodyEvent
- type DataContribution
- type DataOperationDetails
- type DateRange
- type DetectionDetails
- type DetectionInput
- type EmailAddress
- type EmailDetails
- type EmailInput
- type EmailPublicKey
- type EnrichedDetail
- type EntryType
- type Evidence
- type ExecuteViewOptions
- type ExecuteViewResult
- type ExportDetails
- type ExportInput
- type ExportStream
- type ExternalIdentifierInput
- type ExternalIdentifierRecord
- type ExternalSystem
- type ExtractedIdentifier
- type ExtractedIdentifierOccurrence
- type FailedIdentifier
- type FileExport
- type FileExportService
- func (s *FileExportService) Create(ctx context.Context, in CreateFileExportInput) (*FileExport, error)
- func (s *FileExportService) Delete(ctx context.Context, exportID string) error
- func (s *FileExportService) Download(ctx context.Context, exportID string, w io.Writer) (int64, error)
- func (s *FileExportService) DownloadToFile(ctx context.Context, exportID, path string) error
- func (s *FileExportService) DownloadURL(ctx context.Context, exportID string) (string, string, error)
- func (s *FileExportService) Get(ctx context.Context, exportID string) (*FileExport, error)
- func (s *FileExportService) List(ctx context.Context) ([]FileExport, error)
- func (s *FileExportService) Rename(ctx context.Context, exportID, name string) (*FileExport, error)
- type FilterCriteria
- type FunnelActionDetails
- type Identifier
- type IdentifierConfidenceUpdate
- type IdentifierEmailDetails
- type IdentifierExclusion
- type IdentifierLookup
- func BankAccountLookup(in BankAccountInput) (IdentifierLookup, error)
- func ChimeLookup(chimesign, name string, confidence *float64) (IdentifierLookup, error)
- func DeltaChatLookup(fingerprint string, confidence *float64) (IdentifierLookup, error)
- func VenmoLookup(identifier, name string, confidence *float64) (IdentifierLookup, error)
- type IdentifierReportInput
- type IdentifierService
- func (s *IdentifierService) CreateExclusion(ctx context.Context, in CreateExclusionInput) (*IdentifierExclusion, error)
- func (s *IdentifierService) DeleteExclusion(ctx context.Context, exclusionID string) error
- func (s *IdentifierService) Get(ctx context.Context, identifierID string) (*Identifier, error)
- func (s *IdentifierService) List(ctx context.Context, opts *ListIdentifiersOptions) ([]Identifier, error)
- func (s *IdentifierService) ListExclusions(ctx context.Context, page, pageSize int) ([]IdentifierExclusion, error)
- func (s *IdentifierService) PanoptesScan(ctx context.Context, identifierID string) (*PanoptesScan, error)
- func (s *IdentifierService) URLReferences(ctx context.Context, identifierID string, opts *URLReferencesOptions) (*URLReferencesResult, error)
- type IdentifierStreamMessage
- type IdentifierSubtypeCount
- type IdentifierSummary
- type IdentifierType
- type IdentifierTypeCount
- type IdentifierURLReference
- type ImportDetails
- type ImportInput
- type ItemActionInput
- type JournalEntry
- type JournalEntryChildSummary
- type JournalEntryReportInput
- type JournalEntryStreamMessage
- type JournalService
- func (s *JournalService) CompleteActivity(ctx context.Context, parentID string, endTime Time, reason, description string) (*JournalEntry, error)
- func (s *JournalService) Create(ctx context.Context, in CreateEntryInput) (*JournalEntry, error)
- func (s *JournalService) CreateBatch(ctx context.Context, entries []CreateEntryInput) (*BatchCreateResult, error)
- func (s *JournalService) CreateConversationContinuation(ctx context.Context, in ConversationContinuationInput) (*JournalEntry, error)
- func (s *JournalService) CreateDetection(ctx context.Context, in DetectionInput) (*JournalEntry, error)
- func (s *JournalService) CreateEmail(ctx context.Context, in EmailInput) (*JournalEntry, error)
- func (s *JournalService) CreateExport(ctx context.Context, in ExportInput) (*JournalEntry, error)
- func (s *JournalService) CreateImport(ctx context.Context, in ImportInput) (*JournalEntry, error)
- func (s *JournalService) CreateNote(ctx context.Context, in NoteInput) (*JournalEntry, error)
- func (s *JournalService) CreatePhoneCall(ctx context.Context, in PhoneCallInput) (*JournalEntry, error)
- func (s *JournalService) CreateTextConversation(ctx context.Context, in TextConversationInput) (*JournalEntry, error)
- func (s *JournalService) Delete(ctx context.Context, entryID string) error
- func (s *JournalService) ExternalSystems(ctx context.Context) ([]ExternalSystem, error)
- func (s *JournalService) ExtractedIdentifiers(ctx context.Context, entryID string) ([]ExtractedIdentifier, error)
- func (s *JournalService) Get(ctx context.Context, entryID string) (*JournalEntry, error)
- func (s *JournalService) IdentifierSummary(ctx context.Context, entryID string, identifierType IdentifierType) (*IdentifierSummary, error)
- func (s *JournalService) InProgress(ctx context.Context) ([]JournalEntry, error)
- func (s *JournalService) List(ctx context.Context, opts *ListEntriesOptions) ([]JournalEntry, error)
- func (s *JournalService) Query(ctx context.Context, in QueryEntriesInput) (*QueryEntriesResult, error)
- func (s *JournalService) QueryAll(ctx context.Context, in QueryEntriesInput, fn func(JournalEntry) error) error
- type KarmaAdjustmentDetails
- type KarmaBreakdown
- type KarmaComponent
- type ListAutomationsResult
- type ListCasesOptions
- type ListDomainRulesOptions
- type ListEntriesOptions
- type ListIdentifiersOptions
- type ListNotificationsOptions
- type ListStreamsOptions
- type ListStreamsResult
- type ListTagsResult
- type ListViewsResult
- type Media
- type MediaService
- type MediaUpload
- type MessageAttachment
- type MessageIdentifierRef
- type MoveItemInput
- type NoteInput
- type Notification
- type NotificationService
- func (s *NotificationService) Dismiss(ctx context.Context, notificationID string) error
- func (s *NotificationService) DismissAll(ctx context.Context) error
- func (s *NotificationService) Get(ctx context.Context, notificationID string) (*Notification, error)
- func (s *NotificationService) List(ctx context.Context, opts *ListNotificationsOptions) ([]Notification, int, error)
- func (s *NotificationService) MarkAllRead(ctx context.Context) error
- func (s *NotificationService) MarkRead(ctx context.Context, notificationID string) error
- func (s *NotificationService) UnreadCount(ctx context.Context) (int, error)
- type Option
- func WithAPIKey(id, secret string) Option
- func WithAPIURL(u string) Option
- func WithHTTPClient(h *http.Client) Option
- func WithLogger(l *slog.Logger) Option
- func WithMaxResponseBytes(n int64) Option
- func WithMaxRetries(n int) Option
- func WithRetryMaxTime(d time.Duration) Option
- func WithTimeout(d time.Duration) Option
- func WithToken(token string) Option
- type OriginatorLookup
- type PageRequest
- type Pagination
- type PanoptesScan
- type Passkey
- type PaymentService
- type PaymentTokenDetails
- type Persona
- type PersonaIdentifierInput
- type PersonaIdentifierLink
- type PersonaMediaInput
- type PersonaMediaLink
- type PersonaService
- func (s *PersonaService) AddMedia(ctx context.Context, personaID string, in PersonaMediaInput) (*PersonaMediaLink, error)
- func (s *PersonaService) Create(ctx context.Context, in CreatePersonaInput) (*Persona, error)
- func (s *PersonaService) Delete(ctx context.Context, personaID string) error
- func (s *PersonaService) Get(ctx context.Context, personaID string) (*Persona, error)
- func (s *PersonaService) List(ctx context.Context) ([]Persona, error)
- func (s *PersonaService) RemoveMedia(ctx context.Context, personaID, mediaID string) error
- func (s *PersonaService) Update(ctx context.Context, personaID string, in UpdatePersonaInput) (*Persona, error)
- func (s *PersonaService) UpdateMedia(ctx context.Context, personaID, mediaID string, in UpdatePersonaMediaInput) error
- type PhoneCallDetails
- type PhoneCallInput
- type PhoneDetails
- type PollOptions
- type PollResult
- type QueryEntriesInput
- type QueryEntriesResult
- type Queue
- type QueueClusterIdentifier
- type QueueContactLog
- type QueueItem
- type QueueItemEvent
- type QueuePatch
- type QueueService
- func (s *QueueService) Claim(ctx context.Context, queueID string) (*QueueItem, error)
- func (s *QueueService) Complete(ctx context.Context, queueID, itemID string, in ItemActionInput) error
- func (s *QueueService) Create(ctx context.Context, in CreateQueueInput) (*Queue, error)
- func (s *QueueService) Delete(ctx context.Context, queueID string) error
- func (s *QueueService) Drop(ctx context.Context, queueID, itemID string, in ItemActionInput) error
- func (s *QueueService) Get(ctx context.Context, queueID string) (*Queue, error)
- func (s *QueueService) ItemClusterIdentifiers(ctx context.Context, queueID, itemID, role string) ([]QueueClusterIdentifier, error)
- func (s *QueueService) ItemEvents(ctx context.Context, queueID, itemID string) ([]QueueItemEvent, error)
- func (s *QueueService) ItemHistory(ctx context.Context, queueID, itemID string) ([]QueueContactLog, error)
- func (s *QueueService) List(ctx context.Context) ([]Queue, error)
- func (s *QueueService) ListItems(ctx context.Context, queueID, state string) ([]QueueItem, error)
- func (s *QueueService) Move(ctx context.Context, queueID, itemID string, in MoveItemInput) error
- func (s *QueueService) ReadStream(ctx context.Context, queueID string, opts *ReadStreamOptions) (*QueueStreamResponse, error)
- func (s *QueueService) RecordContact(ctx context.Context, queueID, itemID string, in ContactInput) error
- func (s *QueueService) Release(ctx context.Context, queueID, itemID string) error
- func (s *QueueService) Stats(ctx context.Context, queueID string) (*QueueStats, error)
- func (s *QueueService) Update(ctx context.Context, queueID string, patch QueuePatch) (*Queue, error)
- type QueueStats
- type QueueStreamMessage
- type QueueStreamResponse
- type ReadStreamOptions
- type RecoverResult
- type RecoveryHistoryOptions
- type RedactionDetails
- type Report
- type ReportService
- func (s *ReportService) Download(ctx context.Context, reportID string, w io.Writer) (int64, error)
- func (s *ReportService) DownloadToFile(ctx context.Context, reportID, path string) error
- func (s *ReportService) GenerateIdentifierReport(ctx context.Context, in IdentifierReportInput) (*Report, error)
- func (s *ReportService) GenerateJournalEntryReport(ctx context.Context, in JournalEntryReportInput) (*Report, error)
- func (s *ReportService) GenerateViewReport(ctx context.Context, viewID string, includeEvidence, signReport bool) (*Report, error)
- func (s *ReportService) Status(ctx context.Context, reportID string) (*Report, error)
- func (s *ReportService) Wait(ctx context.Context, reportID string, pollInterval time.Duration) (*Report, error)
- type SSEEvent
- type ScamClassificationDetails
- type ScamFactorScoreDetail
- type SearchCasesInput
- type SearchCasesResult
- type SearchIdentifiersInput
- type SearchIdentifiersResult
- type SearchService
- func (s *SearchService) Cases(ctx context.Context, in SearchCasesInput) (*SearchCasesResult, error)
- func (s *SearchService) Identifiers(ctx context.Context, in SearchIdentifiersInput) (*SearchIdentifiersResult, error)
- func (s *SearchService) IdentifiersAll(ctx context.Context, in SearchIdentifiersInput, fn func(Identifier) error) error
- type Session
- type SessionService
- func (s *SessionService) DeletePasskey(ctx context.Context, passkeyID string) error
- func (s *SessionService) List(ctx context.Context) ([]Session, error)
- func (s *SessionService) ListPasskeys(ctx context.Context) ([]Passkey, error)
- func (s *SessionService) Revoke(ctx context.Context, sessionID string) error
- func (s *SessionService) SetTwoFactor(ctx context.Context, enable bool) (*TwoFactorResult, error)
- func (s *SessionService) TwoFactorStatus(ctx context.Context) (*TwoFactorStatus, error)
- type SocialMediaDetails
- type SortOrder
- type SpecialDomainRule
- type StreamCursors
- type StreamDataType
- type StreamEvidenceInfo
- type StreamIdentifierInfo
- type StreamInfo
- type StreamJournalEntryInfo
- type StreamMessage
- type StreamOriginatorInfo
- type StreamService
- func (s *StreamService) BackfillIdentifiers(ctx context.Context, streamID, fromDate string) (map[string]any, error)
- func (s *StreamService) Create(ctx context.Context, in CreateStreamInput) (*ExportStream, error)
- func (s *StreamService) CreateTemporary(ctx context.Context, in CreateTemporaryStreamInput) (*ExportStream, error)
- func (s *StreamService) Delete(ctx context.Context, streamID string) error
- func (s *StreamService) Get(ctx context.Context, streamID string) (*ExportStream, error)
- func (s *StreamService) List(ctx context.Context, opts *ListStreamsOptions) (*ListStreamsResult, error)
- func (s *StreamService) Recover(ctx context.Context, streamID string, ignoreCheckpoint, clearStream bool) (*RecoverResult, error)
- func (s *StreamService) RecoveryHistory(ctx context.Context, opts *RecoveryHistoryOptions) (map[string]any, error)
- func (s *StreamService) RecoveryInfo(ctx context.Context, streamID string) (map[string]any, error)
- type StreamTagInfo
- type SubscribeOptions
- type Tag
- type TagDisplay
- type TagLookup
- type TagOperationDetails
- type TagRef
- type TagService
- func (s *TagService) Create(ctx context.Context, in CreateTagInput) (*Tag, error)
- func (s *TagService) CreateValue(ctx context.Context, tagID string, in CreateTagValue) (*TagValue, error)
- func (s *TagService) Delete(ctx context.Context, tagID string) error
- func (s *TagService) DeleteValue(ctx context.Context, tagID, valueID string) error
- func (s *TagService) Effective(ctx context.Context, entityType, entityID string) ([]TagDisplay, error)
- func (s *TagService) Get(ctx context.Context, tagID string) (*Tag, error)
- func (s *TagService) List(ctx context.Context, page *PageRequest) (*ListTagsResult, error)
- func (s *TagService) ListValues(ctx context.Context, tagID string) ([]TagValue, error)
- func (s *TagService) Update(ctx context.Context, tagID string, in UpdateTagInput) (*Tag, error)
- func (s *TagService) UpdateValue(ctx context.Context, tagID, valueID string, in UpdateTagValueInput) (*TagValue, error)
- type TagValue
- type TaskAssignmentDetails
- type TaskUpdateDetails
- type TextConversationDetails
- type TextConversationInput
- type Time
- type TwoFactorResult
- type TwoFactorStatus
- type URLConsolidationStatus
- type URLDetails
- type URLReferencesOptions
- type URLReferencesResult
- type UpdateCaseInput
- type UpdateDomainRuleInput
- type UpdatePersonaInput
- type UpdatePersonaMediaInput
- type UpdateQueueInput
- type UpdateTagInput
- type UpdateTagValueInput
- type UpdateViewInput
- type View
- type ViewService
- func (s *ViewService) Create(ctx context.Context, in CreateViewInput) (*View, error)
- func (s *ViewService) Delete(ctx context.Context, viewID string) error
- func (s *ViewService) Execute(ctx context.Context, viewID string, opts *ExecuteViewOptions) (*ExecuteViewResult, error)
- func (s *ViewService) ExecuteMyJournalEntries(ctx context.Context, opts *ExecuteViewOptions) (*ExecuteViewResult, error)
- func (s *ViewService) ExecuteMyPinboard(ctx context.Context, opts *ExecuteViewOptions) (*ExecuteViewResult, error)
- func (s *ViewService) Get(ctx context.Context, viewID string) (*View, error)
- func (s *ViewService) List(ctx context.Context, page *PageRequest) (*ListViewsResult, error)
- func (s *ViewService) MyJournalEntries(ctx context.Context) (*View, error)
- func (s *ViewService) MyPinboard(ctx context.Context) (*View, error)
- func (s *ViewService) Update(ctx context.Context, viewID string, in UpdateViewInput) (*View, error)
- type WSClient
- func (w *WSClient) Close() error
- func (w *WSClient) Connect(ctx context.Context) error
- func (w *WSClient) ListenNotifications(ctx context.Context, fn func(Notification)) error
- func (w *WSClient) ListenStream(ctx context.Context, streamID, cursor string, includeTest bool, ...) error
- func (w *WSClient) On(channel, event string, handler WSHandler) func()
- func (w *WSClient) Run(ctx context.Context) error
- func (w *WSClient) SubscribeChannel(ctx context.Context, channel string) error
- func (w *WSClient) SubscribeStream(ctx context.Context, streamID, cursor string, includeTest bool) error
- func (w *WSClient) UnsubscribeStream(ctx context.Context, streamID string) error
- type WSHandler
- type WSMessage
- type WSOption
- type ZelleDetails
Constants ¶
const ( ResolutionResolved = "resolved" ResolutionUnresolved = "unresolved" ResolutionTransferred = "transferred" ResolutionDuplicate = "duplicate" )
Resolution values accepted when closing a case.
const ( PanoptesScanRunning = "running" PanoptesScanComplete = "complete" PanoptesScanTimeout = "timeout" PanoptesScanError = "error" )
const ( SortAsc = "asc" SortDesc = "desc" )
const ( CursorStart = "0" CursorEnd = "$" )
Cursor values accepted by the stream consumer endpoints.
const DefaultAPIURL = "https://scambus.net/api"
const (
Version = "0.1.0"
)
Variables ¶
var ( ErrAuthentication = errors.New("scambus: authentication failed") ErrValidation = errors.New("scambus: request validation failed") ErrNotFound = errors.New("scambus: resource not found") ErrServer = errors.New("scambus: server error") ErrRateLimited = errors.New("scambus: rate limited") ErrCursorExpired = errors.New("scambus: cursor outside retention window") ErrNoCredentials = errors.New("scambus: no authentication provided") )
var ErrStopSubscription = errors.New("scambus: stop subscription")
ErrStopSubscription ends a Subscribe loop cleanly when returned by its callback.
Functions ¶
func DecodeDetails ¶
DecodeDetails re-decodes a loosely typed details map into a concrete details struct, e.g. DecodeDetails[PhoneCallDetails](entry.Details).
func ParseIdentifierDetails ¶
ParseIdentifierDetails decodes Identifier.Data into the struct matching the identifier type. Unknown types return the map unchanged.
Types ¶
type APIError ¶
type ActivityCompleteDetails ¶
type AdminService ¶
type AdminService struct {
// contains filtered or unexported fields
}
func (*AdminService) CancelURLConsolidation ¶
func (s *AdminService) CancelURLConsolidation(ctx context.Context) error
func (*AdminService) CreateSpecialDomainRule ¶
func (s *AdminService) CreateSpecialDomainRule(ctx context.Context, in CreateDomainRuleInput) (*SpecialDomainRule, error)
func (*AdminService) DeleteSpecialDomainRule ¶
func (s *AdminService) DeleteSpecialDomainRule(ctx context.Context, ruleID string) error
func (*AdminService) ListSpecialDomainRules ¶
func (s *AdminService) ListSpecialDomainRules(ctx context.Context, opts *ListDomainRulesOptions) ([]SpecialDomainRule, error)
func (*AdminService) StartURLConsolidation ¶
func (s *AdminService) StartURLConsolidation(ctx context.Context) (*URLConsolidationStatus, error)
func (*AdminService) URLConsolidationStatus ¶
func (s *AdminService) URLConsolidationStatus(ctx context.Context) (*URLConsolidationStatus, error)
func (*AdminService) UpdateSpecialDomainRule ¶
func (s *AdminService) UpdateSpecialDomainRule(ctx context.Context, ruleID string, in UpdateDomainRuleInput) (*SpecialDomainRule, error)
type Automation ¶
type AutomationAPIKey ¶
type AutomationAPIKey struct {
ID string `json:"id"`
AutomationID string `json:"automation_id,omitempty"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
OwnerType string `json:"owner_type,omitempty"`
IsActive bool `json:"is_active"`
LastUsed Time `json:"last_used"`
ExpiresAt Time `json:"expires_at"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
// Key is the secret, returned only by CreateAPIKey and never again.
Key string `json:"key,omitempty"`
SecretID string `json:"secret_id,omitempty"`
}
type AutomationService ¶
type AutomationService struct {
// contains filtered or unexported fields
}
func (*AutomationService) Create ¶
func (s *AutomationService) Create(ctx context.Context, in CreateAutomationInput) (*Automation, error)
func (*AutomationService) CreateAPIKey ¶
func (s *AutomationService) CreateAPIKey(ctx context.Context, automationID, name, expiresAt string) (*AutomationAPIKey, error)
CreateAPIKey returns the only copy of the secret. Store it now.
func (*AutomationService) DeleteAPIKey ¶
func (s *AutomationService) DeleteAPIKey(ctx context.Context, automationID, keyID string) error
func (*AutomationService) Get ¶
func (s *AutomationService) Get(ctx context.Context, automationID string) (*Automation, error)
func (*AutomationService) List ¶
func (s *AutomationService) List(ctx context.Context, page *PageRequest) (*ListAutomationsResult, error)
func (*AutomationService) ListAPIKeys ¶
func (s *AutomationService) ListAPIKeys(ctx context.Context, automationID string) ([]AutomationAPIKey, error)
func (*AutomationService) RevokeAPIKey ¶
func (s *AutomationService) RevokeAPIKey(ctx context.Context, automationID, keyID string) error
type BankAccountDetails ¶
type BankAccountDetails struct {
AccountNumber string `json:"account_number,omitempty"`
Routing string `json:"routing,omitempty"`
Institution string `json:"institution,omitempty"`
Owner string `json:"owner,omitempty"`
OwnerAddress string `json:"owner_address,omitempty"`
Country string `json:"country,omitempty"`
Address string `json:"address,omitempty"`
Swift string `json:"swift,omitempty"`
IBAN string `json:"iban,omitempty"`
AccountType string `json:"account_type,omitempty"`
}
type BankAccountInput ¶
type BatchCreateResult ¶
type BatchCreateResult struct {
Results []BatchEntryResult `json:"results"`
Summary BatchSummary `json:"summary"`
}
type BatchEntryResult ¶
type BatchEntryResult struct {
Index int `json:"index"`
Status string `json:"status"`
ID string `json:"id,omitempty"`
Error string `json:"error,omitempty"`
FailedIdentifiers []FailedIdentifier `json:"failed_identifiers,omitempty"`
ExtractedIdentifiers []ExtractedIdentifier `json:"extracted_identifiers,omitempty"`
}
type BatchSummary ¶
type CarriedBlock ¶
CarriedBlock is the provider reference of a carried result, and the reference of an earlier result of the same provider that it corrects.
type CarriedCheck ¶
type CarriedCheck struct {
Provider string `json:"provider"`
// IdentifierRef names an identifier lookup of the same entry by its Ref.
// IdentifierID names a linked identifier instead.
IdentifierRef string `json:"identifier_ref,omitempty"`
IdentifierID string `json:"identifier_id,omitempty"`
Block CarriedBlock `json:"block"`
}
CarriedCheck names a provider check result that a new entry carries. SCAMBUS asks the provider for the result that Block.Ref names and stores the provider's answer. Only an automation key can send one.
type Case ¶
type Case struct {
ID string `json:"id"`
Title string `json:"title"`
Notes string `json:"notes,omitempty"`
Status string `json:"status,omitempty"`
Priority string `json:"priority,omitempty"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
OriginatorID string `json:"originator_id,omitempty"`
OriginatorType string `json:"originator_type,omitempty"`
IsTest bool `json:"is_test"`
}
type CaseComment ¶
type CaseComment struct {
ID string `json:"id"`
CaseID string `json:"case_id"`
AuthorID string `json:"author_id"`
Content string `json:"content"`
IsReaction bool `json:"is_reaction"`
Reaction string `json:"reaction,omitempty"`
Edited bool `json:"edited"`
Deleted bool `json:"deleted"`
ParentCommentID string `json:"parent_comment_id,omitempty"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
DeletedAt Time `json:"deleted_at"`
}
type CaseHandoffDetails ¶
type CaseHandoffDetails struct {
FromUserID string `json:"from_user_id"`
FromUserName string `json:"from_user_name"`
ToUserID string `json:"to_user_id"`
ToUserName string `json:"to_user_name"`
Reason string `json:"reason"`
Notes string `json:"notes,omitempty"`
ReassignedTasks int `json:"reassigned_tasks"`
}
type CaseIdentifierLinkDetails ¶
type CaseIdentifierLinkDetails struct {
Operation string `json:"operation"`
CaseID string `json:"case_id"`
IdentifierID string `json:"identifier_id"`
Reason string `json:"reason,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
CaseRef string `json:"case_ref,omitempty"`
CaseTitle string `json:"case_title,omitempty"`
IdentifierType string `json:"identifier_type,omitempty"`
IdentifierValue string `json:"identifier_value,omitempty"`
}
type CaseService ¶
type CaseService struct {
// contains filtered or unexported fields
}
func (*CaseService) CommentCount ¶
func (*CaseService) Create ¶
func (s *CaseService) Create(ctx context.Context, in CreateCaseInput) (*Case, error)
func (*CaseService) CreateComment ¶
func (s *CaseService) CreateComment(ctx context.Context, caseID, content, parentCommentID string) (*CaseComment, error)
func (*CaseService) List ¶
func (s *CaseService) List(ctx context.Context, opts *ListCasesOptions) ([]Case, error)
func (*CaseService) ListComments ¶
func (s *CaseService) ListComments(ctx context.Context, caseID string) ([]CaseComment, error)
func (*CaseService) Update ¶
func (s *CaseService) Update(ctx context.Context, caseID string, in UpdateCaseInput) (*Case, error)
Update reloads the case afterwards because the API answers 204.
type CaseUpdateDetails ¶
type CheckDetails ¶
type CheckDetails struct {
IdentifierID string `json:"identifier_id"`
Failures []CheckFailureRecord `json:"failures,omitempty"`
OverriddenFailures []CheckFailureRecord `json:"overridden_failures,omitempty"`
PreviousCap *float64 `json:"previous_cap,omitempty"`
NewCap *float64 `json:"new_cap,omitempty"`
Reason string `json:"reason,omitempty"`
}
type CheckFailureRecord ¶
type Client ¶
type Client struct {
Media *MediaService
Journal *JournalService
Identifiers *IdentifierService
Cases *CaseService
Comments *CommentService
Queues *QueueService
Streams *StreamService
Consume *ConsumeService
FileExports *FileExportService
Views *ViewService
Tags *TagService
Search *SearchService
Notifications *NotificationService
Sessions *SessionService
Personas *PersonaService
Reports *ReportService
Automations *AutomationService
Admin *AdminService
// contains filtered or unexported fields
}
type CommentService ¶
type CommentService struct {
// contains filtered or unexported fields
}
func (*CommentService) Delete ¶
func (s *CommentService) Delete(ctx context.Context, commentID string) error
func (*CommentService) Update ¶
func (s *CommentService) Update(ctx context.Context, commentID, content string) (*CaseComment, error)
type Confidence ¶
Confidence decodes both the object form the entity endpoints return ({"score": 0.95}) and the bare number the stream endpoints return.
func NewConfidence ¶
func NewConfidence(score float64) Confidence
func (Confidence) MarshalJSON ¶
func (c Confidence) MarshalJSON() ([]byte, error)
func (*Confidence) UnmarshalJSON ¶
func (c *Confidence) UnmarshalJSON(data []byte) error
type ConfidenceOperationDetails ¶
type ConfidenceOperationDetails struct {
Identifiers []IdentifierConfidenceUpdate `json:"identifiers"`
Reason string `json:"reason,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
type ConsumeService ¶
type ConsumeService struct {
// contains filtered or unexported fields
}
ConsumeService reads export streams. Every method takes the stream's consumer key, not its stream id.
func (*ConsumeService) Info ¶
func (s *ConsumeService) Info(ctx context.Context, consumerKey string) (*StreamInfo, error)
func (*ConsumeService) Poll ¶
func (s *ConsumeService) Poll(ctx context.Context, consumerKey string, opts *PollOptions) (*PollResult, error)
func (*ConsumeService) Subscribe ¶
func (s *ConsumeService) Subscribe(ctx context.Context, consumerKey string, opts *SubscribeOptions, fn func(StreamMessage) error) error
Subscribe opens the SSE endpoint for a consumer key and calls fn for every message, until ctx is cancelled or fn returns an error.
type ContactInput ¶
type ConversationContinuationDetails ¶
type ConversationContinuationDetails struct {
Messages []ConversationMessage `json:"messages"`
Reason string `json:"reason,omitempty"`
NonContiguous bool `json:"non_contiguous"`
}
type ConversationContinuationInput ¶
type ConversationContinuationInput struct {
Description string
Identifiers []IdentifierLookup
OurIdentifiers []IdentifierLookup
Evidence []Evidence
Media []Media
CaseID string
Tags []TagLookup
Metadata map[string]any
ParentJournalEntryID string
Originator *OriginatorLookup
IsTest bool
ExternalIdentifiers []ExternalIdentifierInput
ExtractExternalIdentifiers bool
ParentEntryID string
Messages []ConversationMessage
Reason string
NonContiguous bool
AIExtract bool
}
type ConversationMessage ¶
type ConversationMessage struct {
Index int `json:"index"`
MessageID string `json:"message_id"`
Timestamp Time `json:"timestamp"`
Body string `json:"body"`
IsOutgoing bool `json:"is_outgoing"`
MessageType string `json:"message_type,omitempty"`
PhoneCallJournalEntryID string `json:"phone_call_journal_entry_id,omitempty"`
SenderRef string `json:"sender_ref,omitempty"`
SenderDisplayName string `json:"sender_display_name,omitempty"`
IdentifierRefs []MessageIdentifierRef `json:"identifier_refs,omitempty"`
Attachments []MessageAttachment `json:"attachments,omitempty"`
Timezone string `json:"timezone,omitempty"`
BodyHTML string `json:"body_html,omitempty"`
Subject string `json:"subject,omitempty"`
IsDeleted bool `json:"is_deleted"`
IsEdited bool `json:"is_edited"`
DeliveryStatus string `json:"delivery_status,omitempty"`
DeliveryTimestamp Time `json:"delivery_timestamp,omitzero"`
ReadTimestamp Time `json:"read_timestamp,omitzero"`
InReplyTo string `json:"in_reply_to,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
PlatformMetadata map[string]any `json:"platform_metadata,omitempty"`
}
type CreateAutomationInput ¶
type CreateCaseInput ¶
type CreateDomainRuleInput ¶
type CreateDomainRuleInput struct {
Domain string `json:"domain"`
Category string `json:"category"`
PathDepth *int `json:"path_depth,omitempty"`
StripQuery *bool `json:"strip_query,omitempty"`
StripFragment *bool `json:"strip_fragment,omitempty"`
IsActive *bool `json:"is_active,omitempty"`
}
CreateDomainRuleInput leaves StripQuery and StripFragment nil to accept the server default of true.
type CreateEntryInput ¶
type CreateEntryInput struct {
Type EntryType
Description string
Details any
PerformedAt Time
CaseID string
IdentifierLookups []IdentifierLookup
OurIdentifierLookups []IdentifierLookup
Evidence []Evidence
Originator *OriginatorLookup
ParentJournalEntryID string
TagLookups []TagLookup
StartTime Time
EndTime Time
InProgress bool
Metadata map[string]any
IsTest bool
IsNSFW bool
AIExtract bool
RetractedIdentifierIDs []string
ExternalIdentifiers []ExternalIdentifierInput
ExtractExternalIdentifiers bool
CarriedChecks []CarriedCheck
}
type CreateExclusionInput ¶
type CreateFileExportInput ¶
type CreateFileExportInput struct {
SourceType string `json:"source_type"`
SourceID string `json:"source_id,omitempty"`
EntityType string `json:"entity_type"`
Format string `json:"format"`
Name string `json:"name,omitempty"`
FilterCriteria *FilterCriteria `json:"filter_criteria,omitempty"`
Columns []string `json:"columns,omitempty"`
Limit *int `json:"limit,omitempty"`
DateRangeStart string `json:"date_range_start,omitempty"`
DateRangeEnd string `json:"date_range_end,omitempty"`
IncludeOurs bool `json:"include_ours,omitempty"`
FormatOptions map[string]any `json:"format_options,omitempty"`
}
type CreatePersonaInput ¶
type CreatePersonaInput struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Personality string `json:"personality,omitempty"`
Background string `json:"background,omitempty"`
AddressLine1 string `json:"address_line1,omitempty"`
AddressLine2 string `json:"address_line2,omitempty"`
AddressCity string `json:"address_city,omitempty"`
AddressState string `json:"address_state,omitempty"`
AddressPostalCode string `json:"address_postal_code,omitempty"`
AddressCountry string `json:"address_country,omitempty"`
Identifiers []PersonaIdentifierInput `json:"identifiers,omitempty"`
}
type CreateQueueInput ¶
type CreateQueueInput struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
FilterCriteria map[string]any `json:"filter_criteria,omitempty"`
CadenceDays *int `json:"cadence_days,omitempty"`
CooldownHours *int `json:"cooldown_hours,omitempty"`
MaxContactsPerCluster *int `json:"max_contacts_per_cluster,omitempty"`
RotationEnabled *bool `json:"rotation_enabled,omitempty"`
PriorityMode string `json:"priority_mode,omitempty"`
AutoPopulate *bool `json:"auto_populate,omitempty"`
ActorClusterID string `json:"actor_cluster_id,omitempty"`
}
type CreateStreamInput ¶
type CreateStreamInput struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
DataType StreamDataType `json:"data_type"`
FilterCriteria *FilterCriteria `json:"filter_criteria,omitempty"`
FilterExpression string `json:"filter_expression,omitempty"`
IsActive *bool `json:"is_active,omitempty"`
RetentionDays *int `json:"retention_days,omitempty"`
BackfillHistorical bool `json:"backfill_historical"`
BackfillFromDate string `json:"backfill_from_date,omitempty"`
IncludeOriginator bool `json:"include_originator,omitempty"`
IncludeJournalEntries bool `json:"include_journal_entries,omitempty"`
BatchSize *int `json:"batch_size,omitempty"`
RateLimitPerMinute *int `json:"rate_limit_per_minute,omitempty"`
}
type CreateTagInput ¶
type CreateTagInput struct {
Title string `json:"title"`
TagType string `json:"tag_type"`
Description string `json:"description,omitempty"`
Aliases []string `json:"aliases,omitempty"`
IsGlobal bool `json:"is_global,omitempty"`
FlowUp bool `json:"flow_up"`
FlowDown bool `json:"flow_down"`
AllowDynamicValues bool `json:"allow_dynamic_values"`
Color string `json:"color,omitempty"`
Icon string `json:"icon,omitempty"`
AllocatesKarma *int `json:"allocates_karma,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
TagValues []CreateTagValue `json:"tag_values,omitempty"`
}
type CreateTagValue ¶
type CreateTemporaryStreamInput ¶
type CreateTemporaryStreamInput struct {
Name string `json:"name,omitempty"`
DataType StreamDataType `json:"data_type"`
ViewID string `json:"viewId,omitempty"`
FilterCriteria *FilterCriteria `json:"filter_criteria,omitempty"`
FilterExpression string `json:"filter_expression,omitempty"`
IncludeOriginator bool `json:"include_originator,omitempty"`
IncludeJournalEntries bool `json:"include_journal_entries,omitempty"`
BatchSize *int `json:"batch_size,omitempty"`
}
type CreateViewInput ¶
type CreateViewInput struct {
Name string `json:"name"`
EntityType string `json:"entity_type"`
Visibility string `json:"visibility,omitempty"`
ViewType string `json:"view_type,omitempty"`
Description string `json:"description,omitempty"`
Alias string `json:"alias,omitempty"`
FilterCriteria *FilterCriteria `json:"filter_criteria,omitempty"`
SortOrder *SortOrder `json:"sort_order,omitempty"`
QueryString string `json:"query_string,omitempty"`
DisplaySettings map[string]any `json:"display_settings,omitempty"`
}
type CryptoWalletDetails ¶
type CustodyEvent ¶
type DataContribution ¶
type DataOperationDetails ¶
type DataOperationDetails struct {
Identifiers []DataContribution `json:"identifiers"`
Reason string `json:"reason,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
type DetectionDetails ¶
type DetectionInput ¶
type DetectionInput struct {
Description string
Identifiers []IdentifierLookup
OurIdentifiers []IdentifierLookup
Evidence []Evidence
Media []Media
CaseID string
Tags []TagLookup
Metadata map[string]any
ParentJournalEntryID string
Originator *OriginatorLookup
IsTest bool
ExternalIdentifiers []ExternalIdentifierInput
ExtractExternalIdentifiers bool
CarriedChecks []CarriedCheck
Details *DetectionDetails
PerformedAt Time
StartTime Time
EndTime Time
InProgress bool
}
type EmailAddress ¶
type EmailDetails ¶
type EmailDetails struct {
Direction string `json:"direction"`
Subject string `json:"subject"`
Body string `json:"body,omitempty"`
HTMLBody string `json:"html_body,omitempty"`
MessageID string `json:"message_id"`
Headers map[string]string `json:"headers,omitempty"`
Attachments []string `json:"attachments,omitempty"`
SentAt Time `json:"sent_at"`
FromAddress *EmailAddress `json:"from_address,omitempty"`
ToAddresses []EmailAddress `json:"to_addresses,omitempty"`
CCAddresses []EmailAddress `json:"cc_addresses,omitempty"`
BCCAddresses []EmailAddress `json:"bcc_addresses,omitempty"`
ReplyToAddresses []EmailAddress `json:"reply_to_addresses,omitempty"`
SourceIP string `json:"source_ip,omitempty"`
SPFResult string `json:"spf_result,omitempty"`
DKIMResult string `json:"dkim_result,omitempty"`
DMARCResult string `json:"dmarc_result,omitempty"`
AuthFailures []string `json:"auth_failures,omitempty"`
PublicKeys []EmailPublicKey `json:"public_keys,omitempty"`
RawEmailMediaID string `json:"raw_email_media_id,omitempty"`
ExtractedBodyMediaID string `json:"extracted_body_media_id,omitempty"`
}
type EmailInput ¶
type EmailInput struct {
Description string
Identifiers []IdentifierLookup
OurIdentifiers []IdentifierLookup
Evidence []Evidence
Media []Media
CaseID string
Tags []TagLookup
Metadata map[string]any
ParentJournalEntryID string
Originator *OriginatorLookup
IsTest bool
ExternalIdentifiers []ExternalIdentifierInput
ExtractExternalIdentifiers bool
Direction string
Subject string
SentAt Time
Body string
HTMLBody string
MessageID string
Headers map[string]string
Attachments []string
StartTime Time
EndTime Time
InProgress bool
}
type EmailPublicKey ¶
type EnrichedDetail ¶
type EntryType ¶
type EntryType string
const ( EntryTypePhoneCall EntryType = "phone_call" EntryTypeEmail EntryType = "email" EntryTypeTextConversation EntryType = "text_conversation" EntryTypeConversationContinuation EntryType = "conversation_continuation" EntryTypeWebInteraction EntryType = "web_interaction" EntryTypeDetection EntryType = "detection" EntryTypeImport EntryType = "import" EntryTypeExport EntryType = "export" EntryTypeNote EntryType = "note" EntryTypeTagOperation EntryType = "tag_operation" EntryTypeConfidenceOperation EntryType = "confidence_operation" EntryTypeRedaction EntryType = "redaction" EntryTypeCaseUpdate EntryType = "case_update" EntryTypeCaseIdentifierLink EntryType = "case_identifier_link" EntryTypeCaseIdentifierUnlink EntryType = "case_identifier_unlink" EntryTypeKarmaAdjustment EntryType = "karma_adjustment" EntryTypeActivityComplete EntryType = "activity_complete" EntryTypeData EntryType = "data" EntryTypeTaskUpdate EntryType = "task_update" EntryTypeTaskAssignment EntryType = "task_assignment" EntryTypeCaseHandoff EntryType = "case_handoff" EntryTypeEvidenceReview EntryType = "evidence_review" EntryTypeFinancialTransaction EntryType = "financial_transaction" EntryTypeFalsePositive EntryType = "false_positive" EntryTypeEvidenceOperation EntryType = "evidence_operation" )
type Evidence ¶
type Evidence struct {
ID string `json:"id,omitempty"`
Type string `json:"type"`
Description string `json:"description,omitempty"`
Source string `json:"source,omitempty"`
CollectedAt Time `json:"collected_at,omitzero"`
MediaID string `json:"media_id,omitempty"`
CreatedAt Time `json:"created_at,omitzero"`
UpdatedAt Time `json:"updated_at,omitzero"`
IsTest bool `json:"is_test,omitempty"`
}
Evidence carries at most one media item. Attach several by sending one Evidence per item.
type ExecuteViewOptions ¶
type ExecuteViewResult ¶
type ExecuteViewResult struct {
Data []json.RawMessage `json:"data"`
NextCursor string `json:"nextCursor"`
HasMore bool `json:"hasMore"`
TotalCount int `json:"totalCount"`
View *View `json:"view,omitempty"`
}
func (ExecuteViewResult) Identifiers ¶
func (r ExecuteViewResult) Identifiers() ([]Identifier, error)
func (ExecuteViewResult) JournalEntries ¶
func (r ExecuteViewResult) JournalEntries() ([]JournalEntry, error)
type ExportDetails ¶
type ExportInput ¶
type ExportInput struct {
Description string
Identifiers []IdentifierLookup
OurIdentifiers []IdentifierLookup
Evidence []Evidence
Media []Media
CaseID string
Tags []TagLookup
Metadata map[string]any
ParentJournalEntryID string
Originator *OriginatorLookup
IsTest bool
ExternalIdentifiers []ExternalIdentifierInput
ExtractExternalIdentifiers bool
Details *ExportDetails
PerformedAt Time
}
type ExportStream ¶
type ExportStream struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
DataType string `json:"data_type"`
FilterCriteria map[string]any `json:"filter_criteria,omitempty"`
IdentifierTypes []string `json:"identifier_types,omitempty"`
MinConfidence float64 `json:"min_confidence"`
MaxConfidence float64 `json:"max_confidence"`
IsActive bool `json:"is_active"`
ConsumerKey string `json:"consumer_key,omitempty"`
RetentionDays int `json:"retention_days"`
FilterExpression string `json:"filter_expression,omitempty"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
}
type ExternalIdentifierInput ¶
type ExternalIdentifierRecord ¶
type ExternalIdentifierRecord struct {
ID string `json:"id"`
JournalEntryID string `json:"journal_entry_id"`
ExternalSystem string `json:"external_system"`
ExternalID string `json:"external_id"`
Source string `json:"source"`
RawMatch string `json:"raw_match,omitempty"`
Link string `json:"link,omitempty"`
CreatedAt Time `json:"created_at"`
}
type ExternalSystem ¶
type ExtractedIdentifier ¶
type ExtractedIdentifier struct {
Ref string `json:"ref"`
IdentifierID string `json:"identifier_id"`
Type string `json:"type"`
Value string `json:"value"`
Label string `json:"label,omitempty"`
Confidence *float64 `json:"confidence,omitempty"`
Occurrences []ExtractedIdentifierOccurrence `json:"occurrences,omitempty"`
}
type FailedIdentifier ¶
type FileExport ¶
type FileExport struct {
ID string `json:"id"`
SourceType string `json:"source_type"`
SourceID string `json:"source_id,omitempty"`
SourceName string `json:"source_name,omitempty"`
EntityType string `json:"entity_type"`
Format string `json:"format"`
Status string `json:"status"`
Progress int `json:"progress"`
TotalRows int `json:"total_rows"`
ExportedRows int `json:"exported_rows"`
Truncated bool `json:"truncated"`
FileName string `json:"file_name,omitempty"`
FileSizeBytes int64 `json:"file_size_bytes"`
ExportParams map[string]any `json:"export_params,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
StartedAt Time `json:"started_at"`
CompletedAt Time `json:"completed_at"`
ExpiresAt Time `json:"expires_at"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
}
type FileExportService ¶
type FileExportService struct {
// contains filtered or unexported fields
}
func (*FileExportService) Create ¶
func (s *FileExportService) Create(ctx context.Context, in CreateFileExportInput) (*FileExport, error)
func (*FileExportService) Delete ¶
func (s *FileExportService) Delete(ctx context.Context, exportID string) error
func (*FileExportService) Download ¶
func (s *FileExportService) Download(ctx context.Context, exportID string, w io.Writer) (int64, error)
Download resolves the presigned URL and streams the bytes. The URL carries its own credentials, so no auth header is sent with the second request.
func (*FileExportService) DownloadToFile ¶
func (s *FileExportService) DownloadToFile(ctx context.Context, exportID, path string) error
func (*FileExportService) DownloadURL ¶
func (s *FileExportService) DownloadURL(ctx context.Context, exportID string) (string, string, error)
DownloadURL returns the presigned location of the finished export.
func (*FileExportService) Get ¶
func (s *FileExportService) Get(ctx context.Context, exportID string) (*FileExport, error)
func (*FileExportService) List ¶
func (s *FileExportService) List(ctx context.Context) ([]FileExport, error)
func (*FileExportService) Rename ¶
func (s *FileExportService) Rename(ctx context.Context, exportID, name string) (*FileExport, error)
type FilterCriteria ¶
type FilterCriteria struct {
SearchQuery string `json:"search_query,omitempty"`
NegateSearchQuery *bool `json:"negate_search_query,omitempty"`
Status []string `json:"status,omitempty"`
Priority []string `json:"priority,omitempty"`
Tags []string `json:"tags,omitempty"`
TagsAny []string `json:"tags_any,omitempty"`
Types []string `json:"types,omitempty"`
OriginatorIDs []string `json:"originator_ids,omitempty"`
ProxyOriginatorIDs []string `json:"proxy_originator_ids,omitempty"`
OriginatorTypes []string `json:"originator_types,omitempty"`
OrgIDs []string `json:"org_ids,omitempty"`
Type string `json:"type,omitempty"`
IdentifierType string `json:"identifier_type,omitempty"`
ConfidenceRange string `json:"confidence_range,omitempty"`
MinConfidence *float64 `json:"min_confidence,omitempty"`
MaxConfidence *float64 `json:"max_confidence,omitempty"`
CreatedAfter string `json:"created_after,omitempty"`
CreatedBefore string `json:"created_before,omitempty"`
PerformedAfter string `json:"performed_after,omitempty"`
PerformedBefore string `json:"performed_before,omitempty"`
DiscoveredAfter string `json:"discovered_after,omitempty"`
DiscoveredBefore string `json:"discovered_before,omitempty"`
ConfidenceChangedAfter string `json:"confidence_changed_after,omitempty"`
ConfidenceChangedBefore string `json:"confidence_changed_before,omitempty"`
OriginatorFilterType string `json:"originator_filter_type,omitempty"`
Details map[string]any `json:"details,omitempty"`
ExcludedDetails map[string]any `json:"excluded_details,omitempty"`
HasMedia *bool `json:"has_media,omitempty"`
HasNotes *bool `json:"has_notes,omitempty"`
IsOurs *bool `json:"is_ours,omitempty"`
HumanReviewed *bool `json:"human_reviewed,omitempty"`
ExcludeHumanReviewed *bool `json:"exclude_human_reviewed,omitempty"`
UserPinned *bool `json:"user_pinned,omitempty"`
IsTest *bool `json:"is_test,omitempty"`
IncludeIdentifiers *bool `json:"include_identifiers,omitempty"`
IncludeEvidence *bool `json:"include_evidence,omitempty"`
TollFree *bool `json:"toll_free,omitempty"`
Institution string `json:"institution,omitempty"`
Platform string `json:"platform,omitempty"`
Service string `json:"service,omitempty"`
AreaCode string `json:"area_code,omitempty"`
Region string `json:"region,omitempty"`
Country string `json:"country,omitempty"`
State string `json:"state,omitempty"`
DomainCategory string `json:"domain_category,omitempty"`
IsPrivateSuffix *bool `json:"is_private_suffix,omitempty"`
RoutingNumberOwner string `json:"routing_number_owner,omitempty"`
Networks []string `json:"networks,omitempty"`
FormatClass string `json:"format_class,omitempty"`
IsContract *bool `json:"is_contract,omitempty"`
Sanctioned *bool `json:"sanctioned,omitempty"`
SanctionsList []string `json:"sanctions_list,omitempty"`
KnownLabels []string `json:"known_labels,omitempty"`
EnrichedAfter string `json:"enriched_after,omitempty"`
EnrichedBefore string `json:"enriched_before,omitempty"`
AssignedTo string `json:"assigned_to,omitempty"`
TagNames []string `json:"tag_names,omitempty"`
ExcludedTagNames []string `json:"excluded_tag_names,omitempty"`
ExcludedStatus []string `json:"excluded_status,omitempty"`
ExcludedPriority []string `json:"excluded_priority,omitempty"`
ExcludedTags []string `json:"excluded_tags,omitempty"`
ExcludedTypes []string `json:"excluded_types,omitempty"`
ExcludedOriginatorTypes []string `json:"excluded_originator_types,omitempty"`
ExcludedOriginatorIDs []string `json:"excluded_originator_ids,omitempty"`
ExcludedProxyOriginatorIDs []string `json:"excluded_proxy_originator_ids,omitempty"`
ExcludedOrgIDs []string `json:"excluded_org_ids,omitempty"`
ExcludedOriginatorFilterType string `json:"excluded_originator_filter_type,omitempty"`
NegateHasMedia *bool `json:"negate_has_media,omitempty"`
NegateIsOurs *bool `json:"negate_is_ours,omitempty"`
}
FilterCriteria is the shared filter shape used by search, query, views, export streams and file exports. Zero fields are omitted from the request.
type FunnelActionDetails ¶
type FunnelActionDetails struct {
FunnelID string `json:"funnel_id"`
FunnelName string `json:"funnel_name"`
StageID string `json:"stage_id,omitempty"`
StageName string `json:"stage_name,omitempty"`
ActionType string `json:"action_type"`
ClusterID string `json:"cluster_id"`
EntryID string `json:"entry_id,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
type Identifier ¶
type Identifier struct {
ID string `json:"id"`
Type string `json:"type"`
DisplayValue string `json:"display_value"`
Confidence Confidence `json:"confidence"`
Data map[string]any `json:"data,omitempty"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
IsTest bool `json:"is_test"`
TagDisplay []TagDisplay `json:"tag_display,omitempty"`
Label string `json:"label,omitempty"`
Classification string `json:"classification,omitempty"`
}
type IdentifierEmailDetails ¶
type IdentifierEmailDetails struct {
Email string `json:"email,omitempty"`
}
type IdentifierExclusion ¶
type IdentifierExclusion struct {
ID string `json:"id"`
OwnerOrgID string `json:"owner_org_id"`
IdentifierType string `json:"identifier_type"`
UniquenessKey string `json:"uniqueness_key"`
DisplayValue string `json:"display_value"`
Reason string `json:"reason,omitempty"`
CreatedByID string `json:"created_by_id,omitempty"`
CreatedAt Time `json:"created_at"`
}
type IdentifierLookup ¶
type IdentifierLookup struct {
Type IdentifierType `json:"type"`
Value string `json:"value"`
Confidence *float64 `json:"confidence,omitempty"`
Label string `json:"label,omitempty"`
Ref string `json:"ref,omitempty"`
Enrichments map[string]EnrichedDetail `json:"enrichments,omitempty"`
}
func BankAccountLookup ¶
func BankAccountLookup(in BankAccountInput) (IdentifierLookup, error)
BankAccountLookup packs bank fields into the JSON-encoded lookup value the API expects.
func ChimeLookup ¶
func ChimeLookup(chimesign, name string, confidence *float64) (IdentifierLookup, error)
ChimeLookup accepts a $ChimeSign.
func DeltaChatLookup ¶
func DeltaChatLookup(fingerprint string, confidence *float64) (IdentifierLookup, error)
DeltaChatLookup accepts an OpenPGP key fingerprint (bare or grouped in fours), an https://i.delta.chat/#... invite link, or an OPENPGP4FPR: QR payload, and stores the fingerprint bare and uppercase.
func VenmoLookup ¶
func VenmoLookup(identifier, name string, confidence *float64) (IdentifierLookup, error)
VenmoLookup accepts an @username, a 16-19 digit user id, or a venmo.com/code QR URL.
type IdentifierReportInput ¶
type IdentifierReportInput struct {
IdentifierIDs []string `json:"identifier_ids,omitempty"`
ViewID string `json:"view_id,omitempty"`
IncludeJournalEntries bool `json:"include_journal_entries"`
IncludeEvidence bool `json:"include_evidence"`
SignReport bool `json:"sign_report"`
DateRange *DateRange `json:"date_range,omitempty"`
}
type IdentifierService ¶
type IdentifierService struct {
// contains filtered or unexported fields
}
func (*IdentifierService) CreateExclusion ¶
func (s *IdentifierService) CreateExclusion(ctx context.Context, in CreateExclusionInput) (*IdentifierExclusion, error)
func (*IdentifierService) DeleteExclusion ¶
func (s *IdentifierService) DeleteExclusion(ctx context.Context, exclusionID string) error
func (*IdentifierService) Get ¶
func (s *IdentifierService) Get(ctx context.Context, identifierID string) (*Identifier, error)
func (*IdentifierService) List ¶
func (s *IdentifierService) List(ctx context.Context, opts *ListIdentifiersOptions) ([]Identifier, error)
func (*IdentifierService) ListExclusions ¶
func (s *IdentifierService) ListExclusions(ctx context.Context, page, pageSize int) ([]IdentifierExclusion, error)
func (*IdentifierService) PanoptesScan ¶
func (s *IdentifierService) PanoptesScan(ctx context.Context, identifierID string) (*PanoptesScan, error)
PanoptesScan returns nil with no error when no scan is recorded yet.
func (*IdentifierService) URLReferences ¶
func (s *IdentifierService) URLReferences(ctx context.Context, identifierID string, opts *URLReferencesOptions) (*URLReferencesResult, error)
type IdentifierStreamMessage ¶
type IdentifierStreamMessage struct {
MessageID string `json:"message_id,omitempty"`
Cursor string `json:"cursor,omitempty"`
IdentifierID string `json:"identifier_id"`
Type string `json:"type"`
DisplayValue string `json:"display_value"`
Details map[string]any `json:"details,omitempty"`
Confidence Confidence `json:"confidence"`
ModifiedAt Time `json:"modified_at"`
OriginatorID string `json:"originator_id,omitempty"`
Tags []StreamTagInfo `json:"tags,omitempty"`
TriggeringJournalEntry *StreamJournalEntryInfo `json:"triggering_journal_entry,omitempty"`
JournalEntries []StreamJournalEntryInfo `json:"journal_entries,omitempty"`
IsTest bool `json:"is_test"`
}
type IdentifierSubtypeCount ¶
type IdentifierSummary ¶
type IdentifierSummary struct {
JournalEntryID string `json:"journal_entry_id"`
Total int `json:"total"`
ByType []IdentifierTypeCount `json:"by_type"`
}
type IdentifierType ¶
type IdentifierType string
const ( IdentifierTypePhone IdentifierType = "phone" IdentifierTypeEmail IdentifierType = "email" IdentifierTypeURL IdentifierType = "url" IdentifierTypeBankAccount IdentifierType = "bank_account" IdentifierTypeCryptoWallet IdentifierType = "crypto_wallet" IdentifierTypeSocialMedia IdentifierType = "social_media" IdentifierTypeZelle IdentifierType = "zelle" IdentifierTypePaymentToken IdentifierType = "payment_token" )
func (IdentifierType) String ¶
func (t IdentifierType) String() string
func (IdentifierType) Valid ¶
func (t IdentifierType) Valid() bool
type IdentifierTypeCount ¶
type IdentifierTypeCount struct {
Type string `json:"type"`
Count int `json:"count"`
BySubtype []IdentifierSubtypeCount `json:"by_subtype,omitempty"`
}
type IdentifierURLReference ¶
type IdentifierURLReference struct {
ID string `json:"id"`
IdentifierID string `json:"identifier_id"`
URL string `json:"url"`
Hostname string `json:"hostname"`
Path string `json:"path"`
FirstSeenAt Time `json:"first_seen_at"`
LastSeenAt Time `json:"last_seen_at"`
SeenCount int `json:"seen_count"`
OwnerOrgID string `json:"owner_org_id,omitempty"`
IsTest bool `json:"is_test"`
CreatedAt Time `json:"created_at"`
}
type ImportDetails ¶
type ImportInput ¶
type ImportInput struct {
Description string
Identifiers []IdentifierLookup
OurIdentifiers []IdentifierLookup
Evidence []Evidence
Media []Media
CaseID string
Tags []TagLookup
Metadata map[string]any
ParentJournalEntryID string
Originator *OriginatorLookup
IsTest bool
ExternalIdentifiers []ExternalIdentifierInput
ExtractExternalIdentifiers bool
Details *ImportDetails
PerformedAt Time
}
type ItemActionInput ¶
type JournalEntry ¶
type JournalEntry struct {
ID string `json:"id"`
Type string `json:"type"`
Description string `json:"description"`
Details map[string]any `json:"details,omitempty"`
PerformedAt Time `json:"performed_at"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
Identifiers []Identifier `json:"identifiers,omitempty"`
OurIdentifiers []Identifier `json:"our_identifiers,omitempty"`
Evidence []Evidence `json:"evidence,omitempty"`
StartTime Time `json:"start_time"`
EndTime Time `json:"end_time"`
ParentJournalEntryID string `json:"parent_journal_entry_id,omitempty"`
BatchID string `json:"batch_id,omitempty"`
TagDisplay []TagDisplay `json:"tag_display,omitempty"`
TotalKarma *int `json:"total_karma,omitempty"`
KarmaBreakdown *KarmaBreakdown `json:"karma_breakdown,omitempty"`
IsDraft bool `json:"is_draft"`
IsTest bool `json:"is_test"`
DraftSavedAt Time `json:"draft_saved_at"`
SignedBy string `json:"signed_by,omitempty"`
SignatureAlgorithm string `json:"signature_algorithm,omitempty"`
SignedAt Time `json:"signed_at"`
ChildJournalEntries []JournalEntry `json:"child_journal_entries,omitempty"`
FailedIdentifiers []FailedIdentifier `json:"failed_identifiers,omitempty"`
ExtractedIdentifiers []ExtractedIdentifier `json:"extracted_identifiers,omitempty"`
ExternalIdentifiers []ExternalIdentifierRecord `json:"external_identifiers,omitempty"`
// Absorbed is set by Create when an existing entry took a carried check in
// place of a new entry. ID then names that existing entry.
Absorbed bool `json:"absorbed,omitempty"`
}
type JournalEntryReportInput ¶
type JournalEntryReportInput struct {
JournalEntryIDs []string `json:"journal_entry_ids,omitempty"`
ViewID string `json:"view_id,omitempty"`
IncludeIdentifiers bool `json:"include_identifiers"`
IncludeEvidence bool `json:"include_evidence"`
IncludeParentChain bool `json:"include_parent_chain"`
SignReport bool `json:"sign_report"`
DateRange *DateRange `json:"date_range,omitempty"`
}
type JournalEntryStreamMessage ¶
type JournalEntryStreamMessage struct {
MessageID string `json:"message_id,omitempty"`
Cursor string `json:"cursor,omitempty"`
ID string `json:"id"`
Type string `json:"type"`
Description string `json:"description"`
Details map[string]any `json:"details,omitempty"`
PerformedAt Time `json:"performed_at"`
Confidence Confidence `json:"confidence"`
StartTime Time `json:"start_time"`
EndTime Time `json:"end_time"`
ParentJournalEntryID string `json:"parent_journal_entry_id,omitempty"`
Originator *StreamOriginatorInfo `json:"originator,omitempty"`
Identifiers []StreamIdentifierInfo `json:"identifiers,omitempty"`
Evidence []StreamEvidenceInfo `json:"evidence,omitempty"`
IsTest bool `json:"is_test"`
LockedBy string `json:"locked_by,omitempty"`
LockedByName string `json:"locked_by_name,omitempty"`
LockedAt Time `json:"locked_at"`
}
type JournalService ¶
type JournalService struct {
// contains filtered or unexported fields
}
func (*JournalService) CompleteActivity ¶
func (s *JournalService) CompleteActivity(ctx context.Context, parentID string, endTime Time, reason, description string) (*JournalEntry, error)
CompleteActivity closes an in-progress entry with an activity_complete child.
func (*JournalService) Create ¶
func (s *JournalService) Create(ctx context.Context, in CreateEntryInput) (*JournalEntry, error)
Create posts the entry, then reloads it because the API returns only an id. When an existing entry absorbed a carried check, SCAMBUS creates no entry: Create returns the id of the entry that holds the result, with Absorbed set, and does not reload it.
func (*JournalService) CreateBatch ¶
func (s *JournalService) CreateBatch(ctx context.Context, entries []CreateEntryInput) (*BatchCreateResult, error)
func (*JournalService) CreateConversationContinuation ¶
func (s *JournalService) CreateConversationContinuation(ctx context.Context, in ConversationContinuationInput) (*JournalEntry, error)
CreateConversationContinuation derives start and end times from the messages.
func (*JournalService) CreateDetection ¶
func (s *JournalService) CreateDetection(ctx context.Context, in DetectionInput) (*JournalEntry, error)
func (*JournalService) CreateEmail ¶
func (s *JournalService) CreateEmail(ctx context.Context, in EmailInput) (*JournalEntry, error)
func (*JournalService) CreateExport ¶
func (s *JournalService) CreateExport(ctx context.Context, in ExportInput) (*JournalEntry, error)
func (*JournalService) CreateImport ¶
func (s *JournalService) CreateImport(ctx context.Context, in ImportInput) (*JournalEntry, error)
func (*JournalService) CreateNote ¶
func (s *JournalService) CreateNote(ctx context.Context, in NoteInput) (*JournalEntry, error)
func (*JournalService) CreatePhoneCall ¶
func (s *JournalService) CreatePhoneCall(ctx context.Context, in PhoneCallInput) (*JournalEntry, error)
func (*JournalService) CreateTextConversation ¶
func (s *JournalService) CreateTextConversation(ctx context.Context, in TextConversationInput) (*JournalEntry, error)
func (*JournalService) Delete ¶
func (s *JournalService) Delete(ctx context.Context, entryID string) error
func (*JournalService) ExternalSystems ¶
func (s *JournalService) ExternalSystems(ctx context.Context) ([]ExternalSystem, error)
func (*JournalService) ExtractedIdentifiers ¶
func (s *JournalService) ExtractedIdentifiers(ctx context.Context, entryID string) ([]ExtractedIdentifier, error)
func (*JournalService) Get ¶
func (s *JournalService) Get(ctx context.Context, entryID string) (*JournalEntry, error)
func (*JournalService) IdentifierSummary ¶
func (s *JournalService) IdentifierSummary(ctx context.Context, entryID string, identifierType IdentifierType) (*IdentifierSummary, error)
func (*JournalService) InProgress ¶
func (s *JournalService) InProgress(ctx context.Context) ([]JournalEntry, error)
func (*JournalService) List ¶
func (s *JournalService) List(ctx context.Context, opts *ListEntriesOptions) ([]JournalEntry, error)
func (*JournalService) Query ¶
func (s *JournalService) Query(ctx context.Context, in QueryEntriesInput) (*QueryEntriesResult, error)
func (*JournalService) QueryAll ¶
func (s *JournalService) QueryAll(ctx context.Context, in QueryEntriesInput, fn func(JournalEntry) error) error
QueryAll walks every page of a query, calling fn for each entry.
type KarmaAdjustmentDetails ¶
type KarmaBreakdown ¶
type KarmaBreakdown struct {
Components []KarmaComponent `json:"components"`
Total int `json:"total"`
}
type KarmaComponent ¶
type ListAutomationsResult ¶
type ListAutomationsResult struct {
Data []Automation `json:"data"`
Pagination Pagination `json:"pagination"`
}
type ListCasesOptions ¶
type ListDomainRulesOptions ¶
type ListEntriesOptions ¶
type ListIdentifiersOptions ¶
type ListIdentifiersOptions struct {
Type IdentifierType
Page int
PageSize int
}
type ListStreamsOptions ¶
type ListStreamsResult ¶
type ListStreamsResult struct {
Data []ExportStream `json:"data"`
Pagination Pagination `json:"pagination"`
}
type ListTagsResult ¶
type ListTagsResult struct {
Data []Tag `json:"data"`
Pagination Pagination `json:"pagination"`
}
type ListViewsResult ¶
type ListViewsResult struct {
Data []View `json:"data"`
Pagination Pagination `json:"pagination"`
}
type Media ¶
type Media struct {
ID string `json:"id"`
Type string `json:"type"`
FileName string `json:"file_name"`
MimeType string `json:"mime_type"`
FileSize int64 `json:"file_size"`
Notes string `json:"notes,omitempty"`
UploadedAt Time `json:"uploaded_at"`
JournalEntryID string `json:"journal_entry_id,omitempty"`
}
type MediaService ¶
type MediaService struct {
// contains filtered or unexported fields
}
func (*MediaService) Upload ¶
func (s *MediaService) Upload(ctx context.Context, filename string, r io.Reader, opts *MediaUpload) (*Media, error)
func (*MediaService) UploadFile ¶
func (s *MediaService) UploadFile(ctx context.Context, path string, opts *MediaUpload) (*Media, error)
type MediaUpload ¶
type MessageAttachment ¶
type MessageIdentifierRef ¶
type MoveItemInput ¶
type MoveItemInput struct {
ItemActionInput
TargetQueueID string `json:"target_queue_id"`
}
type NoteInput ¶
type NoteInput struct {
Description string
Identifiers []IdentifierLookup
OurIdentifiers []IdentifierLookup
Evidence []Evidence
Media []Media
CaseID string
Tags []TagLookup
Metadata map[string]any
ParentJournalEntryID string
Originator *OriginatorLookup
IsTest bool
ExternalIdentifiers []ExternalIdentifierInput
ExtractExternalIdentifiers bool
// Note entries carry a free-form details payload; the API defines no
// typed shape for them.
Details map[string]any
PerformedAt Time
StartTime Time
EndTime Time
InProgress bool
}
type Notification ¶
type Notification struct {
ID string `json:"id"`
UserID string `json:"user_id"`
Timestamp Time `json:"timestamp"`
NotificationText string `json:"notification_text"`
Service string `json:"service"`
Read bool `json:"read"`
Dismissed bool `json:"dismissed"`
Link string `json:"link,omitempty"`
Icon string `json:"icon,omitempty"`
Severity string `json:"severity"`
EntityType string `json:"entity_type,omitempty"`
EntityID string `json:"entity_id,omitempty"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
}
type NotificationService ¶
type NotificationService struct {
// contains filtered or unexported fields
}
func (*NotificationService) Dismiss ¶
func (s *NotificationService) Dismiss(ctx context.Context, notificationID string) error
func (*NotificationService) DismissAll ¶
func (s *NotificationService) DismissAll(ctx context.Context) error
func (*NotificationService) Get ¶
func (s *NotificationService) Get(ctx context.Context, notificationID string) (*Notification, error)
func (*NotificationService) List ¶
func (s *NotificationService) List(ctx context.Context, opts *ListNotificationsOptions) ([]Notification, int, error)
func (*NotificationService) MarkAllRead ¶
func (s *NotificationService) MarkAllRead(ctx context.Context) error
func (*NotificationService) MarkRead ¶
func (s *NotificationService) MarkRead(ctx context.Context, notificationID string) error
func (*NotificationService) UnreadCount ¶
func (s *NotificationService) UnreadCount(ctx context.Context) (int, error)
type Option ¶
type Option func(*Client)
func WithAPIKey ¶
func WithAPIURL ¶
func WithHTTPClient ¶
func WithLogger ¶
func WithMaxResponseBytes ¶
WithMaxResponseBytes caps how much of a JSON response body is read.
func WithMaxRetries ¶
func WithRetryMaxTime ¶
func WithTimeout ¶
WithTimeout bounds a single non-streaming request. It never mutates a client passed to WithHTTPClient.
type OriginatorLookup ¶
type OriginatorLookup struct {
Type string `json:"type"`
Identifier string `json:"identifier"`
CreateIfNotExist bool `json:"create_if_not_exists"`
// FallbackToAnonymous gives the entry to the anonymous reporter when the lookup matches nobody.
FallbackToAnonymous bool `json:"fallback_to_anonymous,omitempty"`
}
OriginatorLookup names the user or automation an entry is created on behalf of. Type is "user" (email or Clerk user ID), "discord" (the Discord user ID a SCAMBUS user linked) or "automation" (automation name).
type PageRequest ¶
PageRequest carries the paging parameters the API actually reads. The server ignores "limit"; page size is "pageSize", default 25, maximum 100.
type Pagination ¶
type PanoptesScan ¶
type PanoptesScan struct {
ID string `json:"id"`
IdentifierID string `json:"identifier_id"`
TargetURL string `json:"target_url"`
Host string `json:"host"`
RegistrableDomain string `json:"registrable_domain"`
Status string `json:"status"`
WarningLevel string `json:"warning_level"`
Category string `json:"category"`
Details string `json:"details"`
Block bool `json:"block"`
PermalinkURL string `json:"permalink_url"`
ScannedAt Time `json:"scanned_at"`
}
PanoptesScan is the newest Panoptes scan SCAMBUS recorded for a url identifier.
func (*PanoptesScan) Settled ¶
func (s *PanoptesScan) Settled() bool
type PaymentService ¶
type PaymentService string
const ( PaymentServiceZelle PaymentService = "zelle" PaymentServiceCashApp PaymentService = "cashapp" PaymentServicePayPal PaymentService = "paypal" PaymentServiceWise PaymentService = "wise" PaymentServiceKrak PaymentService = "krak" PaymentServiceVenmo PaymentService = "venmo" PaymentServiceChime PaymentService = "chime" )
type PaymentTokenDetails ¶
type PaymentTokenDetails struct {
Service string `json:"service,omitempty"`
Identifier string `json:"identifier,omitempty"`
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
SourceURLCreated string `json:"source_url_created,omitempty"`
SourceURLPrinted string `json:"source_url_printed,omitempty"`
}
type Persona ¶
type Persona struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Personality string `json:"personality"`
Background string `json:"background"`
AddressLine1 string `json:"address_line1,omitempty"`
AddressLine2 string `json:"address_line2,omitempty"`
AddressCity string `json:"address_city"`
AddressState string `json:"address_state"`
AddressPostalCode string `json:"address_postal_code"`
AddressCountry string `json:"address_country"`
OwnerOrgID string `json:"owner_org_id,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
IsActive bool `json:"is_active"`
IsTest bool `json:"is_test"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
Identifiers []PersonaIdentifierLink `json:"identifiers,omitempty"`
Media []PersonaMediaLink `json:"media,omitempty"`
}
type PersonaIdentifierInput ¶
type PersonaIdentifierLink ¶
type PersonaIdentifierLink struct {
PersonaID string `json:"persona_id"`
IdentifierID string `json:"identifier_id"`
Annotation string `json:"annotation"`
IdentifierValue string `json:"identifier_value,omitempty"`
IdentifierType string `json:"identifier_type,omitempty"`
CreatedAt Time `json:"created_at"`
}
type PersonaMediaInput ¶
type PersonaMediaLink ¶
type PersonaMediaLink struct {
PersonaID string `json:"persona_id"`
MediaID string `json:"media_id"`
Category string `json:"category"`
Notes string `json:"notes"`
FileName string `json:"file_name,omitempty"`
MimeType string `json:"mime_type,omitempty"`
FileSize int64 `json:"file_size,omitempty"`
CreatedAt Time `json:"created_at"`
}
type PersonaService ¶
type PersonaService struct {
// contains filtered or unexported fields
}
func (*PersonaService) AddMedia ¶
func (s *PersonaService) AddMedia(ctx context.Context, personaID string, in PersonaMediaInput) (*PersonaMediaLink, error)
func (*PersonaService) Create ¶
func (s *PersonaService) Create(ctx context.Context, in CreatePersonaInput) (*Persona, error)
func (*PersonaService) Delete ¶
func (s *PersonaService) Delete(ctx context.Context, personaID string) error
func (*PersonaService) RemoveMedia ¶
func (s *PersonaService) RemoveMedia(ctx context.Context, personaID, mediaID string) error
func (*PersonaService) Update ¶
func (s *PersonaService) Update(ctx context.Context, personaID string, in UpdatePersonaInput) (*Persona, error)
func (*PersonaService) UpdateMedia ¶
func (s *PersonaService) UpdateMedia(ctx context.Context, personaID, mediaID string, in UpdatePersonaMediaInput) error
type PhoneCallDetails ¶
type PhoneCallDetails struct {
Direction string `json:"direction"`
RecordingURL string `json:"recording_url,omitempty"`
TranscriptURL string `json:"transcript_url,omitempty"`
Transcript []ConversationMessage `json:"transcript,omitempty"`
StartTime Time `json:"start_time"`
EndTime Time `json:"end_time"`
Platform string `json:"platform,omitempty"`
}
type PhoneCallInput ¶
type PhoneCallInput struct {
Description string
Identifiers []IdentifierLookup
OurIdentifiers []IdentifierLookup
Evidence []Evidence
Media []Media
CaseID string
Tags []TagLookup
Metadata map[string]any
ParentJournalEntryID string
Originator *OriginatorLookup
IsTest bool
ExternalIdentifiers []ExternalIdentifierInput
ExtractExternalIdentifiers bool
Direction string
StartTime Time
EndTime Time
RecordingURL string
TranscriptURL string
Transcript []ConversationMessage
InProgress bool
// AIExtract defaults to on when a transcript is attached. Set
// DisableAIExtract to keep it off.
AIExtract bool
DisableAIExtract bool
}
type PhoneDetails ¶
type PollOptions ¶
type PollResult ¶
type PollResult struct {
Messages []json.RawMessage `json:"messages"`
NextCursor string `json:"next_cursor"`
HasMore bool `json:"has_more"`
}
func (PollResult) IdentifierMessages ¶
func (r PollResult) IdentifierMessages() ([]IdentifierStreamMessage, error)
func (PollResult) JournalEntryMessages ¶
func (r PollResult) JournalEntryMessages() ([]JournalEntryStreamMessage, error)
type QueryEntriesInput ¶
type QueryEntriesResult ¶
type QueryEntriesResult struct {
Data []JournalEntry `json:"data"`
NextCursor string `json:"nextCursor"`
HasMore bool `json:"hasMore"`
Count int `json:"count"`
EstimatedTotal *int `json:"estimatedTotal"`
}
type Queue ¶
type Queue struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
FilterCriteria map[string]any `json:"filter_criteria,omitempty"`
CadenceDays int `json:"cadence_days"`
CooldownHours int `json:"cooldown_hours"`
MaxContactsPerCluster *int `json:"max_contacts_per_cluster,omitempty"`
RotationEnabled bool `json:"rotation_enabled"`
PriorityMode string `json:"priority_mode"`
AutoPopulate bool `json:"auto_populate"`
ActorClusterID string `json:"actor_cluster_id,omitempty"`
ActorClusterName string `json:"actor_cluster_name,omitempty"`
RedisStreamKey string `json:"redis_stream_key,omitempty"`
StreamVersion int `json:"stream_version"`
OwnerOrgID string `json:"owner_org_id,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
IsActive bool `json:"is_active"`
IsTest bool `json:"is_test"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
}
type QueueClusterIdentifier ¶
type QueueContactLog ¶
type QueueContactLog struct {
ID string `json:"id"`
QueueItemID string `json:"queue_item_id"`
QueueID string `json:"queue_id"`
ClusterID string `json:"cluster_id"`
ContactedBy string `json:"contacted_by"`
Outcome string `json:"outcome"`
ContactedAt Time `json:"contacted_at"`
Notes string `json:"notes"`
FunnelID string `json:"funnel_id,omitempty"`
FunnelEntryID string `json:"funnel_entry_id,omitempty"`
FunnelStageID string `json:"funnel_stage_id,omitempty"`
PersonaID string `json:"persona_id,omitempty"`
ActorClusterID string `json:"actor_cluster_id,omitempty"`
ContactIdentifierID string `json:"contact_identifier_id,omitempty"`
JournalEntryID string `json:"journal_entry_id,omitempty"`
Channel string `json:"channel,omitempty"`
}
type QueueItem ¶
type QueueItem struct {
ID string `json:"id"`
QueueID string `json:"queue_id"`
ClusterID string `json:"cluster_id"`
RepresentativeID string `json:"representative_id"`
State string `json:"state"`
FunnelID string `json:"funnel_id,omitempty"`
FunnelEntryID string `json:"funnel_entry_id,omitempty"`
FunnelStageID string `json:"funnel_stage_id,omitempty"`
PersonaID string `json:"persona_id,omitempty"`
ActorClusterID string `json:"actor_cluster_id,omitempty"`
SelectedChannel string `json:"selected_channel,omitempty"`
JourneyState map[string]any `json:"journey_state,omitempty"`
Provenance string `json:"provenance"`
ClaimedBy string `json:"claimed_by,omitempty"`
ClaimedAt Time `json:"claimed_at"`
LastContactedAt Time `json:"last_contacted_at"`
LastContactedBy string `json:"last_contacted_by,omitempty"`
ContactCount int `json:"contact_count"`
NextContactAfter Time `json:"next_contact_after"`
Priority int `json:"priority"`
OwnerOrgID string `json:"owner_org_id,omitempty"`
IsTest bool `json:"is_test"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
RepresentativeValue string `json:"representative_value,omitempty"`
RepresentativeType string `json:"representative_type,omitempty"`
ClusterSize *int `json:"cluster_size,omitempty"`
}
type QueueItemEvent ¶
type QueueItemEvent struct {
ID string `json:"id"`
QueueItemID string `json:"queue_item_id"`
QueueID string `json:"queue_id"`
ClusterID string `json:"cluster_id"`
RepresentativeID string `json:"representative_id"`
Event string `json:"event"`
State string `json:"state"`
ContactCount int `json:"contact_count"`
Priority int `json:"priority"`
StreamVersion int `json:"stream_version"`
Metadata map[string]any `json:"metadata,omitempty"`
IsTest bool `json:"is_test"`
OccurredAt Time `json:"occurred_at"`
PreviousQueueID string `json:"previous_queue_id,omitempty"`
TargetQueueID string `json:"target_queue_id,omitempty"`
FunnelID string `json:"funnel_id,omitempty"`
FunnelEntryID string `json:"funnel_entry_id,omitempty"`
FunnelStageID string `json:"funnel_stage_id,omitempty"`
PersonaID string `json:"persona_id,omitempty"`
ActorClusterID string `json:"actor_cluster_id,omitempty"`
SelectedChannel string `json:"selected_channel,omitempty"`
OwnerOrgID string `json:"owner_org_id,omitempty"`
QueueName string `json:"queue_name,omitempty"`
PreviousQueueName string `json:"previous_queue_name,omitempty"`
TargetQueueName string `json:"target_queue_name,omitempty"`
}
type QueuePatch ¶
type QueuePatch struct {
Name *string
Description *string
FilterCriteria map[string]any
CadenceDays *int
CooldownHours *int
MaxContactsPerCluster *int
RotationEnabled *bool
PriorityMode *string
AutoPopulate *bool
ActorClusterID *string
IsActive *bool
}
QueuePatch names the fields Update should change. Anything left nil keeps the queue's current value.
type QueueService ¶
type QueueService struct {
// contains filtered or unexported fields
}
func (*QueueService) Claim ¶
Claim returns nil when the queue holds no claimable item. A missing or inaccessible queue is an error: the API answers 404 for both, but only the empty case carries a JSON body naming it.
func (*QueueService) Complete ¶
func (s *QueueService) Complete(ctx context.Context, queueID, itemID string, in ItemActionInput) error
func (*QueueService) Create ¶
func (s *QueueService) Create(ctx context.Context, in CreateQueueInput) (*Queue, error)
func (*QueueService) Delete ¶
func (s *QueueService) Delete(ctx context.Context, queueID string) error
func (*QueueService) Drop ¶
func (s *QueueService) Drop(ctx context.Context, queueID, itemID string, in ItemActionInput) error
func (*QueueService) ItemClusterIdentifiers ¶
func (s *QueueService) ItemClusterIdentifiers(ctx context.Context, queueID, itemID, role string) ([]QueueClusterIdentifier, error)
func (*QueueService) ItemEvents ¶
func (s *QueueService) ItemEvents(ctx context.Context, queueID, itemID string) ([]QueueItemEvent, error)
func (*QueueService) ItemHistory ¶
func (s *QueueService) ItemHistory(ctx context.Context, queueID, itemID string) ([]QueueContactLog, error)
func (*QueueService) Move ¶
func (s *QueueService) Move(ctx context.Context, queueID, itemID string, in MoveItemInput) error
func (*QueueService) ReadStream ¶
func (s *QueueService) ReadStream(ctx context.Context, queueID string, opts *ReadStreamOptions) (*QueueStreamResponse, error)
func (*QueueService) RecordContact ¶
func (s *QueueService) RecordContact(ctx context.Context, queueID, itemID string, in ContactInput) error
func (*QueueService) Release ¶
func (s *QueueService) Release(ctx context.Context, queueID, itemID string) error
func (*QueueService) Stats ¶
func (s *QueueService) Stats(ctx context.Context, queueID string) (*QueueStats, error)
func (*QueueService) Update ¶
func (s *QueueService) Update(ctx context.Context, queueID string, patch QueuePatch) (*Queue, error)
Update reads the queue, applies the patch, and resends every field. The API has no partial update: a field the request omits is overwritten with its zero value, which would deactivate the queue and clear its description.
type QueueStats ¶
type QueueStats struct {
TotalItems int `json:"total_items"`
Pending int `json:"pending"`
Claimed int `json:"claimed"`
InProgress int `json:"in_progress"`
Contacted int `json:"contacted"`
Cooldown int `json:"cooldown"`
Ready int `json:"ready"`
Completed int `json:"completed"`
Dropped int `json:"dropped"`
}
type QueueStreamMessage ¶
type QueueStreamMessage struct {
Event string `json:"event"`
QueueID string `json:"queue_id"`
QueueItemID string `json:"queue_item_id"`
ClusterID string `json:"cluster_id"`
RepresentativeID string `json:"representative_id"`
State string `json:"state"`
ContactCount int `json:"contact_count"`
Priority int `json:"priority"`
StreamVersion int `json:"stream_version"`
OccurredAt Time `json:"occurred_at"`
IsTest bool `json:"is_test"`
Cursor string `json:"cursor,omitempty"`
PreviousQueueID string `json:"previous_queue_id,omitempty"`
TargetQueueID string `json:"target_queue_id,omitempty"`
RepresentativeType string `json:"representative_type,omitempty"`
RepresentativeValue string `json:"representative_value,omitempty"`
FunnelID string `json:"funnel_id,omitempty"`
FunnelEntryID string `json:"funnel_entry_id,omitempty"`
FunnelStageID string `json:"funnel_stage_id,omitempty"`
PersonaID string `json:"persona_id,omitempty"`
ActorClusterID string `json:"actor_cluster_id,omitempty"`
SelectedChannel string `json:"selected_channel,omitempty"`
JourneyState map[string]any `json:"journey_state,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
type QueueStreamResponse ¶
type QueueStreamResponse struct {
StreamKey string `json:"stream_key"`
Cursor string `json:"cursor"`
Messages []QueueStreamMessage `json:"messages"`
ClaimEndpoint string `json:"claim_endpoint,omitempty"`
SourceOfTruth string `json:"source_of_truth"`
}
type ReadStreamOptions ¶
type RecoverResult ¶
type RecoverResult struct {
Status string `json:"status"`
Message string `json:"message,omitempty"`
StreamID string `json:"stream_id"`
StreamName string `json:"stream_name,omitempty"`
IgnoreCheckpoint bool `json:"ignore_checkpoint"`
ClearStream bool `json:"clear_stream"`
TriggeredBy string `json:"triggered_by,omitempty"`
}
RecoverResult reports a 202; recovery then runs asynchronously.
type RecoveryHistoryOptions ¶
type RedactionDetails ¶
type Report ¶
type Report struct {
ID string `json:"report_id"`
Status string `json:"status"`
DownloadURL string `json:"download_url,omitempty"`
StatusURL string `json:"status_url,omitempty"`
GeneratedAt Time `json:"generated_at"`
}
func (Report) IsCompleted ¶
func (Report) IsProcessing ¶
type ReportService ¶
type ReportService struct {
// contains filtered or unexported fields
}
func (*ReportService) DownloadToFile ¶
func (s *ReportService) DownloadToFile(ctx context.Context, reportID, path string) error
func (*ReportService) GenerateIdentifierReport ¶
func (s *ReportService) GenerateIdentifierReport(ctx context.Context, in IdentifierReportInput) (*Report, error)
func (*ReportService) GenerateJournalEntryReport ¶
func (s *ReportService) GenerateJournalEntryReport(ctx context.Context, in JournalEntryReportInput) (*Report, error)
func (*ReportService) GenerateViewReport ¶
func (s *ReportService) GenerateViewReport(ctx context.Context, viewID string, includeEvidence, signReport bool) (*Report, error)
GenerateViewReport picks the report kind from the view's entity type.
type ScamClassificationDetails ¶
type ScamClassificationDetails struct {
FactorScores []ScamFactorScoreDetail `json:"factor_scores"`
CompositeScore float64 `json:"composite_score"`
PriorComposite float64 `json:"prior_composite_score"`
IsFirstAnalysis bool `json:"is_first_analysis"`
Summary string `json:"summary"`
ModelUsed string `json:"model_used"`
MessageCount int `json:"message_count"`
ContextCount int `json:"context_count"`
}
type ScamFactorScoreDetail ¶
type SearchCasesInput ¶
type SearchCasesInput struct {
SearchQuery string `json:"searchQuery,omitempty"`
Status []string `json:"status,omitempty"`
Priority []string `json:"priority,omitempty"`
Category string `json:"category,omitempty"`
Tags []string `json:"tags,omitempty"`
AssignedTo string `json:"assignedTo,omitempty"`
CreatedBy string `json:"createdBy,omitempty"`
Resolution string `json:"resolution,omitempty"`
CreatedAfter string `json:"createdAfter,omitempty"`
CreatedBefore string `json:"createdBefore,omitempty"`
UpdatedAfter string `json:"updatedAfter,omitempty"`
UpdatedBefore string `json:"updatedBefore,omitempty"`
ClosedAfter string `json:"closedAfter,omitempty"`
ClosedBefore string `json:"closedBefore,omitempty"`
IncludesIdentifier string `json:"includesIdentifier,omitempty"`
TeamMemberInvolved string `json:"teamMemberInvolved,omitempty"`
Cursor string `json:"cursor,omitempty"`
Limit int `json:"limit,omitempty"`
IsTest *bool `json:"isTest,omitempty"`
}
SearchCasesInput is camelCase on the wire, unlike the identifier search.
type SearchCasesResult ¶
type SearchIdentifiersInput ¶
type SearchIdentifiersInput struct {
Filter *FilterCriteria
Limit int
Cursor string
IncludeJournalEntries bool
}
type SearchIdentifiersResult ¶
type SearchIdentifiersResult struct {
Data []Identifier `json:"data"`
NextCursor string `json:"nextCursor"`
HasMore bool `json:"hasMore"`
EstimatedTotal *int `json:"estimatedTotal"`
}
type SearchService ¶
type SearchService struct {
// contains filtered or unexported fields
}
func (*SearchService) Cases ¶
func (s *SearchService) Cases(ctx context.Context, in SearchCasesInput) (*SearchCasesResult, error)
func (*SearchService) Identifiers ¶
func (s *SearchService) Identifiers(ctx context.Context, in SearchIdentifiersInput) (*SearchIdentifiersResult, error)
func (*SearchService) IdentifiersAll ¶
func (s *SearchService) IdentifiersAll(ctx context.Context, in SearchIdentifiersInput, fn func(Identifier) error) error
IdentifiersAll walks every page of an identifier search.
type Session ¶
type Session struct {
ID string `json:"id"`
JTI string `json:"jti"`
UserID string `json:"user_id"`
UserType string `json:"user_type"`
ClerkUserID string `json:"clerk_user_id"`
ExpiresAt Time `json:"expires_at"`
IPAddress string `json:"ip_address,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
RevokedAt Time `json:"revoked_at"`
RevokedBy string `json:"revoked_by,omitempty"`
RevokeReason string `json:"revoke_reason,omitempty"`
CreatedAt Time `json:"created_at"`
}
type SessionService ¶
type SessionService struct {
// contains filtered or unexported fields
}
func (*SessionService) DeletePasskey ¶
func (s *SessionService) DeletePasskey(ctx context.Context, passkeyID string) error
func (*SessionService) ListPasskeys ¶
func (s *SessionService) ListPasskeys(ctx context.Context) ([]Passkey, error)
func (*SessionService) Revoke ¶
func (s *SessionService) Revoke(ctx context.Context, sessionID string) error
func (*SessionService) SetTwoFactor ¶
func (s *SessionService) SetTwoFactor(ctx context.Context, enable bool) (*TwoFactorResult, error)
SetTwoFactor sends {"enable": …}; the server reads that key, not "enabled".
func (*SessionService) TwoFactorStatus ¶
func (s *SessionService) TwoFactorStatus(ctx context.Context) (*TwoFactorStatus, error)
type SocialMediaDetails ¶
type SpecialDomainRule ¶
type SpecialDomainRule struct {
ID string `json:"id"`
Domain string `json:"domain"`
Category string `json:"category"`
PathDepth int `json:"path_depth"`
StripQuery bool `json:"strip_query"`
StripFragment bool `json:"strip_fragment"`
IsActive bool `json:"is_active"`
IsDefault bool `json:"is_default"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
}
type StreamCursors ¶
type StreamDataType ¶
type StreamDataType string
const ( StreamDataJournalEntry StreamDataType = "journal_entry" StreamDataIdentifier StreamDataType = "identifier" )
type StreamEvidenceInfo ¶
type StreamEvidenceInfo struct {
ID string `json:"id"`
Type string `json:"type"`
Description string `json:"description,omitempty"`
Source string `json:"source,omitempty"`
CollectedAt Time `json:"collected_at"`
MediaIDs []string `json:"media_ids,omitempty"`
OriginatorID string `json:"originator_id,omitempty"`
OriginatorType string `json:"originator_type,omitempty"`
}
type StreamIdentifierInfo ¶
type StreamIdentifierInfo struct {
ID string `json:"id"`
Type string `json:"type"`
DisplayValue string `json:"display_value"`
Confidence Confidence `json:"confidence"`
IsOurs bool `json:"is_ours"`
Label string `json:"label,omitempty"`
Data map[string]any `json:"data,omitempty"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
}
type StreamInfo ¶
type StreamInfo struct {
StreamID string `json:"stream_id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
DataType string `json:"data_type"`
FilterCriteria map[string]any `json:"filter_criteria,omitempty"`
RateLimitPerMinute int `json:"rate_limit_per_minute"`
BatchSize int `json:"batch_size"`
Cursors StreamCursors `json:"cursors"`
MessagesInStream int64 `json:"messages_in_stream"`
FirstEntry string `json:"first_entry,omitempty"`
LastEntry string `json:"last_entry,omitempty"`
ConsumerGroups any `json:"consumer_groups,omitempty"`
}
type StreamJournalEntryInfo ¶
type StreamJournalEntryInfo struct {
ID string `json:"id"`
Type string `json:"type"`
Description string `json:"description"`
PerformedAt Time `json:"performed_at"`
OriginatorID string `json:"originator_id,omitempty"`
OriginatorType string `json:"originator_type,omitempty"`
Evidence []StreamEvidenceInfo `json:"evidence,omitempty"`
}
type StreamMessage ¶
type StreamMessage struct {
Cursor string
Raw json.RawMessage
}
StreamMessage is one decoded payload from an SSE `batch` or `message` event.
func (StreamMessage) Identifier ¶
func (m StreamMessage) Identifier() (IdentifierStreamMessage, error)
func (StreamMessage) JournalEntry ¶
func (m StreamMessage) JournalEntry() (JournalEntryStreamMessage, error)
type StreamOriginatorInfo ¶
type StreamService ¶
type StreamService struct {
// contains filtered or unexported fields
}
func (*StreamService) BackfillIdentifiers ¶
func (s *StreamService) BackfillIdentifiers(ctx context.Context, streamID, fromDate string) (map[string]any, error)
BackfillIdentifiers returns the raw diagnostic payload; the endpoint publishes no stable shape.
func (*StreamService) Create ¶
func (s *StreamService) Create(ctx context.Context, in CreateStreamInput) (*ExportStream, error)
func (*StreamService) CreateTemporary ¶
func (s *StreamService) CreateTemporary(ctx context.Context, in CreateTemporaryStreamInput) (*ExportStream, error)
func (*StreamService) Delete ¶
func (s *StreamService) Delete(ctx context.Context, streamID string) error
func (*StreamService) Get ¶
func (s *StreamService) Get(ctx context.Context, streamID string) (*ExportStream, error)
func (*StreamService) List ¶
func (s *StreamService) List(ctx context.Context, opts *ListStreamsOptions) (*ListStreamsResult, error)
func (*StreamService) Recover ¶
func (s *StreamService) Recover(ctx context.Context, streamID string, ignoreCheckpoint, clearStream bool) (*RecoverResult, error)
func (*StreamService) RecoveryHistory ¶
func (s *StreamService) RecoveryHistory(ctx context.Context, opts *RecoveryHistoryOptions) (map[string]any, error)
RecoveryHistory returns the raw diagnostic payload; the endpoint publishes no stable shape.
func (*StreamService) RecoveryInfo ¶
RecoveryInfo returns the raw diagnostic payload; the endpoint publishes no stable shape.
type StreamTagInfo ¶
type SubscribeOptions ¶
type Tag ¶
type Tag struct {
ID string `json:"id"`
Title string `json:"title"`
TagType string `json:"tag_type"`
Description string `json:"description,omitempty"`
Aliases []string `json:"aliases,omitempty"`
ApplicableModels []string `json:"applicable_models,omitempty"`
Color string `json:"color,omitempty"`
Icon string `json:"icon,omitempty"`
Active bool `json:"active"`
IsSystem bool `json:"is_system"`
IsGlobal bool `json:"is_global"`
FlowUp bool `json:"flow_up"`
FlowDown bool `json:"flow_down"`
AllowDynamicValues bool `json:"allow_dynamic_values"`
AllocatesKarma *int `json:"allocates_karma,omitempty"`
OwnerOrgID string `json:"owner_org_id,omitempty"`
TagValues []TagValue `json:"tag_values,omitempty"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
}
type TagDisplay ¶
type TagDisplay struct {
TagID string `json:"tag_id"`
TagTitle string `json:"tag_title"`
ValueID string `json:"value_id,omitempty"`
ValueTitle string `json:"value_title,omitempty"`
Display string `json:"display"`
IsFlowedUp bool `json:"is_flowed_up"`
IsFlowedDown bool `json:"is_flowed_down"`
IsInherited bool `json:"is_inherited,omitempty"`
IsSystem bool `json:"is_system,omitempty"`
IsSticky bool `json:"is_sticky,omitempty"`
JournalEntryID string `json:"journal_entry_id,omitempty"`
JournalEntryType string `json:"journal_entry_type,omitempty"`
}
TagDisplay is the rendered form of a tag on an entity, including tags inherited from ancestor or descendant entries.
type TagOperationDetails ¶
type TagOperationDetails struct {
Operation string `json:"operation"`
TagID string `json:"tag_id,omitempty"`
TagValueID string `json:"tag_value_id,omitempty"`
TagName string `json:"tag_name,omitempty"`
TagValueName string `json:"tag_value_name,omitempty"`
Tags []TagRef `json:"tags,omitempty"`
Reason string `json:"reason,omitempty"`
BatchID string `json:"batch_id,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
type TagService ¶
type TagService struct {
// contains filtered or unexported fields
}
func (*TagService) Create ¶
func (s *TagService) Create(ctx context.Context, in CreateTagInput) (*Tag, error)
func (*TagService) CreateValue ¶
func (s *TagService) CreateValue(ctx context.Context, tagID string, in CreateTagValue) (*TagValue, error)
func (*TagService) DeleteValue ¶
func (s *TagService) DeleteValue(ctx context.Context, tagID, valueID string) error
func (*TagService) Effective ¶
func (s *TagService) Effective(ctx context.Context, entityType, entityID string) ([]TagDisplay, error)
func (*TagService) List ¶
func (s *TagService) List(ctx context.Context, page *PageRequest) (*ListTagsResult, error)
func (*TagService) ListValues ¶
func (*TagService) Update ¶
func (s *TagService) Update(ctx context.Context, tagID string, in UpdateTagInput) (*Tag, error)
func (*TagService) UpdateValue ¶
func (s *TagService) UpdateValue(ctx context.Context, tagID, valueID string, in UpdateTagValueInput) (*TagValue, error)
type TaskAssignmentDetails ¶
type TaskUpdateDetails ¶
type TextConversationDetails ¶
type TextConversationDetails struct {
Platform string `json:"platform"`
ConversationType string `json:"conversation_type,omitempty"`
ConversationID string `json:"conversation_id,omitempty"`
FirstMessageAt Time `json:"first_message_at,omitzero"`
LastMessageAt Time `json:"last_message_at,omitzero"`
SourceType string `json:"source_type,omitempty"`
Subject string `json:"subject,omitempty"`
ParticipantCount int `json:"participant_count,omitempty"`
ExportFormat string `json:"export_format,omitempty"`
CollectionMethod string `json:"collection_method,omitempty"`
ChainOfCustody []CustodyEvent `json:"chain_of_custody,omitempty"`
PlatformMetadata map[string]any `json:"platform_metadata,omitempty"`
}
type TextConversationInput ¶
type TextConversationInput struct {
Description string
Identifiers []IdentifierLookup
OurIdentifiers []IdentifierLookup
Evidence []Evidence
Media []Media
CaseID string
Tags []TagLookup
Metadata map[string]any
ParentJournalEntryID string
Originator *OriginatorLookup
IsTest bool
ExternalIdentifiers []ExternalIdentifierInput
ExtractExternalIdentifiers bool
Platform string
StartTime Time
EndTime Time
InProgress bool
AIExtract bool
Details *TextConversationDetails
}
type Time ¶
Time accepts RFC3339 with or without a zone; a naive value is read as UTC.
func (Time) MarshalJSON ¶
func (*Time) UnmarshalJSON ¶
type TwoFactorResult ¶
type TwoFactorStatus ¶
type URLConsolidationStatus ¶
type URLConsolidationStatus struct {
Status string `json:"status"`
StartedAt Time `json:"started_at"`
CompletedAt Time `json:"completed_at"`
TotalGroups int `json:"total_groups"`
ProcessedGroups int `json:"processed_groups"`
Merged int `json:"merged"`
Skipped int `json:"skipped"`
Errors int `json:"errors"`
LastError string `json:"last_error,omitempty"`
}
type URLDetails ¶
type URLDetails struct {
URL string `json:"url,omitempty"`
}
type URLReferencesOptions ¶
type URLReferencesResult ¶
type URLReferencesResult struct {
URLReferences []IdentifierURLReference `json:"url_references"`
Total int `json:"total"`
Page int `json:"page"`
PageSize int `json:"page_size"`
}
type UpdateCaseInput ¶
type UpdateCaseInput struct {
Title *string `json:"title,omitempty"`
Notes *string `json:"notes,omitempty"`
Status *string `json:"status,omitempty"`
Priority *string `json:"priority,omitempty"`
IsTest *bool `json:"is_test,omitempty"`
// Both are required, and must be non-empty, when Status is "closed".
Resolution *string `json:"resolution,omitempty"`
ClosureNotes *string `json:"closure_notes,omitempty"`
}
type UpdateDomainRuleInput ¶
type UpdateDomainRuleInput struct {
Domain *string `json:"domain,omitempty"`
Category *string `json:"category,omitempty"`
PathDepth *int `json:"path_depth,omitempty"`
StripQuery *bool `json:"strip_query,omitempty"`
StripFragment *bool `json:"strip_fragment,omitempty"`
IsActive *bool `json:"is_active,omitempty"`
}
type UpdatePersonaInput ¶
type UpdatePersonaInput struct {
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
Personality *string `json:"personality,omitempty"`
Background *string `json:"background,omitempty"`
AddressLine1 *string `json:"address_line1,omitempty"`
AddressLine2 *string `json:"address_line2,omitempty"`
AddressCity *string `json:"address_city,omitempty"`
AddressState *string `json:"address_state,omitempty"`
AddressPostalCode *string `json:"address_postal_code,omitempty"`
AddressCountry *string `json:"address_country,omitempty"`
IsActive *bool `json:"is_active,omitempty"`
}
type UpdatePersonaMediaInput ¶
type UpdateQueueInput ¶
type UpdateQueueInput struct {
Name string `json:"name"`
Description string `json:"description"`
FilterCriteria map[string]any `json:"filter_criteria,omitempty"`
CadenceDays int `json:"cadence_days"`
CooldownHours int `json:"cooldown_hours"`
MaxContactsPerCluster *int `json:"max_contacts_per_cluster"`
RotationEnabled bool `json:"rotation_enabled"`
PriorityMode string `json:"priority_mode"`
AutoPopulate bool `json:"auto_populate"`
ActorClusterID string `json:"actor_cluster_id,omitempty"`
IsActive bool `json:"is_active"`
}
UpdateQueueInput is a whole-object replace. The server applies description, max_contacts_per_cluster, rotation_enabled, actor_cluster_id, auto_populate and is_active unconditionally, so an omitted field is written as its zero value. Use Update, which reads the queue first and resends every field, rather than building this by hand.
type UpdateTagInput ¶
type UpdateTagInput struct {
Title *string `json:"title,omitempty"`
Description *string `json:"description,omitempty"`
Aliases []string `json:"aliases,omitempty"`
IsGlobal *bool `json:"is_global,omitempty"`
FlowUp *bool `json:"flow_up,omitempty"`
FlowDown *bool `json:"flow_down,omitempty"`
AllowDynamicValues *bool `json:"allow_dynamic_values,omitempty"`
Color *string `json:"color,omitempty"`
Icon *string `json:"icon,omitempty"`
Active *bool `json:"active,omitempty"`
TagValues []CreateTagValue `json:"tag_values,omitempty"`
}
type UpdateTagValueInput ¶
type UpdateViewInput ¶
type UpdateViewInput struct {
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
Visibility *string `json:"visibility,omitempty"`
FilterCriteria *FilterCriteria `json:"filter_criteria,omitempty"`
SortOrder *SortOrder `json:"sort_order,omitempty"`
QueryString *string `json:"query_string,omitempty"`
DisplaySettings map[string]any `json:"display_settings,omitempty"`
}
type View ¶
type View struct {
ID string `json:"id"`
Name string `json:"name"`
EntityType string `json:"entity_type"`
Visibility string `json:"visibility"`
ViewType string `json:"view_type"`
Description string `json:"description,omitempty"`
Alias string `json:"alias,omitempty"`
FilterCriteria map[string]any `json:"filter_criteria,omitempty"`
SortOrder *SortOrder `json:"sort_order,omitempty"`
IsSystem bool `json:"is_system"`
CreatedAt Time `json:"created_at"`
UpdatedAt Time `json:"updated_at"`
CreatedBy string `json:"created_by,omitempty"`
OrgID string `json:"org_id,omitempty"`
}
type ViewService ¶
type ViewService struct {
// contains filtered or unexported fields
}
func (*ViewService) Create ¶
func (s *ViewService) Create(ctx context.Context, in CreateViewInput) (*View, error)
func (*ViewService) Execute ¶
func (s *ViewService) Execute(ctx context.Context, viewID string, opts *ExecuteViewOptions) (*ExecuteViewResult, error)
func (*ViewService) ExecuteMyJournalEntries ¶
func (s *ViewService) ExecuteMyJournalEntries(ctx context.Context, opts *ExecuteViewOptions) (*ExecuteViewResult, error)
func (*ViewService) ExecuteMyPinboard ¶
func (s *ViewService) ExecuteMyPinboard(ctx context.Context, opts *ExecuteViewOptions) (*ExecuteViewResult, error)
func (*ViewService) List ¶
func (s *ViewService) List(ctx context.Context, page *PageRequest) (*ListViewsResult, error)
func (*ViewService) MyJournalEntries ¶
func (s *ViewService) MyJournalEntries(ctx context.Context) (*View, error)
func (*ViewService) MyPinboard ¶
func (s *ViewService) MyPinboard(ctx context.Context) (*View, error)
func (*ViewService) Update ¶
func (s *ViewService) Update(ctx context.Context, viewID string, in UpdateViewInput) (*View, error)
type WSClient ¶
type WSClient struct {
// contains filtered or unexported fields
}
func (*WSClient) ListenNotifications ¶
func (w *WSClient) ListenNotifications(ctx context.Context, fn func(Notification)) error
ListenNotifications subscribes to the notifications channel and runs until ctx is cancelled. The server subscribes nothing on connect, so the frame has to be sent explicitly.
func (*WSClient) ListenStream ¶
func (w *WSClient) ListenStream(ctx context.Context, streamID, cursor string, includeTest bool, fn func(StreamMessage)) error
ListenStream connects, subscribes, and runs until ctx is cancelled.
func (*WSClient) On ¶
On registers a handler for a channel and event. Pass "*" as the event to receive every message on the channel. The returned function unregisters it.
func (*WSClient) SubscribeChannel ¶
SubscribeChannel subscribes to a non-stream channel and replays the subscription after a reconnect.
func (*WSClient) SubscribeStream ¶
type WSHandler ¶
type WSHandler func(WSMessage)
WSHandler receives the `data` payload of a matching message. A handler registered for the "*" event receives the whole message instead.
type WSMessage ¶
type WSMessage struct {
Type string `json:"type"`
Channel string `json:"channel"`
Event string `json:"event"`
Data json.RawMessage `json:"data"`
}
type WSOption ¶
type WSOption func(*WSClient)
func WithWSLogger ¶
func WithWSMaxReconnects ¶
func WithWSReconnectDelay ¶
type ZelleDetails ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
consume-poll
command
Polls an export stream in a loop, resuming from the last cursor.
|
Polls an export stream in a loop, resuming from the last cursor. |
|
consume-sse
command
Reads an export stream over SSE, reconnecting from the last cursor.
|
Reads an export stream over SSE, reconnecting from the last cursor. |
|
phone-call
command
Uploads a recording, files a phone call with a transcript, and completes it.
|
Uploads a recording, files a phone call with a transcript, and completes it. |
|
queue-worker
command
Claims queue items in a loop, records contact, and completes them.
|
Claims queue items in a loop, records contact, and completes them. |
|
reports
command
Generates a signed identifier report and downloads the PDF.
|
Generates a signed identifier report and downloads the PDF. |
|
search-and-views
command
Searches identifiers, then saves the same filter as a view.
|
Searches identifiers, then saves the same filter as a view. |
|
simple-detection
command
Submits a detection with two identifiers and a tag.
|
Submits a detection with two identifiers and a tag. |
|
websocket-stream
command
Receives export stream messages and notifications over WebSocket.
|
Receives export stream messages and notifications over WebSocket. |