@atproto/api 0.13.10 → 0.13.12
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/index.d.ts +24 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +61 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/lexicons.d.ts +292 -0
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +298 -0
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/tools/ozone/set/addValues.d.ts +25 -0
- package/dist/client/types/tools/ozone/set/addValues.d.ts.map +1 -0
- package/dist/client/types/tools/ozone/set/addValues.js +8 -0
- package/dist/client/types/tools/ozone/set/addValues.js.map +1 -0
- package/dist/client/types/tools/ozone/set/defs.d.ts +22 -0
- package/dist/client/types/tools/ozone/set/defs.d.ts.map +1 -0
- package/dist/client/types/tools/ozone/set/defs.js +24 -0
- package/dist/client/types/tools/ozone/set/defs.js.map +1 -0
- package/dist/client/types/tools/ozone/set/deleteSet.d.ts +30 -0
- package/dist/client/types/tools/ozone/set/deleteSet.d.ts.map +1 -0
- package/dist/client/types/tools/ozone/set/deleteSet.js +22 -0
- package/dist/client/types/tools/ozone/set/deleteSet.js.map +1 -0
- package/dist/client/types/tools/ozone/set/deleteValues.d.ts +28 -0
- package/dist/client/types/tools/ozone/set/deleteValues.d.ts.map +1 -0
- package/dist/client/types/tools/ozone/set/deleteValues.js +22 -0
- package/dist/client/types/tools/ozone/set/deleteValues.js.map +1 -0
- package/dist/client/types/tools/ozone/set/getValues.d.ts +31 -0
- package/dist/client/types/tools/ozone/set/getValues.d.ts.map +1 -0
- package/dist/client/types/tools/ozone/set/getValues.js +22 -0
- package/dist/client/types/tools/ozone/set/getValues.js.map +1 -0
- package/dist/client/types/tools/ozone/set/querySets.d.ts +30 -0
- package/dist/client/types/tools/ozone/set/querySets.d.ts.map +1 -0
- package/dist/client/types/tools/ozone/set/querySets.js +8 -0
- package/dist/client/types/tools/ozone/set/querySets.js.map +1 -0
- package/dist/client/types/tools/ozone/set/upsertSet.d.ts +22 -0
- package/dist/client/types/tools/ozone/set/upsertSet.d.ts.map +1 -0
- package/dist/client/types/tools/ozone/set/upsertSet.js +8 -0
- package/dist/client/types/tools/ozone/set/upsertSet.js.map +1 -0
- package/dist/moderation/subjects/post.js +11 -0
- package/dist/moderation/subjects/post.js.map +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +83 -0
- package/src/client/lexicons.ts +301 -0
- package/src/client/types/tools/ozone/set/addValues.ts +34 -0
- package/src/client/types/tools/ozone/set/defs.ts +44 -0
- package/src/client/types/tools/ozone/set/deleteSet.ts +47 -0
- package/src/client/types/tools/ozone/set/deleteValues.ts +44 -0
- package/src/client/types/tools/ozone/set/getValues.ts +49 -0
- package/src/client/types/tools/ozone/set/querySets.ts +41 -0
- package/src/client/types/tools/ozone/set/upsertSet.ts +31 -0
- package/src/moderation/subjects/post.ts +14 -0
package/src/client/lexicons.ts
CHANGED
|
@@ -12139,6 +12139,300 @@ export const schemaDict = {
|
|
|
12139
12139
|
},
|
|
12140
12140
|
},
|
|
12141
12141
|
},
|
|
12142
|
+
ToolsOzoneSetAddValues: {
|
|
12143
|
+
lexicon: 1,
|
|
12144
|
+
id: 'tools.ozone.set.addValues',
|
|
12145
|
+
defs: {
|
|
12146
|
+
main: {
|
|
12147
|
+
type: 'procedure',
|
|
12148
|
+
description:
|
|
12149
|
+
'Add values to a specific set. Attempting to add values to a set that does not exist will result in an error.',
|
|
12150
|
+
input: {
|
|
12151
|
+
encoding: 'application/json',
|
|
12152
|
+
schema: {
|
|
12153
|
+
type: 'object',
|
|
12154
|
+
required: ['name', 'values'],
|
|
12155
|
+
properties: {
|
|
12156
|
+
name: {
|
|
12157
|
+
type: 'string',
|
|
12158
|
+
description: 'Name of the set to add values to',
|
|
12159
|
+
},
|
|
12160
|
+
values: {
|
|
12161
|
+
type: 'array',
|
|
12162
|
+
minLength: 1,
|
|
12163
|
+
maxLength: 1000,
|
|
12164
|
+
items: {
|
|
12165
|
+
type: 'string',
|
|
12166
|
+
},
|
|
12167
|
+
description: 'Array of string values to add to the set',
|
|
12168
|
+
},
|
|
12169
|
+
},
|
|
12170
|
+
},
|
|
12171
|
+
},
|
|
12172
|
+
},
|
|
12173
|
+
},
|
|
12174
|
+
},
|
|
12175
|
+
ToolsOzoneSetDefs: {
|
|
12176
|
+
lexicon: 1,
|
|
12177
|
+
id: 'tools.ozone.set.defs',
|
|
12178
|
+
defs: {
|
|
12179
|
+
set: {
|
|
12180
|
+
type: 'object',
|
|
12181
|
+
required: ['name'],
|
|
12182
|
+
properties: {
|
|
12183
|
+
name: {
|
|
12184
|
+
type: 'string',
|
|
12185
|
+
minLength: 3,
|
|
12186
|
+
maxLength: 128,
|
|
12187
|
+
},
|
|
12188
|
+
description: {
|
|
12189
|
+
type: 'string',
|
|
12190
|
+
maxGraphemes: 1024,
|
|
12191
|
+
maxLength: 10240,
|
|
12192
|
+
},
|
|
12193
|
+
},
|
|
12194
|
+
},
|
|
12195
|
+
setView: {
|
|
12196
|
+
type: 'object',
|
|
12197
|
+
required: ['name', 'setSize', 'createdAt', 'updatedAt'],
|
|
12198
|
+
properties: {
|
|
12199
|
+
name: {
|
|
12200
|
+
type: 'string',
|
|
12201
|
+
minLength: 3,
|
|
12202
|
+
maxLength: 128,
|
|
12203
|
+
},
|
|
12204
|
+
description: {
|
|
12205
|
+
type: 'string',
|
|
12206
|
+
maxGraphemes: 1024,
|
|
12207
|
+
maxLength: 10240,
|
|
12208
|
+
},
|
|
12209
|
+
setSize: {
|
|
12210
|
+
type: 'integer',
|
|
12211
|
+
},
|
|
12212
|
+
createdAt: {
|
|
12213
|
+
type: 'string',
|
|
12214
|
+
format: 'datetime',
|
|
12215
|
+
},
|
|
12216
|
+
updatedAt: {
|
|
12217
|
+
type: 'string',
|
|
12218
|
+
format: 'datetime',
|
|
12219
|
+
},
|
|
12220
|
+
},
|
|
12221
|
+
},
|
|
12222
|
+
},
|
|
12223
|
+
},
|
|
12224
|
+
ToolsOzoneSetDeleteSet: {
|
|
12225
|
+
lexicon: 1,
|
|
12226
|
+
id: 'tools.ozone.set.deleteSet',
|
|
12227
|
+
defs: {
|
|
12228
|
+
main: {
|
|
12229
|
+
type: 'procedure',
|
|
12230
|
+
description:
|
|
12231
|
+
'Delete an entire set. Attempting to delete a set that does not exist will result in an error.',
|
|
12232
|
+
input: {
|
|
12233
|
+
encoding: 'application/json',
|
|
12234
|
+
schema: {
|
|
12235
|
+
type: 'object',
|
|
12236
|
+
required: ['name'],
|
|
12237
|
+
properties: {
|
|
12238
|
+
name: {
|
|
12239
|
+
type: 'string',
|
|
12240
|
+
description: 'Name of the set to delete',
|
|
12241
|
+
},
|
|
12242
|
+
},
|
|
12243
|
+
},
|
|
12244
|
+
},
|
|
12245
|
+
output: {
|
|
12246
|
+
encoding: 'application/json',
|
|
12247
|
+
schema: {
|
|
12248
|
+
type: 'object',
|
|
12249
|
+
properties: {},
|
|
12250
|
+
},
|
|
12251
|
+
},
|
|
12252
|
+
errors: [
|
|
12253
|
+
{
|
|
12254
|
+
name: 'SetNotFound',
|
|
12255
|
+
description: 'set with the given name does not exist',
|
|
12256
|
+
},
|
|
12257
|
+
],
|
|
12258
|
+
},
|
|
12259
|
+
},
|
|
12260
|
+
},
|
|
12261
|
+
ToolsOzoneSetDeleteValues: {
|
|
12262
|
+
lexicon: 1,
|
|
12263
|
+
id: 'tools.ozone.set.deleteValues',
|
|
12264
|
+
defs: {
|
|
12265
|
+
main: {
|
|
12266
|
+
type: 'procedure',
|
|
12267
|
+
description:
|
|
12268
|
+
'Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error',
|
|
12269
|
+
input: {
|
|
12270
|
+
encoding: 'application/json',
|
|
12271
|
+
schema: {
|
|
12272
|
+
type: 'object',
|
|
12273
|
+
required: ['name', 'values'],
|
|
12274
|
+
properties: {
|
|
12275
|
+
name: {
|
|
12276
|
+
type: 'string',
|
|
12277
|
+
description: 'Name of the set to delete values from',
|
|
12278
|
+
},
|
|
12279
|
+
values: {
|
|
12280
|
+
type: 'array',
|
|
12281
|
+
minLength: 1,
|
|
12282
|
+
items: {
|
|
12283
|
+
type: 'string',
|
|
12284
|
+
},
|
|
12285
|
+
description: 'Array of string values to delete from the set',
|
|
12286
|
+
},
|
|
12287
|
+
},
|
|
12288
|
+
},
|
|
12289
|
+
},
|
|
12290
|
+
errors: [
|
|
12291
|
+
{
|
|
12292
|
+
name: 'SetNotFound',
|
|
12293
|
+
description: 'set with the given name does not exist',
|
|
12294
|
+
},
|
|
12295
|
+
],
|
|
12296
|
+
},
|
|
12297
|
+
},
|
|
12298
|
+
},
|
|
12299
|
+
ToolsOzoneSetGetValues: {
|
|
12300
|
+
lexicon: 1,
|
|
12301
|
+
id: 'tools.ozone.set.getValues',
|
|
12302
|
+
defs: {
|
|
12303
|
+
main: {
|
|
12304
|
+
type: 'query',
|
|
12305
|
+
description: 'Get a specific set and its values',
|
|
12306
|
+
parameters: {
|
|
12307
|
+
type: 'params',
|
|
12308
|
+
required: ['name'],
|
|
12309
|
+
properties: {
|
|
12310
|
+
name: {
|
|
12311
|
+
type: 'string',
|
|
12312
|
+
},
|
|
12313
|
+
limit: {
|
|
12314
|
+
type: 'integer',
|
|
12315
|
+
minimum: 1,
|
|
12316
|
+
maximum: 1000,
|
|
12317
|
+
default: 100,
|
|
12318
|
+
},
|
|
12319
|
+
cursor: {
|
|
12320
|
+
type: 'string',
|
|
12321
|
+
},
|
|
12322
|
+
},
|
|
12323
|
+
},
|
|
12324
|
+
output: {
|
|
12325
|
+
encoding: 'application/json',
|
|
12326
|
+
schema: {
|
|
12327
|
+
type: 'object',
|
|
12328
|
+
required: ['set', 'values'],
|
|
12329
|
+
properties: {
|
|
12330
|
+
set: {
|
|
12331
|
+
type: 'ref',
|
|
12332
|
+
ref: 'lex:tools.ozone.set.defs#setView',
|
|
12333
|
+
},
|
|
12334
|
+
values: {
|
|
12335
|
+
type: 'array',
|
|
12336
|
+
items: {
|
|
12337
|
+
type: 'string',
|
|
12338
|
+
},
|
|
12339
|
+
},
|
|
12340
|
+
cursor: {
|
|
12341
|
+
type: 'string',
|
|
12342
|
+
},
|
|
12343
|
+
},
|
|
12344
|
+
},
|
|
12345
|
+
},
|
|
12346
|
+
errors: [
|
|
12347
|
+
{
|
|
12348
|
+
name: 'SetNotFound',
|
|
12349
|
+
description: 'set with the given name does not exist',
|
|
12350
|
+
},
|
|
12351
|
+
],
|
|
12352
|
+
},
|
|
12353
|
+
},
|
|
12354
|
+
},
|
|
12355
|
+
ToolsOzoneSetQuerySets: {
|
|
12356
|
+
lexicon: 1,
|
|
12357
|
+
id: 'tools.ozone.set.querySets',
|
|
12358
|
+
defs: {
|
|
12359
|
+
main: {
|
|
12360
|
+
type: 'query',
|
|
12361
|
+
description: 'Query available sets',
|
|
12362
|
+
parameters: {
|
|
12363
|
+
type: 'params',
|
|
12364
|
+
properties: {
|
|
12365
|
+
limit: {
|
|
12366
|
+
type: 'integer',
|
|
12367
|
+
minimum: 1,
|
|
12368
|
+
maximum: 100,
|
|
12369
|
+
default: 50,
|
|
12370
|
+
},
|
|
12371
|
+
cursor: {
|
|
12372
|
+
type: 'string',
|
|
12373
|
+
},
|
|
12374
|
+
namePrefix: {
|
|
12375
|
+
type: 'string',
|
|
12376
|
+
},
|
|
12377
|
+
sortBy: {
|
|
12378
|
+
type: 'string',
|
|
12379
|
+
enum: ['name', 'createdAt', 'updatedAt'],
|
|
12380
|
+
default: 'name',
|
|
12381
|
+
},
|
|
12382
|
+
sortDirection: {
|
|
12383
|
+
type: 'string',
|
|
12384
|
+
default: 'asc',
|
|
12385
|
+
enum: ['asc', 'desc'],
|
|
12386
|
+
description: 'Defaults to ascending order of name field.',
|
|
12387
|
+
},
|
|
12388
|
+
},
|
|
12389
|
+
},
|
|
12390
|
+
output: {
|
|
12391
|
+
encoding: 'application/json',
|
|
12392
|
+
schema: {
|
|
12393
|
+
type: 'object',
|
|
12394
|
+
required: ['sets'],
|
|
12395
|
+
properties: {
|
|
12396
|
+
sets: {
|
|
12397
|
+
type: 'array',
|
|
12398
|
+
items: {
|
|
12399
|
+
type: 'ref',
|
|
12400
|
+
ref: 'lex:tools.ozone.set.defs#setView',
|
|
12401
|
+
},
|
|
12402
|
+
},
|
|
12403
|
+
cursor: {
|
|
12404
|
+
type: 'string',
|
|
12405
|
+
},
|
|
12406
|
+
},
|
|
12407
|
+
},
|
|
12408
|
+
},
|
|
12409
|
+
},
|
|
12410
|
+
},
|
|
12411
|
+
},
|
|
12412
|
+
ToolsOzoneSetUpsertSet: {
|
|
12413
|
+
lexicon: 1,
|
|
12414
|
+
id: 'tools.ozone.set.upsertSet',
|
|
12415
|
+
defs: {
|
|
12416
|
+
main: {
|
|
12417
|
+
type: 'procedure',
|
|
12418
|
+
description: 'Create or update set metadata',
|
|
12419
|
+
input: {
|
|
12420
|
+
encoding: 'application/json',
|
|
12421
|
+
schema: {
|
|
12422
|
+
type: 'ref',
|
|
12423
|
+
ref: 'lex:tools.ozone.set.defs#set',
|
|
12424
|
+
},
|
|
12425
|
+
},
|
|
12426
|
+
output: {
|
|
12427
|
+
encoding: 'application/json',
|
|
12428
|
+
schema: {
|
|
12429
|
+
type: 'ref',
|
|
12430
|
+
ref: 'lex:tools.ozone.set.defs#setView',
|
|
12431
|
+
},
|
|
12432
|
+
},
|
|
12433
|
+
},
|
|
12434
|
+
},
|
|
12435
|
+
},
|
|
12142
12436
|
ToolsOzoneSignatureDefs: {
|
|
12143
12437
|
lexicon: 1,
|
|
12144
12438
|
id: 'tools.ozone.signature.defs',
|
|
@@ -12764,6 +13058,13 @@ export const ids = {
|
|
|
12764
13058
|
ToolsOzoneModerationQueryStatuses: 'tools.ozone.moderation.queryStatuses',
|
|
12765
13059
|
ToolsOzoneModerationSearchRepos: 'tools.ozone.moderation.searchRepos',
|
|
12766
13060
|
ToolsOzoneServerGetConfig: 'tools.ozone.server.getConfig',
|
|
13061
|
+
ToolsOzoneSetAddValues: 'tools.ozone.set.addValues',
|
|
13062
|
+
ToolsOzoneSetDefs: 'tools.ozone.set.defs',
|
|
13063
|
+
ToolsOzoneSetDeleteSet: 'tools.ozone.set.deleteSet',
|
|
13064
|
+
ToolsOzoneSetDeleteValues: 'tools.ozone.set.deleteValues',
|
|
13065
|
+
ToolsOzoneSetGetValues: 'tools.ozone.set.getValues',
|
|
13066
|
+
ToolsOzoneSetQuerySets: 'tools.ozone.set.querySets',
|
|
13067
|
+
ToolsOzoneSetUpsertSet: 'tools.ozone.set.upsertSet',
|
|
12767
13068
|
ToolsOzoneSignatureDefs: 'tools.ozone.signature.defs',
|
|
12768
13069
|
ToolsOzoneSignatureFindCorrelation: 'tools.ozone.signature.findCorrelation',
|
|
12769
13070
|
ToolsOzoneSignatureFindRelatedAccounts:
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
|
|
10
|
+
export interface QueryParams {}
|
|
11
|
+
|
|
12
|
+
export interface InputSchema {
|
|
13
|
+
/** Name of the set to add values to */
|
|
14
|
+
name: string
|
|
15
|
+
/** Array of string values to add to the set */
|
|
16
|
+
values: string[]
|
|
17
|
+
[k: string]: unknown
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CallOptions {
|
|
21
|
+
signal?: AbortSignal
|
|
22
|
+
headers?: HeadersMap
|
|
23
|
+
qp?: QueryParams
|
|
24
|
+
encoding?: 'application/json'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: HeadersMap
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function toKnownErr(e: any) {
|
|
33
|
+
return e
|
|
34
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
|
|
9
|
+
export interface Set {
|
|
10
|
+
name: string
|
|
11
|
+
description?: string
|
|
12
|
+
[k: string]: unknown
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function isSet(v: unknown): v is Set {
|
|
16
|
+
return (
|
|
17
|
+
isObj(v) && hasProp(v, '$type') && v.$type === 'tools.ozone.set.defs#set'
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function validateSet(v: unknown): ValidationResult {
|
|
22
|
+
return lexicons.validate('tools.ozone.set.defs#set', v)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface SetView {
|
|
26
|
+
name: string
|
|
27
|
+
description?: string
|
|
28
|
+
setSize: number
|
|
29
|
+
createdAt: string
|
|
30
|
+
updatedAt: string
|
|
31
|
+
[k: string]: unknown
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function isSetView(v: unknown): v is SetView {
|
|
35
|
+
return (
|
|
36
|
+
isObj(v) &&
|
|
37
|
+
hasProp(v, '$type') &&
|
|
38
|
+
v.$type === 'tools.ozone.set.defs#setView'
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function validateSetView(v: unknown): ValidationResult {
|
|
43
|
+
return lexicons.validate('tools.ozone.set.defs#setView', v)
|
|
44
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
|
|
10
|
+
export interface QueryParams {}
|
|
11
|
+
|
|
12
|
+
export interface InputSchema {
|
|
13
|
+
/** Name of the set to delete */
|
|
14
|
+
name: string
|
|
15
|
+
[k: string]: unknown
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface OutputSchema {
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CallOptions {
|
|
23
|
+
signal?: AbortSignal
|
|
24
|
+
headers?: HeadersMap
|
|
25
|
+
qp?: QueryParams
|
|
26
|
+
encoding?: 'application/json'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface Response {
|
|
30
|
+
success: boolean
|
|
31
|
+
headers: HeadersMap
|
|
32
|
+
data: OutputSchema
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export class SetNotFoundError extends XRPCError {
|
|
36
|
+
constructor(src: XRPCError) {
|
|
37
|
+
super(src.status, src.error, src.message, src.headers, { cause: src })
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function toKnownErr(e: any) {
|
|
42
|
+
if (e instanceof XRPCError) {
|
|
43
|
+
if (e.error === 'SetNotFound') return new SetNotFoundError(e)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return e
|
|
47
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
|
|
10
|
+
export interface QueryParams {}
|
|
11
|
+
|
|
12
|
+
export interface InputSchema {
|
|
13
|
+
/** Name of the set to delete values from */
|
|
14
|
+
name: string
|
|
15
|
+
/** Array of string values to delete from the set */
|
|
16
|
+
values: string[]
|
|
17
|
+
[k: string]: unknown
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CallOptions {
|
|
21
|
+
signal?: AbortSignal
|
|
22
|
+
headers?: HeadersMap
|
|
23
|
+
qp?: QueryParams
|
|
24
|
+
encoding?: 'application/json'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: HeadersMap
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export class SetNotFoundError extends XRPCError {
|
|
33
|
+
constructor(src: XRPCError) {
|
|
34
|
+
super(src.status, src.error, src.message, src.headers, { cause: src })
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function toKnownErr(e: any) {
|
|
39
|
+
if (e instanceof XRPCError) {
|
|
40
|
+
if (e.error === 'SetNotFound') return new SetNotFoundError(e)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return e
|
|
44
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 ToolsOzoneSetDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
name: string
|
|
13
|
+
limit?: number
|
|
14
|
+
cursor?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
|
|
19
|
+
export interface OutputSchema {
|
|
20
|
+
set: ToolsOzoneSetDefs.SetView
|
|
21
|
+
values: string[]
|
|
22
|
+
cursor?: string
|
|
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 class SetNotFoundError extends XRPCError {
|
|
38
|
+
constructor(src: XRPCError) {
|
|
39
|
+
super(src.status, src.error, src.message, src.headers, { cause: src })
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function toKnownErr(e: any) {
|
|
44
|
+
if (e instanceof XRPCError) {
|
|
45
|
+
if (e.error === 'SetNotFound') return new SetNotFoundError(e)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return e
|
|
49
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 ToolsOzoneSetDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
limit?: number
|
|
13
|
+
cursor?: string
|
|
14
|
+
namePrefix?: string
|
|
15
|
+
sortBy?: 'name' | 'createdAt' | 'updatedAt'
|
|
16
|
+
/** Defaults to ascending order of name field. */
|
|
17
|
+
sortDirection?: 'asc' | 'desc'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type InputSchema = undefined
|
|
21
|
+
|
|
22
|
+
export interface OutputSchema {
|
|
23
|
+
sets: ToolsOzoneSetDefs.SetView[]
|
|
24
|
+
cursor?: string
|
|
25
|
+
[k: string]: unknown
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface CallOptions {
|
|
29
|
+
signal?: AbortSignal
|
|
30
|
+
headers?: HeadersMap
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface Response {
|
|
34
|
+
success: boolean
|
|
35
|
+
headers: HeadersMap
|
|
36
|
+
data: OutputSchema
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function toKnownErr(e: any) {
|
|
40
|
+
return e
|
|
41
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 ToolsOzoneSetDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {}
|
|
12
|
+
|
|
13
|
+
export type InputSchema = ToolsOzoneSetDefs.Set
|
|
14
|
+
export type OutputSchema = ToolsOzoneSetDefs.SetView
|
|
15
|
+
|
|
16
|
+
export interface CallOptions {
|
|
17
|
+
signal?: AbortSignal
|
|
18
|
+
headers?: HeadersMap
|
|
19
|
+
qp?: QueryParams
|
|
20
|
+
encoding?: 'application/json'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Response {
|
|
24
|
+
success: boolean
|
|
25
|
+
headers: HeadersMap
|
|
26
|
+
data: OutputSchema
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function toKnownErr(e: any) {
|
|
30
|
+
return e
|
|
31
|
+
}
|
|
@@ -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
|