@atproto/api 0.13.9 → 0.13.11

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 (35) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/client/index.d.ts +15 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +34 -2
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +176 -0
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +176 -0
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/tools/ozone/signature/defs.d.ts +12 -0
  11. package/dist/client/types/tools/ozone/signature/defs.d.ts.map +1 -0
  12. package/dist/client/types/tools/ozone/signature/defs.js +16 -0
  13. package/dist/client/types/tools/ozone/signature/defs.js.map +1 -0
  14. package/dist/client/types/tools/ozone/signature/findCorrelation.d.ts +24 -0
  15. package/dist/client/types/tools/ozone/signature/findCorrelation.d.ts.map +1 -0
  16. package/dist/client/types/tools/ozone/signature/findCorrelation.js +8 -0
  17. package/dist/client/types/tools/ozone/signature/findCorrelation.js.map +1 -0
  18. package/dist/client/types/tools/ozone/signature/findRelatedAccounts.d.ts +36 -0
  19. package/dist/client/types/tools/ozone/signature/findRelatedAccounts.d.ts.map +1 -0
  20. package/dist/client/types/tools/ozone/signature/findRelatedAccounts.js +20 -0
  21. package/dist/client/types/tools/ozone/signature/findRelatedAccounts.js.map +1 -0
  22. package/dist/client/types/tools/ozone/signature/searchAccounts.d.ts +27 -0
  23. package/dist/client/types/tools/ozone/signature/searchAccounts.d.ts.map +1 -0
  24. package/dist/client/types/tools/ozone/signature/searchAccounts.js +8 -0
  25. package/dist/client/types/tools/ozone/signature/searchAccounts.js.map +1 -0
  26. package/dist/moderation/subjects/post.js +11 -0
  27. package/dist/moderation/subjects/post.js.map +1 -1
  28. package/package.json +1 -1
  29. package/src/client/index.ts +54 -0
  30. package/src/client/lexicons.ts +180 -0
  31. package/src/client/types/tools/ozone/signature/defs.ts +25 -0
  32. package/src/client/types/tools/ozone/signature/findCorrelation.ts +35 -0
  33. package/src/client/types/tools/ozone/signature/findRelatedAccounts.ts +60 -0
  34. package/src/client/types/tools/ozone/signature/searchAccounts.ts +38 -0
  35. package/src/moderation/subjects/post.ts +14 -0
@@ -0,0 +1,60 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import { CID } from 'multiformats/cid'
9
+ import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs'
10
+ import * as ToolsOzoneSignatureDefs from './defs'
11
+
12
+ export interface QueryParams {
13
+ did: string
14
+ cursor?: string
15
+ limit?: number
16
+ }
17
+
18
+ export type InputSchema = undefined
19
+
20
+ export interface OutputSchema {
21
+ cursor?: string
22
+ accounts: RelatedAccount[]
23
+ [k: string]: unknown
24
+ }
25
+
26
+ export interface CallOptions {
27
+ signal?: AbortSignal
28
+ headers?: HeadersMap
29
+ }
30
+
31
+ export interface Response {
32
+ success: boolean
33
+ headers: HeadersMap
34
+ data: OutputSchema
35
+ }
36
+
37
+ export function toKnownErr(e: any) {
38
+ return e
39
+ }
40
+
41
+ export interface RelatedAccount {
42
+ account: ComAtprotoAdminDefs.AccountView
43
+ similarities?: ToolsOzoneSignatureDefs.SigDetail[]
44
+ [k: string]: unknown
45
+ }
46
+
47
+ export function isRelatedAccount(v: unknown): v is RelatedAccount {
48
+ return (
49
+ isObj(v) &&
50
+ hasProp(v, '$type') &&
51
+ v.$type === 'tools.ozone.signature.findRelatedAccounts#relatedAccount'
52
+ )
53
+ }
54
+
55
+ export function validateRelatedAccount(v: unknown): ValidationResult {
56
+ return lexicons.validate(
57
+ 'tools.ozone.signature.findRelatedAccounts#relatedAccount',
58
+ v,
59
+ )
60
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import { CID } from 'multiformats/cid'
9
+ import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs'
10
+
11
+ export interface QueryParams {
12
+ values: string[]
13
+ cursor?: string
14
+ limit?: number
15
+ }
16
+
17
+ export type InputSchema = undefined
18
+
19
+ export interface OutputSchema {
20
+ cursor?: string
21
+ accounts: ComAtprotoAdminDefs.AccountView[]
22
+ [k: string]: unknown
23
+ }
24
+
25
+ export interface CallOptions {
26
+ signal?: AbortSignal
27
+ headers?: HeadersMap
28
+ }
29
+
30
+ export interface Response {
31
+ success: boolean
32
+ headers: HeadersMap
33
+ data: OutputSchema
34
+ }
35
+
36
+ export function toKnownErr(e: any) {
37
+ return e
38
+ }
@@ -321,6 +321,20 @@ function checkMutedWords(
321
321
  }
322
322
  }
323
323
  }
324
+
325
+ if (AppBskyEmbedExternal.isView(subject.embed.media)) {
326
+ const { external } = subject.embed.media
327
+ if (
328
+ hasMutedWord({
329
+ mutedWords,
330
+ text: external.title + ' ' + external.description,
331
+ languages: [],
332
+ actor: embedAuthor,
333
+ })
334
+ ) {
335
+ return true
336
+ }
337
+ }
324
338
  }
325
339
  }
326
340
  return false