Documentation
¶
Index ¶
- Constants
- func MaskKey(key string) string
- func SignalBatchSummary(resp *SignalBatchResponse) string
- type APIError
- type BatchResultItem
- type BatchSignalItem
- type BulkCreateProfileAssignmentsRequest
- type Client
- func (c *Client) ApplyExtractTemplates(ctx context.Context, req ExtractApplyRequest, rawDst io.Writer) (*ExtractApplyResult, error)
- func (c *Client) BulkCreateProfileAssignments(ctx context.Context, req BulkCreateProfileAssignmentsRequest, rawDst io.Writer) ([]ProfileAssignment, error)
- func (c *Client) CountPreviewCompanyList(ctx context.Context, req CountPreviewCompanyListRequest, rawDst io.Writer) (*CountPreviewCompanyListResponse, error)
- func (c *Client) CreateCompanyList(ctx context.Context, req CreateCompanyListRequest, rawDst io.Writer) (*CompanyList, error)
- func (c *Client) CreateCompanySignal(ctx context.Context, req CreateCompanySignalRequest) (*Signal, error)
- func (c *Client) CreateCompanySignalSync(ctx context.Context, req CreateCompanySignalRequest, timeoutSec int, ...) (*CompanySignal, error)
- func (c *Client) CreateContactList(ctx context.Context, req CreateContactListRequest, rawDst io.Writer) (*ContactList, error)
- func (c *Client) CreateContactSignal(ctx context.Context, req CreateContactSignalRequest) (*Signal, error)
- func (c *Client) CreateContactSignalSync(ctx context.Context, req CreateContactSignalRequest, timeoutSec int, ...) (*Signal, error)
- func (c *Client) CreateMarketSignalSubscription(ctx context.Context, req CreateMarketSignalSubscriptionRequest, ...) (*MarketSignalSubscription, error)
- func (c *Client) CreateProfileAssignment(ctx context.Context, req CreateProfileAssignmentRequest, rawDst io.Writer) (*ProfileAssignment, error)
- func (c *Client) CreateScoringProfile(ctx context.Context, req CreateScoringProfileRequest, rawDst io.Writer) (*ScoringProfile, error)
- func (c *Client) CreateSignalBatch(ctx context.Context, req CreateSignalBatchRequest, rawDst io.Writer) (*SignalBatchResponse, error)
- func (c *Client) CreateSignalTemplate(ctx context.Context, req CreateSignalTemplateRequest, rawDst io.Writer) (*SignalTemplate, error)
- func (c *Client) CreateSubscription(ctx context.Context, req CreateSubscriptionRequest, rawDst io.Writer) (*Subscription, error)
- func (c *Client) Delete(ctx context.Context, path string) error
- func (c *Client) DeleteCompanyList(ctx context.Context, id string) error
- func (c *Client) DeleteContactList(ctx context.Context, id string) error
- func (c *Client) DeleteMarketSignalSubscription(ctx context.Context, id string) error
- func (c *Client) DeleteProfileAssignment(ctx context.Context, id string) error
- func (c *Client) DeleteScoringProfile(ctx context.Context, id string) error
- func (c *Client) DeleteScoringRule(ctx context.Context, profileID, ruleID string) error
- func (c *Client) DeleteSignalTemplate(ctx context.Context, id string) error
- func (c *Client) Do(ctx context.Context, method, path string, bodyBytes []byte, ...) error
- func (c *Client) ExportCompanyList(ctx context.Context, id string, req ExportCompanyListRequest, dst io.Writer) error
- func (c *Client) GenerateSummary(ctx context.Context, req GenerateSummaryRequest, rawDst io.Writer) (*SummaryResponse, error)
- func (c *Client) Get(ctx context.Context, path string, dst any, rawDst io.Writer) error
- func (c *Client) GetCompaniesInList(ctx context.Context, id string, limit, offset int, rawDst io.Writer) (*CompaniesInListResponse, error)
- func (c *Client) GetCompanyList(ctx context.Context, id string, rawDst io.Writer) (*CompanyList, error)
- func (c *Client) GetCompanySignal(ctx context.Context, id string, rawDst io.Writer) (*CompanySignal, error)
- func (c *Client) GetContactList(ctx context.Context, id string, rawDst io.Writer) (*ContactList, error)
- func (c *Client) GetContactSignal(ctx context.Context, id string, rawDst io.Writer) (*Signal, error)
- func (c *Client) GetContactsInList(ctx context.Context, id string, limit, offset int, rawDst io.Writer) (*ContactsInListResponse, error)
- func (c *Client) GetCredits(ctx context.Context, rawDst io.Writer) (*CreditsBalance, error)
- func (c *Client) GetMarketSignalSubscription(ctx context.Context, id string, rawDst io.Writer) (*MarketSignalSubscription, error)
- func (c *Client) GetOrganisation(ctx context.Context, rawDst io.Writer) (*Organisation, error)
- func (c *Client) GetScores(ctx context.Context, objectType string, objectIDs []string, rawDst io.Writer) ([]ScoreResult, error)
- func (c *Client) GetScoringProfile(ctx context.Context, id string, rawDst io.Writer) (*ScoringProfile, error)
- func (c *Client) GetSignal(ctx context.Context, id string, rawDst io.Writer) (*Signal, error)
- func (c *Client) GetSignalTemplate(ctx context.Context, id string, rawDst io.Writer) (*SignalTemplate, error)
- func (c *Client) GetSubscription(ctx context.Context, id string, rawDst io.Writer) (*Subscription, error)
- func (c *Client) ImportCompanyList(ctx context.Context, req ImportCompanyListRequest, rawDst io.Writer) (*CompanyList, error)
- func (c *Client) ListCompanyLists(ctx context.Context, limit, offset int, rawDst io.Writer) (*CompanyListsResponse, error)
- func (c *Client) ListConnectors(ctx context.Context, rawDst io.Writer) (*ConnectorsListResponse, error)
- func (c *Client) ListContactLists(ctx context.Context, limit, offset int, rawDst io.Writer) (*ContactListsResponse, error)
- func (c *Client) ListMarketSignalSubscriptions(ctx context.Context, limit, offset int, includeDeleted bool, rawDst io.Writer) (*MarketSignalSubscriptionListResponse, error)
- func (c *Client) ListMarketSignals(ctx context.Context, subscriptionID string, limit, offset int, ...) (*MarketSignalListResponse, error)
- func (c *Client) ListProfileAssignments(ctx context.Context, objectType, objectID string, rawDst io.Writer) ([]ProfileAssignment, error)
- func (c *Client) ListScoringProfiles(ctx context.Context, rawDst io.Writer) ([]ScoringProfile, error)
- func (c *Client) ListScoringRules(ctx context.Context, profileID string, rawDst io.Writer) ([]ScoringRule, error)
- func (c *Client) ListSignalTemplates(ctx context.Context, limit, offset int, includeDeleted bool, rawDst io.Writer) (*SignalTemplatesResponse, error)
- func (c *Client) ListSignals(ctx context.Context, params ListSignalsParams, rawDst io.Writer) (*SignalListResponse, error)
- func (c *Client) ListSubscriptionLogs(ctx context.Context, subscriptionID string, domain string, limit, offset int, ...) (*SignalListResponse, error)
- func (c *Client) ListSubscriptions(ctx context.Context, limit, offset int, rawDst io.Writer) (*SubscriptionsResponse, error)
- func (c *Client) ListSummaries(ctx context.Context, domain string, limit, offset int, rawDst io.Writer) (*SummariesResponse, error)
- func (c *Client) Patch(ctx context.Context, path string, body any, dst any, rawDst io.Writer) error
- func (c *Client) PauseMarketSignalSubscription(ctx context.Context, id string, rawDst io.Writer) (*MarketSignalSubscription, error)
- func (c *Client) Post(ctx context.Context, path string, body any, dst any, rawDst io.Writer) error
- func (c *Client) PostWithHeaders(ctx context.Context, path string, headers map[string]string, body any, dst any, ...) error
- func (c *Client) ProposeExtractTemplates(ctx context.Context, req ExtractProposeRequest, rawDst io.Writer) (*ExtractProposal, error)
- func (c *Client) Put(ctx context.Context, path string, body any, dst any, rawDst io.Writer) error
- func (c *Client) ResumeMarketSignalSubscription(ctx context.Context, id string, rawDst io.Writer) (*MarketSignalSubscription, error)
- func (c *Client) SearchCompanies(ctx context.Context, req CompanySearchRequest, rawDst io.Writer) (*CompanySearchResponse, error)
- func (c *Client) SearchContacts(ctx context.Context, req ContactSearchRequest, rawDst io.Writer) (*ContactSearchResponse, error)
- func (c *Client) StartSubscription(ctx context.Context, id string) (*Subscription, error)
- func (c *Client) StopSubscription(ctx context.Context, id string) (*Subscription, error)
- func (c *Client) TriggerMarketSignalSubscription(ctx context.Context, id string, rawDst io.Writer) (*MarketSignalSubscription, error)
- func (c *Client) TriggerScoreCompute(ctx context.Context, req ComputeScoresRequest) (*ComputeScoresResponse, error)
- func (c *Client) TriggerSubscription(ctx context.Context, id string) (*Subscription, error)
- func (c *Client) UpdateCompanyList(ctx context.Context, id string, req UpdateCompanyListRequest, rawDst io.Writer) (*CompanyList, error)
- func (c *Client) UpdateContactList(ctx context.Context, id string, req UpdateContactListRequest, rawDst io.Writer) (*ContactList, error)
- func (c *Client) UpdateMarketSignalSubscription(ctx context.Context, id string, req UpdateMarketSignalSubscriptionRequest, ...) (*MarketSignalSubscription, error)
- func (c *Client) UpdateOrganisation(ctx context.Context, req UpdateOrganisationRequest, rawDst io.Writer) (*Organisation, error)
- func (c *Client) UpdateScoringProfile(ctx context.Context, id string, req UpdateScoringProfileRequest, ...) (*ScoringProfile, error)
- func (c *Client) UpdateSignalTemplate(ctx context.Context, id string, req UpdateSignalTemplateRequest, ...) (*SignalTemplate, error)
- func (c *Client) UpsertScoringRule(ctx context.Context, profileID string, req UpsertScoringRuleRequest, ...) (*ScoringRule, error)
- type CompaniesInListResponse
- type CompanyList
- type CompanyListCompany
- type CompanyListExclude
- type CompanyListFilter
- type CompanyListLocation
- type CompanyListsResponse
- type CompanySearchRequest
- type CompanySearchResponse
- type CompanySignal
- type ComputeScoresRequest
- type ComputeScoresResponse
- type Connector
- type ConnectorsListResponse
- type ContactList
- type ContactListFilters
- type ContactListItem
- type ContactListsResponse
- type ContactSearchRequest
- type ContactSearchResponse
- type ContactSearchResult
- type ContactsInListResponse
- type CountPreviewCompanyListRequest
- type CountPreviewCompanyListResponse
- type CreateCompanyListRequest
- type CreateCompanySignalRequest
- type CreateContactListRequest
- type CreateContactSignalRequest
- type CreateMarketSignalSubscriptionRequest
- type CreateProfileAssignmentRequest
- type CreateScoringProfileRequest
- type CreateSignalBatchRequest
- type CreateSignalTemplateRequest
- type CreateSubscriptionRequest
- type CreditsBalance
- type DataPoint
- type ExportCompanyListRequest
- type ExtractAppliedTemplate
- type ExtractApplyRequest
- type ExtractApplyResult
- type ExtractCluster
- type ExtractProposal
- type ExtractProposeRequest
- type GenerateSummaryRequest
- type HubSpotPropertyFilter
- type ImportCompanyListRequest
- type ImportCompanyListSource
- type ListSignalsParams
- type MarketSignal
- type MarketSignalListResponse
- type MarketSignalSubscription
- type MarketSignalSubscriptionListResponse
- type Organisation
- type OrganisationDescription
- type ProfileAssignment
- type ScoreContribution
- type ScoreResult
- type ScoringPointValueRange
- type ScoringPointValues
- type ScoringProfile
- type ScoringRule
- type Signal
- type SignalBatchResponse
- type SignalListItem
- type SignalListResponse
- type SignalStatus
- type SignalTemplate
- type SignalTemplatesResponse
- type Source
- type Subscription
- type SubscriptionsResponse
- type SummariesResponse
- type SummaryRecord
- type SummaryResponse
- type UpdateCompanyListRequest
- type UpdateContactListRequest
- type UpdateMarketSignalSubscriptionRequest
- type UpdateOrganisationRequest
- type UpdateScoringProfileRequest
- type UpdateSignalTemplateRequest
- type UpsertScoringRuleRequest
Constants ¶
const ( ExtractClusterKindNew = "new" ExtractClusterKindExisting = "existing" )
ExtractClusterKind values for ExtractCluster.Kind. Mirrors the platform-side `ClusterKind` enum so callers can switch on Kind without magic-string literals.
Variables ¶
This section is empty.
Functions ¶
func SignalBatchSummary ¶ added in v0.1.7
func SignalBatchSummary(resp *SignalBatchResponse) string
signalBatchSummary builds a human-readable one-line summary of a batch result.
Types ¶
type APIError ¶
type APIError struct {
StatusCode int
Message string
RetryAfter int // seconds, for 429
Details []string // structured detail lines surfaced in Error() (e.g. 409 alreadyAttached IDs)
}
APIError represents an error response from the API.
type BatchResultItem ¶ added in v0.1.7
type BatchResultItem struct {
ID string `json:"id,omitempty"`
Status string `json:"status"`
Domain string `json:"domain"`
Question string `json:"question"`
Error string `json:"error,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
}
BatchResultItem is a single signal result from a batch response.
type BatchSignalItem ¶ added in v0.1.7
type BatchSignalItem struct {
Question string `json:"question"`
AnswerType string `json:"answerType,omitempty"`
Weight string `json:"weight,omitempty"`
WebhookURL string `json:"webhookUrl,omitempty"`
ForceRefresh bool `json:"forceRefresh,omitempty"`
}
BatchSignalItem is a single signal definition in a batch request.
type BulkCreateProfileAssignmentsRequest ¶ added in v0.1.8
type BulkCreateProfileAssignmentsRequest struct {
ProfileID string `json:"profileId"`
ObjectType string `json:"objectType"`
ObjectIDs []string `json:"objectIds"`
}
BulkCreateProfileAssignmentsRequest is the payload for POST /v1/scoring/assignments/bulk.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps http.Client with auth, retry, and verbose logging.
func (*Client) ApplyExtractTemplates ¶ added in v0.1.9
func (c *Client) ApplyExtractTemplates(ctx context.Context, req ExtractApplyRequest, rawDst io.Writer) (*ExtractApplyResult, error)
ApplyExtractTemplates creates new templates and/or attaches executions to existing ones in a single transaction. Re-running the same plan returns 409 — drop the already-attached executionIds before retrying.
func (*Client) BulkCreateProfileAssignments ¶ added in v0.1.8
func (c *Client) BulkCreateProfileAssignments(ctx context.Context, req BulkCreateProfileAssignmentsRequest, rawDst io.Writer) ([]ProfileAssignment, error)
func (*Client) CountPreviewCompanyList ¶ added in v0.1.6
func (c *Client) CountPreviewCompanyList(ctx context.Context, req CountPreviewCompanyListRequest, rawDst io.Writer) (*CountPreviewCompanyListResponse, error)
func (*Client) CreateCompanyList ¶
func (c *Client) CreateCompanyList(ctx context.Context, req CreateCompanyListRequest, rawDst io.Writer) (*CompanyList, error)
func (*Client) CreateCompanySignal ¶
func (c *Client) CreateCompanySignal(ctx context.Context, req CreateCompanySignalRequest) (*Signal, error)
CreateCompanySignal creates an async company signal.
func (*Client) CreateCompanySignalSync ¶
func (c *Client) CreateCompanySignalSync(ctx context.Context, req CreateCompanySignalRequest, timeoutSec int, rawDst io.Writer) (*CompanySignal, error)
CreateCompanySignalSync creates a company signal and waits synchronously for the result. timeoutSec is passed as X-Sbr-Timeout-Sec (1–900). A 202 response means the server timed out before the signal completed; the returned signal will have Status == "processing".
func (*Client) CreateContactList ¶
func (c *Client) CreateContactList(ctx context.Context, req CreateContactListRequest, rawDst io.Writer) (*ContactList, error)
func (*Client) CreateContactSignal ¶
func (c *Client) CreateContactSignal(ctx context.Context, req CreateContactSignalRequest) (*Signal, error)
CreateContactSignal creates an async contact signal.
func (*Client) CreateContactSignalSync ¶
func (c *Client) CreateContactSignalSync(ctx context.Context, req CreateContactSignalRequest, timeoutSec int, rawDst io.Writer) (*Signal, error)
CreateContactSignalSync creates a contact signal and waits synchronously for the result.
func (*Client) CreateMarketSignalSubscription ¶ added in v0.1.7
func (c *Client) CreateMarketSignalSubscription(ctx context.Context, req CreateMarketSignalSubscriptionRequest, rawDst io.Writer) (*MarketSignalSubscription, error)
CreateMarketSignalSubscription creates a new market signal subscription.
func (*Client) CreateProfileAssignment ¶ added in v0.1.8
func (c *Client) CreateProfileAssignment(ctx context.Context, req CreateProfileAssignmentRequest, rawDst io.Writer) (*ProfileAssignment, error)
func (*Client) CreateScoringProfile ¶ added in v0.1.8
func (c *Client) CreateScoringProfile(ctx context.Context, req CreateScoringProfileRequest, rawDst io.Writer) (*ScoringProfile, error)
func (*Client) CreateSignalBatch ¶ added in v0.1.7
func (c *Client) CreateSignalBatch(ctx context.Context, req CreateSignalBatchRequest, rawDst io.Writer) (*SignalBatchResponse, error)
CreateSignalBatch creates multiple signals in a batch.
func (*Client) CreateSignalTemplate ¶ added in v0.1.7
func (c *Client) CreateSignalTemplate(ctx context.Context, req CreateSignalTemplateRequest, rawDst io.Writer) (*SignalTemplate, error)
CreateSignalTemplate creates a new signal template.
func (*Client) CreateSubscription ¶ added in v0.1.3
func (c *Client) CreateSubscription(ctx context.Context, req CreateSubscriptionRequest, rawDst io.Writer) (*Subscription, error)
CreateSubscription creates a signal subscription (initially stopped).
func (*Client) DeleteCompanyList ¶
func (*Client) DeleteContactList ¶
func (*Client) DeleteMarketSignalSubscription ¶ added in v0.1.7
DeleteMarketSignalSubscription soft-deletes a subscription.
func (*Client) DeleteProfileAssignment ¶ added in v0.1.8
func (*Client) DeleteScoringProfile ¶ added in v0.1.8
func (*Client) DeleteScoringRule ¶ added in v0.1.8
func (*Client) DeleteSignalTemplate ¶ added in v0.1.7
DeleteSignalTemplate soft-deletes a signal template.
func (*Client) Do ¶
func (c *Client) Do(ctx context.Context, method, path string, bodyBytes []byte, extraHeaders map[string]string, dst any, rawDst io.Writer) error
Do executes an HTTP request with retry/backoff logic. bodyBytes may be nil for requests without a body. If rawDst is non-nil, the response body is copied directly to it (for --json mode). Otherwise, the response body is JSON-decoded into dst.
func (*Client) ExportCompanyList ¶ added in v0.1.6
func (c *Client) ExportCompanyList(ctx context.Context, id string, req ExportCompanyListRequest, dst io.Writer) error
ExportCompanyList streams a CSV export of the list to dst. The request body is optional — pass a zero value to export with defaults.
func (*Client) GenerateSummary ¶ added in v0.1.7
func (c *Client) GenerateSummary(ctx context.Context, req GenerateSummaryRequest, rawDst io.Writer) (*SummaryResponse, error)
GenerateSummary generates an AI summary for a domain.
func (*Client) GetCompaniesInList ¶
func (*Client) GetCompanyList ¶
func (*Client) GetCompanySignal ¶
func (c *Client) GetCompanySignal(ctx context.Context, id string, rawDst io.Writer) (*CompanySignal, error)
GetCompanySignal retrieves a company signal by ID.
func (*Client) GetContactList ¶
func (*Client) GetContactSignal ¶
func (c *Client) GetContactSignal(ctx context.Context, id string, rawDst io.Writer) (*Signal, error)
GetContactSignal retrieves a contact signal by ID.
func (*Client) GetContactsInList ¶
func (*Client) GetCredits ¶
GetCredits returns the current credit balance.
func (*Client) GetMarketSignalSubscription ¶ added in v0.1.7
func (c *Client) GetMarketSignalSubscription(ctx context.Context, id string, rawDst io.Writer) (*MarketSignalSubscription, error)
GetMarketSignalSubscription retrieves a single subscription by ID.
func (*Client) GetOrganisation ¶ added in v0.1.4
GetOrganisation returns the organisation profile.
func (*Client) GetScores ¶ added in v0.1.8
func (c *Client) GetScores(ctx context.Context, objectType string, objectIDs []string, rawDst io.Writer) ([]ScoreResult, error)
GetScores reads scores for one or more objects. objectIDs is repeated as `objectId` in the query string (style=form, explode=true).
func (*Client) GetScoringProfile ¶ added in v0.1.8
func (*Client) GetSignal ¶
GetSignal retrieves a signal by ID, trying the company endpoint first and falling back to the contact endpoint on 404. This lets callers look up any signal without knowing its type.
func (*Client) GetSignalTemplate ¶ added in v0.1.7
func (c *Client) GetSignalTemplate(ctx context.Context, id string, rawDst io.Writer) (*SignalTemplate, error)
GetSignalTemplate retrieves a single signal template by ID.
func (*Client) GetSubscription ¶ added in v0.1.3
func (c *Client) GetSubscription(ctx context.Context, id string, rawDst io.Writer) (*Subscription, error)
GetSubscription retrieves a single subscription by ID.
func (*Client) ImportCompanyList ¶
func (c *Client) ImportCompanyList(ctx context.Context, req ImportCompanyListRequest, rawDst io.Writer) (*CompanyList, error)
func (*Client) ListCompanyLists ¶
func (*Client) ListConnectors ¶
func (c *Client) ListConnectors(ctx context.Context, rawDst io.Writer) (*ConnectorsListResponse, error)
ListConnectors returns all configured connectors and their status.
func (*Client) ListContactLists ¶
func (*Client) ListMarketSignalSubscriptions ¶ added in v0.1.7
func (c *Client) ListMarketSignalSubscriptions(ctx context.Context, limit, offset int, includeDeleted bool, rawDst io.Writer) (*MarketSignalSubscriptionListResponse, error)
ListMarketSignalSubscriptions lists all market signal subscriptions.
func (*Client) ListMarketSignals ¶ added in v0.1.7
func (c *Client) ListMarketSignals(ctx context.Context, subscriptionID string, limit, offset int, rawDst io.Writer) (*MarketSignalListResponse, error)
ListMarketSignals lists signals delivered by a subscription.
func (*Client) ListProfileAssignments ¶ added in v0.1.8
func (*Client) ListScoringProfiles ¶ added in v0.1.8
func (*Client) ListScoringRules ¶ added in v0.1.8
func (*Client) ListSignalTemplates ¶ added in v0.1.7
func (c *Client) ListSignalTemplates(ctx context.Context, limit, offset int, includeDeleted bool, rawDst io.Writer) (*SignalTemplatesResponse, error)
ListSignalTemplates lists signal templates for the organisation.
func (*Client) ListSignals ¶ added in v0.1.7
func (c *Client) ListSignals(ctx context.Context, params ListSignalsParams, rawDst io.Writer) (*SignalListResponse, error)
ListSignals retrieves company signals with optional filters.
func (*Client) ListSubscriptionLogs ¶ added in v0.1.7
func (c *Client) ListSubscriptionLogs(ctx context.Context, subscriptionID string, domain string, limit, offset int, rawDst io.Writer) (*SignalListResponse, error)
ListSubscriptionLogs retrieves signal executions for a subscription.
func (*Client) ListSubscriptions ¶ added in v0.1.3
func (c *Client) ListSubscriptions(ctx context.Context, limit, offset int, rawDst io.Writer) (*SubscriptionsResponse, error)
ListSubscriptions returns all subscriptions for the organisation.
func (*Client) ListSummaries ¶ added in v0.1.7
func (c *Client) ListSummaries(ctx context.Context, domain string, limit, offset int, rawDst io.Writer) (*SummariesResponse, error)
ListSummaries lists all summaries for a domain.
func (*Client) PauseMarketSignalSubscription ¶ added in v0.1.7
func (c *Client) PauseMarketSignalSubscription(ctx context.Context, id string, rawDst io.Writer) (*MarketSignalSubscription, error)
PauseMarketSignalSubscription pauses an active subscription.
func (*Client) PostWithHeaders ¶
func (c *Client) PostWithHeaders(ctx context.Context, path string, headers map[string]string, body any, dst any, rawDst io.Writer) error
PostWithHeaders is like Post but allows passing extra request headers.
func (*Client) ProposeExtractTemplates ¶ added in v0.1.9
func (c *Client) ProposeExtractTemplates(ctx context.Context, req ExtractProposeRequest, rawDst io.Writer) (*ExtractProposal, error)
ProposeExtractTemplates triggers LLM clustering of ad-hoc signal candidates for the org behind the API key. Returns clusters that can be edited locally and replayed via ApplyExtractTemplates.
func (*Client) ResumeMarketSignalSubscription ¶ added in v0.1.7
func (c *Client) ResumeMarketSignalSubscription(ctx context.Context, id string, rawDst io.Writer) (*MarketSignalSubscription, error)
ResumeMarketSignalSubscription resumes a paused subscription.
func (*Client) SearchCompanies ¶
func (c *Client) SearchCompanies(ctx context.Context, req CompanySearchRequest, rawDst io.Writer) (*CompanySearchResponse, error)
func (*Client) SearchContacts ¶ added in v0.1.6
func (c *Client) SearchContacts(ctx context.Context, req ContactSearchRequest, rawDst io.Writer) (*ContactSearchResponse, error)
func (*Client) StartSubscription ¶ added in v0.1.3
StartSubscription activates the schedule for a subscription.
func (*Client) StopSubscription ¶ added in v0.1.3
StopSubscription pauses the schedule for a subscription.
func (*Client) TriggerMarketSignalSubscription ¶ added in v0.1.7
func (c *Client) TriggerMarketSignalSubscription(ctx context.Context, id string, rawDst io.Writer) (*MarketSignalSubscription, error)
TriggerMarketSignalSubscription triggers an immediate run.
func (*Client) TriggerScoreCompute ¶ added in v0.1.8
func (c *Client) TriggerScoreCompute(ctx context.Context, req ComputeScoresRequest) (*ComputeScoresResponse, error)
TriggerScoreCompute queues async recomputation and returns the {queued, failed} counts from the 202 response.
func (*Client) TriggerSubscription ¶ added in v0.1.3
TriggerSubscription runs a subscription immediately, regardless of its schedule.
func (*Client) UpdateCompanyList ¶
func (c *Client) UpdateCompanyList(ctx context.Context, id string, req UpdateCompanyListRequest, rawDst io.Writer) (*CompanyList, error)
func (*Client) UpdateContactList ¶
func (c *Client) UpdateContactList(ctx context.Context, id string, req UpdateContactListRequest, rawDst io.Writer) (*ContactList, error)
func (*Client) UpdateMarketSignalSubscription ¶ added in v0.1.7
func (c *Client) UpdateMarketSignalSubscription(ctx context.Context, id string, req UpdateMarketSignalSubscriptionRequest, rawDst io.Writer) (*MarketSignalSubscription, error)
UpdateMarketSignalSubscription partially updates a subscription.
func (*Client) UpdateOrganisation ¶ added in v0.1.4
func (c *Client) UpdateOrganisation(ctx context.Context, req UpdateOrganisationRequest, rawDst io.Writer) (*Organisation, error)
UpdateOrganisation updates the organisation profile.
func (*Client) UpdateScoringProfile ¶ added in v0.1.8
func (c *Client) UpdateScoringProfile(ctx context.Context, id string, req UpdateScoringProfileRequest, rawDst io.Writer) (*ScoringProfile, error)
func (*Client) UpdateSignalTemplate ¶ added in v0.1.7
func (c *Client) UpdateSignalTemplate(ctx context.Context, id string, req UpdateSignalTemplateRequest, rawDst io.Writer) (*SignalTemplate, error)
UpdateSignalTemplate updates a signal template (creates a new version).
func (*Client) UpsertScoringRule ¶ added in v0.1.8
func (c *Client) UpsertScoringRule(ctx context.Context, profileID string, req UpsertScoringRuleRequest, rawDst io.Writer) (*ScoringRule, error)
type CompaniesInListResponse ¶
type CompaniesInListResponse struct {
Items []CompanyListCompany `json:"items"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
HasMore bool `json:"hasMore"`
}
CompaniesInListResponse wraps paginated companies in a list.
type CompanyList ¶
type CompanyList struct {
ID string `json:"id"`
Name string `json:"name"`
Filter CompanyListFilter `json:"filter"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
CompanyList represents a company list resource.
type CompanyListCompany ¶
type CompanyListCompany struct {
ID string `json:"id"`
Name string `json:"name"`
Domain string `json:"domain"`
Handle string `json:"handle"`
Industry string `json:"industry"`
Size string `json:"size"`
Type string `json:"type"`
Founded int `json:"founded"`
City string `json:"city"`
State string `json:"state"`
CountryCode string `json:"countryCode"`
}
CompanyListCompany is a company entry within a list.
type CompanyListExclude ¶
type CompanyListExclude struct {
Industries []string `json:"industries,omitempty"`
Sizes []string `json:"sizes,omitempty"`
Domains []string `json:"domains,omitempty"`
}
CompanyListExclude exclusion filters.
type CompanyListFilter ¶
type CompanyListFilter struct {
Domains []string `json:"domains,omitempty"`
Names []string `json:"names,omitempty"`
Industries []string `json:"industries,omitempty"`
Sizes []string `json:"sizes,omitempty"`
Types []string `json:"types,omitempty"`
Technologies []string `json:"technologies,omitempty"`
Location *CompanyListLocation `json:"location,omitempty"`
Exclude *CompanyListExclude `json:"exclude,omitempty"`
}
CompanyListFilter is the filter object used in company list create/update/search.
type CompanyListLocation ¶
type CompanyListLocation struct {
Cities []string `json:"cities,omitempty"`
States []string `json:"states,omitempty"`
CountryCodes []string `json:"countryCodes,omitempty"`
}
CompanyListLocation filters by geography.
type CompanyListsResponse ¶
type CompanyListsResponse struct {
Items []CompanyList `json:"items"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
HasMore bool `json:"hasMore"`
}
CompanyListsResponse wraps a paginated list of company lists.
type CompanySearchRequest ¶
type CompanySearchRequest struct {
Filter CompanyListFilter `json:"filter"`
}
CompanySearchRequest is the payload for POST /v1/companies/search.
type CompanySearchResponse ¶
type CompanySearchResponse struct {
Companies []CompanyListCompany `json:"companies"`
Total int `json:"total"`
}
CompanySearchResponse wraps company search results.
type CompanySignal ¶
type CompanySignal = Signal
CompanySignal is an alias kept for backwards compatibility within the package.
type ComputeScoresRequest ¶ added in v0.1.8
type ComputeScoresRequest struct {
ObjectType string `json:"objectType"`
ObjectIDs []string `json:"objectIds"`
}
ComputeScoresRequest is the payload for POST /v1/scoring/compute.
type ComputeScoresResponse ¶ added in v0.1.8
ComputeScoresResponse is the body of a 202 Accepted from POST /v1/scoring/compute. `failed > 0` means some object dispatches failed (typically Temporal hiccups for those specific calls); the request as a whole is "accepted" because at least one workflow was queued. If every dispatch fails the API returns 502 instead of 202.
type Connector ¶
type Connector struct {
Source string `json:"source"` // salesNavigator, hubspotApp
Status string `json:"status"` // connected, disconnected, needs-authentication, ready-to-connect, error
}
Connector represents a configured integration connector.
type ConnectorsListResponse ¶
type ConnectorsListResponse struct {
Connectors []Connector `json:"connectors"`
}
ConnectorsListResponse is returned by GET /v1/connectors.
type ContactList ¶
type ContactList struct {
ID string `json:"id"`
Name string `json:"name"`
Filters ContactListFilters `json:"filters"`
ContactCount int `json:"contactCount"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
ContactList represents a contact list resource.
type ContactListFilters ¶
type ContactListFilters struct {
CompanyLinkedInURLs []string `json:"companyLinkedInUrls,omitempty"`
JobTitles []string `json:"jobTitles,omitempty"`
Keywords string `json:"keywords,omitempty"`
Countries []string `json:"countries,omitempty"`
}
ContactListFilters is the filter object for contact list create.
type ContactListItem ¶
type ContactListItem struct {
ID string `json:"id"`
ListID string `json:"listId"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
FullName string `json:"fullName"`
Headline string `json:"headline"`
Role string `json:"role"`
CompanyName string `json:"companyName"`
Location string `json:"location"`
}
ContactListItem is a contact entry within a list.
type ContactListsResponse ¶
type ContactListsResponse struct {
Items []ContactList `json:"items"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
HasMore bool `json:"hasMore"`
}
ContactListsResponse wraps a paginated list of contact lists.
type ContactSearchRequest ¶ added in v0.1.6
type ContactSearchRequest struct {
CompanyLinkedInURLs []string `json:"companyLinkedInUrls,omitempty"`
FirstName string `json:"firstName,omitempty"`
LastName string `json:"lastName,omitempty"`
JobTitles []string `json:"jobTitles,omitempty"`
Keywords string `json:"keywords,omitempty"`
Countries []string `json:"countries,omitempty"`
}
ContactSearchRequest is the payload for POST /v1/contacts/search.
type ContactSearchResponse ¶ added in v0.1.6
type ContactSearchResponse struct {
Contacts []ContactSearchResult `json:"contacts"`
Count int `json:"count"`
}
ContactSearchResponse wraps contact search results.
type ContactSearchResult ¶ added in v0.1.6
type ContactSearchResult struct {
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
FullName string `json:"fullName"`
Headline string `json:"headline"`
Role string `json:"role"`
CompanyName string `json:"companyName"`
Location string `json:"location"`
Seniority []string `json:"seniority"`
LinkedInProfileURL string `json:"linkedInProfileUrl"`
}
ContactSearchResult is a single contact returned from search.
type ContactsInListResponse ¶
type ContactsInListResponse struct {
Items []ContactListItem `json:"items"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
HasMore bool `json:"hasMore"`
}
ContactsInListResponse wraps paginated contacts in a list.
type CountPreviewCompanyListRequest ¶ added in v0.1.6
type CountPreviewCompanyListRequest struct {
Filter CompanyListFilter `json:"filter"`
}
CountPreviewCompanyListRequest is the payload for POST /v1/companies/lists/count-preview.
type CountPreviewCompanyListResponse ¶ added in v0.1.6
type CountPreviewCompanyListResponse struct {
Count int `json:"count"`
Credits int `json:"credits"`
}
CountPreviewCompanyListResponse is the response from POST /v1/companies/lists/count-preview.
type CreateCompanyListRequest ¶
type CreateCompanyListRequest struct {
Name string `json:"name"`
Filter CompanyListFilter `json:"filter"`
}
CreateCompanyListRequest is the payload for POST /v1/companies/lists.
type CreateCompanySignalRequest ¶
type CreateCompanySignalRequest struct {
Domain string `json:"domain"`
Question string `json:"question,omitempty"`
AnswerType string `json:"answerType,omitempty"`
ForceRefresh bool `json:"forceRefresh,omitempty"`
WebhookURL string `json:"webhookUrl,omitempty"`
SignalTemplateID string `json:"signalTemplateId,omitempty"`
VerificationMode string `json:"verificationMode,omitempty"`
}
CreateCompanySignalRequest is the payload for POST /v1/companies/signals.
type CreateContactListRequest ¶
type CreateContactListRequest struct {
Name string `json:"name"`
Filters ContactListFilters `json:"filters"`
}
CreateContactListRequest is the payload for POST /v1/contacts/lists.
type CreateContactSignalRequest ¶
type CreateContactSignalRequest struct {
ContactProfileURL string `json:"contactProfileUrl"`
Question string `json:"question,omitempty"`
AnswerType string `json:"answerType,omitempty"`
ForceRefresh bool `json:"forceRefresh,omitempty"`
WebhookURL string `json:"webhookUrl,omitempty"`
SignalTemplateID string `json:"signalTemplateId,omitempty"`
VerificationMode string `json:"verificationMode,omitempty"`
}
CreateContactSignalRequest is the payload for POST /v1/contacts/signals.
type CreateMarketSignalSubscriptionRequest ¶ added in v0.1.7
type CreateMarketSignalSubscriptionRequest struct {
Type string `json:"type"`
Name string `json:"name,omitempty"`
Prompt string `json:"prompt,omitempty"`
Filters map[string]any `json:"filters,omitempty"`
WebhookURL string `json:"webhookUrl"`
WebhookSecret string `json:"webhookSecret,omitempty"`
IntervalSignalLimit int `json:"intervalSignalLimit,omitempty"`
Interval string `json:"interval,omitempty"`
}
CreateMarketSignalSubscriptionRequest is the payload for creating a subscription.
type CreateProfileAssignmentRequest ¶ added in v0.1.8
type CreateProfileAssignmentRequest struct {
ProfileID string `json:"profileId"`
ObjectType string `json:"objectType"`
ObjectID string `json:"objectId"`
}
CreateProfileAssignmentRequest is the payload for POST /v1/scoring/assignments.
type CreateScoringProfileRequest ¶ added in v0.1.8
type CreateScoringProfileRequest struct {
ProfileType string `json:"profileType"` // company | contact
Name string `json:"name"`
Description *string `json:"description,omitempty"`
}
CreateScoringProfileRequest is the payload for POST /v1/scoring/profiles.
type CreateSignalBatchRequest ¶ added in v0.1.7
type CreateSignalBatchRequest struct {
Signals []BatchSignalItem `json:"signals"`
Domains []string `json:"domains"`
GenerateSummaryOnComplete bool `json:"generateSummaryOnComplete,omitempty"`
Async bool `json:"async,omitempty"`
}
CreateSignalBatchRequest is the payload for POST /v1/companies/signals/batch.
type CreateSignalTemplateRequest ¶ added in v0.1.7
type CreateSignalTemplateRequest struct {
Name string `json:"name"`
Question string `json:"question"`
Description string `json:"description,omitempty"`
AnswerType string `json:"answerType,omitempty"`
Weight string `json:"weight,omitempty"`
QualificationCriteria map[string]any `json:"qualificationCriteria,omitempty"`
OutputSchema map[string]any `json:"outputSchema,omitempty"`
}
CreateSignalTemplateRequest is the payload for POST /v1/companies/signals/templates.
type CreateSubscriptionRequest ¶ added in v0.1.3
type CreateSubscriptionRequest struct {
// Reference an existing template, or provide name+question to create inline.
SignalTemplateID string `json:"signalTemplateId,omitempty"`
Name string `json:"name,omitempty"`
Question string `json:"question,omitempty"`
AnswerType string `json:"answerType,omitempty"`
// Exactly one of Frequency or CronExpression must be set.
Frequency string `json:"frequency,omitempty"`
CronExpression string `json:"cronExpression,omitempty"`
Timezone string `json:"timezone,omitempty"`
ListID string `json:"listId"`
}
CreateSubscriptionRequest is the payload for POST /v1/companies/signals/subscriptions.
type CreditsBalance ¶
type CreditsBalance struct {
RemainingCredits int `json:"remainingCredits"`
}
CreditsBalance is returned by GET /v1/credits.
type DataPoint ¶ added in v0.1.7
type DataPoint struct {
Description string `json:"description"`
ReferenceQuestions []string `json:"referenceQuestions"`
Qualification string `json:"qualification"`
Sources []Source `json:"sources"`
}
DataPoint is a single insight from a signal summary.
type ExportCompanyListRequest ¶ added in v0.1.6
type ExportCompanyListRequest struct {
Fields []string `json:"fields,omitempty"`
SignalTemplateIDs []string `json:"signalTemplateIds,omitempty"`
}
ExportCompanyListRequest is the optional body for POST /v1/companies/lists/:id/export. All fields are optional.
type ExtractAppliedTemplate ¶ added in v0.1.9
type ExtractAppliedTemplate struct {
Kind string `json:"kind"`
TemplateID string `json:"templateId"`
VersionID string `json:"versionId"`
Name string `json:"name"`
Attached int `json:"attached"`
}
ExtractAppliedTemplate is one row in the /apply response.
type ExtractApplyRequest ¶ added in v0.1.9
type ExtractApplyRequest struct {
Clusters []ExtractCluster `json:"clusters"`
}
ExtractApplyRequest is the body of POST /v1/signal-templates/extract/apply.
type ExtractApplyResult ¶ added in v0.1.9
type ExtractApplyResult struct {
Created []ExtractAppliedTemplate `json:"created"`
}
ExtractApplyResult is the response of /apply.
type ExtractCluster ¶ added in v0.1.9
type ExtractCluster struct {
Kind string `json:"kind"`
Name string `json:"name,omitempty"`
Question string `json:"question,omitempty"`
AnswerType string `json:"answerType,omitempty"`
TemplateID string `json:"templateId,omitempty"`
ExecutionIDs []string `json:"executionIds"`
SampleQuestions []string `json:"sampleQuestions,omitempty"`
Notes string `json:"notes,omitempty"`
}
ExtractCluster is one proposed action in the propose/apply flow. Discriminated by Kind (see ExtractClusterKind* constants):
- "new": Name + Question + AnswerType describe a template to create
- "existing": TemplateID references an existing template to attach to
The fields not relevant to a given Kind are zero/empty; omitempty keeps them out of the wire payload. SampleQuestions and Notes are propose-side only and stripped server-side on apply.
type ExtractProposal ¶ added in v0.1.9
type ExtractProposal struct {
Clusters []ExtractCluster `json:"clusters"`
TotalCandidates int `json:"totalCandidates"`
ProcessedCandidates int `json:"processedCandidates"`
HasMore bool `json:"hasMore"`
}
ExtractProposal is the response of /propose. Carries the clusters plus the pagination state so the caller knows whether more candidates remain.
type ExtractProposeRequest ¶ added in v0.1.9
type ExtractProposeRequest struct {
SignalType string `json:"signalType"`
MaxCandidates int `json:"maxCandidates,omitempty"`
}
ExtractProposeRequest is the body of POST /v1/signal-templates/extract/propose.
type GenerateSummaryRequest ¶ added in v0.1.7
type GenerateSummaryRequest struct {
Domain string `json:"domain"`
}
GenerateSummaryRequest is the payload for POST /v1/companies/signals/summaries.
type HubSpotPropertyFilter ¶
type HubSpotPropertyFilter struct {
PropertyName string `json:"propertyName"`
Operator string `json:"operator"`
Value string `json:"value,omitempty"`
}
HubSpotPropertyFilter is the filter for importing from HubSpot.
type ImportCompanyListRequest ¶
type ImportCompanyListRequest struct {
Name string `json:"name"`
Source ImportCompanyListSource `json:"source"`
}
ImportCompanyListRequest is the payload for POST /v1/companies/lists/import.
type ImportCompanyListSource ¶
type ImportCompanyListSource struct {
Type string `json:"type"` // "hubspot"
Filter HubSpotPropertyFilter `json:"filter"`
}
ImportCompanyListSource specifies the import source.
type ListSignalsParams ¶ added in v0.1.7
type ListSignalsParams struct {
Domain string
CompanyID string
Status []string
FromDate string
ToDate string
SubscriptionID string
Limit int
Offset int
}
ListSignalsParams holds query parameters for GET /v1/companies/signals.
type MarketSignal ¶ added in v0.1.7
type MarketSignal struct {
ID string `json:"id"`
SubscriptionID string `json:"subscriptionId"`
JobPostingID *string `json:"jobPostingId"`
ExternalSignalID *string `json:"externalSignalId"`
Payload map[string]any `json:"payload"`
ConfidenceScore *float64 `json:"confidenceScore"`
Status string `json:"status"`
PublishedAt *time.Time `json:"publishedAt"`
CreatedAt time.Time `json:"createdAt"`
DeliveredAt *time.Time `json:"deliveredAt"`
}
MarketSignal represents a single signal matched by a subscription.
type MarketSignalListResponse ¶ added in v0.1.7
type MarketSignalListResponse struct {
Items []MarketSignal `json:"items"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
}
MarketSignalListResponse wraps a paginated list of market signals.
type MarketSignalSubscription ¶ added in v0.1.7
type MarketSignalSubscription struct {
ID string `json:"id"`
OrganizationID string `json:"organizationId"`
Type string `json:"type"`
Name *string `json:"name"`
Status string `json:"status"`
Prompt *string `json:"prompt"`
Filters map[string]any `json:"filters"`
WebhookURL string `json:"webhookUrl"`
IntervalSignalLimit int `json:"intervalSignalLimit"`
Interval string `json:"interval"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
MarketSignalSubscription represents a market signal subscription.
type MarketSignalSubscriptionListResponse ¶ added in v0.1.7
type MarketSignalSubscriptionListResponse struct {
Items []MarketSignalSubscription `json:"items"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
}
MarketSignalSubscriptionListResponse wraps a paginated list of subscriptions.
type Organisation ¶ added in v0.1.4
type Organisation struct {
Name string `json:"name"`
Website string `json:"website"`
Description OrganisationDescription `json:"description"`
}
Organisation is returned by GET /v1/organisation.
type OrganisationDescription ¶ added in v0.1.4
type OrganisationDescription struct {
General string `json:"general,omitempty"`
Products string `json:"products,omitempty"`
UseCases string `json:"useCases,omitempty"`
ValueProp string `json:"valueProp,omitempty"`
}
OrganisationDescription holds the description sub-fields of an organisation.
type ProfileAssignment ¶ added in v0.1.8
type ProfileAssignment struct {
ID string `json:"id"`
ProfileID string `json:"profileId"`
OrganizationID string `json:"organizationId"`
ObjectType string `json:"objectType"` // company | contact
ObjectID string `json:"objectId"`
AssignedAt time.Time `json:"assignedAt"`
}
ProfileAssignment links a scoring profile to one company or contact.
type ScoreContribution ¶ added in v0.1.8
type ScoreContribution struct {
RuleID string `json:"ruleId"`
SignalTemplateID string `json:"signalTemplateId"`
MatchedValue string `json:"matchedValue"`
PointsEarned float64 `json:"pointsEarned"`
MaxPoints float64 `json:"maxPoints"`
}
ScoreContribution describes how a single rule contributed to a dimension score.
type ScoreResult ¶ added in v0.1.8
type ScoreResult struct {
ID string `json:"id"`
ProfileID string `json:"profileId"`
OrganizationID string `json:"organizationId"`
ObjectType string `json:"objectType"`
ObjectID string `json:"objectId"`
Dimension string `json:"dimension"`
Score float64 `json:"score"`
PreviousScore *float64 `json:"previousScore"`
Contributions []ScoreContribution `json:"contributions"`
PreviousContributions []ScoreContribution `json:"previousContributions"`
SignalCoverage int `json:"signalCoverage"`
TotalRules int `json:"totalRules"`
ComputedAt time.Time `json:"computedAt"`
Version int `json:"version"`
}
ScoreResult is the latest computed score for one (profile, object, dimension) triple.
type ScoringPointValueRange ¶ added in v0.1.8
type ScoringPointValueRange struct {
Min float64 `json:"min"`
Max float64 `json:"max"`
Points float64 `json:"points"`
}
ScoringPointValueRange is one bucket in a numeric ranges definition. Upper bound is exclusive.
type ScoringPointValues ¶ added in v0.1.8
type ScoringPointValues struct {
True *float64 `json:"true,omitempty"`
False *float64 `json:"false,omitempty"`
Ranges []ScoringPointValueRange `json:"ranges,omitempty"`
Choices map[string]float64 `json:"choices,omitempty"`
}
ScoringPointValues encodes the points awarded for a rule. Exactly one shape is populated based on the answer type of the referenced signal template.
- boolean → True / False
- number / percentage / currency → Ranges
- list → Choices (map of value → points)
type ScoringProfile ¶ added in v0.1.8
type ScoringProfile struct {
ID string `json:"id"`
OrganizationID string `json:"organizationId"`
Type string `json:"type"` // company | contact
Name string `json:"name"`
Description *string `json:"description"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
ScoringProfile is a named, org-scoped scoring configuration bound to an object type.
type ScoringRule ¶ added in v0.1.8
type ScoringRule struct {
ID string `json:"id"`
ProfileID string `json:"profileId"`
SignalTemplateID string `json:"signalTemplateId"`
Dimension string `json:"dimension"` // fit | urgency
PointValues ScoringPointValues `json:"pointValues"`
CreatedAt time.Time `json:"createdAt"`
}
ScoringRule maps one signal template to point values for a dimension within a profile.
type Signal ¶
type Signal struct {
ID string `json:"id"`
Status SignalStatus `json:"status"`
Domain string `json:"domain"`
ContactProfileURL string `json:"contactProfileUrl"`
Question string `json:"question"`
AnswerType string `json:"answerType"`
Answer any `json:"answer"`
Confidence *float64 `json:"confidence"`
Reasoning string `json:"reasoning"`
Sources []Source `json:"sources"`
CreatedAt string `json:"createdAt"`
Error string `json:"error"`
}
Signal is a research signal returned by the API (company or contact).
type SignalBatchResponse ¶ added in v0.1.7
type SignalBatchResponse struct {
BatchID string `json:"batchId,omitempty"`
SubmittedAt string `json:"submittedAt"`
TotalSignals int `json:"totalSignals"`
Accepted int `json:"accepted"`
Rejected int `json:"rejected"`
Results []BatchResultItem `json:"results,omitempty"`
// Async fields
Status string `json:"status,omitempty"`
IsAsync bool `json:"async,omitempty"`
}
SignalBatchResponse is the response for sync batch creation.
type SignalListItem ¶ added in v0.1.7
type SignalListItem struct {
ID string `json:"id"`
SignalType string `json:"signalType"`
Status SignalStatus `json:"status"`
Domain string `json:"domain"`
ContactProfileURL string `json:"contactProfileUrl"`
Question string `json:"question"`
AnswerType string `json:"answerType"`
Answer any `json:"answer"`
Confidence *float64 `json:"confidence"`
Reasoning string `json:"reasoning"`
Sources []Source `json:"sources"`
CreatedAt time.Time `json:"createdAt"`
CompletedAt *time.Time `json:"completedAt"`
Error string `json:"error"`
}
SignalListItem is a signal entry in a list response.
type SignalListResponse ¶ added in v0.1.7
type SignalListResponse struct {
Results []SignalListItem `json:"results"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
Count int `json:"count"`
}
SignalListResponse wraps a paginated list of signals.
type SignalStatus ¶
type SignalStatus string
SignalStatus represents the processing state of a signal.
const ( SignalStatusProcessing SignalStatus = "processing" SignalStatusCompleted SignalStatus = "completed" SignalStatusFailed SignalStatus = "failed" )
type SignalTemplate ¶ added in v0.1.7
type SignalTemplate struct {
ID string `json:"id"`
Version int `json:"version"`
OrganizationID string `json:"organizationId"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Question string `json:"question"`
AnswerType string `json:"answerType"`
OutputSchema map[string]any `json:"outputSchema,omitempty"`
Weight string `json:"weight,omitempty"`
QualificationCriteria map[string]any `json:"qualificationCriteria,omitempty"`
CreatedByUserID string `json:"createdByUserId"`
CreatedAt time.Time `json:"createdAt"`
DeletedAt *time.Time `json:"deletedAt,omitempty"`
Source string `json:"source"`
}
SignalTemplate represents a reusable signal template.
type SignalTemplatesResponse ¶ added in v0.1.7
type SignalTemplatesResponse struct {
Items []SignalTemplate `json:"items"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
HasMore bool `json:"hasMore"`
}
SignalTemplatesResponse wraps a paginated list of signal templates.
type Subscription ¶ added in v0.1.3
type Subscription struct {
ID string `json:"id"`
Name string `json:"name"`
Question string `json:"question"`
AnswerType string `json:"answerType"`
Frequency string `json:"frequency"`
CronExpression string `json:"cronExpression"`
Timezone string `json:"timezone"`
Status string `json:"status"` // active, stopped
ListID string `json:"listId"`
LastRunAt *time.Time `json:"lastRunAt"`
NextRunAt *time.Time `json:"nextRunAt"`
CreatedAt time.Time `json:"createdAt"`
}
Subscription represents a signal subscription resource.
type SubscriptionsResponse ¶ added in v0.1.3
type SubscriptionsResponse struct {
Items []Subscription `json:"items"`
Total int `json:"total"`
HasMore bool `json:"hasMore"`
}
SubscriptionsResponse wraps a paginated list of subscriptions.
type SummariesResponse ¶ added in v0.1.7
type SummariesResponse struct {
Results []SummaryRecord `json:"results"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
Count int `json:"count"`
}
SummariesResponse wraps a paginated list of summaries.
type SummaryRecord ¶ added in v0.1.7
type SummaryRecord struct {
ID string `json:"id"`
Summary []DataPoint `json:"summary"`
Status string `json:"status"`
SignalsCount int `json:"signalsCount"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
SummaryRecord is a single summary in the list response.
type SummaryResponse ¶ added in v0.1.7
type SummaryResponse struct {
Summary []DataPoint `json:"summary"`
}
SummaryResponse is the response from POST /v1/companies/signals/summaries.
type UpdateCompanyListRequest ¶
type UpdateCompanyListRequest struct {
Name string `json:"name"`
Filter CompanyListFilter `json:"filter"`
}
UpdateCompanyListRequest is the payload for PUT /v1/companies/lists/{id}.
type UpdateContactListRequest ¶
type UpdateContactListRequest struct {
Name string `json:"name"`
}
UpdateContactListRequest is the payload for PUT /v1/contacts/lists/{id}.
type UpdateMarketSignalSubscriptionRequest ¶ added in v0.1.7
type UpdateMarketSignalSubscriptionRequest struct {
Name string `json:"name,omitempty"`
Prompt string `json:"prompt,omitempty"`
Filters map[string]any `json:"filters,omitempty"`
WebhookURL string `json:"webhookUrl,omitempty"`
WebhookSecret string `json:"webhookSecret,omitempty"`
IntervalSignalLimit *int `json:"intervalSignalLimit,omitempty"`
Interval string `json:"interval,omitempty"`
}
UpdateMarketSignalSubscriptionRequest is the payload for updating a subscription.
type UpdateOrganisationRequest ¶ added in v0.1.4
type UpdateOrganisationRequest struct {
Name string `json:"name,omitempty"`
Website string `json:"website,omitempty"`
Description *OrganisationDescription `json:"description,omitempty"`
}
UpdateOrganisationRequest is the body for PUT /v1/organisation.
type UpdateScoringProfileRequest ¶ added in v0.1.8
type UpdateScoringProfileRequest struct {
Name string `json:"name"`
Description *string `json:"description,omitempty"`
}
UpdateScoringProfileRequest is the payload for PUT /v1/scoring/profiles/{id}.
type UpdateSignalTemplateRequest ¶ added in v0.1.7
type UpdateSignalTemplateRequest struct {
Name string `json:"name,omitempty"`
Question string `json:"question,omitempty"`
Description string `json:"description,omitempty"`
AnswerType string `json:"answerType,omitempty"`
Weight string `json:"weight,omitempty"`
QualificationCriteria map[string]any `json:"qualificationCriteria,omitempty"`
OutputSchema map[string]any `json:"outputSchema,omitempty"`
}
UpdateSignalTemplateRequest is the payload for PATCH /v1/companies/signals/templates/{id}.
type UpsertScoringRuleRequest ¶ added in v0.1.8
type UpsertScoringRuleRequest struct {
SignalTemplateID string `json:"signalTemplateId"`
Dimension string `json:"dimension"`
AnswerType string `json:"answerType"`
PointValues ScoringPointValues `json:"pointValues"`
}
UpsertScoringRuleRequest is the payload for PUT /v1/scoring/profiles/{profileId}/rules.
AnswerType drives server-side validation of PointValues' shape: a mismatch (e.g. ranges for a boolean signal) returns 422 INVALID_POINT_VALUES rather than a silent compute failure later. Required by the API.