@verbatims/sdk 1.6.15 → 1.6.16
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/README.md +31 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/index.d.ts +1 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +1 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/social.d.ts +272 -0
- package/dist/resources/social.d.ts.map +1 -0
- package/dist/resources/social.js +153 -0
- package/dist/resources/social.js.map +1 -0
- package/dist/types.d.ts +110 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +20 -0
- package/src/resources/__tests__/resources.test.ts +250 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/social.ts +190 -0
- package/src/types.ts +127 -0
package/src/types.ts
CHANGED
|
@@ -451,3 +451,130 @@ export interface ThemeSuggestionsQuery {
|
|
|
451
451
|
tags?: string
|
|
452
452
|
language?: string
|
|
453
453
|
}
|
|
454
|
+
|
|
455
|
+
// --- Social queue / auto-post types ---
|
|
456
|
+
|
|
457
|
+
export type SocialPlatform = 'x' | 'bluesky' | 'instagram' | 'threads' | 'facebook' | 'pinterest'
|
|
458
|
+
export type SocialQueueStatus = 'queued' | 'processing' | 'posted' | 'failed'
|
|
459
|
+
export type SocialPostStatus = 'success' | 'failed'
|
|
460
|
+
|
|
461
|
+
export interface SocialQueueStats {
|
|
462
|
+
queued: number
|
|
463
|
+
processing: number
|
|
464
|
+
posted: number
|
|
465
|
+
failed: number
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export interface SocialPlatformInfo {
|
|
469
|
+
platform: SocialPlatform
|
|
470
|
+
label: string
|
|
471
|
+
enabled: boolean
|
|
472
|
+
queue: SocialQueueStats
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export interface SocialResolvedContent {
|
|
476
|
+
source_type: string
|
|
477
|
+
source_id: number
|
|
478
|
+
primary_text: string | null
|
|
479
|
+
secondary_text: string | null
|
|
480
|
+
canonical_path: string | null
|
|
481
|
+
title: string | null
|
|
482
|
+
subtitle: string | null
|
|
483
|
+
language: string | null
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export interface SocialQueueItem {
|
|
487
|
+
id: number
|
|
488
|
+
quote_id: number
|
|
489
|
+
source_type: string
|
|
490
|
+
source_id: number
|
|
491
|
+
platform: SocialPlatform
|
|
492
|
+
status: SocialQueueStatus
|
|
493
|
+
position: number
|
|
494
|
+
scheduled_for: string | null
|
|
495
|
+
created_at: string | null
|
|
496
|
+
updated_at: string | null
|
|
497
|
+
published_post_url: string | null
|
|
498
|
+
published_external_post_id: string | null
|
|
499
|
+
published_posted_at: string | null
|
|
500
|
+
error_message: string | null
|
|
501
|
+
quote_posts_count: number
|
|
502
|
+
quote_text: string | null
|
|
503
|
+
quote_language: string | null
|
|
504
|
+
author_name: string | null
|
|
505
|
+
reference_name: string | null
|
|
506
|
+
resolved_content: SocialResolvedContent | null
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export interface SocialPost {
|
|
510
|
+
id: number
|
|
511
|
+
quote_id: number
|
|
512
|
+
source_type: string
|
|
513
|
+
source_id: number
|
|
514
|
+
queue_id: number | null
|
|
515
|
+
platform: SocialPlatform
|
|
516
|
+
status: SocialPostStatus
|
|
517
|
+
post_text: string | null
|
|
518
|
+
post_url: string | null
|
|
519
|
+
external_post_id: string | null
|
|
520
|
+
error_message: string | null
|
|
521
|
+
posted_at: string | null
|
|
522
|
+
created_at: string | null
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export interface QueuedSocialItem {
|
|
526
|
+
id: number
|
|
527
|
+
quote_id: number
|
|
528
|
+
source_type: string
|
|
529
|
+
source_id: number
|
|
530
|
+
position: number
|
|
531
|
+
status?: SocialQueueStatus
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export interface ListSocialQueueParams {
|
|
535
|
+
page?: number
|
|
536
|
+
limit?: number
|
|
537
|
+
platform?: SocialPlatform
|
|
538
|
+
status?: SocialQueueStatus | 'active'
|
|
539
|
+
search?: string
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export interface ListSocialPostsParams {
|
|
543
|
+
page?: number
|
|
544
|
+
limit?: number
|
|
545
|
+
platform?: SocialPlatform
|
|
546
|
+
status?: SocialPostStatus
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
export interface AddToSocialQueueData {
|
|
550
|
+
quote_ids: number[]
|
|
551
|
+
platform?: SocialPlatform
|
|
552
|
+
scheduled_for?: string | null
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
export interface AddRandomToSocialQueueData {
|
|
556
|
+
platform?: SocialPlatform
|
|
557
|
+
count?: number
|
|
558
|
+
language?: string
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
export interface ClearSocialQueueData {
|
|
562
|
+
platform: SocialPlatform
|
|
563
|
+
confirm: boolean
|
|
564
|
+
scope?: 'all' | 'finished'
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
export interface ReorderSocialQueueData {
|
|
568
|
+
id: number
|
|
569
|
+
direction?: 'up' | 'down'
|
|
570
|
+
before_id?: number | null
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
export interface RunSocialAutopostData {
|
|
574
|
+
platform?: SocialPlatform
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export interface SocialQueueListResult {
|
|
578
|
+
queue: SocialQueueItem[]
|
|
579
|
+
stats: SocialQueueStats
|
|
580
|
+
}
|