@atproto/api 0.21.0 → 0.22.0

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/CHANGELOG.md +26 -0
  2. package/dist/client/index.d.ts +9 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +17 -0
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +730 -22
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +395 -11
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/app/bsky/feed/defs.d.ts +4 -0
  11. package/dist/client/types/app/bsky/feed/defs.d.ts.map +1 -1
  12. package/dist/client/types/app/bsky/feed/defs.js.map +1 -1
  13. package/dist/client/types/app/bsky/feed/getQuotes.d.ts +2 -0
  14. package/dist/client/types/app/bsky/feed/getQuotes.d.ts.map +1 -1
  15. package/dist/client/types/app/bsky/feed/getQuotes.js.map +1 -1
  16. package/dist/client/types/tools/ozone/inbox/appealActionedSubject.d.ts +65 -0
  17. package/dist/client/types/tools/ozone/inbox/appealActionedSubject.d.ts.map +1 -0
  18. package/dist/client/types/tools/ozone/inbox/appealActionedSubject.js +65 -0
  19. package/dist/client/types/tools/ozone/inbox/appealActionedSubject.js.map +1 -0
  20. package/dist/client/types/tools/ozone/inbox/defs.d.ts +68 -0
  21. package/dist/client/types/tools/ozone/inbox/defs.d.ts.map +1 -0
  22. package/dist/client/types/tools/ozone/inbox/defs.js +38 -0
  23. package/dist/client/types/tools/ozone/inbox/defs.js.map +1 -0
  24. package/dist/client/types/tools/ozone/queue/createQueue.d.ts +2 -0
  25. package/dist/client/types/tools/ozone/queue/createQueue.d.ts.map +1 -1
  26. package/dist/client/types/tools/ozone/queue/createQueue.js.map +1 -1
  27. package/dist/client/types/tools/ozone/queue/defs.d.ts +2 -0
  28. package/dist/client/types/tools/ozone/queue/defs.d.ts.map +1 -1
  29. package/dist/client/types/tools/ozone/queue/defs.js.map +1 -1
  30. package/dist/client/types/tools/ozone/queue/updateQueue.d.ts +5 -0
  31. package/dist/client/types/tools/ozone/queue/updateQueue.d.ts.map +1 -1
  32. package/dist/client/types/tools/ozone/queue/updateQueue.js +7 -0
  33. package/dist/client/types/tools/ozone/queue/updateQueue.js.map +1 -1
  34. package/dist/client/types/tools/ozone/report/defs.d.ts +49 -9
  35. package/dist/client/types/tools/ozone/report/defs.d.ts.map +1 -1
  36. package/dist/client/types/tools/ozone/report/defs.js.map +1 -1
  37. package/package.json +6 -6
@@ -3475,6 +3475,14 @@ export const schemaDict = {
3475
3475
  type: 'ref',
3476
3476
  ref: 'lex:app.bsky.feed.defs#replyRef',
3477
3477
  },
3478
+ opThreadPostIndex: {
3479
+ type: 'integer',
3480
+ description: 'The 1-indexed position of this post within the contiguous OP thread. Only present when this post is part of the OP thread.',
3481
+ },
3482
+ opThreadPostCount: {
3483
+ type: 'integer',
3484
+ description: 'The total number of posts in the contiguous OP thread that this post belongs to. Only present when this post is part of the OP thread.',
3485
+ },
3478
3486
  reason: {
3479
3487
  type: 'union',
3480
3488
  refs: [
@@ -4611,6 +4619,11 @@ export const schemaDict = {
4611
4619
  cursor: {
4612
4620
  type: 'string',
4613
4621
  },
4622
+ sort: {
4623
+ type: 'string',
4624
+ knownValues: ['latest', 'top'],
4625
+ description: "Ordering of results. 'latest' (default when unset) is newest first; 'top' orders quotes by their like count.",
4626
+ },
4614
4627
  },
4615
4628
  },
4616
4629
  output: {
@@ -20040,6 +20053,270 @@ export const schemaDict = {
20040
20053
  },
20041
20054
  },
20042
20055
  },
20056
+ ToolsOzoneInboxAppealActionedSubject: {
20057
+ lexicon: 1,
20058
+ id: 'tools.ozone.inbox.appealActionedSubject',
20059
+ defs: {
20060
+ main: {
20061
+ type: 'procedure',
20062
+ description: "Appeal a moderation action affecting the user's account or content.",
20063
+ input: {
20064
+ encoding: 'application/json',
20065
+ schema: {
20066
+ type: 'object',
20067
+ required: ['subject'],
20068
+ properties: {
20069
+ action: {
20070
+ type: 'union',
20071
+ refs: [
20072
+ 'lex:tools.ozone.inbox.appealActionedSubject#actionRef',
20073
+ 'lex:tools.ozone.inbox.appealActionedSubject#labelRef',
20074
+ 'lex:tools.ozone.inbox.appealActionedSubject#takedownRef',
20075
+ ],
20076
+ closed: true,
20077
+ description: 'Moderation action being appealed.',
20078
+ },
20079
+ subject: {
20080
+ type: 'union',
20081
+ refs: [
20082
+ 'lex:com.atproto.admin.defs#repoRef',
20083
+ 'lex:com.atproto.repo.strongRef',
20084
+ ],
20085
+ description: 'Subject being appealed.',
20086
+ },
20087
+ reason: {
20088
+ type: 'string',
20089
+ maxGraphemes: 2000,
20090
+ maxLength: 20000,
20091
+ description: 'Optional explanation supplied by the user.',
20092
+ },
20093
+ modTool: {
20094
+ type: 'ref',
20095
+ ref: 'lex:com.atproto.moderation.createReport#modTool',
20096
+ },
20097
+ },
20098
+ },
20099
+ },
20100
+ output: {
20101
+ encoding: 'application/json',
20102
+ schema: {
20103
+ type: 'ref',
20104
+ ref: 'lex:tools.ozone.inbox.defs#subjectView',
20105
+ },
20106
+ },
20107
+ errors: [
20108
+ {
20109
+ name: 'InvalidAppealSubject',
20110
+ description: 'Invalid appeal subject input.',
20111
+ },
20112
+ {
20113
+ name: 'AlreadyAppealed',
20114
+ description: 'An active appeal already exists for this action.',
20115
+ },
20116
+ {
20117
+ name: 'NotAppealable',
20118
+ description: 'The subject cannot be appealed.',
20119
+ },
20120
+ {
20121
+ name: 'AppealWindowExpired',
20122
+ description: 'The appeal window for this action has closed.',
20123
+ },
20124
+ ],
20125
+ },
20126
+ actionRef: {
20127
+ type: 'object',
20128
+ required: ['id'],
20129
+ properties: {
20130
+ id: {
20131
+ type: 'integer',
20132
+ minimum: 1,
20133
+ description: 'ID of the moderation action being appealed, available via actions in mod inbox.',
20134
+ },
20135
+ },
20136
+ },
20137
+ labelRef: {
20138
+ type: 'object',
20139
+ required: ['val'],
20140
+ properties: {
20141
+ val: {
20142
+ type: 'string',
20143
+ minLength: 1,
20144
+ description: 'Label being appealed.',
20145
+ },
20146
+ },
20147
+ },
20148
+ takedownRef: {
20149
+ type: 'object',
20150
+ properties: {},
20151
+ },
20152
+ },
20153
+ },
20154
+ ToolsOzoneInboxDefs: {
20155
+ lexicon: 1,
20156
+ id: 'tools.ozone.inbox.defs',
20157
+ defs: {
20158
+ subjectView: {
20159
+ type: 'object',
20160
+ description: 'A subject belonging to the viewer that has moderation actions against it.',
20161
+ required: ['src', 'subject', 'enforcement', 'createdAt', 'updatedAt'],
20162
+ properties: {
20163
+ src: {
20164
+ type: 'string',
20165
+ format: 'did',
20166
+ description: 'DID of the moderation service that took the actions.',
20167
+ },
20168
+ subject: {
20169
+ type: 'union',
20170
+ refs: [
20171
+ 'lex:com.atproto.admin.defs#repoRef',
20172
+ 'lex:com.atproto.repo.strongRef',
20173
+ ],
20174
+ },
20175
+ enforcement: {
20176
+ type: 'ref',
20177
+ ref: 'lex:tools.ozone.inbox.defs#enforcementView',
20178
+ },
20179
+ appeal: {
20180
+ type: 'ref',
20181
+ ref: 'lex:tools.ozone.inbox.defs#appealView',
20182
+ },
20183
+ availableActions: {
20184
+ type: 'array',
20185
+ items: {
20186
+ type: 'string',
20187
+ knownValues: ['appeal'],
20188
+ },
20189
+ },
20190
+ latestAction: {
20191
+ type: 'ref',
20192
+ ref: 'lex:tools.ozone.inbox.defs#actionView',
20193
+ },
20194
+ actionCount: {
20195
+ type: 'integer',
20196
+ },
20197
+ createdAt: {
20198
+ type: 'string',
20199
+ format: 'datetime',
20200
+ },
20201
+ updatedAt: {
20202
+ type: 'string',
20203
+ format: 'datetime',
20204
+ },
20205
+ },
20206
+ },
20207
+ enforcementView: {
20208
+ type: 'object',
20209
+ description: 'The current enforcement state of a subject.',
20210
+ required: ['state'],
20211
+ properties: {
20212
+ state: {
20213
+ type: 'string',
20214
+ knownValues: [
20215
+ 'none',
20216
+ 'labeled',
20217
+ 'removed',
20218
+ 'suspended',
20219
+ 'takendown',
20220
+ ],
20221
+ },
20222
+ scope: {
20223
+ type: 'string',
20224
+ knownValues: ['network', 'app', 'labelOnly'],
20225
+ },
20226
+ expiresAt: {
20227
+ type: 'string',
20228
+ format: 'datetime',
20229
+ },
20230
+ labels: {
20231
+ type: 'array',
20232
+ items: {
20233
+ type: 'string',
20234
+ },
20235
+ description: 'Active label values on the subject, excluding negated and expired labels.',
20236
+ },
20237
+ },
20238
+ },
20239
+ appealView: {
20240
+ type: 'object',
20241
+ description: "The state of the viewer's appeal against the actions on a subject.",
20242
+ required: ['state'],
20243
+ properties: {
20244
+ state: {
20245
+ type: 'string',
20246
+ knownValues: [
20247
+ 'none',
20248
+ 'pending',
20249
+ 'resolved',
20250
+ 'superseded',
20251
+ 'expired',
20252
+ ],
20253
+ },
20254
+ appealedAt: {
20255
+ type: 'string',
20256
+ format: 'datetime',
20257
+ },
20258
+ resolvedAt: {
20259
+ type: 'string',
20260
+ format: 'datetime',
20261
+ description: "When the appeal's report was closed.",
20262
+ },
20263
+ note: {
20264
+ type: 'string',
20265
+ description: 'Moderator explanation, from the publicNote on the closing activity. Absent if none was written.',
20266
+ },
20267
+ appealableUntil: {
20268
+ type: 'string',
20269
+ format: 'datetime',
20270
+ },
20271
+ },
20272
+ },
20273
+ actionView: {
20274
+ type: 'object',
20275
+ description: 'A single moderation action taken against a subject.',
20276
+ required: ['id', 'type', 'createdAt'],
20277
+ properties: {
20278
+ id: {
20279
+ type: 'integer',
20280
+ description: 'Action ID (moderation event ID).',
20281
+ },
20282
+ type: {
20283
+ type: 'string',
20284
+ description: 'Public action type.',
20285
+ },
20286
+ scope: {
20287
+ type: 'string',
20288
+ knownValues: ['network', 'app', 'labelOnly'],
20289
+ },
20290
+ createdAt: {
20291
+ type: 'string',
20292
+ format: 'datetime',
20293
+ },
20294
+ reversedAt: {
20295
+ type: 'string',
20296
+ format: 'datetime',
20297
+ },
20298
+ expiresAt: {
20299
+ type: 'string',
20300
+ format: 'datetime',
20301
+ },
20302
+ labels: {
20303
+ type: 'array',
20304
+ items: {
20305
+ type: 'string',
20306
+ },
20307
+ description: 'Label values, for labelApplied/labelRemoved.',
20308
+ },
20309
+ policies: {
20310
+ type: 'array',
20311
+ items: {
20312
+ type: 'string',
20313
+ },
20314
+ description: 'Policies that were applied in this action.',
20315
+ },
20316
+ },
20317
+ },
20318
+ },
20319
+ },
20043
20320
  ToolsOzoneModerationCancelScheduledActions: {
20044
20321
  lexicon: 1,
20045
20322
  id: 'tools.ozone.moderation.cancelScheduledActions',
@@ -22895,6 +23172,13 @@ export const schemaDict = {
22895
23172
  },
22896
23173
  description: 'Policy keys to recommend when actioning reports in this queue',
22897
23174
  },
23175
+ recommendedLabels: {
23176
+ type: 'array',
23177
+ items: {
23178
+ type: 'string',
23179
+ },
23180
+ description: 'Labels to recommend for this queue and use as fallback appeal routing mappings',
23181
+ },
22898
23182
  },
22899
23183
  },
22900
23184
  },
@@ -22979,6 +23263,13 @@ export const schemaDict = {
22979
23263
  },
22980
23264
  description: 'Policy keys recommended when actioning reports in this queue',
22981
23265
  },
23266
+ recommendedLabels: {
23267
+ type: 'array',
23268
+ items: {
23269
+ type: 'string',
23270
+ },
23271
+ description: 'Labels recommended for this queue and used as a fallback when routing label appeals',
23272
+ },
22982
23273
  createdBy: {
22983
23274
  type: 'string',
22984
23275
  format: 'did',
@@ -23364,6 +23655,13 @@ export const schemaDict = {
23364
23655
  },
23365
23656
  description: 'Policy keys to recommend when actioning reports in this queue',
23366
23657
  },
23658
+ recommendedLabels: {
23659
+ type: 'array',
23660
+ items: {
23661
+ type: 'string',
23662
+ },
23663
+ description: 'Labels to recommend for this queue and use as fallback appeal routing mappings',
23664
+ },
23367
23665
  },
23368
23666
  },
23369
23667
  },
@@ -23385,6 +23683,10 @@ export const schemaDict = {
23385
23683
  name: 'InvalidRecommendedPolicies',
23386
23684
  description: 'One or more recommended policy keys do not exist in the configured policy list',
23387
23685
  },
23686
+ {
23687
+ name: 'ConflictingQueue',
23688
+ description: 'The queue configuration conflicts with an existing queue',
23689
+ },
23388
23690
  ],
23389
23691
  },
23390
23692
  },
@@ -23882,7 +24184,7 @@ export const schemaDict = {
23882
24184
  items: {
23883
24185
  type: 'integer',
23884
24186
  },
23885
- description: 'Array of moderation event IDs representing actions taken on this report (sorted DESC, most recent first)',
24187
+ description: 'Array of moderation event IDs representing actions taken on this report, in append order (most recently linked event last)',
23886
24188
  },
23887
24189
  actions: {
23888
24190
  type: 'array',
@@ -24064,25 +24366,65 @@ export const schemaDict = {
24064
24366
  type: 'integer',
24065
24367
  description: 'Number of reports currently not closed.',
24066
24368
  },
24369
+ closedCount: {
24370
+ type: 'integer',
24371
+ description: 'Number of close transitions.',
24372
+ },
24067
24373
  actionedCount: {
24068
24374
  type: 'integer',
24069
- description: 'Number of reports closed today.',
24375
+ description: 'Number of closures whose last report action is label, tag, or takedown.',
24376
+ },
24377
+ acknowledgedCount: {
24378
+ type: 'integer',
24379
+ description: 'Number of closures whose last report action is not label, tag, or takedown.',
24070
24380
  },
24071
24381
  escalatedCount: {
24072
24382
  type: 'integer',
24073
- description: 'Number of reports escalated today.',
24383
+ description: 'Number of reports escalated.',
24074
24384
  },
24075
24385
  inboundCount: {
24076
24386
  type: 'integer',
24077
- description: 'Reports received today.',
24387
+ description: 'Reports received.',
24388
+ },
24389
+ labelActionCount: {
24390
+ type: 'integer',
24391
+ description: 'Closures whose last report action is a label event.',
24392
+ },
24393
+ tagActionCount: {
24394
+ type: 'integer',
24395
+ description: 'Closures whose last report action is a tag event.',
24396
+ },
24397
+ takedownActionCount: {
24398
+ type: 'integer',
24399
+ description: 'Closures whose last report action is a takedown event.',
24400
+ },
24401
+ ahtDurationSec: {
24402
+ type: 'integer',
24403
+ description: 'Sum of report assignment-to-close seconds.',
24404
+ },
24405
+ ahtSampleCount: {
24406
+ type: 'integer',
24407
+ description: 'Number of assigned closed-report samples in ahtDurationSec.',
24408
+ },
24409
+ resolutionDurationSec: {
24410
+ type: 'integer',
24411
+ description: 'Sum of report creation-to-close seconds.',
24412
+ },
24413
+ resolutionSampleCount: {
24414
+ type: 'integer',
24415
+ description: 'Number of closed-report samples in resolutionDurationSec.',
24078
24416
  },
24079
24417
  actionRate: {
24080
24418
  type: 'integer',
24081
- description: 'Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer.',
24419
+ description: 'Percentage of closures actioned (actionedCount / closedCount * 100), rounded to nearest integer.',
24082
24420
  },
24083
24421
  avgHandlingTimeSec: {
24084
24422
  type: 'integer',
24085
- description: 'Average time in seconds from report creation (or moderator assignment) to close.',
24423
+ description: 'Average handling time in seconds from report assignment to close.',
24424
+ },
24425
+ avgResolutionTimeSec: {
24426
+ type: 'integer',
24427
+ description: 'Average resolution time in seconds from report creation to close.',
24086
24428
  },
24087
24429
  lastUpdated: {
24088
24430
  type: 'string',
@@ -24109,9 +24451,17 @@ export const schemaDict = {
24109
24451
  type: 'integer',
24110
24452
  description: 'Number of reports not closed at time of computation.',
24111
24453
  },
24454
+ closedCount: {
24455
+ type: 'integer',
24456
+ description: 'Number of close transitions during this day.',
24457
+ },
24112
24458
  actionedCount: {
24113
24459
  type: 'integer',
24114
- description: 'Number of reports closed during this day.',
24460
+ description: 'Number of closures whose last report action is label, tag, or takedown during this day.',
24461
+ },
24462
+ acknowledgedCount: {
24463
+ type: 'integer',
24464
+ description: 'Number of closures whose last report action is not label, tag, or takedown during this day.',
24115
24465
  },
24116
24466
  escalatedCount: {
24117
24467
  type: 'integer',
@@ -24121,13 +24471,45 @@ export const schemaDict = {
24121
24471
  type: 'integer',
24122
24472
  description: 'Reports received during this day.',
24123
24473
  },
24474
+ labelActionCount: {
24475
+ type: 'integer',
24476
+ description: 'Closures whose last report action is a label event during this day.',
24477
+ },
24478
+ tagActionCount: {
24479
+ type: 'integer',
24480
+ description: 'Closures whose last report action is a tag event during this day.',
24481
+ },
24482
+ takedownActionCount: {
24483
+ type: 'integer',
24484
+ description: 'Closures whose last report action is a takedown event during this day.',
24485
+ },
24486
+ ahtDurationSec: {
24487
+ type: 'integer',
24488
+ description: "Sum of report assignment-to-close seconds for this day's samples.",
24489
+ },
24490
+ ahtSampleCount: {
24491
+ type: 'integer',
24492
+ description: 'Number of assigned closed-report samples in ahtDurationSec.',
24493
+ },
24494
+ resolutionDurationSec: {
24495
+ type: 'integer',
24496
+ description: "Sum of report creation-to-close seconds for this day's samples.",
24497
+ },
24498
+ resolutionSampleCount: {
24499
+ type: 'integer',
24500
+ description: 'Number of closed-report samples in resolutionDurationSec.',
24501
+ },
24124
24502
  actionRate: {
24125
24503
  type: 'integer',
24126
- description: 'Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer.',
24504
+ description: 'Percentage of closures actioned (actionedCount / closedCount * 100), rounded to nearest integer.',
24127
24505
  },
24128
24506
  avgHandlingTimeSec: {
24129
24507
  type: 'integer',
24130
- description: 'Average time in seconds from report creation (or moderator assignment) to close.',
24508
+ description: 'Average handling time in seconds from report assignment to close.',
24509
+ },
24510
+ avgResolutionTimeSec: {
24511
+ type: 'integer',
24512
+ description: 'Average resolution time in seconds from report creation to close.',
24131
24513
  },
24132
24514
  },
24133
24515
  },
@@ -24341,7 +24723,7 @@ export const schemaDict = {
24341
24723
  defs: {
24342
24724
  main: {
24343
24725
  type: 'query',
24344
- description: 'Get live report statistics from the past 24 hours. Filter by queue, moderator, or report type. Omit all parameters for aggregate stats.',
24726
+ description: 'Get live report statistics for the current UTC calendar day. Filter by queue, moderator, or report type. Omit all parameters for aggregate stats.',
24345
24727
  parameters: {
24346
24728
  type: 'params',
24347
24729
  properties: {
@@ -24719,7 +25101,7 @@ export const schemaDict = {
24719
25101
  defs: {
24720
25102
  main: {
24721
25103
  type: 'procedure',
24722
- description: 'Recompute report statistics for a date range. Useful for backfilling after failures or data corrections.',
25104
+ description: 'Recompute report statistics for a date range.',
24723
25105
  input: {
24724
25106
  encoding: 'application/json',
24725
25107
  schema: {
@@ -26881,6 +27263,8 @@ export const ids = {
26881
27263
  ToolsOzoneCommunicationListTemplates: 'tools.ozone.communication.listTemplates',
26882
27264
  ToolsOzoneCommunicationUpdateTemplate: 'tools.ozone.communication.updateTemplate',
26883
27265
  ToolsOzoneHostingGetAccountHistory: 'tools.ozone.hosting.getAccountHistory',
27266
+ ToolsOzoneInboxAppealActionedSubject: 'tools.ozone.inbox.appealActionedSubject',
27267
+ ToolsOzoneInboxDefs: 'tools.ozone.inbox.defs',
26884
27268
  ToolsOzoneModerationCancelScheduledActions: 'tools.ozone.moderation.cancelScheduledActions',
26885
27269
  ToolsOzoneModerationDefs: 'tools.ozone.moderation.defs',
26886
27270
  ToolsOzoneModerationEmitEvent: 'tools.ozone.moderation.emitEvent',