@atproto/api 0.13.21 → 0.13.22
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 +6 -0
- package/definitions/labels.json +1 -0
- package/dist/client/lexicons.d.ts +4 -0
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +2 -0
- package/dist/client/lexicons.js.map +1 -1
- package/dist/moderation/const/labels.d.ts +1 -1
- package/dist/moderation/const/labels.d.ts.map +1 -1
- package/dist/moderation/const/labels.js +23 -0
- package/dist/moderation/const/labels.js.map +1 -1
- package/package.json +2 -2
- package/scripts/code/labels.mjs +33 -9
- package/src/client/lexicons.ts +3 -0
- package/src/moderation/const/labels.ts +24 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** this doc is generated by ./scripts/code/labels.mjs **/
|
|
2
2
|
import { InterpretedLabelValueDefinition, LabelPreference } from '../types';
|
|
3
|
-
export type KnownLabelValue = '!hide' | '!warn' | '!no-unauthenticated' | 'porn' | 'sexual' | 'nudity' | 'graphic-media';
|
|
3
|
+
export type KnownLabelValue = '!hide' | '!warn' | '!no-unauthenticated' | 'porn' | 'sexual' | 'nudity' | 'graphic-media' | 'gore';
|
|
4
4
|
export declare const DEFAULT_LABEL_SETTINGS: Record<string, LabelPreference>;
|
|
5
5
|
export declare const LABELS: Record<KnownLabelValue, InterpretedLabelValueDefinition>;
|
|
6
6
|
//# sourceMappingURL=labels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/moderation/const/labels.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,OAAO,EAAE,+BAA+B,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE3E,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,OAAO,GACP,qBAAqB,GACrB,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/moderation/const/labels.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,OAAO,EAAE,+BAA+B,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE3E,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,OAAO,GACP,qBAAqB,GACrB,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,MAAM,CAAA;AAEV,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAKlE,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,+BAA+B,CAuMzE,CAAA"}
|
|
@@ -182,5 +182,28 @@ exports.LABELS = {
|
|
|
182
182
|
},
|
|
183
183
|
locales: [],
|
|
184
184
|
},
|
|
185
|
+
/** @deprecated alias for `graphic-media` */
|
|
186
|
+
gore: {
|
|
187
|
+
identifier: 'gore',
|
|
188
|
+
flags: ['adult'],
|
|
189
|
+
configurable: true,
|
|
190
|
+
defaultSetting: 'warn',
|
|
191
|
+
severity: 'none',
|
|
192
|
+
blurs: 'media',
|
|
193
|
+
behaviors: {
|
|
194
|
+
account: {
|
|
195
|
+
avatar: 'blur',
|
|
196
|
+
banner: 'blur',
|
|
197
|
+
},
|
|
198
|
+
profile: {
|
|
199
|
+
avatar: 'blur',
|
|
200
|
+
banner: 'blur',
|
|
201
|
+
},
|
|
202
|
+
content: {
|
|
203
|
+
contentMedia: 'blur',
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
locales: [],
|
|
207
|
+
},
|
|
185
208
|
};
|
|
186
209
|
//# sourceMappingURL=labels.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../../src/moderation/const/labels.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../../src/moderation/const/labels.ts"],"names":[],"mappings":";;;AA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MAAM;QACtB,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,OAAO;QACd,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,MAAM;aACf;YACD,OAAO,EAAE;gBACP,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,MAAM;aACf;YACD,OAAO,EAAE;gBACP,YAAY,EAAE,MAAM;aACrB;SACF;QACD,OAAO,EAAE,EAAE;KACZ;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/api",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.22",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Client library for atproto and Bluesky",
|
|
6
6
|
"keywords": [
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"jest": "^28.1.2",
|
|
31
31
|
"prettier": "^3.2.5",
|
|
32
32
|
"typescript": "^5.6.3",
|
|
33
|
-
"@atproto/lex-cli": "^0.5.
|
|
33
|
+
"@atproto/lex-cli": "^0.5.4"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"codegen": "node ./scripts/generate-code.mjs && lex gen-api --yes ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/chat/bsky/*/* ../../lexicons/tools/ozone/*/*",
|
package/scripts/code/labels.mjs
CHANGED
|
@@ -19,12 +19,42 @@ writeFileSync(
|
|
|
19
19
|
)
|
|
20
20
|
|
|
21
21
|
async function gen() {
|
|
22
|
+
const knownValues = new Set()
|
|
23
|
+
const flattenedLabelDefs = []
|
|
24
|
+
|
|
25
|
+
for (const { alias: aliases, ...label } of labelsDef) {
|
|
26
|
+
knownValues.add(label.identifier)
|
|
27
|
+
flattenedLabelDefs.push([label.identifier, { ...label, locales: [] }])
|
|
28
|
+
|
|
29
|
+
if (aliases) {
|
|
30
|
+
for (const alias of aliases) {
|
|
31
|
+
knownValues.add(alias)
|
|
32
|
+
flattenedLabelDefs.push([
|
|
33
|
+
alias,
|
|
34
|
+
{
|
|
35
|
+
...label,
|
|
36
|
+
identifier: alias,
|
|
37
|
+
locales: [],
|
|
38
|
+
comment: `@deprecated alias for \`${label.identifier}\``,
|
|
39
|
+
},
|
|
40
|
+
])
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
let labelDefsStr = `{`
|
|
46
|
+
for (const [key, { comment, ...value }] of flattenedLabelDefs) {
|
|
47
|
+
const commentStr = comment ? `\n/** ${comment} */\n` : ''
|
|
48
|
+
labelDefsStr += `${commentStr}'${key}': ${JSON.stringify(value, null, 2)},`
|
|
49
|
+
}
|
|
50
|
+
labelDefsStr += `}`
|
|
51
|
+
|
|
22
52
|
return prettier.format(
|
|
23
53
|
`/** this doc is generated by ./scripts/code/labels.mjs **/
|
|
24
54
|
import {InterpretedLabelValueDefinition, LabelPreference} from '../types'
|
|
25
55
|
|
|
26
|
-
export type KnownLabelValue = ${
|
|
27
|
-
.map((
|
|
56
|
+
export type KnownLabelValue = ${Array.from(knownValues)
|
|
57
|
+
.map((value) => `"${value}"`)
|
|
28
58
|
.join(' | ')}
|
|
29
59
|
|
|
30
60
|
export const DEFAULT_LABEL_SETTINGS: Record<string, LabelPreference> = ${JSON.stringify(
|
|
@@ -35,13 +65,7 @@ async function gen() {
|
|
|
35
65
|
),
|
|
36
66
|
)}
|
|
37
67
|
|
|
38
|
-
export const LABELS: Record<KnownLabelValue, InterpretedLabelValueDefinition> = ${
|
|
39
|
-
Object.fromEntries(
|
|
40
|
-
labelsDef.map((label) => [label.identifier, { ...label, locales: [] }]),
|
|
41
|
-
),
|
|
42
|
-
null,
|
|
43
|
-
2,
|
|
44
|
-
)}
|
|
68
|
+
export const LABELS: Record<KnownLabelValue, InterpretedLabelValueDefinition> = ${labelDefsStr}
|
|
45
69
|
`,
|
|
46
70
|
{ semi: false, parser: 'typescript', singleQuote: true },
|
|
47
71
|
)
|
package/src/client/lexicons.ts
CHANGED
|
@@ -12498,6 +12498,9 @@ export const schemaDict = {
|
|
|
12498
12498
|
type: 'array',
|
|
12499
12499
|
items: {
|
|
12500
12500
|
type: 'string',
|
|
12501
|
+
maxLength: 25,
|
|
12502
|
+
description:
|
|
12503
|
+
'Items in this array are applied with OR filters. To apply AND filter, put all tags in the same string and separate using && characters',
|
|
12501
12504
|
},
|
|
12502
12505
|
},
|
|
12503
12506
|
excludeTags: {
|
|
@@ -9,6 +9,7 @@ export type KnownLabelValue =
|
|
|
9
9
|
| 'sexual'
|
|
10
10
|
| 'nudity'
|
|
11
11
|
| 'graphic-media'
|
|
12
|
+
| 'gore'
|
|
12
13
|
|
|
13
14
|
export const DEFAULT_LABEL_SETTINGS: Record<string, LabelPreference> = {
|
|
14
15
|
porn: 'hide',
|
|
@@ -193,4 +194,27 @@ export const LABELS: Record<KnownLabelValue, InterpretedLabelValueDefinition> =
|
|
|
193
194
|
},
|
|
194
195
|
locales: [],
|
|
195
196
|
},
|
|
197
|
+
/** @deprecated alias for `graphic-media` */
|
|
198
|
+
gore: {
|
|
199
|
+
identifier: 'gore',
|
|
200
|
+
flags: ['adult'],
|
|
201
|
+
configurable: true,
|
|
202
|
+
defaultSetting: 'warn',
|
|
203
|
+
severity: 'none',
|
|
204
|
+
blurs: 'media',
|
|
205
|
+
behaviors: {
|
|
206
|
+
account: {
|
|
207
|
+
avatar: 'blur',
|
|
208
|
+
banner: 'blur',
|
|
209
|
+
},
|
|
210
|
+
profile: {
|
|
211
|
+
avatar: 'blur',
|
|
212
|
+
banner: 'blur',
|
|
213
|
+
},
|
|
214
|
+
content: {
|
|
215
|
+
contentMedia: 'blur',
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
locales: [],
|
|
219
|
+
},
|
|
196
220
|
}
|