@verbatims/sdk 1.6.15 → 1.6.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/types.ts CHANGED
@@ -51,6 +51,36 @@ export interface QuoteReferenceInfo {
51
51
  type?: string
52
52
  }
53
53
 
54
+ export type ProvenanceStatus = 'unverified' | 'manually_verified' | 'externally_verified' | 'disputed'
55
+
56
+ export interface QuoteAttribution {
57
+ id: number
58
+ quote_id: number
59
+ author_id: number | null
60
+ reference_id: number | null
61
+ is_primary: boolean
62
+ status: ProvenanceStatus
63
+ verified_by?: number | null
64
+ verified_at?: string | null
65
+ notes?: string | null
66
+ author?: { id: number; name: string }
67
+ reference?: { id: number; name: string }
68
+ }
69
+
70
+ export interface QuoteSource {
71
+ id: number
72
+ quote_id: number
73
+ attribution_id: number | null
74
+ source_type: string
75
+ source_url?: string | null
76
+ label?: string | null
77
+ verification_status: ProvenanceStatus
78
+ verified_by?: number | null
79
+ verified_at?: string | null
80
+ notes?: string | null
81
+ is_primary: boolean
82
+ }
83
+
54
84
  export type QuoteStatus = 'draft' | 'pending' | 'approved' | 'rejected'
55
85
 
56
86
  export interface QuoteStats {
@@ -68,6 +98,9 @@ export interface QuoteWithRelations {
68
98
  featured?: boolean
69
99
  author?: QuoteAuthor | null
70
100
  reference?: QuoteReferenceInfo | null
101
+ source?: { type: string; url?: string | null } | null
102
+ attributions?: QuoteAttribution[]
103
+ sources?: QuoteSource[]
71
104
  tags?: Array<{ id: number; name: string; color?: string | null }>
72
105
  user_id?: number
73
106
  moderator_id?: number | null
@@ -163,6 +196,8 @@ export interface CreateQuoteData {
163
196
  language?: string
164
197
  author_id?: number
165
198
  reference_id?: number
199
+ source_type?: string | null
200
+ source_url?: string | null
166
201
  new_author?: {
167
202
  name: string
168
203
  is_fictional?: boolean
@@ -185,6 +220,8 @@ export interface UpdateQuoteData {
185
220
  language?: string
186
221
  author_id?: number | null
187
222
  reference_id?: number | null
223
+ source_type?: string | null
224
+ source_url?: string | null
188
225
  }
189
226
 
190
227
  export interface ModerateQuoteData {
@@ -451,3 +488,130 @@ export interface ThemeSuggestionsQuery {
451
488
  tags?: string
452
489
  language?: string
453
490
  }
491
+
492
+ // --- Social queue / auto-post types ---
493
+
494
+ export type SocialPlatform = 'x' | 'bluesky' | 'instagram' | 'threads' | 'facebook' | 'pinterest'
495
+ export type SocialQueueStatus = 'queued' | 'processing' | 'posted' | 'failed'
496
+ export type SocialPostStatus = 'success' | 'failed'
497
+
498
+ export interface SocialQueueStats {
499
+ queued: number
500
+ processing: number
501
+ posted: number
502
+ failed: number
503
+ }
504
+
505
+ export interface SocialPlatformInfo {
506
+ platform: SocialPlatform
507
+ label: string
508
+ enabled: boolean
509
+ queue: SocialQueueStats
510
+ }
511
+
512
+ export interface SocialResolvedContent {
513
+ source_type: string
514
+ source_id: number
515
+ primary_text: string | null
516
+ secondary_text: string | null
517
+ canonical_path: string | null
518
+ title: string | null
519
+ subtitle: string | null
520
+ language: string | null
521
+ }
522
+
523
+ export interface SocialQueueItem {
524
+ id: number
525
+ quote_id: number
526
+ source_type: string
527
+ source_id: number
528
+ platform: SocialPlatform
529
+ status: SocialQueueStatus
530
+ position: number
531
+ scheduled_for: string | null
532
+ created_at: string | null
533
+ updated_at: string | null
534
+ published_post_url: string | null
535
+ published_external_post_id: string | null
536
+ published_posted_at: string | null
537
+ error_message: string | null
538
+ quote_posts_count: number
539
+ quote_text: string | null
540
+ quote_language: string | null
541
+ author_name: string | null
542
+ reference_name: string | null
543
+ resolved_content: SocialResolvedContent | null
544
+ }
545
+
546
+ export interface SocialPost {
547
+ id: number
548
+ quote_id: number
549
+ source_type: string
550
+ source_id: number
551
+ queue_id: number | null
552
+ platform: SocialPlatform
553
+ status: SocialPostStatus
554
+ post_text: string | null
555
+ post_url: string | null
556
+ external_post_id: string | null
557
+ error_message: string | null
558
+ posted_at: string | null
559
+ created_at: string | null
560
+ }
561
+
562
+ export interface QueuedSocialItem {
563
+ id: number
564
+ quote_id: number
565
+ source_type: string
566
+ source_id: number
567
+ position: number
568
+ status?: SocialQueueStatus
569
+ }
570
+
571
+ export interface ListSocialQueueParams {
572
+ page?: number
573
+ limit?: number
574
+ platform?: SocialPlatform
575
+ status?: SocialQueueStatus | 'active'
576
+ search?: string
577
+ }
578
+
579
+ export interface ListSocialPostsParams {
580
+ page?: number
581
+ limit?: number
582
+ platform?: SocialPlatform
583
+ status?: SocialPostStatus
584
+ }
585
+
586
+ export interface AddToSocialQueueData {
587
+ quote_ids: number[]
588
+ platform?: SocialPlatform
589
+ scheduled_for?: string | null
590
+ }
591
+
592
+ export interface AddRandomToSocialQueueData {
593
+ platform?: SocialPlatform
594
+ count?: number
595
+ language?: string
596
+ }
597
+
598
+ export interface ClearSocialQueueData {
599
+ platform: SocialPlatform
600
+ confirm: boolean
601
+ scope?: 'all' | 'finished'
602
+ }
603
+
604
+ export interface ReorderSocialQueueData {
605
+ id: number
606
+ direction?: 'up' | 'down'
607
+ before_id?: number | null
608
+ }
609
+
610
+ export interface RunSocialAutopostData {
611
+ platform?: SocialPlatform
612
+ }
613
+
614
+ export interface SocialQueueListResult {
615
+ queue: SocialQueueItem[]
616
+ stats: SocialQueueStats
617
+ }