@atproto/api 0.11.0 → 0.11.2
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 +12 -0
- package/dist/client/lexicons.d.ts +13 -0
- package/dist/client/types/com/atproto/server/describeServer.d.ts +7 -0
- package/dist/index.js +23 -1
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
- package/src/agent.ts +1 -0
- package/src/client/lexicons.ts +13 -0
- package/src/client/types/com/atproto/server/describeServer.ts +18 -0
- package/src/moderation/mutewords.ts +1 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/api",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Client library for atproto and Bluesky",
|
|
6
6
|
"keywords": [
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"common-tags": "^1.8.2",
|
|
30
30
|
"get-port": "^6.1.2",
|
|
31
31
|
"@atproto/lex-cli": "^0.3.2",
|
|
32
|
-
"@atproto/dev-env": "^0.2.
|
|
32
|
+
"@atproto/dev-env": "^0.2.41"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"codegen": "node ./scripts/generate-code.mjs && lex gen-api ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/tools/ozone/*/*",
|
package/src/agent.ts
CHANGED
package/src/client/lexicons.ts
CHANGED
|
@@ -2420,6 +2420,11 @@ export const schemaDict = {
|
|
|
2420
2420
|
description: 'URLs of service policy documents.',
|
|
2421
2421
|
ref: 'lex:com.atproto.server.describeServer#links',
|
|
2422
2422
|
},
|
|
2423
|
+
contact: {
|
|
2424
|
+
type: 'ref',
|
|
2425
|
+
description: 'Contact information',
|
|
2426
|
+
ref: 'lex:com.atproto.server.describeServer#contact',
|
|
2427
|
+
},
|
|
2423
2428
|
did: {
|
|
2424
2429
|
type: 'string',
|
|
2425
2430
|
format: 'did',
|
|
@@ -2439,6 +2444,14 @@ export const schemaDict = {
|
|
|
2439
2444
|
},
|
|
2440
2445
|
},
|
|
2441
2446
|
},
|
|
2447
|
+
contact: {
|
|
2448
|
+
type: 'object',
|
|
2449
|
+
properties: {
|
|
2450
|
+
email: {
|
|
2451
|
+
type: 'string',
|
|
2452
|
+
},
|
|
2453
|
+
},
|
|
2454
|
+
},
|
|
2442
2455
|
},
|
|
2443
2456
|
},
|
|
2444
2457
|
ComAtprotoServerGetAccountInviteCodes: {
|
|
@@ -19,6 +19,7 @@ export interface OutputSchema {
|
|
|
19
19
|
/** List of domain suffixes that can be used in account handles. */
|
|
20
20
|
availableUserDomains: string[]
|
|
21
21
|
links?: Links
|
|
22
|
+
contact?: Contact
|
|
22
23
|
did: string
|
|
23
24
|
[k: string]: unknown
|
|
24
25
|
}
|
|
@@ -56,3 +57,20 @@ export function isLinks(v: unknown): v is Links {
|
|
|
56
57
|
export function validateLinks(v: unknown): ValidationResult {
|
|
57
58
|
return lexicons.validate('com.atproto.server.describeServer#links', v)
|
|
58
59
|
}
|
|
60
|
+
|
|
61
|
+
export interface Contact {
|
|
62
|
+
email?: string
|
|
63
|
+
[k: string]: unknown
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function isContact(v: unknown): v is Contact {
|
|
67
|
+
return (
|
|
68
|
+
isObj(v) &&
|
|
69
|
+
hasProp(v, '$type') &&
|
|
70
|
+
v.$type === 'com.atproto.server.describeServer#contact'
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function validateContact(v: unknown): ValidationResult {
|
|
75
|
+
return lexicons.validate('com.atproto.server.describeServer#contact', v)
|
|
76
|
+
}
|
|
@@ -3,9 +3,7 @@ import { AppBskyActorDefs, AppBskyRichtextFacet } from '../client'
|
|
|
3
3
|
const REGEX = {
|
|
4
4
|
LEADING_TRAILING_PUNCTUATION: /(?:^\p{P}+|\p{P}+$)/gu,
|
|
5
5
|
ESCAPE: /[[\]{}()*+?.\\^$|\s]/g,
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line no-useless-escape
|
|
8
|
-
SEPARATORS: /[\/\-\–\—\(\)\[\]\_]+/g,
|
|
6
|
+
SEPARATORS: /[/\-–—()[\]_]+/g,
|
|
9
7
|
WORD_BOUNDARY: /[\s\n\t\r\f\v]+?/g,
|
|
10
8
|
}
|
|
11
9
|
|