@atproto/pds 0.4.155 → 0.4.157

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 (48) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/lexicon/index.d.ts +15 -0
  3. package/dist/lexicon/index.d.ts.map +1 -1
  4. package/dist/lexicon/index.js +40 -1
  5. package/dist/lexicon/index.js.map +1 -1
  6. package/dist/lexicon/lexicons.d.ts +11024 -10188
  7. package/dist/lexicon/lexicons.d.ts.map +1 -1
  8. package/dist/lexicon/lexicons.js +448 -0
  9. package/dist/lexicon/lexicons.js.map +1 -1
  10. package/dist/lexicon/types/tools/ozone/safelink/addRule.d.ts +47 -0
  11. package/dist/lexicon/types/tools/ozone/safelink/addRule.d.ts.map +1 -0
  12. package/dist/lexicon/types/tools/ozone/safelink/addRule.js +7 -0
  13. package/dist/lexicon/types/tools/ozone/safelink/addRule.js.map +1 -0
  14. package/dist/lexicon/types/tools/ozone/safelink/defs.d.ts +47 -0
  15. package/dist/lexicon/types/tools/ozone/safelink/defs.d.ts.map +1 -0
  16. package/dist/lexicon/types/tools/ozone/safelink/defs.js +25 -0
  17. package/dist/lexicon/types/tools/ozone/safelink/defs.js.map +1 -0
  18. package/dist/lexicon/types/tools/ozone/safelink/queryEvents.d.ts +51 -0
  19. package/dist/lexicon/types/tools/ozone/safelink/queryEvents.d.ts.map +1 -0
  20. package/dist/lexicon/types/tools/ozone/safelink/queryEvents.js +7 -0
  21. package/dist/lexicon/types/tools/ozone/safelink/queryEvents.js.map +1 -0
  22. package/dist/lexicon/types/tools/ozone/safelink/queryRules.d.ts +57 -0
  23. package/dist/lexicon/types/tools/ozone/safelink/queryRules.d.ts.map +1 -0
  24. package/dist/lexicon/types/tools/ozone/safelink/queryRules.js +7 -0
  25. package/dist/lexicon/types/tools/ozone/safelink/queryRules.js.map +1 -0
  26. package/dist/lexicon/types/tools/ozone/safelink/removeRule.d.ts +45 -0
  27. package/dist/lexicon/types/tools/ozone/safelink/removeRule.d.ts.map +1 -0
  28. package/dist/lexicon/types/tools/ozone/safelink/removeRule.js +7 -0
  29. package/dist/lexicon/types/tools/ozone/safelink/removeRule.js.map +1 -0
  30. package/dist/lexicon/types/tools/ozone/safelink/updateRule.d.ts +47 -0
  31. package/dist/lexicon/types/tools/ozone/safelink/updateRule.d.ts.map +1 -0
  32. package/dist/lexicon/types/tools/ozone/safelink/updateRule.js +7 -0
  33. package/dist/lexicon/types/tools/ozone/safelink/updateRule.js.map +1 -0
  34. package/dist/pipethrough.js +5 -0
  35. package/dist/pipethrough.js.map +1 -1
  36. package/package.json +5 -5
  37. package/src/lexicon/index.ts +70 -0
  38. package/src/lexicon/lexicons.ts +455 -0
  39. package/src/lexicon/types/tools/ozone/safelink/addRule.ts +64 -0
  40. package/src/lexicon/types/tools/ozone/safelink/defs.ts +76 -0
  41. package/src/lexicon/types/tools/ozone/safelink/queryEvents.ts +68 -0
  42. package/src/lexicon/types/tools/ozone/safelink/queryRules.ts +74 -0
  43. package/src/lexicon/types/tools/ozone/safelink/removeRule.ts +62 -0
  44. package/src/lexicon/types/tools/ozone/safelink/updateRule.ts +64 -0
  45. package/src/pipethrough.ts +5 -0
  46. package/tests/proxied/__snapshots__/feedgen.test.ts.snap +15 -0
  47. package/tests/proxied/__snapshots__/views.test.ts.snap +470 -0
  48. package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,74 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
14
+ import type * as ToolsOzoneSafelinkDefs from './defs.js'
15
+
16
+ const is$typed = _is$typed,
17
+ validate = _validate
18
+ const id = 'tools.ozone.safelink.queryRules'
19
+
20
+ export interface QueryParams {}
21
+
22
+ export interface InputSchema {
23
+ /** Cursor for pagination */
24
+ cursor?: string
25
+ /** Maximum number of results to return */
26
+ limit: number
27
+ /** Filter by specific URLs or domains */
28
+ urls?: string[]
29
+ /** Filter by pattern type */
30
+ patternType?: string
31
+ /** Filter by action types */
32
+ actions?: string[]
33
+ /** Filter by reason type */
34
+ reason?: string
35
+ /** Filter by rule creator */
36
+ createdBy?: string
37
+ /** Sort direction */
38
+ sortDirection: 'asc' | 'desc' | (string & {})
39
+ }
40
+
41
+ export interface OutputSchema {
42
+ /** Next cursor for pagination. Only present if there are more results. */
43
+ cursor?: string
44
+ rules: ToolsOzoneSafelinkDefs.UrlRule[]
45
+ }
46
+
47
+ export interface HandlerInput {
48
+ encoding: 'application/json'
49
+ body: InputSchema
50
+ }
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
+ resetRouteRateLimits: () => Promise<void>
71
+ }
72
+ export type Handler<HA extends HandlerAuth = never> = (
73
+ ctx: HandlerReqCtx<HA>,
74
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -0,0 +1,62 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
14
+ import type * as ToolsOzoneSafelinkDefs from './defs.js'
15
+
16
+ const is$typed = _is$typed,
17
+ validate = _validate
18
+ const id = 'tools.ozone.safelink.removeRule'
19
+
20
+ export interface QueryParams {}
21
+
22
+ export interface InputSchema {
23
+ /** The URL or domain to remove the rule for */
24
+ url: string
25
+ pattern: ToolsOzoneSafelinkDefs.PatternType
26
+ /** Optional comment about why the rule is being removed */
27
+ comment?: string
28
+ /** Optional DID of the user. Only respected when using admin auth. */
29
+ createdBy?: string
30
+ }
31
+
32
+ export type OutputSchema = ToolsOzoneSafelinkDefs.Event
33
+
34
+ export interface HandlerInput {
35
+ encoding: 'application/json'
36
+ body: InputSchema
37
+ }
38
+
39
+ export interface HandlerSuccess {
40
+ encoding: 'application/json'
41
+ body: OutputSchema
42
+ headers?: { [key: string]: string }
43
+ }
44
+
45
+ export interface HandlerError {
46
+ status: number
47
+ message?: string
48
+ error?: 'RuleNotFound'
49
+ }
50
+
51
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
52
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
53
+ auth: HA
54
+ params: QueryParams
55
+ input: HandlerInput
56
+ req: express.Request
57
+ res: express.Response
58
+ resetRouteRateLimits: () => Promise<void>
59
+ }
60
+ export type Handler<HA extends HandlerAuth = never> = (
61
+ ctx: HandlerReqCtx<HA>,
62
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -0,0 +1,64 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
14
+ import type * as ToolsOzoneSafelinkDefs from './defs.js'
15
+
16
+ const is$typed = _is$typed,
17
+ validate = _validate
18
+ const id = 'tools.ozone.safelink.updateRule'
19
+
20
+ export interface QueryParams {}
21
+
22
+ export interface InputSchema {
23
+ /** The URL or domain to update the rule for */
24
+ url: string
25
+ pattern: ToolsOzoneSafelinkDefs.PatternType
26
+ action: ToolsOzoneSafelinkDefs.ActionType
27
+ reason: ToolsOzoneSafelinkDefs.ReasonType
28
+ /** Optional comment about the update */
29
+ comment?: string
30
+ /** Optional DID to credit as the creator. Only respected for admin_token authentication. */
31
+ createdBy?: string
32
+ }
33
+
34
+ export type OutputSchema = ToolsOzoneSafelinkDefs.Event
35
+
36
+ export interface HandlerInput {
37
+ encoding: 'application/json'
38
+ body: InputSchema
39
+ }
40
+
41
+ export interface HandlerSuccess {
42
+ encoding: 'application/json'
43
+ body: OutputSchema
44
+ headers?: { [key: string]: string }
45
+ }
46
+
47
+ export interface HandlerError {
48
+ status: number
49
+ message?: string
50
+ error?: 'RuleNotFound'
51
+ }
52
+
53
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
54
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
55
+ auth: HA
56
+ params: QueryParams
57
+ input: HandlerInput
58
+ req: express.Request
59
+ res: express.Response
60
+ resetRouteRateLimits: () => Promise<void>
61
+ }
62
+ export type Handler<HA extends HandlerAuth = never> = (
63
+ ctx: HandlerReqCtx<HA>,
64
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -535,6 +535,11 @@ const defaultService = (
535
535
  case ids.ToolsOzoneVerificationListVerifications:
536
536
  case ids.ToolsOzoneVerificationGrantVerifications:
537
537
  case ids.ToolsOzoneVerificationRevokeVerifications:
538
+ case ids.ToolsOzoneSafelinkAddRule:
539
+ case ids.ToolsOzoneSafelinkUpdateRule:
540
+ case ids.ToolsOzoneSafelinkRemoveRule:
541
+ case ids.ToolsOzoneSafelinkQueryEvents:
542
+ case ids.ToolsOzoneSafelinkQueryRules:
538
543
  return ctx.cfg.modService
539
544
  case ids.ComAtprotoModerationCreateReport:
540
545
  return ctx.cfg.reportService
@@ -6,6 +6,11 @@ Object {
6
6
  Object {
7
7
  "post": Object {
8
8
  "author": Object {
9
+ "associated": Object {
10
+ "activitySubscription": Object {
11
+ "allowSubscriptions": "followers",
12
+ },
13
+ },
9
14
  "avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
10
15
  "createdAt": "1970-01-01T00:00:00.000Z",
11
16
  "did": "user(0)",
@@ -70,6 +75,11 @@ Object {
70
75
  Object {
71
76
  "post": Object {
72
77
  "author": Object {
78
+ "associated": Object {
79
+ "activitySubscription": Object {
80
+ "allowSubscriptions": "followers",
81
+ },
82
+ },
73
83
  "did": "user(2)",
74
84
  "handle": "carol.test",
75
85
  "labels": Array [],
@@ -102,6 +112,11 @@ Object {
102
112
  "record": Object {
103
113
  "$type": "app.bsky.embed.record#viewRecord",
104
114
  "author": Object {
115
+ "associated": Object {
116
+ "activitySubscription": Object {
117
+ "allowSubscriptions": "followers",
118
+ },
119
+ },
105
120
  "avatar": "https://bsky.public.url/img/avatar/plain/user(5)/cids(1)@jpeg",
106
121
  "createdAt": "1970-01-01T00:00:00.000Z",
107
122
  "did": "user(4)",