Documentation
¶
Index ¶
- func ClearCapabilitiesCache() error
- type ActivityFeedOptions
- type ActivityFeedResponse
- type ActivityItem
- type Capabilities
- type Chunk
- type Client
- func (c *Client) AcknowledgeNotificationEvent(eventID string) error
- func (c *Client) Capabilities(ttl time.Duration) (*Capabilities, error)
- func (c *Client) ClearNotificationDeliveryEmail() error
- func (c *Client) CreateDoc(title, docType, content, groupIDs string, published bool) (CreateDocResp, error)
- func (c *Client) CreateGroup(name, category, description, visibility, imagePath string) (GroupItem, error)
- func (c *Client) CreateNote(documentID, content, groupID string) (Note, error)
- func (c *Client) CreateReviewNowCreditCheckout() (ReviewNowCreditCheckoutResp, error)
- func (c *Client) DeleteGroup(groupID string) error
- func (c *Client) DismissNotificationEvent(eventID string) error
- func (c *Client) EnsureSession() (SessionResponse, error)
- func (c *Client) GetActivityFeed(opts ActivityFeedOptions) (ActivityFeedResponse, error)
- func (c *Client) GetDocumentByID(docID string) (Document, error)
- func (c *Client) GetDocumentByTitle(title string) (Document, error)
- func (c *Client) GetDocumentMetadataByID(docID string) (Document, error)
- func (c *Client) GetNote(noteID string) (Note, error)
- func (c *Client) GetNotificationPreferences() (NotificationPreferences, error)
- func (c *Client) GetOCRFileResult(taskID string) (OCRFileResult, error)
- func (c *Client) GetTaskStatus(taskID string) (TaskStatus, error)
- func (c *Client) HideFeedback(feedbackID string, hidden bool) error
- func (c *Client) JoinGroup(groupID string) error
- func (c *Client) ListAdminGroupIDs() ([]string, error)
- func (c *Client) ListDocuments(groupID string, ownOnly bool) ([]Document, error)
- func (c *Client) ListDocumentsWithOptions(opts ListDocumentsOptions) ([]Document, error)
- func (c *Client) ListFeedback(docID string) ([]FeedbackEntry, error)
- func (c *Client) ListGroupUsers(groupID string) ([]GroupUser, error)
- func (c *Client) ListGroups(ownOnly bool) ([]GroupItem, error)
- func (c *Client) ListNotes(documentID string) ([]Note, error)
- func (c *Client) ListNotificationEvents(opts NotificationEventsOptions) (NotificationEventsResponse, error)
- func (c *Client) LoadChunks(docID string) ([]Chunk, error)
- func (c *Client) LoadReferences(chunkID string) ([]Reference, error)
- func (c *Client) LoadReviewNowCredits() (ReviewNowCreditsResp, error)
- func (c *Client) LoadUserByID(userID string) (UserInfo, error)
- func (c *Client) LoadUserPlan() (string, error)
- func (c *Client) Login(email, password string) (LoginResponse, error)
- func (c *Client) PollGoogleOAuthDevice(pollToken string) (GoogleOAuthDevicePollResponse, error)
- func (c *Client) ProcessDoc(docID, text string, generateFeedback bool) (ProcessDocResp, error)
- func (c *Client) ProcessDocWithMode(docID, text string, generateFeedback bool, chunkMode string) (ProcessDocResp, error)
- func (c *Client) ProcessDocWithOptions(docID, text string, generateFeedback bool, opts ProcessDocOptions) (ProcessDocResp, error)
- func (c *Client) RateFeedback(feedbackID, value string) error
- func (c *Client) RequestNotificationDeliveryEmail(email string) error
- func (c *Client) ReviewNow(opts ReviewNowOptions) (ReviewNowResp, error)
- func (c *Client) ReviewNowQuote(opts ReviewNowOptions) (ReviewNowQuoteResp, error)
- func (c *Client) SetDocumentPublished(docID string, published bool) error
- func (c *Client) ShareNotificationEvent(eventID, note string) error
- func (c *Client) SignUp(email, name, password string, referral string) (SignUpResponse, error)
- func (c *Client) StartGoogleOAuthDevice() (GoogleOAuthDeviceStartResponse, error)
- func (c *Client) UpdateGroup(groupID string, attrs map[string]string) error
- func (c *Client) UpdateNotificationPreferences(update NotificationPreferencesUpdate) error
- func (c *Client) UpdateUser(attrs map[string]string) error
- func (c *Client) UploadOCRFile(path string, docID string) (OCRUploadResp, error)
- type CreateDocResp
- type Document
- type FeedbackEntry
- type FeedbackReference
- type GoogleOAuthDevicePollResponse
- type GoogleOAuthDeviceStartResponse
- type GroupItem
- type GroupListResp
- type GroupUser
- type ListDocumentsOptions
- type LoginRequest
- type LoginResponse
- type Note
- type NoteAuthor
- type NotificationEvent
- type NotificationEventsOptions
- type NotificationEventsResponse
- type NotificationPreferences
- type NotificationPreferencesUpdate
- type OCRFileResult
- type OCRUploadResp
- type ProcessDocOptions
- type ProcessDocResp
- type Reference
- type ReferenceDoc
- type ReviewNowCreditCheckoutResp
- type ReviewNowCreditsResp
- type ReviewNowFinding
- type ReviewNowOptions
- type ReviewNowQuoteResp
- type ReviewNowResp
- type SessionResponse
- type SignUpRequest
- type SignUpResponse
- type TaskStatus
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearCapabilitiesCache ¶
func ClearCapabilitiesCache() error
Types ¶
type ActivityFeedOptions ¶
type ActivityFeedResponse ¶
type ActivityFeedResponse struct {
Activities []ActivityItem `json:"activities"`
TotalCount int `json:"total_count"`
}
type ActivityItem ¶
type ActivityItem struct {
User string `json:"user"`
UserID string `json:"user_id"`
GroupID string `json:"group_id"`
Action string `json:"action"`
Object string `json:"object"`
ObjectType string `json:"object_type"`
ObjectName string `json:"object_name"`
ObjectID string `json:"object_id"`
Timestamp interface{} `json:"timestamp"`
Tooltip string `json:"tooltip,omitempty"`
}
type Capabilities ¶
type Capabilities struct {
Auth struct {
PasswordLogin bool `json:"password_login"`
PasswordReset bool `json:"password_reset"`
DeviceFlow bool `json:"device_flow"`
GoogleOAuth bool `json:"google_oauth"`
Required bool `json:"required"`
SingleUser bool `json:"single_user"`
} `json:"auth"`
Inputs struct {
Text bool `json:"text"`
OCR bool `json:"ocr"`
Repos bool `json:"repos"`
} `json:"inputs"`
Models struct {
Premium bool `json:"premium"`
Open bool `json:"open"`
} `json:"models"`
Integrations struct {
Slack bool `json:"slack"`
Github bool `json:"github"`
} `json:"integrations"`
Limits struct {
Docs *int `json:"docs"`
FeedbackPerDay *int `json:"feedback_per_day"`
} `json:"limits"`
Features struct {
OCRUpload bool `json:"ocr_upload"`
ActivityFeed bool `json:"activity_feed"`
NotificationEvents bool `json:"notification_events"`
NotificationScoring bool `json:"notification_scoring"`
NotificationPreferences bool `json:"notification_preferences"`
NotificationDelivery bool `json:"notification_delivery"`
} `json:"features"`
Server string `json:"server,omitempty"`
Version string `json:"version,omitempty"`
LegacyRoutes bool `json:"legacy_routes,omitempty"`
}
type Client ¶
type Client struct {
BaseURL string
// contains filtered or unexported fields
}
func (*Client) AcknowledgeNotificationEvent ¶
func (*Client) Capabilities ¶
func (c *Client) Capabilities(ttl time.Duration) (*Capabilities, error)
func (*Client) ClearNotificationDeliveryEmail ¶ added in v0.3.3
func (*Client) CreateDoc ¶
func (c *Client) CreateDoc(title, docType, content, groupIDs string, published bool) (CreateDocResp, error)
func (*Client) CreateGroup ¶
func (*Client) CreateNote ¶
func (*Client) CreateReviewNowCreditCheckout ¶ added in v0.5.3
func (c *Client) CreateReviewNowCreditCheckout() (ReviewNowCreditCheckoutResp, error)
func (*Client) DeleteGroup ¶
func (*Client) DismissNotificationEvent ¶
func (*Client) EnsureSession ¶
func (c *Client) EnsureSession() (SessionResponse, error)
func (*Client) GetActivityFeed ¶
func (c *Client) GetActivityFeed(opts ActivityFeedOptions) (ActivityFeedResponse, error)
func (*Client) GetDocumentByTitle ¶
func (*Client) GetDocumentMetadataByID ¶ added in v0.5.3
func (*Client) GetNotificationPreferences ¶ added in v0.3.3
func (c *Client) GetNotificationPreferences() (NotificationPreferences, error)
func (*Client) GetOCRFileResult ¶
func (c *Client) GetOCRFileResult(taskID string) (OCRFileResult, error)
func (*Client) GetTaskStatus ¶
func (c *Client) GetTaskStatus(taskID string) (TaskStatus, error)
func (*Client) ListAdminGroupIDs ¶
ListAdminGroupIDs attempts to fetch the set of group IDs where the current user is an admin. It supports multiple response shapes for compatibility: - {"groups": [{"id":"...","group_id":"..."}, ...]} - [{"id":"...","group_id":"..."}, ...] - ["group-id-1", "group-id-2", ...]
func (*Client) ListDocuments ¶
func (*Client) ListDocumentsWithOptions ¶
func (c *Client) ListDocumentsWithOptions(opts ListDocumentsOptions) ([]Document, error)
func (*Client) ListFeedback ¶
func (c *Client) ListFeedback(docID string) ([]FeedbackEntry, error)
func (*Client) ListGroupUsers ¶
func (*Client) ListNotificationEvents ¶
func (c *Client) ListNotificationEvents(opts NotificationEventsOptions) (NotificationEventsResponse, error)
func (*Client) LoadReferences ¶
func (*Client) LoadReviewNowCredits ¶ added in v0.5.3
func (c *Client) LoadReviewNowCredits() (ReviewNowCreditsResp, error)
func (*Client) LoadUserPlan ¶
func (*Client) PollGoogleOAuthDevice ¶
func (c *Client) PollGoogleOAuthDevice(pollToken string) (GoogleOAuthDevicePollResponse, error)
func (*Client) ProcessDoc ¶
func (c *Client) ProcessDoc(docID, text string, generateFeedback bool) (ProcessDocResp, error)
func (*Client) ProcessDocWithMode ¶
func (*Client) ProcessDocWithOptions ¶ added in v0.1.4
func (c *Client) ProcessDocWithOptions(docID, text string, generateFeedback bool, opts ProcessDocOptions) (ProcessDocResp, error)
func (*Client) RateFeedback ¶
func (*Client) RequestNotificationDeliveryEmail ¶ added in v0.3.3
func (*Client) ReviewNow ¶ added in v0.3.22
func (c *Client) ReviewNow(opts ReviewNowOptions) (ReviewNowResp, error)
func (*Client) ReviewNowQuote ¶ added in v0.5.3
func (c *Client) ReviewNowQuote(opts ReviewNowOptions) (ReviewNowQuoteResp, error)
func (*Client) SetDocumentPublished ¶
Documents: publish/unpublish
func (*Client) ShareNotificationEvent ¶
func (*Client) SignUp ¶
func (c *Client) SignUp(email, name, password string, referral string) (SignUpResponse, error)
func (*Client) StartGoogleOAuthDevice ¶
func (c *Client) StartGoogleOAuthDevice() (GoogleOAuthDeviceStartResponse, error)
func (*Client) UpdateGroup ¶
Group update
func (*Client) UpdateNotificationPreferences ¶ added in v0.3.3
func (c *Client) UpdateNotificationPreferences(update NotificationPreferencesUpdate) error
func (*Client) UploadOCRFile ¶
func (c *Client) UploadOCRFile(path string, docID string) (OCRUploadResp, error)
type Document ¶
type Document struct {
DocumentID string `json:"document_id"`
UserID string `json:"user_id,omitempty"`
AuthorID string `json:"author_id,omitempty"`
Title string `json:"title"`
Content string `json:"content,omitempty"`
DocType string `json:"doc_type,omitempty"`
DatetimeCreated interface{} `json:"datetime_created,omitempty"`
DatetimeModified interface{} `json:"datetime_modified,omitempty"`
IsPublished bool `json:"is_published,omitempty"`
Groups []GroupItem `json:"groups,omitempty"`
}
---- Feedback & Documents ----
type FeedbackEntry ¶
type FeedbackEntry struct {
FeedbackID string `json:"feedback_id"`
ChunkID string `json:"chunk_id"`
ChunkContent string `json:"chunk_content,omitempty"`
Feedback string `json:"feedback"`
UserFeedback string `json:"user_feedback,omitempty"`
Timestamp interface{} `json:"timestamp"`
References []FeedbackReference `json:"references,omitempty"`
}
type FeedbackReference ¶
type GoogleOAuthDevicePollResponse ¶
type GoogleOAuthDevicePollResponse struct {
Status string `json:"status,omitempty"`
Error string `json:"error,omitempty"`
AuthToken string `json:"auth_token,omitempty"`
UserID string `json:"user_id,omitempty"`
Username string `json:"username,omitempty"`
Name string `json:"name,omitempty"`
AccountStatus string `json:"account_status,omitempty"`
}
type GroupItem ¶
type GroupItem struct {
ID string `json:"id,omitempty"`
GroupID string `json:"group_id,omitempty"`
Name string `json:"name"`
Visibility string `json:"visibility,omitempty"`
}
Groups
type GroupListResp ¶
type ListDocumentsOptions ¶
type LoginRequest ¶
Login
type LoginResponse ¶
type NoteAuthor ¶
type NotificationEvent ¶
type NotificationEvent struct {
EventID string `json:"event_id"`
UserID string `json:"user_id"`
GroupID string `json:"group_id"`
Intent string `json:"intent"`
DedupeKey string `json:"dedupe_key"`
TargetDocID string `json:"target_doc_id"`
TargetChunkID string `json:"target_chunk_id"`
PeerDocIDs []string `json:"peer_doc_ids"`
Relevance string `json:"relevance"`
Novelty string `json:"novelty"`
Severity string `json:"severity"`
Certainty string `json:"certainty"`
DeliveryAction string `json:"delivery_action"`
Channel string `json:"channel"`
ParseMode string `json:"parse_mode"`
Model string `json:"model"`
RunID string `json:"run_id"`
DigestBucket string `json:"digest_bucket"`
Rationale []string `json:"rationale"`
EvidenceTarget string `json:"evidence_target"`
EvidencePeer string `json:"evidence_peer"`
CreatedAt interface{} `json:"created_at"`
DeliveredAt interface{} `json:"delivered_at"`
AcknowledgedAt interface{} `json:"acknowledged_at"`
DismissedAt interface{} `json:"dismissed_at"`
}
type NotificationEventsResponse ¶
type NotificationEventsResponse struct {
Events []NotificationEvent `json:"events"`
TotalCount int `json:"total_count"`
}
type NotificationPreferences ¶ added in v0.3.3
type NotificationPreferences struct {
PreferencesID string `json:"preferences_id"`
EmailDigestEnabled bool `json:"email_digest_enabled"`
EmailDigestFrequency string `json:"email_digest_frequency"`
PushNotificationsEnabled bool `json:"push_notifications_enabled"`
DigestBucketsEnabled []string `json:"digest_buckets_enabled"`
QuietHoursStart string `json:"quiet_hours_start"`
QuietHoursEnd string `json:"quiet_hours_end"`
MaxDailyPushEmails int `json:"max_daily_push_emails"`
AccountEmail string `json:"account_email"`
NotificationDeliveryEmail string `json:"notification_delivery_email"`
NotificationDeliveryEmailPending string `json:"notification_delivery_email_pending"`
NotificationDeliveryEmailVerified bool `json:"notification_delivery_email_verified"`
NotificationDeliveryEmailVerifiedAt string `json:"notification_delivery_email_verified_at"`
NotificationDeliveryEmailEffective string `json:"notification_delivery_email_effective"`
NotificationDeliveryEmailSource string `json:"notification_delivery_email_source"`
}
type NotificationPreferencesUpdate ¶ added in v0.3.3
type OCRFileResult ¶
type OCRFileResult struct {
TaskID string `json:"task_id"`
Status string `json:"status"`
Result json.RawMessage `json:"result"`
}
type OCRUploadResp ¶
type OCRUploadResp struct {
TaskID string `json:"task_id"`
}
type ProcessDocOptions ¶ added in v0.1.4
type ProcessDocResp ¶
type ProcessDocResp struct {
TaskID string `json:"task_id"`
SkippedIndex bool `json:"skipped_index,omitempty"`
}
Processing
type Reference ¶
type Reference struct {
ReferenceID string `json:"reference_id"`
SourceChunkID string `json:"source_chunk_id"`
Document ReferenceDoc `json:"document"`
DocumentAuthor string `json:"document_author"`
}
type ReferenceDoc ¶
type ReviewNowCreditCheckoutResp ¶ added in v0.5.3
type ReviewNowCreditsResp ¶ added in v0.5.3
type ReviewNowFinding ¶ added in v0.3.22
type ReviewNowFinding struct {
Intent string `json:"intent"`
Severity string `json:"severity"`
Certainty string `json:"certainty"`
Title string `json:"title"`
Summary string `json:"summary"`
WhyItMatters string `json:"why_it_matters"`
TargetRepos []string `json:"target_repos,omitempty"`
TargetFiles []string `json:"target_files,omitempty"`
PeerRepos []string `json:"peer_repos,omitempty"`
PeerFiles []string `json:"peer_files,omitempty"`
EvidenceTarget string `json:"evidence_target"`
EvidencePeer string `json:"evidence_peer"`
FollowUp string `json:"follow_up"`
}
type ReviewNowOptions ¶ added in v0.3.22
type ReviewNowQuoteResp ¶ added in v0.5.3
type ReviewNowResp ¶ added in v0.3.22
type SessionResponse ¶
type SignUpRequest ¶
type SignUpResponse ¶
type SignUpResponse struct {
Message string `json:"message,omitempty"`
}
type TaskStatus ¶
Click to show internal directories.
Click to hide internal directories.