@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.
- package/CHANGELOG.md +19 -0
- package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.js +6 -2
- package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.js +2 -1
- package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
- package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/registerPush.js +2 -1
- package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
- package/dist/api/com/atproto/admin/sendEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/sendEmail.js +2 -1
- package/dist/api/com/atproto/admin/sendEmail.js.map +1 -1
- package/dist/api/com/atproto/repo/uploadBlob.js +1 -1
- package/dist/api/com/atproto/repo/uploadBlob.js.map +1 -1
- package/dist/api/com/atproto/server/createAccount.js +2 -2
- package/dist/api/com/atproto/server/createAccount.js.map +1 -1
- package/dist/api/com/atproto/server/getServiceAuth.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getServiceAuth.js +13 -0
- package/dist/api/com/atproto/server/getServiceAuth.js.map +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +0 -2
- package/dist/api/index.js.map +1 -1
- package/dist/auth-verifier.d.ts +7 -5
- package/dist/auth-verifier.d.ts.map +1 -1
- package/dist/auth-verifier.js +25 -6
- package/dist/auth-verifier.js.map +1 -1
- package/dist/context.d.ts +2 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +4 -3
- package/dist/context.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +13 -36
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +17 -38
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/label/defs.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/server/getServiceAuth.d.ts +5 -0
- package/dist/lexicon/types/com/atproto/server/getServiceAuth.d.ts.map +1 -1
- package/dist/pipethrough.d.ts +11 -2
- package/dist/pipethrough.d.ts.map +1 -1
- package/dist/pipethrough.js +41 -14
- package/dist/pipethrough.js.map +1 -1
- package/dist/read-after-write/viewer.d.ts +1 -1
- package/dist/read-after-write/viewer.d.ts.map +1 -1
- package/dist/read-after-write/viewer.js +5 -4
- package/dist/read-after-write/viewer.js.map +1 -1
- package/package.json +6 -6
- package/src/api/app/bsky/feed/getFeed.ts +9 -2
- package/src/api/app/bsky/feed/getPostThread.ts +2 -1
- package/src/api/app/bsky/notification/registerPush.ts +6 -1
- package/src/api/com/atproto/admin/sendEmail.ts +3 -1
- package/src/api/com/atproto/repo/uploadBlob.ts +1 -1
- package/src/api/com/atproto/server/createAccount.ts +2 -2
- package/src/api/com/atproto/server/getServiceAuth.ts +20 -1
- package/src/api/index.ts +0 -2
- package/src/auth-verifier.ts +32 -10
- package/src/context.ts +4 -3
- package/src/lexicon/lexicons.ts +20 -39
- package/src/lexicon/types/app/bsky/feed/defs.ts +1 -1
- package/src/lexicon/types/com/atproto/label/defs.ts +1 -1
- package/src/lexicon/types/com/atproto/server/getServiceAuth.ts +5 -0
- package/src/pipethrough.ts +49 -15
- package/src/read-after-write/viewer.ts +8 -4
- package/tests/moderator-auth.test.ts +4 -0
- package/tests/proxied/notif.test.ts +1 -0
- package/tests/proxied/proxy-header.test.ts +1 -0
- package/dist/api/chat/index.d.ts +0 -4
- package/dist/api/chat/index.d.ts.map +0 -1
- package/dist/api/chat/index.js +0 -91
- package/dist/api/chat/index.js.map +0 -1
- package/dist/lexicon/types/app/bsky/feed/detach.d.ts +0 -15
- package/dist/lexicon/types/app/bsky/feed/detach.d.ts.map +0 -1
- package/dist/lexicon/types/app/bsky/feed/detach.js +0 -17
- package/dist/lexicon/types/app/bsky/feed/detach.js.map +0 -1
- package/src/api/chat/index.ts +0 -90
- package/src/lexicon/types/app/bsky/feed/detach.ts +0 -29
package/src/api/chat/index.ts
DELETED
@@ -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
|
-
}
|