@atproto/ozone 0.1.172 → 0.1.173

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 (62) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/daemon/event-reverser.d.ts +1 -0
  3. package/dist/daemon/event-reverser.d.ts.map +1 -1
  4. package/dist/daemon/event-reverser.js +42 -1
  5. package/dist/daemon/event-reverser.js.map +1 -1
  6. package/dist/db/migrations/20260428T000000000Z-add-expiring-tag-table.d.ts +4 -0
  7. package/dist/db/migrations/20260428T000000000Z-add-expiring-tag-table.d.ts.map +1 -0
  8. package/dist/db/migrations/20260428T000000000Z-add-expiring-tag-table.js +32 -0
  9. package/dist/db/migrations/20260428T000000000Z-add-expiring-tag-table.js.map +1 -0
  10. package/dist/db/migrations/index.d.ts +1 -0
  11. package/dist/db/migrations/index.d.ts.map +1 -1
  12. package/dist/db/migrations/index.js +2 -1
  13. package/dist/db/migrations/index.js.map +1 -1
  14. package/dist/db/schema/expiring_tag.d.ts +15 -0
  15. package/dist/db/schema/expiring_tag.d.ts.map +1 -0
  16. package/dist/db/schema/expiring_tag.js +5 -0
  17. package/dist/db/schema/expiring_tag.js.map +1 -0
  18. package/dist/db/schema/index.d.ts +2 -1
  19. package/dist/db/schema/index.d.ts.map +1 -1
  20. package/dist/db/schema/index.js.map +1 -1
  21. package/dist/lexicon/lexicons.d.ts +264 -40
  22. package/dist/lexicon/lexicons.d.ts.map +1 -1
  23. package/dist/lexicon/lexicons.js +132 -19
  24. package/dist/lexicon/lexicons.js.map +1 -1
  25. package/dist/lexicon/types/chat/bsky/actor/defs.d.ts +8 -2
  26. package/dist/lexicon/types/chat/bsky/actor/defs.d.ts.map +1 -1
  27. package/dist/lexicon/types/chat/bsky/actor/defs.js +9 -0
  28. package/dist/lexicon/types/chat/bsky/actor/defs.js.map +1 -1
  29. package/dist/lexicon/types/chat/bsky/convo/defs.d.ts +37 -10
  30. package/dist/lexicon/types/chat/bsky/convo/defs.d.ts.map +1 -1
  31. package/dist/lexicon/types/chat/bsky/convo/defs.js +9 -0
  32. package/dist/lexicon/types/chat/bsky/convo/defs.js.map +1 -1
  33. package/dist/lexicon/types/chat/bsky/convo/getMessages.d.ts +3 -0
  34. package/dist/lexicon/types/chat/bsky/convo/getMessages.d.ts.map +1 -1
  35. package/dist/lexicon/types/chat/bsky/convo/getMessages.js.map +1 -1
  36. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +2 -0
  37. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
  38. package/dist/lexicon/types/tools/ozone/moderation/defs.js.map +1 -1
  39. package/dist/mod-service/expiring-tags.d.ts +27 -0
  40. package/dist/mod-service/expiring-tags.d.ts.map +1 -0
  41. package/dist/mod-service/expiring-tags.js +62 -0
  42. package/dist/mod-service/expiring-tags.js.map +1 -0
  43. package/dist/mod-service/index.d.ts.map +1 -1
  44. package/dist/mod-service/index.js +22 -0
  45. package/dist/mod-service/index.js.map +1 -1
  46. package/dist/mod-service/status.d.ts +4 -0
  47. package/dist/mod-service/status.d.ts.map +1 -1
  48. package/package.json +4 -4
  49. package/src/daemon/event-reverser.ts +50 -1
  50. package/src/db/migrations/20260428T000000000Z-add-expiring-tag-table.ts +32 -0
  51. package/src/db/migrations/index.ts +1 -0
  52. package/src/db/schema/expiring_tag.ts +17 -0
  53. package/src/db/schema/index.ts +3 -1
  54. package/src/lexicon/lexicons.ts +138 -19
  55. package/src/lexicon/types/chat/bsky/actor/defs.ts +17 -1
  56. package/src/lexicon/types/chat/bsky/convo/defs.ts +50 -10
  57. package/src/lexicon/types/chat/bsky/convo/getMessages.ts +3 -0
  58. package/src/lexicon/types/tools/ozone/moderation/defs.ts +2 -0
  59. package/src/mod-service/expiring-tags.ts +98 -0
  60. package/src/mod-service/index.ts +26 -0
  61. package/tests/expiring-tags.test.ts +231 -0
  62. package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,32 @@
1
+ import { Kysely } from 'kysely'
2
+
3
+ export async function up(db: Kysely<unknown>): Promise<void> {
4
+ await db.schema
5
+ .createTable('expiring_tag')
6
+ .addColumn('id', 'serial', (col) => col.primaryKey())
7
+ .addColumn('eventId', 'integer', (col) => col.notNull())
8
+ .addColumn('did', 'varchar', (col) => col.notNull())
9
+ .addColumn('recordPath', 'varchar', (col) => col.notNull())
10
+ .addColumn('tag', 'varchar', (col) => col.notNull())
11
+ .addColumn('expiresAt', 'varchar', (col) => col.notNull())
12
+ .addColumn('createdBy', 'varchar', (col) => col.notNull())
13
+ .execute()
14
+
15
+ // Daemon polls for expired tags
16
+ await db.schema
17
+ .createIndex('idx_expiring_tag_expires_at')
18
+ .on('expiring_tag')
19
+ .column('expiresAt')
20
+ .execute()
21
+
22
+ // Cleanup queries when tags are manually removed
23
+ await db.schema
24
+ .createIndex('idx_expiring_tag_did_record_path')
25
+ .on('expiring_tag')
26
+ .columns(['did', 'recordPath'])
27
+ .execute()
28
+ }
29
+
30
+ export async function down(db: Kysely<unknown>): Promise<void> {
31
+ await db.schema.dropTable('expiring_tag').execute()
32
+ }
@@ -34,3 +34,4 @@ export * as _20250813T000000000Z from './20250813T000000000Z-mod-tool-batch-id-i
34
34
  export * as _20250923T000000000Z from './20250923T000000000Z-scheduled-actions'
35
35
  export * as _20251008T120000000Z from './20251008T120000000Z-add-strike-system'
36
36
  export * as _20260210T154806448Z from './20260210T154806448Z-mod-event-created-by-indexes'
37
+ export * as _20260428T000000000Z from './20260428T000000000Z-add-expiring-tag-table'
@@ -0,0 +1,17 @@
1
+ import { Generated } from 'kysely'
2
+
3
+ export const tableName = 'expiring_tag'
4
+
5
+ export interface ExpiringTag {
6
+ id: Generated<number>
7
+ eventId: number
8
+ did: string
9
+ recordPath: string
10
+ tag: string
11
+ expiresAt: string
12
+ createdBy: string
13
+ }
14
+
15
+ export type PartialDB = {
16
+ [tableName]: ExpiringTag
17
+ }
@@ -5,6 +5,7 @@ import * as accountRecordStatusStats from './account_record_status_stats'
5
5
  import * as accountStrike from './account_strike'
6
6
  import * as blobPushEvent from './blob_push_event'
7
7
  import * as communicationTemplate from './communication_template'
8
+ import * as expiringTag from './expiring_tag'
8
9
  import * as firehoseCursor from './firehose_cursor'
9
10
  import * as jobCursor from './job_cursor'
10
11
  import * as label from './label'
@@ -41,7 +42,8 @@ export type DatabaseSchemaType = modEvent.PartialDB &
41
42
  firehoseCursor.PartialDB &
42
43
  jobCursor.PartialDB &
43
44
  safelink.PartialDB &
44
- scheduledAction.PartialDB
45
+ scheduledAction.PartialDB &
46
+ expiringTag.PartialDB
45
47
 
46
48
  export type DatabaseSchema = Kysely<DatabaseSchemaType>
47
49
 
@@ -9739,6 +9739,7 @@ export const schemaDict = {
9739
9739
  refs: [
9740
9740
  'lex:chat.bsky.actor.defs#directConvoMember',
9741
9741
  'lex:chat.bsky.actor.defs#groupConvoMember',
9742
+ 'lex:chat.bsky.actor.defs#pastGroupConvoMember',
9742
9743
  ],
9743
9744
  },
9744
9745
  },
@@ -9751,7 +9752,7 @@ export const schemaDict = {
9751
9752
  },
9752
9753
  groupConvoMember: {
9753
9754
  description:
9754
- '[NOTE: This is under active development and should be considered unstable while this note is here].',
9755
+ '[NOTE: This is under active development and should be considered unstable while this note is here]. A current group convo member.',
9755
9756
  type: 'object',
9756
9757
  required: ['role'],
9757
9758
  properties: {
@@ -9769,6 +9770,13 @@ export const schemaDict = {
9769
9770
  },
9770
9771
  },
9771
9772
  },
9773
+ pastGroupConvoMember: {
9774
+ description:
9775
+ '[NOTE: This is under active development and should be considered unstable while this note is here]. A past group convo member.',
9776
+ type: 'object',
9777
+ required: [],
9778
+ properties: {},
9779
+ },
9772
9780
  },
9773
9781
  },
9774
9782
  ChatBskyActorDeleteAccount: {
@@ -10012,6 +10020,16 @@ export const schemaDict = {
10012
10020
  },
10013
10021
  },
10014
10022
  },
10023
+ systemMessageReferredUser: {
10024
+ type: 'object',
10025
+ required: ['did'],
10026
+ properties: {
10027
+ did: {
10028
+ type: 'string',
10029
+ format: 'did',
10030
+ },
10031
+ },
10032
+ },
10015
10033
  systemMessageView: {
10016
10034
  description:
10017
10035
  '[NOTE: This is under active development and should be considered unstable while this note is here].',
@@ -10056,7 +10074,7 @@ export const schemaDict = {
10056
10074
  member: {
10057
10075
  description: 'Current view of the member who was added.',
10058
10076
  type: 'ref',
10059
- ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10077
+ ref: 'lex:chat.bsky.convo.defs#systemMessageReferredUser',
10060
10078
  },
10061
10079
  role: {
10062
10080
  description:
@@ -10066,7 +10084,7 @@ export const schemaDict = {
10066
10084
  },
10067
10085
  addedBy: {
10068
10086
  type: 'ref',
10069
- ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10087
+ ref: 'lex:chat.bsky.convo.defs#systemMessageReferredUser',
10070
10088
  },
10071
10089
  },
10072
10090
  },
@@ -10079,11 +10097,11 @@ export const schemaDict = {
10079
10097
  member: {
10080
10098
  description: 'Current view of the member who was removed.',
10081
10099
  type: 'ref',
10082
- ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10100
+ ref: 'lex:chat.bsky.convo.defs#systemMessageReferredUser',
10083
10101
  },
10084
10102
  removedBy: {
10085
10103
  type: 'ref',
10086
- ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10104
+ ref: 'lex:chat.bsky.convo.defs#systemMessageReferredUser',
10087
10105
  },
10088
10106
  },
10089
10107
  },
@@ -10096,7 +10114,7 @@ export const schemaDict = {
10096
10114
  member: {
10097
10115
  description: 'Current view of the member who joined.',
10098
10116
  type: 'ref',
10099
- ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10117
+ ref: 'lex:chat.bsky.convo.defs#systemMessageReferredUser',
10100
10118
  },
10101
10119
  role: {
10102
10120
  description:
@@ -10108,7 +10126,7 @@ export const schemaDict = {
10108
10126
  description:
10109
10127
  'If join link was configured to require approval, this will be set to who approved the request. Undefined if approval was not required.',
10110
10128
  type: 'ref',
10111
- ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10129
+ ref: 'lex:chat.bsky.convo.defs#systemMessageReferredUser',
10112
10130
  },
10113
10131
  },
10114
10132
  },
@@ -10121,7 +10139,7 @@ export const schemaDict = {
10121
10139
  member: {
10122
10140
  description: 'Current view of the member who left the group.',
10123
10141
  type: 'ref',
10124
- ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10142
+ ref: 'lex:chat.bsky.convo.defs#systemMessageReferredUser',
10125
10143
  },
10126
10144
  },
10127
10145
  },
@@ -10134,7 +10152,7 @@ export const schemaDict = {
10134
10152
  lockedBy: {
10135
10153
  description: 'Current view of the member who locked the group.',
10136
10154
  type: 'ref',
10137
- ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10155
+ ref: 'lex:chat.bsky.convo.defs#systemMessageReferredUser',
10138
10156
  },
10139
10157
  },
10140
10158
  },
@@ -10147,7 +10165,7 @@ export const schemaDict = {
10147
10165
  unlockedBy: {
10148
10166
  description: 'Current view of the member who unlocked the group.',
10149
10167
  type: 'ref',
10150
- ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10168
+ ref: 'lex:chat.bsky.convo.defs#systemMessageReferredUser',
10151
10169
  },
10152
10170
  },
10153
10171
  },
@@ -10160,7 +10178,7 @@ export const schemaDict = {
10160
10178
  lockedBy: {
10161
10179
  description: 'Current view of the member who locked the group.',
10162
10180
  type: 'ref',
10163
- ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10181
+ ref: 'lex:chat.bsky.convo.defs#systemMessageReferredUser',
10164
10182
  },
10165
10183
  },
10166
10184
  },
@@ -10338,7 +10356,7 @@ export const schemaDict = {
10338
10356
  description:
10339
10357
  '[NOTE: This is under active development and should be considered unstable while this note is here].',
10340
10358
  type: 'object',
10341
- required: ['name', 'lockStatus', 'memberCount'],
10359
+ required: ['name', 'lockStatus', 'memberCount', 'createdAt'],
10342
10360
  properties: {
10343
10361
  name: {
10344
10362
  type: 'string',
@@ -10351,6 +10369,10 @@ export const schemaDict = {
10351
10369
  description:
10352
10370
  'The total number of members in the group conversation.',
10353
10371
  },
10372
+ createdAt: {
10373
+ type: 'string',
10374
+ format: 'datetime',
10375
+ },
10354
10376
  joinLink: {
10355
10377
  type: 'ref',
10356
10378
  ref: 'lex:chat.bsky.group.defs#joinLinkView',
@@ -10451,6 +10473,15 @@ export const schemaDict = {
10451
10473
  'lex:chat.bsky.convo.defs#deletedMessageView',
10452
10474
  ],
10453
10475
  },
10476
+ relatedProfiles: {
10477
+ description:
10478
+ "Profiles referred to in the message view. This isn't required for compatibility, because it was added later, but should generally be present.",
10479
+ type: 'array',
10480
+ items: {
10481
+ type: 'ref',
10482
+ ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10483
+ },
10484
+ },
10454
10485
  },
10455
10486
  },
10456
10487
  logDeleteMessage: {
@@ -10518,6 +10549,15 @@ export const schemaDict = {
10518
10549
  type: 'ref',
10519
10550
  ref: 'lex:chat.bsky.convo.defs#reactionView',
10520
10551
  },
10552
+ relatedProfiles: {
10553
+ description:
10554
+ "Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.",
10555
+ type: 'array',
10556
+ items: {
10557
+ type: 'ref',
10558
+ ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10559
+ },
10560
+ },
10521
10561
  },
10522
10562
  },
10523
10563
  logRemoveReaction: {
@@ -10542,6 +10582,15 @@ export const schemaDict = {
10542
10582
  type: 'ref',
10543
10583
  ref: 'lex:chat.bsky.convo.defs#reactionView',
10544
10584
  },
10585
+ relatedProfiles: {
10586
+ description:
10587
+ "Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.",
10588
+ type: 'array',
10589
+ items: {
10590
+ type: 'ref',
10591
+ ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10592
+ },
10593
+ },
10545
10594
  },
10546
10595
  },
10547
10596
  logReadConvo: {
@@ -10570,7 +10619,7 @@ export const schemaDict = {
10570
10619
  description:
10571
10620
  '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was added to a group convo. The member who was added gets a logBeginConvo (to create the convo) but also a logAddMember (to show the system message as the first message the user sees).',
10572
10621
  type: 'object',
10573
- required: ['rev', 'convoId', 'message'],
10622
+ required: ['rev', 'convoId', 'message', 'relatedProfiles'],
10574
10623
  properties: {
10575
10624
  rev: {
10576
10625
  type: 'string',
@@ -10584,13 +10633,21 @@ export const schemaDict = {
10584
10633
  type: 'ref',
10585
10634
  ref: 'lex:chat.bsky.convo.defs#systemMessageView',
10586
10635
  },
10636
+ relatedProfiles: {
10637
+ description: 'Profiles referred in the system message.',
10638
+ type: 'array',
10639
+ items: {
10640
+ type: 'ref',
10641
+ ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10642
+ },
10643
+ },
10587
10644
  },
10588
10645
  },
10589
10646
  logRemoveMember: {
10590
10647
  description:
10591
10648
  "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was removed from a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logRemoveMember (because they already left, so can't see the system message).",
10592
10649
  type: 'object',
10593
- required: ['rev', 'convoId', 'message'],
10650
+ required: ['rev', 'convoId', 'message', 'relatedProfiles'],
10594
10651
  properties: {
10595
10652
  rev: {
10596
10653
  type: 'string',
@@ -10604,13 +10661,21 @@ export const schemaDict = {
10604
10661
  type: 'ref',
10605
10662
  ref: 'lex:chat.bsky.convo.defs#systemMessageView',
10606
10663
  },
10664
+ relatedProfiles: {
10665
+ description: 'Profiles referred in the system message.',
10666
+ type: 'array',
10667
+ items: {
10668
+ type: 'ref',
10669
+ ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10670
+ },
10671
+ },
10607
10672
  },
10608
10673
  },
10609
10674
  logMemberJoin: {
10610
10675
  description:
10611
10676
  '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member joined a group convo via join link. The member who was added gets a logBeginConvo (to create the convo) but also a logMemberJoin (to show the system message as the first message the user sees).',
10612
10677
  type: 'object',
10613
- required: ['rev', 'convoId', 'message'],
10678
+ required: ['rev', 'convoId', 'message', 'relatedProfiles'],
10614
10679
  properties: {
10615
10680
  rev: {
10616
10681
  type: 'string',
@@ -10624,13 +10689,21 @@ export const schemaDict = {
10624
10689
  type: 'ref',
10625
10690
  ref: 'lex:chat.bsky.convo.defs#systemMessageView',
10626
10691
  },
10692
+ relatedProfiles: {
10693
+ description: 'Profiles referred in the system message.',
10694
+ type: 'array',
10695
+ items: {
10696
+ type: 'ref',
10697
+ ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10698
+ },
10699
+ },
10627
10700
  },
10628
10701
  },
10629
10702
  logMemberLeave: {
10630
10703
  description:
10631
10704
  "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member voluntarily left a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logMemberLeave (because they already left, so can't see the system message).",
10632
10705
  type: 'object',
10633
- required: ['rev', 'convoId', 'message'],
10706
+ required: ['rev', 'convoId', 'message', 'relatedProfiles'],
10634
10707
  properties: {
10635
10708
  rev: {
10636
10709
  type: 'string',
@@ -10644,13 +10717,21 @@ export const schemaDict = {
10644
10717
  type: 'ref',
10645
10718
  ref: 'lex:chat.bsky.convo.defs#systemMessageView',
10646
10719
  },
10720
+ relatedProfiles: {
10721
+ description: 'Profiles referred in the system message.',
10722
+ type: 'array',
10723
+ items: {
10724
+ type: 'ref',
10725
+ ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10726
+ },
10727
+ },
10647
10728
  },
10648
10729
  },
10649
10730
  logLockConvo: {
10650
10731
  description:
10651
10732
  '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked.',
10652
10733
  type: 'object',
10653
- required: ['rev', 'convoId', 'message'],
10734
+ required: ['rev', 'convoId', 'message', 'relatedProfiles'],
10654
10735
  properties: {
10655
10736
  rev: {
10656
10737
  type: 'string',
@@ -10664,13 +10745,21 @@ export const schemaDict = {
10664
10745
  type: 'ref',
10665
10746
  ref: 'lex:chat.bsky.convo.defs#systemMessageView',
10666
10747
  },
10748
+ relatedProfiles: {
10749
+ description: 'Profiles referred in the system message.',
10750
+ type: 'array',
10751
+ items: {
10752
+ type: 'ref',
10753
+ ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10754
+ },
10755
+ },
10667
10756
  },
10668
10757
  },
10669
10758
  logUnlockConvo: {
10670
10759
  description:
10671
10760
  '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was unlocked.',
10672
10761
  type: 'object',
10673
- required: ['rev', 'convoId', 'message'],
10762
+ required: ['rev', 'convoId', 'message', 'relatedProfiles'],
10674
10763
  properties: {
10675
10764
  rev: {
10676
10765
  type: 'string',
@@ -10684,13 +10773,21 @@ export const schemaDict = {
10684
10773
  type: 'ref',
10685
10774
  ref: 'lex:chat.bsky.convo.defs#systemMessageView',
10686
10775
  },
10776
+ relatedProfiles: {
10777
+ description: 'Profiles referred in the system message.',
10778
+ type: 'array',
10779
+ items: {
10780
+ type: 'ref',
10781
+ ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10782
+ },
10783
+ },
10687
10784
  },
10688
10785
  },
10689
10786
  logLockConvoPermanently: {
10690
10787
  description:
10691
10788
  '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked permanently.',
10692
10789
  type: 'object',
10693
- required: ['rev', 'convoId', 'message'],
10790
+ required: ['rev', 'convoId', 'message', 'relatedProfiles'],
10694
10791
  properties: {
10695
10792
  rev: {
10696
10793
  type: 'string',
@@ -10704,6 +10801,14 @@ export const schemaDict = {
10704
10801
  type: 'ref',
10705
10802
  ref: 'lex:chat.bsky.convo.defs#systemMessageView',
10706
10803
  },
10804
+ relatedProfiles: {
10805
+ description: 'Profiles referred in the system message.',
10806
+ type: 'array',
10807
+ items: {
10808
+ type: 'ref',
10809
+ ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
10810
+ },
10811
+ },
10707
10812
  },
10708
10813
  },
10709
10814
  logEditGroup: {
@@ -11224,6 +11329,15 @@ export const schemaDict = {
11224
11329
  ],
11225
11330
  },
11226
11331
  },
11332
+ relatedProfiles: {
11333
+ description:
11334
+ 'Set of all members who authored or reacted to the returned messages. Members referred to by system messages are also included.',
11335
+ type: 'array',
11336
+ items: {
11337
+ type: 'ref',
11338
+ ref: 'lex:chat.bsky.actor.defs#profileViewBasic',
11339
+ },
11340
+ },
11227
11341
  },
11228
11342
  },
11229
11343
  },
@@ -18920,6 +19034,11 @@ export const schemaDict = {
18920
19034
  type: 'string',
18921
19035
  description: 'Additional comment about added/removed tags.',
18922
19036
  },
19037
+ durationInHours: {
19038
+ type: 'integer',
19039
+ description:
19040
+ 'Indicates how long the tags being added should remain before automatically being removed. Only applies to tags being added.',
19041
+ },
18923
19042
  },
18924
19043
  },
18925
19044
  accountEvent: {
@@ -34,6 +34,7 @@ export interface ProfileViewBasic {
34
34
  kind?:
35
35
  | $Typed<DirectConvoMember>
36
36
  | $Typed<GroupConvoMember>
37
+ | $Typed<PastGroupConvoMember>
37
38
  | { $type: string }
38
39
  }
39
40
 
@@ -62,7 +63,7 @@ export function validateDirectConvoMember<V>(v: V) {
62
63
  return validate<DirectConvoMember & V>(v, id, hashDirectConvoMember)
63
64
  }
64
65
 
65
- /** [NOTE: This is under active development and should be considered unstable while this note is here]. */
66
+ /** [NOTE: This is under active development and should be considered unstable while this note is here]. A current group convo member. */
66
67
  export interface GroupConvoMember {
67
68
  $type?: 'chat.bsky.actor.defs#groupConvoMember'
68
69
  addedBy?: ProfileViewBasic
@@ -78,3 +79,18 @@ export function isGroupConvoMember<V>(v: V) {
78
79
  export function validateGroupConvoMember<V>(v: V) {
79
80
  return validate<GroupConvoMember & V>(v, id, hashGroupConvoMember)
80
81
  }
82
+
83
+ /** [NOTE: This is under active development and should be considered unstable while this note is here]. A past group convo member. */
84
+ export interface PastGroupConvoMember {
85
+ $type?: 'chat.bsky.actor.defs#pastGroupConvoMember'
86
+ }
87
+
88
+ const hashPastGroupConvoMember = 'pastGroupConvoMember'
89
+
90
+ export function isPastGroupConvoMember<V>(v: V) {
91
+ return is$typed(v, id, hashPastGroupConvoMember)
92
+ }
93
+
94
+ export function validatePastGroupConvoMember<V>(v: V) {
95
+ return validate<PastGroupConvoMember & V>(v, id, hashPastGroupConvoMember)
96
+ }
@@ -85,6 +85,25 @@ export function validateMessageView<V>(v: V) {
85
85
  return validate<MessageView & V>(v, id, hashMessageView)
86
86
  }
87
87
 
88
+ export interface SystemMessageReferredUser {
89
+ $type?: 'chat.bsky.convo.defs#systemMessageReferredUser'
90
+ did: string
91
+ }
92
+
93
+ const hashSystemMessageReferredUser = 'systemMessageReferredUser'
94
+
95
+ export function isSystemMessageReferredUser<V>(v: V) {
96
+ return is$typed(v, id, hashSystemMessageReferredUser)
97
+ }
98
+
99
+ export function validateSystemMessageReferredUser<V>(v: V) {
100
+ return validate<SystemMessageReferredUser & V>(
101
+ v,
102
+ id,
103
+ hashSystemMessageReferredUser,
104
+ )
105
+ }
106
+
88
107
  /** [NOTE: This is under active development and should be considered unstable while this note is here]. */
89
108
  export interface SystemMessageView {
90
109
  $type?: 'chat.bsky.convo.defs#systemMessageView'
@@ -120,9 +139,9 @@ export function validateSystemMessageView<V>(v: V) {
120
139
  /** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was added to the group convo. */
121
140
  export interface SystemMessageDataAddMember {
122
141
  $type?: 'chat.bsky.convo.defs#systemMessageDataAddMember'
123
- member: ChatBskyActorDefs.ProfileViewBasic
142
+ member: SystemMessageReferredUser
124
143
  role: ChatBskyActorDefs.MemberRole
125
- addedBy: ChatBskyActorDefs.ProfileViewBasic
144
+ addedBy: SystemMessageReferredUser
126
145
  }
127
146
 
128
147
  const hashSystemMessageDataAddMember = 'systemMessageDataAddMember'
@@ -142,8 +161,8 @@ export function validateSystemMessageDataAddMember<V>(v: V) {
142
161
  /** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was removed from the group convo. */
143
162
  export interface SystemMessageDataRemoveMember {
144
163
  $type?: 'chat.bsky.convo.defs#systemMessageDataRemoveMember'
145
- member: ChatBskyActorDefs.ProfileViewBasic
146
- removedBy: ChatBskyActorDefs.ProfileViewBasic
164
+ member: SystemMessageReferredUser
165
+ removedBy: SystemMessageReferredUser
147
166
  }
148
167
 
149
168
  const hashSystemMessageDataRemoveMember = 'systemMessageDataRemoveMember'
@@ -163,9 +182,9 @@ export function validateSystemMessageDataRemoveMember<V>(v: V) {
163
182
  /** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user joined the group convo via join link. */
164
183
  export interface SystemMessageDataMemberJoin {
165
184
  $type?: 'chat.bsky.convo.defs#systemMessageDataMemberJoin'
166
- member: ChatBskyActorDefs.ProfileViewBasic
185
+ member: SystemMessageReferredUser
167
186
  role: ChatBskyActorDefs.MemberRole
168
- approvedBy?: ChatBskyActorDefs.ProfileViewBasic
187
+ approvedBy?: SystemMessageReferredUser
169
188
  }
170
189
 
171
190
  const hashSystemMessageDataMemberJoin = 'systemMessageDataMemberJoin'
@@ -185,7 +204,7 @@ export function validateSystemMessageDataMemberJoin<V>(v: V) {
185
204
  /** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user voluntarily left the group convo. */
186
205
  export interface SystemMessageDataMemberLeave {
187
206
  $type?: 'chat.bsky.convo.defs#systemMessageDataMemberLeave'
188
- member: ChatBskyActorDefs.ProfileViewBasic
207
+ member: SystemMessageReferredUser
189
208
  }
190
209
 
191
210
  const hashSystemMessageDataMemberLeave = 'systemMessageDataMemberLeave'
@@ -205,7 +224,7 @@ export function validateSystemMessageDataMemberLeave<V>(v: V) {
205
224
  /** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked. */
206
225
  export interface SystemMessageDataLockConvo {
207
226
  $type?: 'chat.bsky.convo.defs#systemMessageDataLockConvo'
208
- lockedBy: ChatBskyActorDefs.ProfileViewBasic
227
+ lockedBy: SystemMessageReferredUser
209
228
  }
210
229
 
211
230
  const hashSystemMessageDataLockConvo = 'systemMessageDataLockConvo'
@@ -225,7 +244,7 @@ export function validateSystemMessageDataLockConvo<V>(v: V) {
225
244
  /** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was unlocked. */
226
245
  export interface SystemMessageDataUnlockConvo {
227
246
  $type?: 'chat.bsky.convo.defs#systemMessageDataUnlockConvo'
228
- unlockedBy: ChatBskyActorDefs.ProfileViewBasic
247
+ unlockedBy: SystemMessageReferredUser
229
248
  }
230
249
 
231
250
  const hashSystemMessageDataUnlockConvo = 'systemMessageDataUnlockConvo'
@@ -245,7 +264,7 @@ export function validateSystemMessageDataUnlockConvo<V>(v: V) {
245
264
  /** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked permanently. */
246
265
  export interface SystemMessageDataLockConvoPermanently {
247
266
  $type?: 'chat.bsky.convo.defs#systemMessageDataLockConvoPermanently'
248
- lockedBy: ChatBskyActorDefs.ProfileViewBasic
267
+ lockedBy: SystemMessageReferredUser
249
268
  }
250
269
 
251
270
  const hashSystemMessageDataLockConvoPermanently =
@@ -493,6 +512,7 @@ export interface GroupConvo {
493
512
  name: string
494
513
  /** The total number of members in the group conversation. */
495
514
  memberCount: number
515
+ createdAt: string
496
516
  joinLink?: ChatBskyGroupDefs.JoinLinkView
497
517
  lockStatus: ConvoLockStatus
498
518
  }
@@ -598,6 +618,8 @@ export interface LogCreateMessage {
598
618
  rev: string
599
619
  convoId: string
600
620
  message: $Typed<MessageView> | $Typed<DeletedMessageView> | { $type: string }
621
+ /** Profiles referred to in the message view. This isn't required for compatibility, because it was added later, but should generally be present. */
622
+ relatedProfiles?: ChatBskyActorDefs.ProfileViewBasic[]
601
623
  }
602
624
 
603
625
  const hashLogCreateMessage = 'logCreateMessage'
@@ -657,6 +679,8 @@ export interface LogAddReaction {
657
679
  convoId: string
658
680
  message: $Typed<MessageView> | $Typed<DeletedMessageView> | { $type: string }
659
681
  reaction: ReactionView
682
+ /** Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present. */
683
+ relatedProfiles?: ChatBskyActorDefs.ProfileViewBasic[]
660
684
  }
661
685
 
662
686
  const hashLogAddReaction = 'logAddReaction'
@@ -676,6 +700,8 @@ export interface LogRemoveReaction {
676
700
  convoId: string
677
701
  message: $Typed<MessageView> | $Typed<DeletedMessageView> | { $type: string }
678
702
  reaction: ReactionView
703
+ /** Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present. */
704
+ relatedProfiles?: ChatBskyActorDefs.ProfileViewBasic[]
679
705
  }
680
706
 
681
707
  const hashLogRemoveReaction = 'logRemoveReaction'
@@ -716,6 +742,8 @@ export interface LogAddMember {
716
742
  rev: string
717
743
  convoId: string
718
744
  message: SystemMessageView
745
+ /** Profiles referred in the system message. */
746
+ relatedProfiles: ChatBskyActorDefs.ProfileViewBasic[]
719
747
  }
720
748
 
721
749
  const hashLogAddMember = 'logAddMember'
@@ -734,6 +762,8 @@ export interface LogRemoveMember {
734
762
  rev: string
735
763
  convoId: string
736
764
  message: SystemMessageView
765
+ /** Profiles referred in the system message. */
766
+ relatedProfiles: ChatBskyActorDefs.ProfileViewBasic[]
737
767
  }
738
768
 
739
769
  const hashLogRemoveMember = 'logRemoveMember'
@@ -752,6 +782,8 @@ export interface LogMemberJoin {
752
782
  rev: string
753
783
  convoId: string
754
784
  message: SystemMessageView
785
+ /** Profiles referred in the system message. */
786
+ relatedProfiles: ChatBskyActorDefs.ProfileViewBasic[]
755
787
  }
756
788
 
757
789
  const hashLogMemberJoin = 'logMemberJoin'
@@ -770,6 +802,8 @@ export interface LogMemberLeave {
770
802
  rev: string
771
803
  convoId: string
772
804
  message: SystemMessageView
805
+ /** Profiles referred in the system message. */
806
+ relatedProfiles: ChatBskyActorDefs.ProfileViewBasic[]
773
807
  }
774
808
 
775
809
  const hashLogMemberLeave = 'logMemberLeave'
@@ -788,6 +822,8 @@ export interface LogLockConvo {
788
822
  rev: string
789
823
  convoId: string
790
824
  message: SystemMessageView
825
+ /** Profiles referred in the system message. */
826
+ relatedProfiles: ChatBskyActorDefs.ProfileViewBasic[]
791
827
  }
792
828
 
793
829
  const hashLogLockConvo = 'logLockConvo'
@@ -806,6 +842,8 @@ export interface LogUnlockConvo {
806
842
  rev: string
807
843
  convoId: string
808
844
  message: SystemMessageView
845
+ /** Profiles referred in the system message. */
846
+ relatedProfiles: ChatBskyActorDefs.ProfileViewBasic[]
809
847
  }
810
848
 
811
849
  const hashLogUnlockConvo = 'logUnlockConvo'
@@ -824,6 +862,8 @@ export interface LogLockConvoPermanently {
824
862
  rev: string
825
863
  convoId: string
826
864
  message: SystemMessageView
865
+ /** Profiles referred in the system message. */
866
+ relatedProfiles: ChatBskyActorDefs.ProfileViewBasic[]
827
867
  }
828
868
 
829
869
  const hashLogLockConvoPermanently = 'logLockConvoPermanently'