@atproto/pds 0.4.162 → 0.4.164

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 (34) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/lexicon/index.d.ts +9 -4
  3. package/dist/lexicon/index.d.ts.map +1 -1
  4. package/dist/lexicon/index.js +15 -8
  5. package/dist/lexicon/index.js.map +1 -1
  6. package/dist/lexicon/lexicons.d.ts +427 -259
  7. package/dist/lexicon/lexicons.d.ts.map +1 -1
  8. package/dist/lexicon/lexicons.js +250 -134
  9. package/dist/lexicon/lexicons.js.map +1 -1
  10. package/dist/lexicon/types/{app/bsky/unspecced → com/atproto/temp}/checkHandleAvailability.d.ts +6 -6
  11. package/dist/lexicon/types/com/atproto/temp/checkHandleAvailability.d.ts.map +1 -0
  12. package/dist/lexicon/types/{app/bsky/unspecced → com/atproto/temp}/checkHandleAvailability.js +1 -1
  13. package/dist/lexicon/types/com/atproto/temp/checkHandleAvailability.js.map +1 -0
  14. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +6 -0
  15. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
  16. package/dist/lexicon/types/tools/ozone/moderation/defs.js +7 -1
  17. package/dist/lexicon/types/tools/ozone/moderation/defs.js.map +1 -1
  18. package/dist/lexicon/types/tools/ozone/moderation/getAccountTimeline.d.ts +41 -0
  19. package/dist/lexicon/types/tools/ozone/moderation/getAccountTimeline.d.ts.map +1 -0
  20. package/dist/lexicon/types/tools/ozone/moderation/getAccountTimeline.js +25 -0
  21. package/dist/lexicon/types/tools/ozone/moderation/getAccountTimeline.js.map +1 -0
  22. package/dist/pipethrough.js +1 -0
  23. package/dist/pipethrough.js.map +1 -1
  24. package/package.json +8 -8
  25. package/src/lexicon/index.ts +43 -24
  26. package/src/lexicon/lexicons.ts +264 -143
  27. package/src/lexicon/types/{app/bsky/unspecced → com/atproto/temp}/checkHandleAvailability.ts +4 -4
  28. package/src/lexicon/types/tools/ozone/moderation/defs.ts +7 -0
  29. package/src/lexicon/types/tools/ozone/moderation/getAccountTimeline.ts +102 -0
  30. package/src/pipethrough.ts +1 -0
  31. package/tests/crud.test.ts +7 -3
  32. package/tsconfig.build.tsbuildinfo +1 -1
  33. package/dist/lexicon/types/app/bsky/unspecced/checkHandleAvailability.d.ts.map +0 -1
  34. package/dist/lexicon/types/app/bsky/unspecced/checkHandleAvailability.js.map +0 -1
@@ -4449,6 +4449,104 @@ export const schemaDict = {
4449
4449
  },
4450
4450
  },
4451
4451
  },
4452
+ ComAtprotoTempCheckHandleAvailability: {
4453
+ lexicon: 1,
4454
+ id: 'com.atproto.temp.checkHandleAvailability',
4455
+ defs: {
4456
+ main: {
4457
+ type: 'query',
4458
+ description:
4459
+ 'Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.',
4460
+ parameters: {
4461
+ type: 'params',
4462
+ required: ['handle'],
4463
+ properties: {
4464
+ handle: {
4465
+ type: 'string',
4466
+ format: 'handle',
4467
+ description:
4468
+ 'Tentative handle. Will be checked for availability or used to build handle suggestions.',
4469
+ },
4470
+ email: {
4471
+ type: 'string',
4472
+ description:
4473
+ 'User-provided email. Might be used to build handle suggestions.',
4474
+ },
4475
+ birthDate: {
4476
+ type: 'string',
4477
+ format: 'datetime',
4478
+ description:
4479
+ 'User-provided birth date. Might be used to build handle suggestions.',
4480
+ },
4481
+ },
4482
+ },
4483
+ output: {
4484
+ encoding: 'application/json',
4485
+ schema: {
4486
+ type: 'object',
4487
+ required: ['handle', 'result'],
4488
+ properties: {
4489
+ handle: {
4490
+ type: 'string',
4491
+ format: 'handle',
4492
+ description: 'Echo of the input handle.',
4493
+ },
4494
+ result: {
4495
+ type: 'union',
4496
+ refs: [
4497
+ 'lex:com.atproto.temp.checkHandleAvailability#resultAvailable',
4498
+ 'lex:com.atproto.temp.checkHandleAvailability#resultUnavailable',
4499
+ ],
4500
+ },
4501
+ },
4502
+ },
4503
+ },
4504
+ errors: [
4505
+ {
4506
+ name: 'InvalidEmail',
4507
+ description: 'An invalid email was provided.',
4508
+ },
4509
+ ],
4510
+ },
4511
+ resultAvailable: {
4512
+ type: 'object',
4513
+ description: 'Indicates the provided handle is available.',
4514
+ properties: {},
4515
+ },
4516
+ resultUnavailable: {
4517
+ type: 'object',
4518
+ description:
4519
+ 'Indicates the provided handle is unavailable and gives suggestions of available handles.',
4520
+ required: ['suggestions'],
4521
+ properties: {
4522
+ suggestions: {
4523
+ type: 'array',
4524
+ description:
4525
+ 'List of suggested handles based on the provided inputs.',
4526
+ items: {
4527
+ type: 'ref',
4528
+ ref: 'lex:com.atproto.temp.checkHandleAvailability#suggestion',
4529
+ },
4530
+ },
4531
+ },
4532
+ },
4533
+ suggestion: {
4534
+ type: 'object',
4535
+ required: ['handle', 'method'],
4536
+ properties: {
4537
+ handle: {
4538
+ type: 'string',
4539
+ format: 'handle',
4540
+ },
4541
+ method: {
4542
+ type: 'string',
4543
+ description:
4544
+ 'Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics.',
4545
+ },
4546
+ },
4547
+ },
4548
+ },
4549
+ },
4452
4550
  ComAtprotoTempCheckSignupQueue: {
4453
4551
  lexicon: 1,
4454
4552
  id: 'com.atproto.temp.checkSignupQueue',
@@ -7282,48 +7380,6 @@ export const schemaDict = {
7282
7380
  },
7283
7381
  },
7284
7382
  },
7285
- AppBskyFeedGetPosts: {
7286
- lexicon: 1,
7287
- id: 'app.bsky.feed.getPosts',
7288
- defs: {
7289
- main: {
7290
- type: 'query',
7291
- description:
7292
- "Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
7293
- parameters: {
7294
- type: 'params',
7295
- required: ['uris'],
7296
- properties: {
7297
- uris: {
7298
- type: 'array',
7299
- description: 'List of post AT-URIs to return hydrated views for.',
7300
- items: {
7301
- type: 'string',
7302
- format: 'at-uri',
7303
- },
7304
- maxLength: 25,
7305
- },
7306
- },
7307
- },
7308
- output: {
7309
- encoding: 'application/json',
7310
- schema: {
7311
- type: 'object',
7312
- required: ['posts'],
7313
- properties: {
7314
- posts: {
7315
- type: 'array',
7316
- items: {
7317
- type: 'ref',
7318
- ref: 'lex:app.bsky.feed.defs#postView',
7319
- },
7320
- },
7321
- },
7322
- },
7323
- },
7324
- },
7325
- },
7326
- },
7327
7383
  AppBskyFeedGetPostThread: {
7328
7384
  lexicon: 1,
7329
7385
  id: 'app.bsky.feed.getPostThread',
@@ -7388,6 +7444,48 @@ export const schemaDict = {
7388
7444
  },
7389
7445
  },
7390
7446
  },
7447
+ AppBskyFeedGetPosts: {
7448
+ lexicon: 1,
7449
+ id: 'app.bsky.feed.getPosts',
7450
+ defs: {
7451
+ main: {
7452
+ type: 'query',
7453
+ description:
7454
+ "Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
7455
+ parameters: {
7456
+ type: 'params',
7457
+ required: ['uris'],
7458
+ properties: {
7459
+ uris: {
7460
+ type: 'array',
7461
+ description: 'List of post AT-URIs to return hydrated views for.',
7462
+ items: {
7463
+ type: 'string',
7464
+ format: 'at-uri',
7465
+ },
7466
+ maxLength: 25,
7467
+ },
7468
+ },
7469
+ },
7470
+ output: {
7471
+ encoding: 'application/json',
7472
+ schema: {
7473
+ type: 'object',
7474
+ required: ['posts'],
7475
+ properties: {
7476
+ posts: {
7477
+ type: 'array',
7478
+ items: {
7479
+ type: 'ref',
7480
+ ref: 'lex:app.bsky.feed.defs#postView',
7481
+ },
7482
+ },
7483
+ },
7484
+ },
7485
+ },
7486
+ },
7487
+ },
7488
+ },
7391
7489
  AppBskyFeedGetQuotes: {
7392
7490
  lexicon: 1,
7393
7491
  id: 'app.bsky.feed.getQuotes',
@@ -10511,104 +10609,6 @@ export const schemaDict = {
10511
10609
  },
10512
10610
  },
10513
10611
  },
10514
- AppBskyUnspeccedCheckHandleAvailability: {
10515
- lexicon: 1,
10516
- id: 'app.bsky.unspecced.checkHandleAvailability',
10517
- defs: {
10518
- main: {
10519
- type: 'query',
10520
- description:
10521
- 'Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.',
10522
- parameters: {
10523
- type: 'params',
10524
- required: ['handle'],
10525
- properties: {
10526
- handle: {
10527
- type: 'string',
10528
- format: 'handle',
10529
- description:
10530
- 'Tentative handle. Will be checked for availability or used to build handle suggestions.',
10531
- },
10532
- email: {
10533
- type: 'string',
10534
- description:
10535
- 'User-provided email. Might be used to build handle suggestions.',
10536
- },
10537
- birthDate: {
10538
- type: 'string',
10539
- format: 'datetime',
10540
- description:
10541
- 'User-provided birth date. Might be used to build handle suggestions.',
10542
- },
10543
- },
10544
- },
10545
- output: {
10546
- encoding: 'application/json',
10547
- schema: {
10548
- type: 'object',
10549
- required: ['handle', 'result'],
10550
- properties: {
10551
- handle: {
10552
- type: 'string',
10553
- format: 'handle',
10554
- description: 'Echo of the input handle.',
10555
- },
10556
- result: {
10557
- type: 'union',
10558
- refs: [
10559
- 'lex:app.bsky.unspecced.checkHandleAvailability#resultAvailable',
10560
- 'lex:app.bsky.unspecced.checkHandleAvailability#resultUnavailable',
10561
- ],
10562
- },
10563
- },
10564
- },
10565
- },
10566
- errors: [
10567
- {
10568
- name: 'InvalidEmail',
10569
- description: 'An invalid email was provided.',
10570
- },
10571
- ],
10572
- },
10573
- resultAvailable: {
10574
- type: 'object',
10575
- description: 'Indicates the provided handle is available.',
10576
- properties: {},
10577
- },
10578
- resultUnavailable: {
10579
- type: 'object',
10580
- description:
10581
- 'Indicates the provided handle is unavailable and gives suggestions of available handles.',
10582
- required: ['suggestions'],
10583
- properties: {
10584
- suggestions: {
10585
- type: 'array',
10586
- description:
10587
- 'List of suggested handles based on the provided inputs.',
10588
- items: {
10589
- type: 'ref',
10590
- ref: 'lex:app.bsky.unspecced.checkHandleAvailability#suggestion',
10591
- },
10592
- },
10593
- },
10594
- },
10595
- suggestion: {
10596
- type: 'object',
10597
- required: ['handle', 'method'],
10598
- properties: {
10599
- handle: {
10600
- type: 'string',
10601
- format: 'handle',
10602
- },
10603
- method: {
10604
- type: 'string',
10605
- description:
10606
- 'Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics.',
10607
- },
10608
- },
10609
- },
10610
- },
10611
- },
10612
10612
  AppBskyUnspeccedDefs: {
10613
10613
  lexicon: 1,
10614
10614
  id: 'app.bsky.unspecced.defs',
@@ -15006,6 +15006,21 @@ export const schemaDict = {
15006
15006
  },
15007
15007
  },
15008
15008
  },
15009
+ timelineEventPlcCreate: {
15010
+ type: 'token',
15011
+ description:
15012
+ 'Moderation event timeline event for a PLC create operation',
15013
+ },
15014
+ timelineEventPlcOperation: {
15015
+ type: 'token',
15016
+ description:
15017
+ 'Moderation event timeline event for generic PLC operation',
15018
+ },
15019
+ timelineEventPlcTombstone: {
15020
+ type: 'token',
15021
+ description:
15022
+ 'Moderation event timeline event for a PLC tombstone operation',
15023
+ },
15009
15024
  },
15010
15025
  },
15011
15026
  ToolsOzoneModerationEmitEvent: {
@@ -15097,6 +15112,110 @@ export const schemaDict = {
15097
15112
  },
15098
15113
  },
15099
15114
  },
15115
+ ToolsOzoneModerationGetAccountTimeline: {
15116
+ lexicon: 1,
15117
+ id: 'tools.ozone.moderation.getAccountTimeline',
15118
+ defs: {
15119
+ main: {
15120
+ type: 'query',
15121
+ description:
15122
+ 'Get timeline of all available events of an account. This includes moderation events, account history and did history.',
15123
+ parameters: {
15124
+ type: 'params',
15125
+ required: ['did'],
15126
+ properties: {
15127
+ did: {
15128
+ type: 'string',
15129
+ format: 'did',
15130
+ },
15131
+ },
15132
+ },
15133
+ output: {
15134
+ encoding: 'application/json',
15135
+ schema: {
15136
+ type: 'object',
15137
+ required: ['timeline'],
15138
+ properties: {
15139
+ timeline: {
15140
+ type: 'array',
15141
+ items: {
15142
+ type: 'ref',
15143
+ ref: 'lex:tools.ozone.moderation.getAccountTimeline#timelineItem',
15144
+ },
15145
+ },
15146
+ },
15147
+ },
15148
+ },
15149
+ errors: [
15150
+ {
15151
+ name: 'RepoNotFound',
15152
+ },
15153
+ ],
15154
+ },
15155
+ timelineItem: {
15156
+ type: 'object',
15157
+ required: ['day', 'summary'],
15158
+ properties: {
15159
+ day: {
15160
+ type: 'string',
15161
+ },
15162
+ summary: {
15163
+ type: 'array',
15164
+ items: {
15165
+ type: 'ref',
15166
+ ref: 'lex:tools.ozone.moderation.getAccountTimeline#timelineItemSummary',
15167
+ },
15168
+ },
15169
+ },
15170
+ },
15171
+ timelineItemSummary: {
15172
+ type: 'object',
15173
+ required: ['eventSubjectType', 'eventType', 'count'],
15174
+ properties: {
15175
+ eventSubjectType: {
15176
+ type: 'string',
15177
+ knownValues: ['account', 'record', 'chat'],
15178
+ },
15179
+ eventType: {
15180
+ type: 'string',
15181
+ knownValues: [
15182
+ 'tools.ozone.moderation.defs#modEventTakedown',
15183
+ 'tools.ozone.moderation.defs#modEventReverseTakedown',
15184
+ 'tools.ozone.moderation.defs#modEventComment',
15185
+ 'tools.ozone.moderation.defs#modEventReport',
15186
+ 'tools.ozone.moderation.defs#modEventLabel',
15187
+ 'tools.ozone.moderation.defs#modEventAcknowledge',
15188
+ 'tools.ozone.moderation.defs#modEventEscalate',
15189
+ 'tools.ozone.moderation.defs#modEventMute',
15190
+ 'tools.ozone.moderation.defs#modEventUnmute',
15191
+ 'tools.ozone.moderation.defs#modEventMuteReporter',
15192
+ 'tools.ozone.moderation.defs#modEventUnmuteReporter',
15193
+ 'tools.ozone.moderation.defs#modEventEmail',
15194
+ 'tools.ozone.moderation.defs#modEventResolveAppeal',
15195
+ 'tools.ozone.moderation.defs#modEventDivert',
15196
+ 'tools.ozone.moderation.defs#modEventTag',
15197
+ 'tools.ozone.moderation.defs#accountEvent',
15198
+ 'tools.ozone.moderation.defs#identityEvent',
15199
+ 'tools.ozone.moderation.defs#recordEvent',
15200
+ 'tools.ozone.moderation.defs#modEventPriorityScore',
15201
+ 'tools.ozone.moderation.defs#ageAssuranceEvent',
15202
+ 'tools.ozone.moderation.defs#ageAssuranceOverrideEvent',
15203
+ 'tools.ozone.moderation.defs#timelineEventPlcCreate',
15204
+ 'tools.ozone.moderation.defs#timelineEventPlcOperation',
15205
+ 'tools.ozone.moderation.defs#timelineEventPlcTombstone',
15206
+ 'tools.ozone.hosting.getAccountHistory#accountCreated',
15207
+ 'tools.ozone.hosting.getAccountHistory#emailConfirmed',
15208
+ 'tools.ozone.hosting.getAccountHistory#passwordUpdated',
15209
+ 'tools.ozone.hosting.getAccountHistory#handleUpdated',
15210
+ ],
15211
+ },
15212
+ count: {
15213
+ type: 'integer',
15214
+ },
15215
+ },
15216
+ },
15217
+ },
15218
+ },
15100
15219
  ToolsOzoneModerationGetEvent: {
15101
15220
  lexicon: 1,
15102
15221
  id: 'tools.ozone.moderation.getEvent',
@@ -17745,6 +17864,8 @@ export const ids = {
17745
17864
  ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl',
17746
17865
  ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos',
17747
17866
  ComAtprotoTempAddReservedHandle: 'com.atproto.temp.addReservedHandle',
17867
+ ComAtprotoTempCheckHandleAvailability:
17868
+ 'com.atproto.temp.checkHandleAvailability',
17748
17869
  ComAtprotoTempCheckSignupQueue: 'com.atproto.temp.checkSignupQueue',
17749
17870
  ComAtprotoTempFetchLabels: 'com.atproto.temp.fetchLabels',
17750
17871
  ComAtprotoTempRequestPhoneVerification:
@@ -17777,8 +17898,8 @@ export const ids = {
17777
17898
  AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
17778
17899
  AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
17779
17900
  AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed',
17780
- AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
17781
17901
  AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
17902
+ AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
17782
17903
  AppBskyFeedGetQuotes: 'app.bsky.feed.getQuotes',
17783
17904
  AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy',
17784
17905
  AppBskyFeedGetSuggestedFeeds: 'app.bsky.feed.getSuggestedFeeds',
@@ -17839,8 +17960,6 @@ export const ids = {
17839
17960
  AppBskyNotificationUnregisterPush: 'app.bsky.notification.unregisterPush',
17840
17961
  AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
17841
17962
  AppBskyRichtextFacet: 'app.bsky.richtext.facet',
17842
- AppBskyUnspeccedCheckHandleAvailability:
17843
- 'app.bsky.unspecced.checkHandleAvailability',
17844
17963
  AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
17845
17964
  AppBskyUnspeccedGetAgeAssuranceState:
17846
17965
  'app.bsky.unspecced.getAgeAssuranceState',
@@ -17914,6 +18033,8 @@ export const ids = {
17914
18033
  ToolsOzoneHostingGetAccountHistory: 'tools.ozone.hosting.getAccountHistory',
17915
18034
  ToolsOzoneModerationDefs: 'tools.ozone.moderation.defs',
17916
18035
  ToolsOzoneModerationEmitEvent: 'tools.ozone.moderation.emitEvent',
18036
+ ToolsOzoneModerationGetAccountTimeline:
18037
+ 'tools.ozone.moderation.getAccountTimeline',
17917
18038
  ToolsOzoneModerationGetEvent: 'tools.ozone.moderation.getEvent',
17918
18039
  ToolsOzoneModerationGetRecord: 'tools.ozone.moderation.getRecord',
17919
18040
  ToolsOzoneModerationGetRecords: 'tools.ozone.moderation.getRecords',
@@ -12,7 +12,7 @@ import {
12
12
 
13
13
  const is$typed = _is$typed,
14
14
  validate = _validate
15
- const id = 'app.bsky.unspecced.checkHandleAvailability'
15
+ const id = 'com.atproto.temp.checkHandleAvailability'
16
16
 
17
17
  export type QueryParams = {
18
18
  /** Tentative handle. Will be checked for availability or used to build handle suggestions. */
@@ -51,7 +51,7 @@ export type HandlerOutput = HandlerError | HandlerSuccess
51
51
 
52
52
  /** Indicates the provided handle is available. */
53
53
  export interface ResultAvailable {
54
- $type?: 'app.bsky.unspecced.checkHandleAvailability#resultAvailable'
54
+ $type?: 'com.atproto.temp.checkHandleAvailability#resultAvailable'
55
55
  }
56
56
 
57
57
  const hashResultAvailable = 'resultAvailable'
@@ -66,7 +66,7 @@ export function validateResultAvailable<V>(v: V) {
66
66
 
67
67
  /** Indicates the provided handle is unavailable and gives suggestions of available handles. */
68
68
  export interface ResultUnavailable {
69
- $type?: 'app.bsky.unspecced.checkHandleAvailability#resultUnavailable'
69
+ $type?: 'com.atproto.temp.checkHandleAvailability#resultUnavailable'
70
70
  /** List of suggested handles based on the provided inputs. */
71
71
  suggestions: Suggestion[]
72
72
  }
@@ -82,7 +82,7 @@ export function validateResultUnavailable<V>(v: V) {
82
82
  }
83
83
 
84
84
  export interface Suggestion {
85
- $type?: 'app.bsky.unspecced.checkHandleAvailability#suggestion'
85
+ $type?: 'com.atproto.temp.checkHandleAvailability#suggestion'
86
86
  handle: string
87
87
  /** Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics. */
88
88
  method: string
@@ -980,3 +980,10 @@ export function isModTool<V>(v: V) {
980
980
  export function validateModTool<V>(v: V) {
981
981
  return validate<ModTool & V>(v, id, hashModTool)
982
982
  }
983
+
984
+ /** Moderation event timeline event for a PLC create operation */
985
+ export const TIMELINEEVENTPLCCREATE = `${id}#timelineEventPlcCreate`
986
+ /** Moderation event timeline event for generic PLC operation */
987
+ export const TIMELINEEVENTPLCOPERATION = `${id}#timelineEventPlcOperation`
988
+ /** Moderation event timeline event for a PLC tombstone operation */
989
+ export const TIMELINEEVENTPLCTOMBSTONE = `${id}#timelineEventPlcTombstone`
@@ -0,0 +1,102 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+
13
+ const is$typed = _is$typed,
14
+ validate = _validate
15
+ const id = 'tools.ozone.moderation.getAccountTimeline'
16
+
17
+ export type QueryParams = {
18
+ did: string
19
+ }
20
+ export type InputSchema = undefined
21
+
22
+ export interface OutputSchema {
23
+ timeline: TimelineItem[]
24
+ }
25
+
26
+ export type HandlerInput = void
27
+
28
+ export interface HandlerSuccess {
29
+ encoding: 'application/json'
30
+ body: OutputSchema
31
+ headers?: { [key: string]: string }
32
+ }
33
+
34
+ export interface HandlerError {
35
+ status: number
36
+ message?: string
37
+ error?: 'RepoNotFound'
38
+ }
39
+
40
+ export type HandlerOutput = HandlerError | HandlerSuccess
41
+
42
+ export interface TimelineItem {
43
+ $type?: 'tools.ozone.moderation.getAccountTimeline#timelineItem'
44
+ day: string
45
+ summary: TimelineItemSummary[]
46
+ }
47
+
48
+ const hashTimelineItem = 'timelineItem'
49
+
50
+ export function isTimelineItem<V>(v: V) {
51
+ return is$typed(v, id, hashTimelineItem)
52
+ }
53
+
54
+ export function validateTimelineItem<V>(v: V) {
55
+ return validate<TimelineItem & V>(v, id, hashTimelineItem)
56
+ }
57
+
58
+ export interface TimelineItemSummary {
59
+ $type?: 'tools.ozone.moderation.getAccountTimeline#timelineItemSummary'
60
+ eventSubjectType: 'account' | 'record' | 'chat' | (string & {})
61
+ eventType:
62
+ | 'tools.ozone.moderation.defs#modEventTakedown'
63
+ | 'tools.ozone.moderation.defs#modEventReverseTakedown'
64
+ | 'tools.ozone.moderation.defs#modEventComment'
65
+ | 'tools.ozone.moderation.defs#modEventReport'
66
+ | 'tools.ozone.moderation.defs#modEventLabel'
67
+ | 'tools.ozone.moderation.defs#modEventAcknowledge'
68
+ | 'tools.ozone.moderation.defs#modEventEscalate'
69
+ | 'tools.ozone.moderation.defs#modEventMute'
70
+ | 'tools.ozone.moderation.defs#modEventUnmute'
71
+ | 'tools.ozone.moderation.defs#modEventMuteReporter'
72
+ | 'tools.ozone.moderation.defs#modEventUnmuteReporter'
73
+ | 'tools.ozone.moderation.defs#modEventEmail'
74
+ | 'tools.ozone.moderation.defs#modEventResolveAppeal'
75
+ | 'tools.ozone.moderation.defs#modEventDivert'
76
+ | 'tools.ozone.moderation.defs#modEventTag'
77
+ | 'tools.ozone.moderation.defs#accountEvent'
78
+ | 'tools.ozone.moderation.defs#identityEvent'
79
+ | 'tools.ozone.moderation.defs#recordEvent'
80
+ | 'tools.ozone.moderation.defs#modEventPriorityScore'
81
+ | 'tools.ozone.moderation.defs#ageAssuranceEvent'
82
+ | 'tools.ozone.moderation.defs#ageAssuranceOverrideEvent'
83
+ | 'tools.ozone.moderation.defs#timelineEventPlcCreate'
84
+ | 'tools.ozone.moderation.defs#timelineEventPlcOperation'
85
+ | 'tools.ozone.moderation.defs#timelineEventPlcTombstone'
86
+ | 'tools.ozone.hosting.getAccountHistory#accountCreated'
87
+ | 'tools.ozone.hosting.getAccountHistory#emailConfirmed'
88
+ | 'tools.ozone.hosting.getAccountHistory#passwordUpdated'
89
+ | 'tools.ozone.hosting.getAccountHistory#handleUpdated'
90
+ | (string & {})
91
+ count: number
92
+ }
93
+
94
+ const hashTimelineItemSummary = 'timelineItemSummary'
95
+
96
+ export function isTimelineItemSummary<V>(v: V) {
97
+ return is$typed(v, id, hashTimelineItemSummary)
98
+ }
99
+
100
+ export function validateTimelineItemSummary<V>(v: V) {
101
+ return validate<TimelineItemSummary & V>(v, id, hashTimelineItemSummary)
102
+ }
@@ -532,6 +532,7 @@ const defaultService = (
532
532
  case ids.ToolsOzoneModerationQueryEvents:
533
533
  case ids.ToolsOzoneModerationQueryStatuses:
534
534
  case ids.ToolsOzoneModerationSearchRepos:
535
+ case ids.ToolsOzoneModerationGetAccountTimeline:
535
536
  case ids.ToolsOzoneVerificationListVerifications:
536
537
  case ids.ToolsOzoneVerificationGrantVerifications:
537
538
  case ids.ToolsOzoneVerificationRevokeVerifications:
@@ -1,6 +1,6 @@
1
1
  import assert from 'node:assert'
2
2
  import fs from 'node:fs/promises'
3
- import { AtpAgent } from '@atproto/api'
3
+ import { AppBskyFeedPostRecord, AtpAgent } from '@atproto/api'
4
4
  import { TID, cidForCbor, ui8ToArrayBuffer } from '@atproto/common'
5
5
  import { TestNetworkNoAppView } from '@atproto/dev-env'
6
6
  import { BlobRef } from '@atproto/lexicon'
@@ -247,7 +247,9 @@ describe('crud operations', () => {
247
247
  })
248
248
 
249
249
  it('in forwards order', async () => {
250
- const results = (results) => results.flatMap((res) => res.records)
250
+ const results = (
251
+ results: Awaited<ReturnType<AppBskyFeedPostRecord['list']>>[],
252
+ ) => results.flatMap((res) => res.records)
251
253
  const paginator = async (cursor?: string) => {
252
254
  const res = await agent.app.bsky.feed.post.list({
253
255
  repo: aliceAgent.accountDid,
@@ -271,7 +273,9 @@ describe('crud operations', () => {
271
273
  })
272
274
 
273
275
  it('in reverse order', async () => {
274
- const results = (results) => results.flatMap((res) => res.records)
276
+ const results = (
277
+ results: Awaited<ReturnType<AppBskyFeedPostRecord['list']>>[],
278
+ ) => results.flatMap((res) => res.records)
275
279
  const paginator = async (cursor?: string) => {
276
280
  const res = await agent.app.bsky.feed.post.list({
277
281
  repo: aliceAgent.accountDid,