feat: add webhook thought ingestion
CI / build-and-test (push) Failing after 1m31s
CI / build-and-test (pull_request) Failing after 1m19s

This commit is contained in:
2026-07-15 04:24:23 +02:00
parent 5718685c40
commit fe82678280
7 changed files with 392 additions and 13 deletions
+21 -13
View File
@@ -14,12 +14,20 @@ type ThoughtMetadata struct {
Type string `json:"type"`
Source string `json:"source"`
Attachments []ThoughtAttachment `json:"attachments,omitempty"`
Webhook *WebhookMetadata `json:"webhook,omitempty"`
MetadataStatus string `json:"metadata_status,omitempty"`
MetadataUpdatedAt string `json:"metadata_updated_at,omitempty"`
MetadataLastAttemptedAt string `json:"metadata_last_attempted_at,omitempty"`
MetadataError string `json:"metadata_error,omitempty"`
}
type WebhookMetadata struct {
ReceivedAt string `json:"received_at"`
IDempotencyKey string `json:"idempotency_key,omitempty"`
ExternalID string `json:"external_id,omitempty"`
SourceMetadata map[string]any `json:"source_metadata,omitempty"`
}
type ThoughtAttachment struct {
FileID uuid.UUID `json:"file_id"`
Name string `json:"name"`
@@ -30,19 +38,19 @@ type ThoughtAttachment struct {
}
type StoredFile struct {
ID int64 `json:"id"`
GUID uuid.UUID `json:"guid"`
ThoughtID *int64 `json:"thought_id,omitempty"`
ProjectID *int64 `json:"project_id,omitempty"`
Name string `json:"name"`
MediaType string `json:"media_type"`
Kind string `json:"kind"`
Encoding string `json:"encoding"`
SizeBytes int64 `json:"size_bytes"`
SHA256 string `json:"sha256"`
Content []byte `json:"-"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ID int64 `json:"id"`
GUID uuid.UUID `json:"guid"`
ThoughtID *int64 `json:"thought_id,omitempty"`
ProjectID *int64 `json:"project_id,omitempty"`
Name string `json:"name"`
MediaType string `json:"media_type"`
Kind string `json:"kind"`
Encoding string `json:"encoding"`
SizeBytes int64 `json:"size_bytes"`
SHA256 string `json:"sha256"`
Content []byte `json:"-"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type StoredFileFilter struct {