@atproto/api 0.12.2 → 0.12.3
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.
- package/CHANGELOG.md +8 -0
- package/dist/client/index.d.ts +17 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +26 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/lexicons.d.ts +244 -0
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +258 -1
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/app/bsky/embed/record.d.ts +3 -0
- package/dist/client/types/app/bsky/embed/record.d.ts.map +1 -1
- package/dist/client/types/app/bsky/embed/record.js.map +1 -1
- package/dist/client/types/app/bsky/feed/defs.d.ts +38 -0
- package/dist/client/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/defs.js +35 -1
- package/dist/client/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/client/types/app/bsky/feed/generator.d.ts +2 -0
- package/dist/client/types/app/bsky/feed/generator.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/generator.js.map +1 -1
- package/dist/client/types/app/bsky/feed/searchPosts.d.ts +18 -0
- package/dist/client/types/app/bsky/feed/searchPosts.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/searchPosts.js.map +1 -1
- package/dist/client/types/app/bsky/feed/sendInteractions.d.ts +26 -0
- package/dist/client/types/app/bsky/feed/sendInteractions.d.ts.map +1 -0
- package/dist/client/types/app/bsky/feed/sendInteractions.js +14 -0
- package/dist/client/types/app/bsky/feed/sendInteractions.js.map +1 -0
- package/dist/client/types/app/bsky/unspecced/searchActorsSkeleton.d.ts +2 -0
- package/dist/client/types/app/bsky/unspecced/searchActorsSkeleton.d.ts.map +1 -1
- package/dist/client/types/app/bsky/unspecced/searchActorsSkeleton.js.map +1 -1
- package/dist/client/types/app/bsky/unspecced/searchPostsSkeleton.d.ts +20 -0
- package/dist/client/types/app/bsky/unspecced/searchPostsSkeleton.d.ts.map +1 -1
- package/dist/client/types/app/bsky/unspecced/searchPostsSkeleton.js.map +1 -1
- package/dist/client/types/com/atproto/sync/getRecord.d.ts +1 -1
- package/dist/client/types/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/mocker.d.ts +21 -21
- package/dist/mocker.d.ts.map +1 -1
- package/dist/moderation/ui.d.ts.map +1 -1
- package/dist/moderation/ui.js.map +1 -1
- package/dist/moderation/util.js.map +1 -1
- package/dist/rich-text/rich-text.d.ts.map +1 -1
- package/dist/rich-text/rich-text.js.map +1 -1
- package/jest.setup.ts +1 -1
- package/package.json +2 -1
- package/scripts/code/labels.mjs +1 -1
- package/src/client/index.ts +27 -0
- package/src/client/lexicons.ts +285 -1
- package/src/client/types/app/bsky/embed/record.ts +3 -0
- package/src/client/types/app/bsky/feed/defs.ts +63 -0
- package/src/client/types/app/bsky/feed/generator.ts +2 -0
- package/src/client/types/app/bsky/feed/searchPosts.ts +18 -0
- package/src/client/types/app/bsky/feed/sendInteractions.ts +38 -0
- package/src/client/types/app/bsky/unspecced/searchActorsSkeleton.ts +2 -0
- package/src/client/types/app/bsky/unspecced/searchPostsSkeleton.ts +20 -0
- package/src/client/types/com/atproto/sync/getRecord.ts +1 -1
- package/src/moderation/ui.ts +1 -1
- package/src/moderation/util.ts +2 -2
- package/src/rich-text/rich-text.ts +4 -1
- package/tests/util/moderation-behavior.ts +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, 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 AppBskyFeedDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {}
|
|
12
|
+
|
|
13
|
+
export interface InputSchema {
|
|
14
|
+
interactions: AppBskyFeedDefs.Interaction[]
|
|
15
|
+
[k: string]: unknown
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface OutputSchema {
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CallOptions {
|
|
23
|
+
headers?: Headers
|
|
24
|
+
qp?: QueryParams
|
|
25
|
+
encoding: 'application/json'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface Response {
|
|
29
|
+
success: boolean
|
|
30
|
+
headers: Headers
|
|
31
|
+
data: OutputSchema
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function toKnownErr(e: any) {
|
|
35
|
+
if (e instanceof XRPCError) {
|
|
36
|
+
}
|
|
37
|
+
return e
|
|
38
|
+
}
|
|
@@ -11,6 +11,8 @@ import * as AppBskyUnspeccedDefs from './defs'
|
|
|
11
11
|
export interface QueryParams {
|
|
12
12
|
/** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax. */
|
|
13
13
|
q: string
|
|
14
|
+
/** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. */
|
|
15
|
+
viewer?: string
|
|
14
16
|
/** If true, acts as fast/simple 'typeahead' query. */
|
|
15
17
|
typeahead?: boolean
|
|
16
18
|
limit?: number
|
|
@@ -11,6 +11,26 @@ import * as AppBskyUnspeccedDefs from './defs'
|
|
|
11
11
|
export interface QueryParams {
|
|
12
12
|
/** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */
|
|
13
13
|
q: string
|
|
14
|
+
/** Specifies the ranking order of results. */
|
|
15
|
+
sort?: 'top' | 'latest' | (string & {})
|
|
16
|
+
/** Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). */
|
|
17
|
+
since?: string
|
|
18
|
+
/** Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). */
|
|
19
|
+
until?: string
|
|
20
|
+
/** Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. */
|
|
21
|
+
mentions?: string
|
|
22
|
+
/** Filter to posts by the given account. Handles are resolved to DID before query-time. */
|
|
23
|
+
author?: string
|
|
24
|
+
/** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. */
|
|
25
|
+
lang?: string
|
|
26
|
+
/** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. */
|
|
27
|
+
domain?: string
|
|
28
|
+
/** Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. */
|
|
29
|
+
url?: string
|
|
30
|
+
/** Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. */
|
|
31
|
+
tag?: string[]
|
|
32
|
+
/** DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. */
|
|
33
|
+
viewer?: string
|
|
14
34
|
limit?: number
|
|
15
35
|
/** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */
|
|
16
36
|
cursor?: string
|
package/src/moderation/ui.ts
CHANGED
package/src/moderation/util.ts
CHANGED
|
@@ -38,8 +38,8 @@ export function interpretLabelValueDefinition(
|
|
|
38
38
|
def.severity === 'alert'
|
|
39
39
|
? 'alert'
|
|
40
40
|
: def.severity === 'inform'
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
? 'inform'
|
|
42
|
+
: undefined
|
|
43
43
|
if (def.blurs === 'content') {
|
|
44
44
|
// target=account, blurs=content
|
|
45
45
|
behaviors.account.profileList = alertOrInform
|
|
@@ -117,7 +117,10 @@ export interface RichTextOpts {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
export class RichTextSegment {
|
|
120
|
-
constructor(
|
|
120
|
+
constructor(
|
|
121
|
+
public text: string,
|
|
122
|
+
public facet?: Facet,
|
|
123
|
+
) {}
|
|
121
124
|
|
|
122
125
|
get link(): FacetLink | undefined {
|
|
123
126
|
const link = this.facet?.features.find(AppBskyRichtextFacet.isLink)
|