feat: add webhook thought ingestion
This commit is contained in:
+21
-13
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user