@codingfactory/socialkit-vue 0.7.23 → 0.7.24

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.
Files changed (37) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/services/circles.d.ts +7 -0
  5. package/dist/services/circles.d.ts.map +1 -1
  6. package/dist/services/circles.js +34 -5
  7. package/dist/services/circles.js.map +1 -1
  8. package/dist/stores/__tests__/discussion.spec.d.ts +2 -0
  9. package/dist/stores/__tests__/discussion.spec.d.ts.map +1 -0
  10. package/dist/stores/__tests__/discussion.spec.js +768 -0
  11. package/dist/stores/__tests__/discussion.spec.js.map +1 -0
  12. package/dist/stores/circles.d.ts +144 -0
  13. package/dist/stores/circles.d.ts.map +1 -1
  14. package/dist/stores/circles.js +7 -1
  15. package/dist/stores/circles.js.map +1 -1
  16. package/dist/stores/content.d.ts.map +1 -1
  17. package/dist/stores/content.js +6 -3
  18. package/dist/stores/content.js.map +1 -1
  19. package/dist/stores/discussion.d.ts +714 -15
  20. package/dist/stores/discussion.d.ts.map +1 -1
  21. package/dist/stores/discussion.js +272 -65
  22. package/dist/stores/discussion.js.map +1 -1
  23. package/dist/types/content.d.ts +3 -2
  24. package/dist/types/content.d.ts.map +1 -1
  25. package/dist/types/content.js +2 -1
  26. package/dist/types/content.js.map +1 -1
  27. package/dist/types/discussion.d.ts +38 -0
  28. package/dist/types/discussion.d.ts.map +1 -1
  29. package/package.json +1 -1
  30. package/src/index.ts +4 -0
  31. package/src/services/circles.ts +45 -5
  32. package/src/stores/__tests__/discussion.spec.ts +945 -0
  33. package/src/stores/circles.ts +7 -1
  34. package/src/stores/content.ts +6 -3
  35. package/src/stores/discussion.ts +333 -76
  36. package/src/types/content.ts +3 -2
  37. package/src/types/discussion.ts +43 -0
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Generic discussion store factory for SocialKit-powered frontends.
3
3
  */
4
- import type { CreateReplyInput, CreateThreadInput, DiscussionCategorySummary, DiscussionStoreConfig, DiscussionTag, QuoteResponse, Reply, SaveDraftOptions, Space, SpaceMembership, SpaceThreadSort, Thread, UpdateThreadInput } from '../types/discussion.js';
4
+ import type { CreateSpaceInput, CreateReplyInput, CreateThreadInput, DiscussionBrowseMode, DiscussionCategorySummary, DiscussionStoreConfig, DiscussionTag, LoadSpacesOptions, QuoteResponse, Reply, SaveDraftOptions, Space, SpaceMembership, SpaceThreadFilter, SpaceThreadSort, Thread, UpdateThreadInput } from '../types/discussion.js';
5
5
  interface DiscussionCreateThreadResponse {
6
6
  data?: Thread;
7
7
  }
@@ -277,6 +277,21 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
277
277
  label: string;
278
278
  thread_count?: number | undefined;
279
279
  }[] | undefined;
280
+ space?: {
281
+ id: string;
282
+ slug: string;
283
+ name: string;
284
+ } | undefined;
285
+ latest_reply?: {
286
+ id: string;
287
+ created_at: string;
288
+ author?: {
289
+ id: string;
290
+ name: string;
291
+ handle?: string | null | undefined;
292
+ } | null | undefined;
293
+ } | null | undefined;
294
+ is_unanswered?: boolean | undefined;
280
295
  is_subscribed?: boolean | undefined;
281
296
  can_moderate?: boolean | undefined;
282
297
  media?: {
@@ -340,6 +355,178 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
340
355
  label: string;
341
356
  thread_count?: number | undefined;
342
357
  }[] | undefined;
358
+ space?: {
359
+ id: string;
360
+ slug: string;
361
+ name: string;
362
+ } | undefined;
363
+ latest_reply?: {
364
+ id: string;
365
+ created_at: string;
366
+ author?: {
367
+ id: string;
368
+ name: string;
369
+ handle?: string | null | undefined;
370
+ } | null | undefined;
371
+ } | null | undefined;
372
+ is_unanswered?: boolean | undefined;
373
+ is_subscribed?: boolean | undefined;
374
+ can_moderate?: boolean | undefined;
375
+ media?: {
376
+ id: string;
377
+ uuid: string;
378
+ mime_type: string;
379
+ size: number;
380
+ name: string;
381
+ type: "image" | "video";
382
+ is_image: boolean;
383
+ url?: string | undefined;
384
+ thumb_url?: string | null | undefined;
385
+ preview_url?: string | null | undefined;
386
+ urls?: Record<string, string> | undefined;
387
+ responsive?: unknown;
388
+ playback_url?: string | null | undefined;
389
+ provider?: string | null | undefined;
390
+ playback_id?: string | null | undefined;
391
+ provider_asset_id?: string | null | undefined;
392
+ processing_status?: string | null | undefined;
393
+ duration?: number | null | undefined;
394
+ width?: number | null | undefined;
395
+ height?: number | null | undefined;
396
+ aspect_ratio?: string | null | undefined;
397
+ thumbnail_url?: string | null | undefined;
398
+ }[] | undefined;
399
+ deleted_at?: string | null | undefined;
400
+ }[]>;
401
+ browseThreadList: import("vue").Ref<{
402
+ id: string;
403
+ space_id: string;
404
+ author_id: string;
405
+ author?: {
406
+ id: string;
407
+ name: string;
408
+ handle?: string | null | undefined;
409
+ avatar?: string | {
410
+ url?: string | null | undefined;
411
+ thumb_url?: string | null | undefined;
412
+ preview_url?: string | null | undefined;
413
+ urls?: Record<string, string | null | undefined> | undefined;
414
+ } | null | undefined;
415
+ avatar_url?: string | null | undefined;
416
+ } | undefined;
417
+ title: string;
418
+ body?: string | undefined;
419
+ slug?: string | undefined;
420
+ audience: "public" | "authenticated" | "private";
421
+ status: "open" | "locked" | "archived";
422
+ is_pinned: boolean;
423
+ reply_count: number;
424
+ last_activity_at: string;
425
+ created_at: string;
426
+ meta?: {
427
+ views?: number | undefined;
428
+ upvotes?: number | undefined;
429
+ tags?: string[] | undefined;
430
+ } | undefined;
431
+ tags?: {
432
+ id: string;
433
+ slug: string;
434
+ label: string;
435
+ thread_count?: number | undefined;
436
+ }[] | undefined;
437
+ space?: {
438
+ id: string;
439
+ slug: string;
440
+ name: string;
441
+ } | undefined;
442
+ latest_reply?: {
443
+ id: string;
444
+ created_at: string;
445
+ author?: {
446
+ id: string;
447
+ name: string;
448
+ handle?: string | null | undefined;
449
+ } | null | undefined;
450
+ } | null | undefined;
451
+ is_unanswered?: boolean | undefined;
452
+ is_subscribed?: boolean | undefined;
453
+ can_moderate?: boolean | undefined;
454
+ media?: {
455
+ id: string;
456
+ uuid: string;
457
+ mime_type: string;
458
+ size: number;
459
+ name: string;
460
+ type: "image" | "video";
461
+ is_image: boolean;
462
+ url?: string | undefined;
463
+ thumb_url?: string | null | undefined;
464
+ preview_url?: string | null | undefined;
465
+ urls?: Record<string, string> | undefined;
466
+ responsive?: unknown;
467
+ playback_url?: string | null | undefined;
468
+ provider?: string | null | undefined;
469
+ playback_id?: string | null | undefined;
470
+ provider_asset_id?: string | null | undefined;
471
+ processing_status?: string | null | undefined;
472
+ duration?: number | null | undefined;
473
+ width?: number | null | undefined;
474
+ height?: number | null | undefined;
475
+ aspect_ratio?: string | null | undefined;
476
+ thumbnail_url?: string | null | undefined;
477
+ }[] | undefined;
478
+ deleted_at?: string | null | undefined;
479
+ }[], Thread[] | {
480
+ id: string;
481
+ space_id: string;
482
+ author_id: string;
483
+ author?: {
484
+ id: string;
485
+ name: string;
486
+ handle?: string | null | undefined;
487
+ avatar?: string | {
488
+ url?: string | null | undefined;
489
+ thumb_url?: string | null | undefined;
490
+ preview_url?: string | null | undefined;
491
+ urls?: Record<string, string | null | undefined> | undefined;
492
+ } | null | undefined;
493
+ avatar_url?: string | null | undefined;
494
+ } | undefined;
495
+ title: string;
496
+ body?: string | undefined;
497
+ slug?: string | undefined;
498
+ audience: "public" | "authenticated" | "private";
499
+ status: "open" | "locked" | "archived";
500
+ is_pinned: boolean;
501
+ reply_count: number;
502
+ last_activity_at: string;
503
+ created_at: string;
504
+ meta?: {
505
+ views?: number | undefined;
506
+ upvotes?: number | undefined;
507
+ tags?: string[] | undefined;
508
+ } | undefined;
509
+ tags?: {
510
+ id: string;
511
+ slug: string;
512
+ label: string;
513
+ thread_count?: number | undefined;
514
+ }[] | undefined;
515
+ space?: {
516
+ id: string;
517
+ slug: string;
518
+ name: string;
519
+ } | undefined;
520
+ latest_reply?: {
521
+ id: string;
522
+ created_at: string;
523
+ author?: {
524
+ id: string;
525
+ name: string;
526
+ handle?: string | null | undefined;
527
+ } | null | undefined;
528
+ } | null | undefined;
529
+ is_unanswered?: boolean | undefined;
343
530
  is_subscribed?: boolean | undefined;
344
531
  can_moderate?: boolean | undefined;
345
532
  media?: {
@@ -368,6 +555,7 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
368
555
  }[] | undefined;
369
556
  deleted_at?: string | null | undefined;
370
557
  }[]>;
558
+ currentBrowseMode: import("vue").Ref<DiscussionBrowseMode | null, DiscussionBrowseMode | null>;
371
559
  currentThread: import("vue").Ref<{
372
560
  id: string;
373
561
  space_id: string;
@@ -404,6 +592,21 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
404
592
  label: string;
405
593
  thread_count?: number | undefined;
406
594
  }[] | undefined;
595
+ space?: {
596
+ id: string;
597
+ slug: string;
598
+ name: string;
599
+ } | undefined;
600
+ latest_reply?: {
601
+ id: string;
602
+ created_at: string;
603
+ author?: {
604
+ id: string;
605
+ name: string;
606
+ handle?: string | null | undefined;
607
+ } | null | undefined;
608
+ } | null | undefined;
609
+ is_unanswered?: boolean | undefined;
407
610
  is_subscribed?: boolean | undefined;
408
611
  can_moderate?: boolean | undefined;
409
612
  media?: {
@@ -467,6 +670,21 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
467
670
  label: string;
468
671
  thread_count?: number | undefined;
469
672
  }[] | undefined;
673
+ space?: {
674
+ id: string;
675
+ slug: string;
676
+ name: string;
677
+ } | undefined;
678
+ latest_reply?: {
679
+ id: string;
680
+ created_at: string;
681
+ author?: {
682
+ id: string;
683
+ name: string;
684
+ handle?: string | null | undefined;
685
+ } | null | undefined;
686
+ } | null | undefined;
687
+ is_unanswered?: boolean | undefined;
470
688
  is_subscribed?: boolean | undefined;
471
689
  can_moderate?: boolean | undefined;
472
690
  media?: {
@@ -638,14 +856,19 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
638
856
  thumbnail_url?: string | null | undefined;
639
857
  }[] | undefined;
640
858
  }[]>;
859
+ currentReplySort: import("vue").Ref<"best" | "top" | "new" | "controversial", "best" | "top" | "new" | "controversial">;
641
860
  loading: import("vue").Ref<boolean, boolean>;
642
861
  error: import("vue").Ref<string | null, string | null>;
643
862
  nextCursor: import("vue").Ref<string | null, string | null>;
863
+ browseNextCursor: import("vue").Ref<string | null, string | null>;
644
864
  repliesNextCursor: import("vue").Ref<string | null, string | null>;
645
865
  spacesLoadingState: import("../index.js").DiscussionLoadingState;
646
866
  threadsLoadingState: import("../index.js").DiscussionLoadingState;
647
867
  repliesLoadingState: import("../index.js").DiscussionLoadingState;
648
- loadSpaces: () => Promise<unknown>;
868
+ loadSpaces: (options?: LoadSpacesOptions) => Promise<unknown>;
869
+ createSpace: (input: CreateSpaceInput) => Promise<unknown>;
870
+ moveSpace: (spaceId: string, parentId?: string | null) => Promise<unknown>;
871
+ reorderSpaces: (ids: string[]) => Promise<unknown>;
649
872
  loadSpaceDetail: (slug: string, options?: {
650
873
  signal?: AbortSignal;
651
874
  }) => Promise<Space | null>;
@@ -659,6 +882,10 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
659
882
  loadThreads: (spaceSlug: string, cursor?: string, options?: {
660
883
  signal?: AbortSignal;
661
884
  sort?: SpaceThreadSort;
885
+ filter?: SpaceThreadFilter;
886
+ }) => Promise<unknown>;
887
+ browseThreads: (view: DiscussionBrowseMode, cursor?: string, options?: {
888
+ signal?: AbortSignal;
662
889
  }) => Promise<unknown>;
663
890
  loadThread: (spaceSlug: string, threadId: string) => Promise<Thread | null>;
664
891
  loadReplies: (threadId: string, cursor?: string, sortBy?: "best" | "top" | "new" | "controversial") => Promise<unknown>;
@@ -668,9 +895,15 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
668
895
  fetchQuote: (replyId: string) => Promise<QuoteResponse>;
669
896
  subscribeToThread: (threadId: string) => Promise<unknown>;
670
897
  unsubscribeFromThread: (threadId: string) => Promise<unknown>;
671
- searchThreads: (query: string, spaceSlug?: string) => Promise<unknown>;
672
- searchThreadsInSpace: (query: string, spaceId: string) => Promise<Thread[]>;
673
- searchThreadsGlobally: (query: string) => Promise<Thread[]>;
898
+ searchThreads: (query: string, spaceSlug?: string, options?: {
899
+ signal?: AbortSignal;
900
+ }) => Promise<unknown>;
901
+ searchThreadsInSpace: (query: string, spaceId: string, options?: {
902
+ signal?: AbortSignal;
903
+ }) => Promise<Thread[]>;
904
+ searchThreadsGlobally: (query: string, options?: {
905
+ signal?: AbortSignal;
906
+ }) => Promise<Thread[]>;
674
907
  featuredSpaces: () => Space[];
675
908
  getCategories: () => DiscussionCategorySummary[];
676
909
  setThreadPinned: (threadId: string, pinned: boolean) => Promise<void>;
@@ -692,7 +925,7 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
692
925
  generateThreadDraftId: (spaceSlug: string) => string;
693
926
  generateReplyDraftId: (threadId: string) => string;
694
927
  setError: (message: string | null) => void;
695
- }, "error" | "loading" | "spaces" | "spaceTree" | "currentSpace" | "spaceMemberships" | "spaceMembershipLoading" | "threads" | "currentThread" | "replies" | "nextCursor" | "repliesNextCursor" | "spacesLoadingState" | "threadsLoadingState" | "repliesLoadingState" | "draftTypes">, Pick<{
928
+ }, "error" | "loading" | "spaces" | "spaceTree" | "currentSpace" | "spaceMemberships" | "spaceMembershipLoading" | "threads" | "browseThreadList" | "currentBrowseMode" | "currentThread" | "replies" | "currentReplySort" | "nextCursor" | "browseNextCursor" | "repliesNextCursor" | "spacesLoadingState" | "threadsLoadingState" | "repliesLoadingState" | "draftTypes">, Pick<{
696
929
  spaces: import("vue").Ref<{
697
930
  id: string;
698
931
  slug: string;
@@ -951,6 +1184,178 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
951
1184
  label: string;
952
1185
  thread_count?: number | undefined;
953
1186
  }[] | undefined;
1187
+ space?: {
1188
+ id: string;
1189
+ slug: string;
1190
+ name: string;
1191
+ } | undefined;
1192
+ latest_reply?: {
1193
+ id: string;
1194
+ created_at: string;
1195
+ author?: {
1196
+ id: string;
1197
+ name: string;
1198
+ handle?: string | null | undefined;
1199
+ } | null | undefined;
1200
+ } | null | undefined;
1201
+ is_unanswered?: boolean | undefined;
1202
+ is_subscribed?: boolean | undefined;
1203
+ can_moderate?: boolean | undefined;
1204
+ media?: {
1205
+ id: string;
1206
+ uuid: string;
1207
+ mime_type: string;
1208
+ size: number;
1209
+ name: string;
1210
+ type: "image" | "video";
1211
+ is_image: boolean;
1212
+ url?: string | undefined;
1213
+ thumb_url?: string | null | undefined;
1214
+ preview_url?: string | null | undefined;
1215
+ urls?: Record<string, string> | undefined;
1216
+ responsive?: unknown;
1217
+ playback_url?: string | null | undefined;
1218
+ provider?: string | null | undefined;
1219
+ playback_id?: string | null | undefined;
1220
+ provider_asset_id?: string | null | undefined;
1221
+ processing_status?: string | null | undefined;
1222
+ duration?: number | null | undefined;
1223
+ width?: number | null | undefined;
1224
+ height?: number | null | undefined;
1225
+ aspect_ratio?: string | null | undefined;
1226
+ thumbnail_url?: string | null | undefined;
1227
+ }[] | undefined;
1228
+ deleted_at?: string | null | undefined;
1229
+ }[], Thread[] | {
1230
+ id: string;
1231
+ space_id: string;
1232
+ author_id: string;
1233
+ author?: {
1234
+ id: string;
1235
+ name: string;
1236
+ handle?: string | null | undefined;
1237
+ avatar?: string | {
1238
+ url?: string | null | undefined;
1239
+ thumb_url?: string | null | undefined;
1240
+ preview_url?: string | null | undefined;
1241
+ urls?: Record<string, string | null | undefined> | undefined;
1242
+ } | null | undefined;
1243
+ avatar_url?: string | null | undefined;
1244
+ } | undefined;
1245
+ title: string;
1246
+ body?: string | undefined;
1247
+ slug?: string | undefined;
1248
+ audience: "public" | "authenticated" | "private";
1249
+ status: "open" | "locked" | "archived";
1250
+ is_pinned: boolean;
1251
+ reply_count: number;
1252
+ last_activity_at: string;
1253
+ created_at: string;
1254
+ meta?: {
1255
+ views?: number | undefined;
1256
+ upvotes?: number | undefined;
1257
+ tags?: string[] | undefined;
1258
+ } | undefined;
1259
+ tags?: {
1260
+ id: string;
1261
+ slug: string;
1262
+ label: string;
1263
+ thread_count?: number | undefined;
1264
+ }[] | undefined;
1265
+ space?: {
1266
+ id: string;
1267
+ slug: string;
1268
+ name: string;
1269
+ } | undefined;
1270
+ latest_reply?: {
1271
+ id: string;
1272
+ created_at: string;
1273
+ author?: {
1274
+ id: string;
1275
+ name: string;
1276
+ handle?: string | null | undefined;
1277
+ } | null | undefined;
1278
+ } | null | undefined;
1279
+ is_unanswered?: boolean | undefined;
1280
+ is_subscribed?: boolean | undefined;
1281
+ can_moderate?: boolean | undefined;
1282
+ media?: {
1283
+ id: string;
1284
+ uuid: string;
1285
+ mime_type: string;
1286
+ size: number;
1287
+ name: string;
1288
+ type: "image" | "video";
1289
+ is_image: boolean;
1290
+ url?: string | undefined;
1291
+ thumb_url?: string | null | undefined;
1292
+ preview_url?: string | null | undefined;
1293
+ urls?: Record<string, string> | undefined;
1294
+ responsive?: unknown;
1295
+ playback_url?: string | null | undefined;
1296
+ provider?: string | null | undefined;
1297
+ playback_id?: string | null | undefined;
1298
+ provider_asset_id?: string | null | undefined;
1299
+ processing_status?: string | null | undefined;
1300
+ duration?: number | null | undefined;
1301
+ width?: number | null | undefined;
1302
+ height?: number | null | undefined;
1303
+ aspect_ratio?: string | null | undefined;
1304
+ thumbnail_url?: string | null | undefined;
1305
+ }[] | undefined;
1306
+ deleted_at?: string | null | undefined;
1307
+ }[]>;
1308
+ browseThreadList: import("vue").Ref<{
1309
+ id: string;
1310
+ space_id: string;
1311
+ author_id: string;
1312
+ author?: {
1313
+ id: string;
1314
+ name: string;
1315
+ handle?: string | null | undefined;
1316
+ avatar?: string | {
1317
+ url?: string | null | undefined;
1318
+ thumb_url?: string | null | undefined;
1319
+ preview_url?: string | null | undefined;
1320
+ urls?: Record<string, string | null | undefined> | undefined;
1321
+ } | null | undefined;
1322
+ avatar_url?: string | null | undefined;
1323
+ } | undefined;
1324
+ title: string;
1325
+ body?: string | undefined;
1326
+ slug?: string | undefined;
1327
+ audience: "public" | "authenticated" | "private";
1328
+ status: "open" | "locked" | "archived";
1329
+ is_pinned: boolean;
1330
+ reply_count: number;
1331
+ last_activity_at: string;
1332
+ created_at: string;
1333
+ meta?: {
1334
+ views?: number | undefined;
1335
+ upvotes?: number | undefined;
1336
+ tags?: string[] | undefined;
1337
+ } | undefined;
1338
+ tags?: {
1339
+ id: string;
1340
+ slug: string;
1341
+ label: string;
1342
+ thread_count?: number | undefined;
1343
+ }[] | undefined;
1344
+ space?: {
1345
+ id: string;
1346
+ slug: string;
1347
+ name: string;
1348
+ } | undefined;
1349
+ latest_reply?: {
1350
+ id: string;
1351
+ created_at: string;
1352
+ author?: {
1353
+ id: string;
1354
+ name: string;
1355
+ handle?: string | null | undefined;
1356
+ } | null | undefined;
1357
+ } | null | undefined;
1358
+ is_unanswered?: boolean | undefined;
954
1359
  is_subscribed?: boolean | undefined;
955
1360
  can_moderate?: boolean | undefined;
956
1361
  media?: {
@@ -1014,6 +1419,21 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1014
1419
  label: string;
1015
1420
  thread_count?: number | undefined;
1016
1421
  }[] | undefined;
1422
+ space?: {
1423
+ id: string;
1424
+ slug: string;
1425
+ name: string;
1426
+ } | undefined;
1427
+ latest_reply?: {
1428
+ id: string;
1429
+ created_at: string;
1430
+ author?: {
1431
+ id: string;
1432
+ name: string;
1433
+ handle?: string | null | undefined;
1434
+ } | null | undefined;
1435
+ } | null | undefined;
1436
+ is_unanswered?: boolean | undefined;
1017
1437
  is_subscribed?: boolean | undefined;
1018
1438
  can_moderate?: boolean | undefined;
1019
1439
  media?: {
@@ -1042,6 +1462,7 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1042
1462
  }[] | undefined;
1043
1463
  deleted_at?: string | null | undefined;
1044
1464
  }[]>;
1465
+ currentBrowseMode: import("vue").Ref<DiscussionBrowseMode | null, DiscussionBrowseMode | null>;
1045
1466
  currentThread: import("vue").Ref<{
1046
1467
  id: string;
1047
1468
  space_id: string;
@@ -1078,6 +1499,21 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1078
1499
  label: string;
1079
1500
  thread_count?: number | undefined;
1080
1501
  }[] | undefined;
1502
+ space?: {
1503
+ id: string;
1504
+ slug: string;
1505
+ name: string;
1506
+ } | undefined;
1507
+ latest_reply?: {
1508
+ id: string;
1509
+ created_at: string;
1510
+ author?: {
1511
+ id: string;
1512
+ name: string;
1513
+ handle?: string | null | undefined;
1514
+ } | null | undefined;
1515
+ } | null | undefined;
1516
+ is_unanswered?: boolean | undefined;
1081
1517
  is_subscribed?: boolean | undefined;
1082
1518
  can_moderate?: boolean | undefined;
1083
1519
  media?: {
@@ -1141,6 +1577,21 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1141
1577
  label: string;
1142
1578
  thread_count?: number | undefined;
1143
1579
  }[] | undefined;
1580
+ space?: {
1581
+ id: string;
1582
+ slug: string;
1583
+ name: string;
1584
+ } | undefined;
1585
+ latest_reply?: {
1586
+ id: string;
1587
+ created_at: string;
1588
+ author?: {
1589
+ id: string;
1590
+ name: string;
1591
+ handle?: string | null | undefined;
1592
+ } | null | undefined;
1593
+ } | null | undefined;
1594
+ is_unanswered?: boolean | undefined;
1144
1595
  is_subscribed?: boolean | undefined;
1145
1596
  can_moderate?: boolean | undefined;
1146
1597
  media?: {
@@ -1312,14 +1763,19 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1312
1763
  thumbnail_url?: string | null | undefined;
1313
1764
  }[] | undefined;
1314
1765
  }[]>;
1766
+ currentReplySort: import("vue").Ref<"best" | "top" | "new" | "controversial", "best" | "top" | "new" | "controversial">;
1315
1767
  loading: import("vue").Ref<boolean, boolean>;
1316
1768
  error: import("vue").Ref<string | null, string | null>;
1317
1769
  nextCursor: import("vue").Ref<string | null, string | null>;
1770
+ browseNextCursor: import("vue").Ref<string | null, string | null>;
1318
1771
  repliesNextCursor: import("vue").Ref<string | null, string | null>;
1319
1772
  spacesLoadingState: import("../index.js").DiscussionLoadingState;
1320
1773
  threadsLoadingState: import("../index.js").DiscussionLoadingState;
1321
1774
  repliesLoadingState: import("../index.js").DiscussionLoadingState;
1322
- loadSpaces: () => Promise<unknown>;
1775
+ loadSpaces: (options?: LoadSpacesOptions) => Promise<unknown>;
1776
+ createSpace: (input: CreateSpaceInput) => Promise<unknown>;
1777
+ moveSpace: (spaceId: string, parentId?: string | null) => Promise<unknown>;
1778
+ reorderSpaces: (ids: string[]) => Promise<unknown>;
1323
1779
  loadSpaceDetail: (slug: string, options?: {
1324
1780
  signal?: AbortSignal;
1325
1781
  }) => Promise<Space | null>;
@@ -1333,6 +1789,10 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1333
1789
  loadThreads: (spaceSlug: string, cursor?: string, options?: {
1334
1790
  signal?: AbortSignal;
1335
1791
  sort?: SpaceThreadSort;
1792
+ filter?: SpaceThreadFilter;
1793
+ }) => Promise<unknown>;
1794
+ browseThreads: (view: DiscussionBrowseMode, cursor?: string, options?: {
1795
+ signal?: AbortSignal;
1336
1796
  }) => Promise<unknown>;
1337
1797
  loadThread: (spaceSlug: string, threadId: string) => Promise<Thread | null>;
1338
1798
  loadReplies: (threadId: string, cursor?: string, sortBy?: "best" | "top" | "new" | "controversial") => Promise<unknown>;
@@ -1342,9 +1802,15 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1342
1802
  fetchQuote: (replyId: string) => Promise<QuoteResponse>;
1343
1803
  subscribeToThread: (threadId: string) => Promise<unknown>;
1344
1804
  unsubscribeFromThread: (threadId: string) => Promise<unknown>;
1345
- searchThreads: (query: string, spaceSlug?: string) => Promise<unknown>;
1346
- searchThreadsInSpace: (query: string, spaceId: string) => Promise<Thread[]>;
1347
- searchThreadsGlobally: (query: string) => Promise<Thread[]>;
1805
+ searchThreads: (query: string, spaceSlug?: string, options?: {
1806
+ signal?: AbortSignal;
1807
+ }) => Promise<unknown>;
1808
+ searchThreadsInSpace: (query: string, spaceId: string, options?: {
1809
+ signal?: AbortSignal;
1810
+ }) => Promise<Thread[]>;
1811
+ searchThreadsGlobally: (query: string, options?: {
1812
+ signal?: AbortSignal;
1813
+ }) => Promise<Thread[]>;
1348
1814
  featuredSpaces: () => Space[];
1349
1815
  getCategories: () => DiscussionCategorySummary[];
1350
1816
  setThreadPinned: (threadId: string, pinned: boolean) => Promise<void>;
@@ -1625,6 +2091,178 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1625
2091
  label: string;
1626
2092
  thread_count?: number | undefined;
1627
2093
  }[] | undefined;
2094
+ space?: {
2095
+ id: string;
2096
+ slug: string;
2097
+ name: string;
2098
+ } | undefined;
2099
+ latest_reply?: {
2100
+ id: string;
2101
+ created_at: string;
2102
+ author?: {
2103
+ id: string;
2104
+ name: string;
2105
+ handle?: string | null | undefined;
2106
+ } | null | undefined;
2107
+ } | null | undefined;
2108
+ is_unanswered?: boolean | undefined;
2109
+ is_subscribed?: boolean | undefined;
2110
+ can_moderate?: boolean | undefined;
2111
+ media?: {
2112
+ id: string;
2113
+ uuid: string;
2114
+ mime_type: string;
2115
+ size: number;
2116
+ name: string;
2117
+ type: "image" | "video";
2118
+ is_image: boolean;
2119
+ url?: string | undefined;
2120
+ thumb_url?: string | null | undefined;
2121
+ preview_url?: string | null | undefined;
2122
+ urls?: Record<string, string> | undefined;
2123
+ responsive?: unknown;
2124
+ playback_url?: string | null | undefined;
2125
+ provider?: string | null | undefined;
2126
+ playback_id?: string | null | undefined;
2127
+ provider_asset_id?: string | null | undefined;
2128
+ processing_status?: string | null | undefined;
2129
+ duration?: number | null | undefined;
2130
+ width?: number | null | undefined;
2131
+ height?: number | null | undefined;
2132
+ aspect_ratio?: string | null | undefined;
2133
+ thumbnail_url?: string | null | undefined;
2134
+ }[] | undefined;
2135
+ deleted_at?: string | null | undefined;
2136
+ }[], Thread[] | {
2137
+ id: string;
2138
+ space_id: string;
2139
+ author_id: string;
2140
+ author?: {
2141
+ id: string;
2142
+ name: string;
2143
+ handle?: string | null | undefined;
2144
+ avatar?: string | {
2145
+ url?: string | null | undefined;
2146
+ thumb_url?: string | null | undefined;
2147
+ preview_url?: string | null | undefined;
2148
+ urls?: Record<string, string | null | undefined> | undefined;
2149
+ } | null | undefined;
2150
+ avatar_url?: string | null | undefined;
2151
+ } | undefined;
2152
+ title: string;
2153
+ body?: string | undefined;
2154
+ slug?: string | undefined;
2155
+ audience: "public" | "authenticated" | "private";
2156
+ status: "open" | "locked" | "archived";
2157
+ is_pinned: boolean;
2158
+ reply_count: number;
2159
+ last_activity_at: string;
2160
+ created_at: string;
2161
+ meta?: {
2162
+ views?: number | undefined;
2163
+ upvotes?: number | undefined;
2164
+ tags?: string[] | undefined;
2165
+ } | undefined;
2166
+ tags?: {
2167
+ id: string;
2168
+ slug: string;
2169
+ label: string;
2170
+ thread_count?: number | undefined;
2171
+ }[] | undefined;
2172
+ space?: {
2173
+ id: string;
2174
+ slug: string;
2175
+ name: string;
2176
+ } | undefined;
2177
+ latest_reply?: {
2178
+ id: string;
2179
+ created_at: string;
2180
+ author?: {
2181
+ id: string;
2182
+ name: string;
2183
+ handle?: string | null | undefined;
2184
+ } | null | undefined;
2185
+ } | null | undefined;
2186
+ is_unanswered?: boolean | undefined;
2187
+ is_subscribed?: boolean | undefined;
2188
+ can_moderate?: boolean | undefined;
2189
+ media?: {
2190
+ id: string;
2191
+ uuid: string;
2192
+ mime_type: string;
2193
+ size: number;
2194
+ name: string;
2195
+ type: "image" | "video";
2196
+ is_image: boolean;
2197
+ url?: string | undefined;
2198
+ thumb_url?: string | null | undefined;
2199
+ preview_url?: string | null | undefined;
2200
+ urls?: Record<string, string> | undefined;
2201
+ responsive?: unknown;
2202
+ playback_url?: string | null | undefined;
2203
+ provider?: string | null | undefined;
2204
+ playback_id?: string | null | undefined;
2205
+ provider_asset_id?: string | null | undefined;
2206
+ processing_status?: string | null | undefined;
2207
+ duration?: number | null | undefined;
2208
+ width?: number | null | undefined;
2209
+ height?: number | null | undefined;
2210
+ aspect_ratio?: string | null | undefined;
2211
+ thumbnail_url?: string | null | undefined;
2212
+ }[] | undefined;
2213
+ deleted_at?: string | null | undefined;
2214
+ }[]>;
2215
+ browseThreadList: import("vue").Ref<{
2216
+ id: string;
2217
+ space_id: string;
2218
+ author_id: string;
2219
+ author?: {
2220
+ id: string;
2221
+ name: string;
2222
+ handle?: string | null | undefined;
2223
+ avatar?: string | {
2224
+ url?: string | null | undefined;
2225
+ thumb_url?: string | null | undefined;
2226
+ preview_url?: string | null | undefined;
2227
+ urls?: Record<string, string | null | undefined> | undefined;
2228
+ } | null | undefined;
2229
+ avatar_url?: string | null | undefined;
2230
+ } | undefined;
2231
+ title: string;
2232
+ body?: string | undefined;
2233
+ slug?: string | undefined;
2234
+ audience: "public" | "authenticated" | "private";
2235
+ status: "open" | "locked" | "archived";
2236
+ is_pinned: boolean;
2237
+ reply_count: number;
2238
+ last_activity_at: string;
2239
+ created_at: string;
2240
+ meta?: {
2241
+ views?: number | undefined;
2242
+ upvotes?: number | undefined;
2243
+ tags?: string[] | undefined;
2244
+ } | undefined;
2245
+ tags?: {
2246
+ id: string;
2247
+ slug: string;
2248
+ label: string;
2249
+ thread_count?: number | undefined;
2250
+ }[] | undefined;
2251
+ space?: {
2252
+ id: string;
2253
+ slug: string;
2254
+ name: string;
2255
+ } | undefined;
2256
+ latest_reply?: {
2257
+ id: string;
2258
+ created_at: string;
2259
+ author?: {
2260
+ id: string;
2261
+ name: string;
2262
+ handle?: string | null | undefined;
2263
+ } | null | undefined;
2264
+ } | null | undefined;
2265
+ is_unanswered?: boolean | undefined;
1628
2266
  is_subscribed?: boolean | undefined;
1629
2267
  can_moderate?: boolean | undefined;
1630
2268
  media?: {
@@ -1688,6 +2326,21 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1688
2326
  label: string;
1689
2327
  thread_count?: number | undefined;
1690
2328
  }[] | undefined;
2329
+ space?: {
2330
+ id: string;
2331
+ slug: string;
2332
+ name: string;
2333
+ } | undefined;
2334
+ latest_reply?: {
2335
+ id: string;
2336
+ created_at: string;
2337
+ author?: {
2338
+ id: string;
2339
+ name: string;
2340
+ handle?: string | null | undefined;
2341
+ } | null | undefined;
2342
+ } | null | undefined;
2343
+ is_unanswered?: boolean | undefined;
1691
2344
  is_subscribed?: boolean | undefined;
1692
2345
  can_moderate?: boolean | undefined;
1693
2346
  media?: {
@@ -1716,6 +2369,7 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1716
2369
  }[] | undefined;
1717
2370
  deleted_at?: string | null | undefined;
1718
2371
  }[]>;
2372
+ currentBrowseMode: import("vue").Ref<DiscussionBrowseMode | null, DiscussionBrowseMode | null>;
1719
2373
  currentThread: import("vue").Ref<{
1720
2374
  id: string;
1721
2375
  space_id: string;
@@ -1752,6 +2406,21 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1752
2406
  label: string;
1753
2407
  thread_count?: number | undefined;
1754
2408
  }[] | undefined;
2409
+ space?: {
2410
+ id: string;
2411
+ slug: string;
2412
+ name: string;
2413
+ } | undefined;
2414
+ latest_reply?: {
2415
+ id: string;
2416
+ created_at: string;
2417
+ author?: {
2418
+ id: string;
2419
+ name: string;
2420
+ handle?: string | null | undefined;
2421
+ } | null | undefined;
2422
+ } | null | undefined;
2423
+ is_unanswered?: boolean | undefined;
1755
2424
  is_subscribed?: boolean | undefined;
1756
2425
  can_moderate?: boolean | undefined;
1757
2426
  media?: {
@@ -1815,6 +2484,21 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1815
2484
  label: string;
1816
2485
  thread_count?: number | undefined;
1817
2486
  }[] | undefined;
2487
+ space?: {
2488
+ id: string;
2489
+ slug: string;
2490
+ name: string;
2491
+ } | undefined;
2492
+ latest_reply?: {
2493
+ id: string;
2494
+ created_at: string;
2495
+ author?: {
2496
+ id: string;
2497
+ name: string;
2498
+ handle?: string | null | undefined;
2499
+ } | null | undefined;
2500
+ } | null | undefined;
2501
+ is_unanswered?: boolean | undefined;
1818
2502
  is_subscribed?: boolean | undefined;
1819
2503
  can_moderate?: boolean | undefined;
1820
2504
  media?: {
@@ -1986,14 +2670,19 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
1986
2670
  thumbnail_url?: string | null | undefined;
1987
2671
  }[] | undefined;
1988
2672
  }[]>;
2673
+ currentReplySort: import("vue").Ref<"best" | "top" | "new" | "controversial", "best" | "top" | "new" | "controversial">;
1989
2674
  loading: import("vue").Ref<boolean, boolean>;
1990
2675
  error: import("vue").Ref<string | null, string | null>;
1991
2676
  nextCursor: import("vue").Ref<string | null, string | null>;
2677
+ browseNextCursor: import("vue").Ref<string | null, string | null>;
1992
2678
  repliesNextCursor: import("vue").Ref<string | null, string | null>;
1993
2679
  spacesLoadingState: import("../index.js").DiscussionLoadingState;
1994
2680
  threadsLoadingState: import("../index.js").DiscussionLoadingState;
1995
2681
  repliesLoadingState: import("../index.js").DiscussionLoadingState;
1996
- loadSpaces: () => Promise<unknown>;
2682
+ loadSpaces: (options?: LoadSpacesOptions) => Promise<unknown>;
2683
+ createSpace: (input: CreateSpaceInput) => Promise<unknown>;
2684
+ moveSpace: (spaceId: string, parentId?: string | null) => Promise<unknown>;
2685
+ reorderSpaces: (ids: string[]) => Promise<unknown>;
1997
2686
  loadSpaceDetail: (slug: string, options?: {
1998
2687
  signal?: AbortSignal;
1999
2688
  }) => Promise<Space | null>;
@@ -2007,6 +2696,10 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
2007
2696
  loadThreads: (spaceSlug: string, cursor?: string, options?: {
2008
2697
  signal?: AbortSignal;
2009
2698
  sort?: SpaceThreadSort;
2699
+ filter?: SpaceThreadFilter;
2700
+ }) => Promise<unknown>;
2701
+ browseThreads: (view: DiscussionBrowseMode, cursor?: string, options?: {
2702
+ signal?: AbortSignal;
2010
2703
  }) => Promise<unknown>;
2011
2704
  loadThread: (spaceSlug: string, threadId: string) => Promise<Thread | null>;
2012
2705
  loadReplies: (threadId: string, cursor?: string, sortBy?: "best" | "top" | "new" | "controversial") => Promise<unknown>;
@@ -2016,9 +2709,15 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
2016
2709
  fetchQuote: (replyId: string) => Promise<QuoteResponse>;
2017
2710
  subscribeToThread: (threadId: string) => Promise<unknown>;
2018
2711
  unsubscribeFromThread: (threadId: string) => Promise<unknown>;
2019
- searchThreads: (query: string, spaceSlug?: string) => Promise<unknown>;
2020
- searchThreadsInSpace: (query: string, spaceId: string) => Promise<Thread[]>;
2021
- searchThreadsGlobally: (query: string) => Promise<Thread[]>;
2712
+ searchThreads: (query: string, spaceSlug?: string, options?: {
2713
+ signal?: AbortSignal;
2714
+ }) => Promise<unknown>;
2715
+ searchThreadsInSpace: (query: string, spaceId: string, options?: {
2716
+ signal?: AbortSignal;
2717
+ }) => Promise<Thread[]>;
2718
+ searchThreadsGlobally: (query: string, options?: {
2719
+ signal?: AbortSignal;
2720
+ }) => Promise<Thread[]>;
2022
2721
  featuredSpaces: () => Space[];
2023
2722
  getCategories: () => DiscussionCategorySummary[];
2024
2723
  setThreadPinned: (threadId: string, pinned: boolean) => Promise<void>;
@@ -2040,6 +2739,6 @@ export declare function createDiscussionStoreDefinition(config: DiscussionStoreC
2040
2739
  generateThreadDraftId: (spaceSlug: string) => string;
2041
2740
  generateReplyDraftId: (threadId: string) => string;
2042
2741
  setError: (message: string | null) => void;
2043
- }, "cleanupRealtimeChannels" | "loadSpaces" | "loadSpaceDetail" | "loadSpaceMembership" | "joinSpace" | "leaveSpace" | "getSpaceMembership" | "flattenTree" | "rootSpaces" | "leafSpaces" | "loadThreads" | "loadThread" | "loadReplies" | "createThread" | "loadTagCategories" | "createReply" | "fetchQuote" | "subscribeToThread" | "unsubscribeFromThread" | "searchThreads" | "searchThreadsInSpace" | "searchThreadsGlobally" | "featuredSpaces" | "getCategories" | "setThreadPinned" | "setThreadLocked" | "moveThread" | "updateThread" | "deleteThread" | "restoreThread" | "deleteReply" | "updateReply" | "toggleReplyReaction" | "saveDraft" | "getDraft" | "clearDraft" | "generateThreadDraftId" | "generateReplyDraftId" | "setError">>;
2742
+ }, "cleanupRealtimeChannels" | "loadSpaces" | "createSpace" | "moveSpace" | "reorderSpaces" | "loadSpaceDetail" | "loadSpaceMembership" | "joinSpace" | "leaveSpace" | "getSpaceMembership" | "flattenTree" | "rootSpaces" | "leafSpaces" | "loadThreads" | "browseThreads" | "loadThread" | "loadReplies" | "createThread" | "loadTagCategories" | "createReply" | "fetchQuote" | "subscribeToThread" | "unsubscribeFromThread" | "searchThreads" | "searchThreadsInSpace" | "searchThreadsGlobally" | "featuredSpaces" | "getCategories" | "setThreadPinned" | "setThreadLocked" | "moveThread" | "updateThread" | "deleteThread" | "restoreThread" | "deleteReply" | "updateReply" | "toggleReplyReaction" | "saveDraft" | "getDraft" | "clearDraft" | "generateThreadDraftId" | "generateReplyDraftId" | "setError">>;
2044
2743
  export {};
2045
2744
  //# sourceMappingURL=discussion.d.ts.map