@atproto/bsky 0.0.37 → 0.0.39

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 (149) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/api/app/bsky/feed/getAuthorFeed.d.ts +2 -3
  3. package/dist/api/app/bsky/feed/getListFeed.d.ts +2 -2
  4. package/dist/api/app/bsky/feed/getTimeline.d.ts +4 -2
  5. package/dist/api/app/bsky/labeler/getServices.d.ts +3 -0
  6. package/dist/api/util.d.ts +9 -2
  7. package/dist/auth-verifier.d.ts +1 -1
  8. package/dist/context.d.ts +3 -0
  9. package/dist/data-plane/server/db/database-schema.d.ts +2 -2
  10. package/dist/data-plane/server/db/migrations/20240226T225725627Z-labelers.d.ts +3 -0
  11. package/dist/data-plane/server/db/migrations/index.d.ts +1 -0
  12. package/dist/data-plane/server/db/tables/labeler.d.ts +13 -0
  13. package/dist/data-plane/server/indexing/index.d.ts +2 -0
  14. package/dist/data-plane/server/indexing/plugins/labeler.d.ts +10 -0
  15. package/dist/data-plane/server/util.d.ts +6 -6
  16. package/dist/hydration/actor.d.ts +3 -0
  17. package/dist/hydration/hydrator.d.ts +27 -22
  18. package/dist/hydration/label.d.ts +23 -9
  19. package/dist/index.js +4100 -4645
  20. package/dist/index.js.map +3 -3
  21. package/dist/lexicon/index.d.ts +7 -27
  22. package/dist/lexicon/lexicons.d.ts +516 -1463
  23. package/dist/lexicon/types/app/bsky/actor/defs.d.ts +23 -1
  24. package/dist/lexicon/types/app/bsky/embed/record.d.ts +2 -1
  25. package/dist/lexicon/types/app/bsky/feed/defs.d.ts +1 -0
  26. package/dist/lexicon/types/app/bsky/graph/defs.d.ts +3 -0
  27. package/dist/lexicon/types/app/bsky/labeler/defs.d.ts +41 -0
  28. package/dist/lexicon/types/{com/atproto/admin/searchRepos.d.ts → app/bsky/labeler/getServices.d.ts} +7 -7
  29. package/dist/lexicon/types/app/bsky/labeler/service.d.ts +14 -0
  30. package/dist/lexicon/types/com/atproto/admin/defs.d.ts +0 -304
  31. package/dist/lexicon/types/com/atproto/label/defs.d.ts +23 -0
  32. package/dist/lexicon/types/com/atproto/server/describeServer.d.ts +7 -0
  33. package/dist/proto/bsky_connect.d.ts +7 -1
  34. package/dist/proto/bsky_pb.d.ts +25 -0
  35. package/dist/util.d.ts +7 -0
  36. package/dist/views/index.d.ts +3 -0
  37. package/dist/views/types.d.ts +2 -1
  38. package/package.json +14 -13
  39. package/proto/bsky.proto +12 -0
  40. package/src/api/app/bsky/actor/getProfile.ts +21 -17
  41. package/src/api/app/bsky/actor/getProfiles.ts +16 -7
  42. package/src/api/app/bsky/actor/getSuggestions.ts +18 -13
  43. package/src/api/app/bsky/actor/searchActors.ts +9 -5
  44. package/src/api/app/bsky/actor/searchActorsTypeahead.ts +12 -5
  45. package/src/api/app/bsky/feed/getActorFeeds.ts +16 -6
  46. package/src/api/app/bsky/feed/getActorLikes.ts +18 -8
  47. package/src/api/app/bsky/feed/getAuthorFeed.ts +18 -19
  48. package/src/api/app/bsky/feed/getFeed.ts +14 -7
  49. package/src/api/app/bsky/feed/getFeedGenerator.ts +8 -2
  50. package/src/api/app/bsky/feed/getFeedGenerators.ts +16 -5
  51. package/src/api/app/bsky/feed/getLikes.ts +13 -6
  52. package/src/api/app/bsky/feed/getListFeed.ts +13 -7
  53. package/src/api/app/bsky/feed/getPostThread.ts +15 -8
  54. package/src/api/app/bsky/feed/getPosts.ts +14 -5
  55. package/src/api/app/bsky/feed/getRepostedBy.ts +13 -6
  56. package/src/api/app/bsky/feed/getSuggestedFeeds.ts +8 -2
  57. package/src/api/app/bsky/feed/getTimeline.ts +14 -8
  58. package/src/api/app/bsky/feed/searchPosts.ts +9 -5
  59. package/src/api/app/bsky/graph/getBlocks.ts +10 -9
  60. package/src/api/app/bsky/graph/getFollowers.ts +23 -15
  61. package/src/api/app/bsky/graph/getFollows.ts +23 -15
  62. package/src/api/app/bsky/graph/getList.ts +14 -8
  63. package/src/api/app/bsky/graph/getListBlocks.ts +10 -7
  64. package/src/api/app/bsky/graph/getListMutes.ts +10 -7
  65. package/src/api/app/bsky/graph/getLists.ts +9 -7
  66. package/src/api/app/bsky/graph/getMutes.ts +10 -8
  67. package/src/api/app/bsky/graph/getSuggestedFollowsByActor.ts +10 -7
  68. package/src/api/app/bsky/graph/muteActor.ts +1 -1
  69. package/src/api/app/bsky/labeler/getServices.ts +46 -0
  70. package/src/api/app/bsky/notification/listNotifications.ts +12 -8
  71. package/src/api/app/bsky/unspecced/getPopularFeedGenerators.ts +6 -3
  72. package/src/api/com/atproto/admin/getAccountInfos.ts +10 -3
  73. package/src/api/index.ts +2 -0
  74. package/src/api/util.ts +19 -4
  75. package/src/auth-verifier.ts +2 -2
  76. package/src/context.ts +20 -0
  77. package/src/data-plane/server/db/database-schema.ts +4 -4
  78. package/src/data-plane/server/db/migrations/20240226T225725627Z-labelers.ts +27 -0
  79. package/src/data-plane/server/db/migrations/index.ts +1 -0
  80. package/src/data-plane/server/db/tables/labeler.ts +16 -0
  81. package/src/data-plane/server/indexing/index.ts +4 -0
  82. package/src/data-plane/server/indexing/plugins/labeler.ts +77 -0
  83. package/src/data-plane/server/routes/interactions.ts +17 -1
  84. package/src/data-plane/server/routes/labels.ts +4 -2
  85. package/src/data-plane/server/routes/profile.ts +15 -1
  86. package/src/data-plane/server/routes/records.ts +1 -0
  87. package/src/hydration/actor.ts +6 -0
  88. package/src/hydration/hydrator.ts +171 -97
  89. package/src/hydration/label.ts +106 -20
  90. package/src/index.ts +1 -3
  91. package/src/lexicon/index.ts +22 -137
  92. package/src/lexicon/lexicons.ts +552 -1635
  93. package/src/lexicon/types/app/bsky/actor/defs.ts +57 -1
  94. package/src/lexicon/types/app/bsky/embed/record.ts +2 -0
  95. package/src/lexicon/types/app/bsky/feed/defs.ts +1 -0
  96. package/src/lexicon/types/app/bsky/graph/defs.ts +3 -0
  97. package/src/lexicon/types/app/bsky/labeler/defs.ts +93 -0
  98. package/src/lexicon/types/{com/atproto/admin/searchRepos.ts → app/bsky/labeler/getServices.ts} +8 -8
  99. package/src/lexicon/types/app/bsky/labeler/service.ts +31 -0
  100. package/src/lexicon/types/com/atproto/admin/defs.ts +0 -694
  101. package/src/lexicon/types/com/atproto/label/defs.ts +78 -0
  102. package/src/lexicon/types/com/atproto/server/describeServer.ts +18 -0
  103. package/src/proto/bsky_connect.ts +11 -0
  104. package/src/proto/bsky_pb.ts +146 -0
  105. package/src/util.ts +44 -0
  106. package/src/views/index.ts +77 -8
  107. package/src/views/types.ts +6 -3
  108. package/tests/__snapshots__/feed-generation.test.ts.snap +12 -45
  109. package/tests/_util.ts +21 -0
  110. package/tests/data-plane/__snapshots__/indexing.test.ts.snap +20 -8
  111. package/tests/label-hydration.test.ts +162 -0
  112. package/tests/views/__snapshots__/author-feed.test.ts.snap +0 -46
  113. package/tests/views/__snapshots__/block-lists.test.ts.snap +7 -17
  114. package/tests/views/__snapshots__/blocks.test.ts.snap +0 -9
  115. package/tests/views/__snapshots__/labeler-service.test.ts.snap +156 -0
  116. package/tests/views/__snapshots__/list-feed.test.ts.snap +0 -20
  117. package/tests/views/__snapshots__/mute-lists.test.ts.snap +10 -18
  118. package/tests/views/__snapshots__/mutes.test.ts.snap +0 -4
  119. package/tests/views/__snapshots__/notifications.test.ts.snap +0 -9
  120. package/tests/views/__snapshots__/posts.test.ts.snap +0 -7
  121. package/tests/views/__snapshots__/profile.test.ts.snap +40 -6
  122. package/tests/views/__snapshots__/thread.test.ts.snap +0 -38
  123. package/tests/views/__snapshots__/threadgating.test.ts.snap +2 -0
  124. package/tests/views/__snapshots__/timeline.test.ts.snap +0 -145
  125. package/tests/views/labeler-service.test.ts +156 -0
  126. package/tests/views/takedown-labels.test.ts +133 -0
  127. package/tests/views/timeline.test.ts +7 -2
  128. package/dist/data-plane/server/db/tables/moderation.d.ts +0 -42
  129. package/dist/lexicon/types/com/atproto/admin/createCommunicationTemplate.d.ts +0 -37
  130. package/dist/lexicon/types/com/atproto/admin/deleteCommunicationTemplate.d.ts +0 -25
  131. package/dist/lexicon/types/com/atproto/admin/emitModerationEvent.d.ts +0 -45
  132. package/dist/lexicon/types/com/atproto/admin/getModerationEvent.d.ts +0 -29
  133. package/dist/lexicon/types/com/atproto/admin/getRecord.d.ts +0 -31
  134. package/dist/lexicon/types/com/atproto/admin/getRepo.d.ts +0 -30
  135. package/dist/lexicon/types/com/atproto/admin/listCommunicationTemplates.d.ts +0 -31
  136. package/dist/lexicon/types/com/atproto/admin/queryModerationEvents.d.ts +0 -48
  137. package/dist/lexicon/types/com/atproto/admin/queryModerationStatuses.d.ts +0 -50
  138. package/dist/lexicon/types/com/atproto/admin/updateCommunicationTemplate.d.ts +0 -39
  139. package/src/data-plane/server/db/tables/moderation.ts +0 -59
  140. package/src/lexicon/types/com/atproto/admin/createCommunicationTemplate.ts +0 -54
  141. package/src/lexicon/types/com/atproto/admin/deleteCommunicationTemplate.ts +0 -38
  142. package/src/lexicon/types/com/atproto/admin/emitModerationEvent.ts +0 -67
  143. package/src/lexicon/types/com/atproto/admin/getModerationEvent.ts +0 -41
  144. package/src/lexicon/types/com/atproto/admin/getRecord.ts +0 -43
  145. package/src/lexicon/types/com/atproto/admin/getRepo.ts +0 -42
  146. package/src/lexicon/types/com/atproto/admin/listCommunicationTemplates.ts +0 -44
  147. package/src/lexicon/types/com/atproto/admin/queryModerationEvents.ts +0 -73
  148. package/src/lexicon/types/com/atproto/admin/queryModerationStatuses.ts +0 -74
  149. package/src/lexicon/types/com/atproto/admin/updateCommunicationTemplate.ts +0 -57
@@ -1,39 +0,0 @@
1
- import express from 'express';
2
- import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
3
- import * as ComAtprotoAdminDefs from './defs';
4
- export interface QueryParams {
5
- }
6
- export interface InputSchema {
7
- id: string;
8
- name?: string;
9
- contentMarkdown?: string;
10
- subject?: string;
11
- updatedBy?: string;
12
- disabled?: boolean;
13
- [k: string]: unknown;
14
- }
15
- export type OutputSchema = ComAtprotoAdminDefs.CommunicationTemplateView;
16
- export interface HandlerInput {
17
- encoding: 'application/json';
18
- body: InputSchema;
19
- }
20
- export interface HandlerSuccess {
21
- encoding: 'application/json';
22
- body: OutputSchema;
23
- headers?: {
24
- [key: string]: string;
25
- };
26
- }
27
- export interface HandlerError {
28
- status: number;
29
- message?: string;
30
- }
31
- export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
32
- export type HandlerReqCtx<HA extends HandlerAuth = never> = {
33
- auth: HA;
34
- params: QueryParams;
35
- input: HandlerInput;
36
- req: express.Request;
37
- res: express.Response;
38
- };
39
- export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -1,59 +0,0 @@
1
- import { Generated } from 'kysely'
2
- import {
3
- REVIEWCLOSED,
4
- REVIEWOPEN,
5
- REVIEWESCALATED,
6
- } from '../../../../lexicon/types/com/atproto/admin/defs'
7
-
8
- export const eventTableName = 'moderation_event'
9
- export const subjectStatusTableName = 'moderation_subject_status'
10
-
11
- export interface ModerationEvent {
12
- id: Generated<number>
13
- action:
14
- | 'com.atproto.admin.defs#modEventTakedown'
15
- | 'com.atproto.admin.defs#modEventAcknowledge'
16
- | 'com.atproto.admin.defs#modEventEscalate'
17
- | 'com.atproto.admin.defs#modEventComment'
18
- | 'com.atproto.admin.defs#modEventLabel'
19
- | 'com.atproto.admin.defs#modEventReport'
20
- | 'com.atproto.admin.defs#modEventMute'
21
- | 'com.atproto.admin.defs#modEventReverseTakedown'
22
- | 'com.atproto.admin.defs#modEventEmail'
23
- subjectType: 'com.atproto.admin.defs#repoRef' | 'com.atproto.repo.strongRef'
24
- subjectDid: string
25
- subjectUri: string | null
26
- subjectCid: string | null
27
- createLabelVals: string | null
28
- negateLabelVals: string | null
29
- comment: string | null
30
- createdAt: string
31
- createdBy: string
32
- durationInHours: number | null
33
- expiresAt: string | null
34
- meta: Record<string, string | boolean> | null
35
- legacyRefId: number | null
36
- }
37
-
38
- export interface ModerationSubjectStatus {
39
- id: Generated<number>
40
- did: string
41
- recordPath: string
42
- recordCid: string | null
43
- blobCids: string[] | null
44
- reviewState: typeof REVIEWCLOSED | typeof REVIEWOPEN | typeof REVIEWESCALATED
45
- createdAt: string
46
- updatedAt: string
47
- lastReviewedBy: string | null
48
- lastReviewedAt: string | null
49
- lastReportedAt: string | null
50
- muteUntil: string | null
51
- suspendUntil: string | null
52
- takendown: boolean
53
- comment: string | null
54
- }
55
-
56
- export type PartialDB = {
57
- [eventTableName]: ModerationEvent
58
- [subjectStatusTableName]: ModerationSubjectStatus
59
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import express from 'express'
5
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
- import { lexicons } from '../../../../lexicons'
7
- import { isObj, hasProp } from '../../../../util'
8
- import { CID } from 'multiformats/cid'
9
- import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
- import * as ComAtprotoAdminDefs from './defs'
11
-
12
- export interface QueryParams {}
13
-
14
- export interface InputSchema {
15
- /** Name of the template. */
16
- name: string
17
- /** Content of the template, markdown supported, can contain variable placeholders. */
18
- contentMarkdown: string
19
- /** Subject of the message, used in emails. */
20
- subject: string
21
- /** DID of the user who is creating the template. */
22
- createdBy?: string
23
- [k: string]: unknown
24
- }
25
-
26
- export type OutputSchema = ComAtprotoAdminDefs.CommunicationTemplateView
27
-
28
- export interface HandlerInput {
29
- encoding: 'application/json'
30
- body: InputSchema
31
- }
32
-
33
- export interface HandlerSuccess {
34
- encoding: 'application/json'
35
- body: OutputSchema
36
- headers?: { [key: string]: string }
37
- }
38
-
39
- export interface HandlerError {
40
- status: number
41
- message?: string
42
- }
43
-
44
- export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
45
- export type HandlerReqCtx<HA extends HandlerAuth = never> = {
46
- auth: HA
47
- params: QueryParams
48
- input: HandlerInput
49
- req: express.Request
50
- res: express.Response
51
- }
52
- export type Handler<HA extends HandlerAuth = never> = (
53
- ctx: HandlerReqCtx<HA>,
54
- ) => Promise<HandlerOutput> | HandlerOutput
@@ -1,38 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import express from 'express'
5
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
- import { lexicons } from '../../../../lexicons'
7
- import { isObj, hasProp } from '../../../../util'
8
- import { CID } from 'multiformats/cid'
9
- import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
-
11
- export interface QueryParams {}
12
-
13
- export interface InputSchema {
14
- id: string
15
- [k: string]: unknown
16
- }
17
-
18
- export interface HandlerInput {
19
- encoding: 'application/json'
20
- body: InputSchema
21
- }
22
-
23
- export interface HandlerError {
24
- status: number
25
- message?: string
26
- }
27
-
28
- export type HandlerOutput = HandlerError | void
29
- export type HandlerReqCtx<HA extends HandlerAuth = never> = {
30
- auth: HA
31
- params: QueryParams
32
- input: HandlerInput
33
- req: express.Request
34
- res: express.Response
35
- }
36
- export type Handler<HA extends HandlerAuth = never> = (
37
- ctx: HandlerReqCtx<HA>,
38
- ) => Promise<HandlerOutput> | HandlerOutput
@@ -1,67 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import express from 'express'
5
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
- import { lexicons } from '../../../../lexicons'
7
- import { isObj, hasProp } from '../../../../util'
8
- import { CID } from 'multiformats/cid'
9
- import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
- import * as ComAtprotoAdminDefs from './defs'
11
- import * as ComAtprotoRepoStrongRef from '../repo/strongRef'
12
-
13
- export interface QueryParams {}
14
-
15
- export interface InputSchema {
16
- event:
17
- | ComAtprotoAdminDefs.ModEventTakedown
18
- | ComAtprotoAdminDefs.ModEventAcknowledge
19
- | ComAtprotoAdminDefs.ModEventEscalate
20
- | ComAtprotoAdminDefs.ModEventComment
21
- | ComAtprotoAdminDefs.ModEventLabel
22
- | ComAtprotoAdminDefs.ModEventReport
23
- | ComAtprotoAdminDefs.ModEventMute
24
- | ComAtprotoAdminDefs.ModEventReverseTakedown
25
- | ComAtprotoAdminDefs.ModEventUnmute
26
- | ComAtprotoAdminDefs.ModEventEmail
27
- | ComAtprotoAdminDefs.ModEventTag
28
- | { $type: string; [k: string]: unknown }
29
- subject:
30
- | ComAtprotoAdminDefs.RepoRef
31
- | ComAtprotoRepoStrongRef.Main
32
- | { $type: string; [k: string]: unknown }
33
- subjectBlobCids?: string[]
34
- createdBy: string
35
- [k: string]: unknown
36
- }
37
-
38
- export type OutputSchema = ComAtprotoAdminDefs.ModEventView
39
-
40
- export interface HandlerInput {
41
- encoding: 'application/json'
42
- body: InputSchema
43
- }
44
-
45
- export interface HandlerSuccess {
46
- encoding: 'application/json'
47
- body: OutputSchema
48
- headers?: { [key: string]: string }
49
- }
50
-
51
- export interface HandlerError {
52
- status: number
53
- message?: string
54
- error?: 'SubjectHasAction'
55
- }
56
-
57
- export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
58
- export type HandlerReqCtx<HA extends HandlerAuth = never> = {
59
- auth: HA
60
- params: QueryParams
61
- input: HandlerInput
62
- req: express.Request
63
- res: express.Response
64
- }
65
- export type Handler<HA extends HandlerAuth = never> = (
66
- ctx: HandlerReqCtx<HA>,
67
- ) => Promise<HandlerOutput> | HandlerOutput
@@ -1,41 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import express from 'express'
5
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
- import { lexicons } from '../../../../lexicons'
7
- import { isObj, hasProp } from '../../../../util'
8
- import { CID } from 'multiformats/cid'
9
- import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
- import * as ComAtprotoAdminDefs from './defs'
11
-
12
- export interface QueryParams {
13
- id: number
14
- }
15
-
16
- export type InputSchema = undefined
17
- export type OutputSchema = ComAtprotoAdminDefs.ModEventViewDetail
18
- export type HandlerInput = undefined
19
-
20
- export interface HandlerSuccess {
21
- encoding: 'application/json'
22
- body: OutputSchema
23
- headers?: { [key: string]: string }
24
- }
25
-
26
- export interface HandlerError {
27
- status: number
28
- message?: string
29
- }
30
-
31
- export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
32
- export type HandlerReqCtx<HA extends HandlerAuth = never> = {
33
- auth: HA
34
- params: QueryParams
35
- input: HandlerInput
36
- req: express.Request
37
- res: express.Response
38
- }
39
- export type Handler<HA extends HandlerAuth = never> = (
40
- ctx: HandlerReqCtx<HA>,
41
- ) => Promise<HandlerOutput> | HandlerOutput
@@ -1,43 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import express from 'express'
5
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
- import { lexicons } from '../../../../lexicons'
7
- import { isObj, hasProp } from '../../../../util'
8
- import { CID } from 'multiformats/cid'
9
- import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
- import * as ComAtprotoAdminDefs from './defs'
11
-
12
- export interface QueryParams {
13
- uri: string
14
- cid?: string
15
- }
16
-
17
- export type InputSchema = undefined
18
- export type OutputSchema = ComAtprotoAdminDefs.RecordViewDetail
19
- export type HandlerInput = undefined
20
-
21
- export interface HandlerSuccess {
22
- encoding: 'application/json'
23
- body: OutputSchema
24
- headers?: { [key: string]: string }
25
- }
26
-
27
- export interface HandlerError {
28
- status: number
29
- message?: string
30
- error?: 'RecordNotFound'
31
- }
32
-
33
- export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
34
- export type HandlerReqCtx<HA extends HandlerAuth = never> = {
35
- auth: HA
36
- params: QueryParams
37
- input: HandlerInput
38
- req: express.Request
39
- res: express.Response
40
- }
41
- export type Handler<HA extends HandlerAuth = never> = (
42
- ctx: HandlerReqCtx<HA>,
43
- ) => Promise<HandlerOutput> | HandlerOutput
@@ -1,42 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import express from 'express'
5
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
- import { lexicons } from '../../../../lexicons'
7
- import { isObj, hasProp } from '../../../../util'
8
- import { CID } from 'multiformats/cid'
9
- import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
- import * as ComAtprotoAdminDefs from './defs'
11
-
12
- export interface QueryParams {
13
- did: string
14
- }
15
-
16
- export type InputSchema = undefined
17
- export type OutputSchema = ComAtprotoAdminDefs.RepoViewDetail
18
- export type HandlerInput = undefined
19
-
20
- export interface HandlerSuccess {
21
- encoding: 'application/json'
22
- body: OutputSchema
23
- headers?: { [key: string]: string }
24
- }
25
-
26
- export interface HandlerError {
27
- status: number
28
- message?: string
29
- error?: 'RepoNotFound'
30
- }
31
-
32
- export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
33
- export type HandlerReqCtx<HA extends HandlerAuth = never> = {
34
- auth: HA
35
- params: QueryParams
36
- input: HandlerInput
37
- req: express.Request
38
- res: express.Response
39
- }
40
- export type Handler<HA extends HandlerAuth = never> = (
41
- ctx: HandlerReqCtx<HA>,
42
- ) => Promise<HandlerOutput> | HandlerOutput
@@ -1,44 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import express from 'express'
5
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
- import { lexicons } from '../../../../lexicons'
7
- import { isObj, hasProp } from '../../../../util'
8
- import { CID } from 'multiformats/cid'
9
- import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
- import * as ComAtprotoAdminDefs from './defs'
11
-
12
- export interface QueryParams {}
13
-
14
- export type InputSchema = undefined
15
-
16
- export interface OutputSchema {
17
- communicationTemplates: ComAtprotoAdminDefs.CommunicationTemplateView[]
18
- [k: string]: unknown
19
- }
20
-
21
- export type HandlerInput = undefined
22
-
23
- export interface HandlerSuccess {
24
- encoding: 'application/json'
25
- body: OutputSchema
26
- headers?: { [key: string]: string }
27
- }
28
-
29
- export interface HandlerError {
30
- status: number
31
- message?: string
32
- }
33
-
34
- export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
35
- export type HandlerReqCtx<HA extends HandlerAuth = never> = {
36
- auth: HA
37
- params: QueryParams
38
- input: HandlerInput
39
- req: express.Request
40
- res: express.Response
41
- }
42
- export type Handler<HA extends HandlerAuth = never> = (
43
- ctx: HandlerReqCtx<HA>,
44
- ) => Promise<HandlerOutput> | HandlerOutput
@@ -1,73 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import express from 'express'
5
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
- import { lexicons } from '../../../../lexicons'
7
- import { isObj, hasProp } from '../../../../util'
8
- import { CID } from 'multiformats/cid'
9
- import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
- import * as ComAtprotoAdminDefs from './defs'
11
-
12
- export interface QueryParams {
13
- /** The types of events (fully qualified string in the format of com.atproto.admin#modEvent<name>) to filter by. If not specified, all events are returned. */
14
- types?: string[]
15
- createdBy?: string
16
- /** Sort direction for the events. Defaults to descending order of created at timestamp. */
17
- sortDirection: 'asc' | 'desc'
18
- /** Retrieve events created after a given timestamp */
19
- createdAfter?: string
20
- /** Retrieve events created before a given timestamp */
21
- createdBefore?: string
22
- subject?: string
23
- /** If true, events on all record types (posts, lists, profile etc.) owned by the did are returned */
24
- includeAllUserRecords: boolean
25
- limit: number
26
- /** If true, only events with comments are returned */
27
- hasComment?: boolean
28
- /** If specified, only events with comments containing the keyword are returned */
29
- comment?: string
30
- /** If specified, only events where all of these labels were added are returned */
31
- addedLabels?: string[]
32
- /** If specified, only events where all of these labels were removed are returned */
33
- removedLabels?: string[]
34
- /** If specified, only events where all of these tags were added are returned */
35
- addedTags?: string[]
36
- /** If specified, only events where all of these tags were removed are returned */
37
- removedTags?: string[]
38
- reportTypes?: string[]
39
- cursor?: string
40
- }
41
-
42
- export type InputSchema = undefined
43
-
44
- export interface OutputSchema {
45
- cursor?: string
46
- events: ComAtprotoAdminDefs.ModEventView[]
47
- [k: string]: unknown
48
- }
49
-
50
- export type HandlerInput = undefined
51
-
52
- export interface HandlerSuccess {
53
- encoding: 'application/json'
54
- body: OutputSchema
55
- headers?: { [key: string]: string }
56
- }
57
-
58
- export interface HandlerError {
59
- status: number
60
- message?: string
61
- }
62
-
63
- export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
64
- export type HandlerReqCtx<HA extends HandlerAuth = never> = {
65
- auth: HA
66
- params: QueryParams
67
- input: HandlerInput
68
- req: express.Request
69
- res: express.Response
70
- }
71
- export type Handler<HA extends HandlerAuth = never> = (
72
- ctx: HandlerReqCtx<HA>,
73
- ) => Promise<HandlerOutput> | HandlerOutput
@@ -1,74 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import express from 'express'
5
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
- import { lexicons } from '../../../../lexicons'
7
- import { isObj, hasProp } from '../../../../util'
8
- import { CID } from 'multiformats/cid'
9
- import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
- import * as ComAtprotoAdminDefs from './defs'
11
-
12
- export interface QueryParams {
13
- subject?: string
14
- /** Search subjects by keyword from comments */
15
- comment?: string
16
- /** Search subjects reported after a given timestamp */
17
- reportedAfter?: string
18
- /** Search subjects reported before a given timestamp */
19
- reportedBefore?: string
20
- /** Search subjects reviewed after a given timestamp */
21
- reviewedAfter?: string
22
- /** Search subjects reviewed before a given timestamp */
23
- reviewedBefore?: string
24
- /** By default, we don't include muted subjects in the results. Set this to true to include them. */
25
- includeMuted?: boolean
26
- /** Specify when fetching subjects in a certain state */
27
- reviewState?: string
28
- ignoreSubjects?: string[]
29
- /** Get all subject statuses that were reviewed by a specific moderator */
30
- lastReviewedBy?: string
31
- sortField: 'lastReviewedAt' | 'lastReportedAt'
32
- sortDirection: 'asc' | 'desc'
33
- /** Get subjects that were taken down */
34
- takendown?: boolean
35
- /** Get subjects in unresolved appealed status */
36
- appealed?: boolean
37
- limit: number
38
- tags?: string[]
39
- excludeTags?: string[]
40
- cursor?: string
41
- }
42
-
43
- export type InputSchema = undefined
44
-
45
- export interface OutputSchema {
46
- cursor?: string
47
- subjectStatuses: ComAtprotoAdminDefs.SubjectStatusView[]
48
- [k: string]: unknown
49
- }
50
-
51
- export type HandlerInput = undefined
52
-
53
- export interface HandlerSuccess {
54
- encoding: 'application/json'
55
- body: OutputSchema
56
- headers?: { [key: string]: string }
57
- }
58
-
59
- export interface HandlerError {
60
- status: number
61
- message?: string
62
- }
63
-
64
- export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
65
- export type HandlerReqCtx<HA extends HandlerAuth = never> = {
66
- auth: HA
67
- params: QueryParams
68
- input: HandlerInput
69
- req: express.Request
70
- res: express.Response
71
- }
72
- export type Handler<HA extends HandlerAuth = never> = (
73
- ctx: HandlerReqCtx<HA>,
74
- ) => Promise<HandlerOutput> | HandlerOutput
@@ -1,57 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import express from 'express'
5
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
- import { lexicons } from '../../../../lexicons'
7
- import { isObj, hasProp } from '../../../../util'
8
- import { CID } from 'multiformats/cid'
9
- import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
- import * as ComAtprotoAdminDefs from './defs'
11
-
12
- export interface QueryParams {}
13
-
14
- export interface InputSchema {
15
- /** ID of the template to be updated. */
16
- id: string
17
- /** Name of the template. */
18
- name?: string
19
- /** Content of the template, markdown supported, can contain variable placeholders. */
20
- contentMarkdown?: string
21
- /** Subject of the message, used in emails. */
22
- subject?: string
23
- /** DID of the user who is updating the template. */
24
- updatedBy?: string
25
- disabled?: boolean
26
- [k: string]: unknown
27
- }
28
-
29
- export type OutputSchema = ComAtprotoAdminDefs.CommunicationTemplateView
30
-
31
- export interface HandlerInput {
32
- encoding: 'application/json'
33
- body: InputSchema
34
- }
35
-
36
- export interface HandlerSuccess {
37
- encoding: 'application/json'
38
- body: OutputSchema
39
- headers?: { [key: string]: string }
40
- }
41
-
42
- export interface HandlerError {
43
- status: number
44
- message?: string
45
- }
46
-
47
- export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
48
- export type HandlerReqCtx<HA extends HandlerAuth = never> = {
49
- auth: HA
50
- params: QueryParams
51
- input: HandlerInput
52
- req: express.Request
53
- res: express.Response
54
- }
55
- export type Handler<HA extends HandlerAuth = never> = (
56
- ctx: HandlerReqCtx<HA>,
57
- ) => Promise<HandlerOutput> | HandlerOutput