@atproto/pds 0.4.44 → 0.4.46

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
  3. package/dist/api/app/bsky/feed/getFeed.js +6 -2
  4. package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
  5. package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
  6. package/dist/api/app/bsky/feed/getPostThread.js +2 -1
  7. package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
  8. package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
  9. package/dist/api/app/bsky/notification/registerPush.js +2 -1
  10. package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
  11. package/dist/api/com/atproto/admin/sendEmail.d.ts.map +1 -1
  12. package/dist/api/com/atproto/admin/sendEmail.js +2 -1
  13. package/dist/api/com/atproto/admin/sendEmail.js.map +1 -1
  14. package/dist/api/com/atproto/repo/uploadBlob.js +1 -1
  15. package/dist/api/com/atproto/repo/uploadBlob.js.map +1 -1
  16. package/dist/api/com/atproto/server/createAccount.js +2 -2
  17. package/dist/api/com/atproto/server/createAccount.js.map +1 -1
  18. package/dist/api/com/atproto/server/getServiceAuth.d.ts.map +1 -1
  19. package/dist/api/com/atproto/server/getServiceAuth.js +13 -0
  20. package/dist/api/com/atproto/server/getServiceAuth.js.map +1 -1
  21. package/dist/api/index.d.ts.map +1 -1
  22. package/dist/api/index.js +0 -2
  23. package/dist/api/index.js.map +1 -1
  24. package/dist/auth-verifier.d.ts +7 -5
  25. package/dist/auth-verifier.d.ts.map +1 -1
  26. package/dist/auth-verifier.js +25 -6
  27. package/dist/auth-verifier.js.map +1 -1
  28. package/dist/context.d.ts +2 -2
  29. package/dist/context.d.ts.map +1 -1
  30. package/dist/context.js +4 -3
  31. package/dist/context.js.map +1 -1
  32. package/dist/lexicon/lexicons.d.ts +13 -36
  33. package/dist/lexicon/lexicons.d.ts.map +1 -1
  34. package/dist/lexicon/lexicons.js +17 -38
  35. package/dist/lexicon/lexicons.js.map +1 -1
  36. package/dist/lexicon/types/app/bsky/feed/defs.d.ts +1 -1
  37. package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
  38. package/dist/lexicon/types/com/atproto/label/defs.d.ts +1 -1
  39. package/dist/lexicon/types/com/atproto/server/getServiceAuth.d.ts +5 -0
  40. package/dist/lexicon/types/com/atproto/server/getServiceAuth.d.ts.map +1 -1
  41. package/dist/pipethrough.d.ts +11 -2
  42. package/dist/pipethrough.d.ts.map +1 -1
  43. package/dist/pipethrough.js +41 -14
  44. package/dist/pipethrough.js.map +1 -1
  45. package/dist/read-after-write/viewer.d.ts +1 -1
  46. package/dist/read-after-write/viewer.d.ts.map +1 -1
  47. package/dist/read-after-write/viewer.js +5 -4
  48. package/dist/read-after-write/viewer.js.map +1 -1
  49. package/package.json +6 -6
  50. package/src/api/app/bsky/feed/getFeed.ts +9 -2
  51. package/src/api/app/bsky/feed/getPostThread.ts +2 -1
  52. package/src/api/app/bsky/notification/registerPush.ts +6 -1
  53. package/src/api/com/atproto/admin/sendEmail.ts +3 -1
  54. package/src/api/com/atproto/repo/uploadBlob.ts +1 -1
  55. package/src/api/com/atproto/server/createAccount.ts +2 -2
  56. package/src/api/com/atproto/server/getServiceAuth.ts +20 -1
  57. package/src/api/index.ts +0 -2
  58. package/src/auth-verifier.ts +32 -10
  59. package/src/context.ts +4 -3
  60. package/src/lexicon/lexicons.ts +20 -39
  61. package/src/lexicon/types/app/bsky/feed/defs.ts +1 -1
  62. package/src/lexicon/types/com/atproto/label/defs.ts +1 -1
  63. package/src/lexicon/types/com/atproto/server/getServiceAuth.ts +5 -0
  64. package/src/pipethrough.ts +49 -15
  65. package/src/read-after-write/viewer.ts +8 -4
  66. package/tests/moderator-auth.test.ts +4 -0
  67. package/tests/proxied/notif.test.ts +1 -0
  68. package/tests/proxied/proxy-header.test.ts +1 -0
  69. package/dist/api/chat/index.d.ts +0 -4
  70. package/dist/api/chat/index.d.ts.map +0 -1
  71. package/dist/api/chat/index.js +0 -91
  72. package/dist/api/chat/index.js.map +0 -1
  73. package/dist/lexicon/types/app/bsky/feed/detach.d.ts +0 -15
  74. package/dist/lexicon/types/app/bsky/feed/detach.d.ts.map +0 -1
  75. package/dist/lexicon/types/app/bsky/feed/detach.js +0 -17
  76. package/dist/lexicon/types/app/bsky/feed/detach.js.map +0 -1
  77. package/src/api/chat/index.ts +0 -90
  78. package/src/lexicon/types/app/bsky/feed/detach.ts +0 -29
@@ -1,90 +0,0 @@
1
- import AppContext from '../../context'
2
- import { Server } from '../../lexicon'
3
- import { pipethrough, pipethroughProcedure } from '../../pipethrough'
4
-
5
- export default function (server: Server, ctx: AppContext) {
6
- server.chat.bsky.actor.deleteAccount({
7
- auth: ctx.authVerifier.accessPrivileged(),
8
- handler: async ({ req, auth }) => {
9
- return pipethroughProcedure(ctx, req, auth.credentials.did)
10
- },
11
- })
12
- server.chat.bsky.actor.exportAccountData({
13
- auth: ctx.authVerifier.accessPrivileged(),
14
- handler: ({ req, auth }) => {
15
- return pipethrough(ctx, req, auth.credentials.did)
16
- },
17
- })
18
- server.chat.bsky.convo.deleteMessageForSelf({
19
- auth: ctx.authVerifier.accessPrivileged(),
20
- handler: ({ req, auth, input }) => {
21
- return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
22
- },
23
- })
24
- server.chat.bsky.convo.getConvo({
25
- auth: ctx.authVerifier.accessPrivileged(),
26
- handler: ({ req, auth }) => {
27
- return pipethrough(ctx, req, auth.credentials.did)
28
- },
29
- })
30
- server.chat.bsky.convo.getConvoForMembers({
31
- auth: ctx.authVerifier.accessPrivileged(),
32
- handler: ({ req, auth }) => {
33
- return pipethrough(ctx, req, auth.credentials.did)
34
- },
35
- })
36
- server.chat.bsky.convo.getLog({
37
- auth: ctx.authVerifier.accessPrivileged(),
38
- handler: ({ req, auth }) => {
39
- return pipethrough(ctx, req, auth.credentials.did)
40
- },
41
- })
42
- server.chat.bsky.convo.getMessages({
43
- auth: ctx.authVerifier.accessPrivileged(),
44
- handler: ({ req, auth }) => {
45
- return pipethrough(ctx, req, auth.credentials.did)
46
- },
47
- })
48
- server.chat.bsky.convo.leaveConvo({
49
- auth: ctx.authVerifier.accessPrivileged(),
50
- handler: ({ req, auth, input }) => {
51
- return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
52
- },
53
- })
54
- server.chat.bsky.convo.listConvos({
55
- auth: ctx.authVerifier.accessPrivileged(),
56
- handler: ({ req, auth }) => {
57
- return pipethrough(ctx, req, auth.credentials.did)
58
- },
59
- })
60
- server.chat.bsky.convo.muteConvo({
61
- auth: ctx.authVerifier.accessPrivileged(),
62
- handler: ({ req, auth, input }) => {
63
- return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
64
- },
65
- })
66
- server.chat.bsky.convo.sendMessage({
67
- auth: ctx.authVerifier.accessPrivileged(),
68
- handler: ({ req, auth, input }) => {
69
- return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
70
- },
71
- })
72
- server.chat.bsky.convo.sendMessageBatch({
73
- auth: ctx.authVerifier.accessPrivileged(),
74
- handler: ({ req, auth, input }) => {
75
- return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
76
- },
77
- })
78
- server.chat.bsky.convo.unmuteConvo({
79
- auth: ctx.authVerifier.accessPrivileged(),
80
- handler: ({ req, auth, input }) => {
81
- return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
82
- },
83
- })
84
- server.chat.bsky.convo.updateRead({
85
- auth: ctx.authVerifier.accessPrivileged(),
86
- handler: ({ req, auth, input }) => {
87
- return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
88
- },
89
- })
90
- }
@@ -1,29 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
5
- import { lexicons } from '../../../../lexicons'
6
- import { isObj, hasProp } from '../../../../util'
7
- import { CID } from 'multiformats/cid'
8
-
9
- export interface Record {
10
- /** Reference (AT-URI) to the post record. */
11
- post: string
12
- /** List of detached post URIs. */
13
- targets: string[]
14
- updatedAt: string
15
- [k: string]: unknown
16
- }
17
-
18
- export function isRecord(v: unknown): v is Record {
19
- return (
20
- isObj(v) &&
21
- hasProp(v, '$type') &&
22
- (v.$type === 'app.bsky.feed.detach#main' ||
23
- v.$type === 'app.bsky.feed.detach')
24
- )
25
- }
26
-
27
- export function validateRecord(v: unknown): ValidationResult {
28
- return lexicons.validate('app.bsky.feed.detach#main', v)
29
- }