@atproto/api 0.13.4 → 0.13.6
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 +18 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +53 -7
- package/dist/client/index.js.map +1 -1
- package/dist/client/lexicons.d.ts +367 -18
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +390 -24
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/app/bsky/embed/defs.d.ts +13 -0
- package/dist/client/types/app/bsky/embed/defs.d.ts.map +1 -0
- package/dist/client/types/app/bsky/embed/defs.js +16 -0
- package/dist/client/types/app/bsky/embed/defs.js.map +1 -0
- package/dist/client/types/app/bsky/embed/images.d.ts +3 -10
- package/dist/client/types/app/bsky/embed/images.d.ts.map +1 -1
- package/dist/client/types/app/bsky/embed/images.js +1 -11
- package/dist/client/types/app/bsky/embed/images.js.map +1 -1
- package/dist/client/types/app/bsky/embed/record.d.ts +2 -1
- 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/embed/recordWithMedia.d.ts +3 -2
- package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts.map +1 -1
- package/dist/client/types/app/bsky/embed/recordWithMedia.js.map +1 -1
- package/dist/client/types/app/bsky/embed/video.d.ts +33 -0
- package/dist/client/types/app/bsky/embed/video.d.ts.map +1 -0
- package/dist/client/types/app/bsky/embed/video.js +35 -0
- package/dist/client/types/app/bsky/embed/video.js.map +1 -0
- package/dist/client/types/app/bsky/feed/defs.d.ts +2 -1
- package/dist/client/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/client/types/app/bsky/feed/post.d.ts +2 -1
- package/dist/client/types/app/bsky/feed/post.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/post.js.map +1 -1
- package/dist/client/types/app/bsky/video/defs.d.ts +19 -0
- package/dist/client/types/app/bsky/video/defs.d.ts.map +1 -0
- package/dist/client/types/app/bsky/video/defs.js +16 -0
- package/dist/client/types/app/bsky/video/defs.js.map +1 -0
- package/dist/client/types/app/bsky/video/getJobStatus.d.ts +24 -0
- package/dist/client/types/app/bsky/video/getJobStatus.d.ts.map +1 -0
- package/dist/client/types/app/bsky/video/getJobStatus.js +8 -0
- package/dist/client/types/app/bsky/video/getJobStatus.js.map +1 -0
- package/dist/client/types/app/bsky/video/getUploadLimits.d.ts +26 -0
- package/dist/client/types/app/bsky/video/getUploadLimits.d.ts.map +1 -0
- package/dist/client/types/app/bsky/video/getUploadLimits.js +8 -0
- package/dist/client/types/app/bsky/video/getUploadLimits.js.map +1 -0
- package/dist/client/types/app/bsky/video/uploadVideo.d.ts +25 -0
- package/dist/client/types/app/bsky/video/uploadVideo.d.ts.map +1 -0
- package/dist/client/types/app/bsky/video/uploadVideo.js +8 -0
- package/dist/client/types/app/bsky/video/uploadVideo.js.map +1 -0
- package/dist/client/types/com/atproto/repo/applyWrites.d.ts +29 -1
- package/dist/client/types/com/atproto/repo/applyWrites.d.ts.map +1 -1
- package/dist/client/types/com/atproto/repo/applyWrites.js +31 -1
- package/dist/client/types/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/client/types/com/atproto/repo/createRecord.d.ts +4 -1
- package/dist/client/types/com/atproto/repo/createRecord.d.ts.map +1 -1
- package/dist/client/types/com/atproto/repo/createRecord.js.map +1 -1
- package/dist/client/types/com/atproto/repo/defs.d.ts +12 -0
- package/dist/client/types/com/atproto/repo/defs.d.ts.map +1 -0
- package/dist/client/types/com/atproto/repo/defs.js +16 -0
- package/dist/client/types/com/atproto/repo/defs.js.map +1 -0
- package/dist/client/types/com/atproto/repo/deleteRecord.d.ts +6 -0
- package/dist/client/types/com/atproto/repo/deleteRecord.d.ts.map +1 -1
- package/dist/client/types/com/atproto/repo/deleteRecord.js.map +1 -1
- package/dist/client/types/com/atproto/repo/putRecord.d.ts +4 -1
- package/dist/client/types/com/atproto/repo/putRecord.d.ts.map +1 -1
- package/dist/client/types/com/atproto/repo/putRecord.js.map +1 -1
- package/dist/client/types/tools/ozone/communication/createTemplate.d.ts +6 -1
- package/dist/client/types/tools/ozone/communication/createTemplate.d.ts.map +1 -1
- package/dist/client/types/tools/ozone/communication/createTemplate.js +15 -1
- package/dist/client/types/tools/ozone/communication/createTemplate.js.map +1 -1
- package/dist/client/types/tools/ozone/communication/defs.d.ts +2 -0
- package/dist/client/types/tools/ozone/communication/defs.d.ts.map +1 -1
- package/dist/client/types/tools/ozone/communication/defs.js.map +1 -1
- package/dist/client/types/tools/ozone/communication/updateTemplate.d.ts +6 -1
- package/dist/client/types/tools/ozone/communication/updateTemplate.d.ts.map +1 -1
- package/dist/client/types/tools/ozone/communication/updateTemplate.js +15 -1
- package/dist/client/types/tools/ozone/communication/updateTemplate.js.map +1 -1
- package/dist/client/types/tools/ozone/moderation/emitEvent.d.ts +1 -1
- package/dist/client/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
- package/dist/client/types/tools/ozone/moderation/emitEvent.js.map +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +65 -12
- package/src/client/lexicons.ts +393 -25
- package/src/client/types/app/bsky/embed/defs.ts +26 -0
- package/src/client/types/app/bsky/embed/images.ts +3 -21
- package/src/client/types/app/bsky/embed/record.ts +2 -0
- package/src/client/types/app/bsky/embed/recordWithMedia.ts +3 -0
- package/src/client/types/app/bsky/embed/video.ts +67 -0
- package/src/client/types/app/bsky/feed/defs.ts +2 -0
- package/src/client/types/app/bsky/feed/post.ts +2 -0
- package/src/client/types/app/bsky/video/defs.ts +32 -0
- package/src/client/types/app/bsky/video/getJobStatus.ts +35 -0
- package/src/client/types/app/bsky/video/getUploadLimits.ts +36 -0
- package/src/client/types/app/bsky/video/uploadVideo.ts +35 -0
- package/src/client/types/com/atproto/repo/applyWrites.ts +63 -1
- package/src/client/types/com/atproto/repo/createRecord.ts +4 -1
- package/src/client/types/com/atproto/repo/defs.ts +25 -0
- package/src/client/types/com/atproto/repo/deleteRecord.ts +7 -0
- package/src/client/types/com/atproto/repo/putRecord.ts +4 -1
- package/src/client/types/tools/ozone/communication/createTemplate.ts +13 -0
- package/src/client/types/tools/ozone/communication/defs.ts +2 -0
- package/src/client/types/tools/ozone/communication/updateTemplate.ts +13 -0
- package/src/client/types/tools/ozone/moderation/emitEvent.ts +1 -0
|
@@ -7,12 +7,14 @@ import { lexicons } from '../../../../lexicons'
|
|
|
7
7
|
import { CID } from 'multiformats/cid'
|
|
8
8
|
import * as AppBskyEmbedRecord from './record'
|
|
9
9
|
import * as AppBskyEmbedImages from './images'
|
|
10
|
+
import * as AppBskyEmbedVideo from './video'
|
|
10
11
|
import * as AppBskyEmbedExternal from './external'
|
|
11
12
|
|
|
12
13
|
export interface Main {
|
|
13
14
|
record: AppBskyEmbedRecord.Main
|
|
14
15
|
media:
|
|
15
16
|
| AppBskyEmbedImages.Main
|
|
17
|
+
| AppBskyEmbedVideo.Main
|
|
16
18
|
| AppBskyEmbedExternal.Main
|
|
17
19
|
| { $type: string; [k: string]: unknown }
|
|
18
20
|
[k: string]: unknown
|
|
@@ -35,6 +37,7 @@ export interface View {
|
|
|
35
37
|
record: AppBskyEmbedRecord.View
|
|
36
38
|
media:
|
|
37
39
|
| AppBskyEmbedImages.View
|
|
40
|
+
| AppBskyEmbedVideo.View
|
|
38
41
|
| AppBskyEmbedExternal.View
|
|
39
42
|
| { $type: string; [k: string]: unknown }
|
|
40
43
|
[k: string]: unknown
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
import * as AppBskyEmbedDefs from './defs'
|
|
9
|
+
|
|
10
|
+
export interface Main {
|
|
11
|
+
video: BlobRef
|
|
12
|
+
captions?: Caption[]
|
|
13
|
+
/** Alt text description of the video, for accessibility. */
|
|
14
|
+
alt?: string
|
|
15
|
+
aspectRatio?: AppBskyEmbedDefs.AspectRatio
|
|
16
|
+
[k: string]: unknown
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function isMain(v: unknown): v is Main {
|
|
20
|
+
return (
|
|
21
|
+
isObj(v) &&
|
|
22
|
+
hasProp(v, '$type') &&
|
|
23
|
+
(v.$type === 'app.bsky.embed.video#main' ||
|
|
24
|
+
v.$type === 'app.bsky.embed.video')
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function validateMain(v: unknown): ValidationResult {
|
|
29
|
+
return lexicons.validate('app.bsky.embed.video#main', v)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface Caption {
|
|
33
|
+
lang: string
|
|
34
|
+
file: BlobRef
|
|
35
|
+
[k: string]: unknown
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function isCaption(v: unknown): v is Caption {
|
|
39
|
+
return (
|
|
40
|
+
isObj(v) &&
|
|
41
|
+
hasProp(v, '$type') &&
|
|
42
|
+
v.$type === 'app.bsky.embed.video#caption'
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function validateCaption(v: unknown): ValidationResult {
|
|
47
|
+
return lexicons.validate('app.bsky.embed.video#caption', v)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface View {
|
|
51
|
+
cid: string
|
|
52
|
+
playlist: string
|
|
53
|
+
thumbnail?: string
|
|
54
|
+
alt?: string
|
|
55
|
+
aspectRatio?: AppBskyEmbedDefs.AspectRatio
|
|
56
|
+
[k: string]: unknown
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function isView(v: unknown): v is View {
|
|
60
|
+
return (
|
|
61
|
+
isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.embed.video#view'
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function validateView(v: unknown): ValidationResult {
|
|
66
|
+
return lexicons.validate('app.bsky.embed.video#view', v)
|
|
67
|
+
}
|
|
@@ -7,6 +7,7 @@ import { lexicons } from '../../../../lexicons'
|
|
|
7
7
|
import { CID } from 'multiformats/cid'
|
|
8
8
|
import * as AppBskyActorDefs from '../actor/defs'
|
|
9
9
|
import * as AppBskyEmbedImages from '../embed/images'
|
|
10
|
+
import * as AppBskyEmbedVideo from '../embed/video'
|
|
10
11
|
import * as AppBskyEmbedExternal from '../embed/external'
|
|
11
12
|
import * as AppBskyEmbedRecord from '../embed/record'
|
|
12
13
|
import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia'
|
|
@@ -21,6 +22,7 @@ export interface PostView {
|
|
|
21
22
|
record: {}
|
|
22
23
|
embed?:
|
|
23
24
|
| AppBskyEmbedImages.View
|
|
25
|
+
| AppBskyEmbedVideo.View
|
|
24
26
|
| AppBskyEmbedExternal.View
|
|
25
27
|
| AppBskyEmbedRecord.View
|
|
26
28
|
| AppBskyEmbedRecordWithMedia.View
|
|
@@ -7,6 +7,7 @@ import { lexicons } from '../../../../lexicons'
|
|
|
7
7
|
import { CID } from 'multiformats/cid'
|
|
8
8
|
import * as AppBskyRichtextFacet from '../richtext/facet'
|
|
9
9
|
import * as AppBskyEmbedImages from '../embed/images'
|
|
10
|
+
import * as AppBskyEmbedVideo from '../embed/video'
|
|
10
11
|
import * as AppBskyEmbedExternal from '../embed/external'
|
|
11
12
|
import * as AppBskyEmbedRecord from '../embed/record'
|
|
12
13
|
import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia'
|
|
@@ -23,6 +24,7 @@ export interface Record {
|
|
|
23
24
|
reply?: ReplyRef
|
|
24
25
|
embed?:
|
|
25
26
|
| AppBskyEmbedImages.Main
|
|
27
|
+
| AppBskyEmbedVideo.Main
|
|
26
28
|
| AppBskyEmbedExternal.Main
|
|
27
29
|
| AppBskyEmbedRecord.Main
|
|
28
30
|
| AppBskyEmbedRecordWithMedia.Main
|
|
@@ -0,0 +1,32 @@
|
|
|
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 JobStatus {
|
|
10
|
+
jobId: string
|
|
11
|
+
did: string
|
|
12
|
+
/** The state of the video processing job. All values not listed as a known value indicate that the job is in process. */
|
|
13
|
+
state: 'JOB_STATE_COMPLETED' | 'JOB_STATE_FAILED' | (string & {})
|
|
14
|
+
/** Progress within the current processing state. */
|
|
15
|
+
progress?: number
|
|
16
|
+
blob?: BlobRef
|
|
17
|
+
error?: string
|
|
18
|
+
message?: string
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function isJobStatus(v: unknown): v is JobStatus {
|
|
23
|
+
return (
|
|
24
|
+
isObj(v) &&
|
|
25
|
+
hasProp(v, '$type') &&
|
|
26
|
+
v.$type === 'app.bsky.video.defs#jobStatus'
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function validateJobStatus(v: unknown): ValidationResult {
|
|
31
|
+
return lexicons.validate('app.bsky.video.defs#jobStatus', v)
|
|
32
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 AppBskyVideoDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
jobId: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type InputSchema = undefined
|
|
16
|
+
|
|
17
|
+
export interface OutputSchema {
|
|
18
|
+
jobStatus: AppBskyVideoDefs.JobStatus
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CallOptions {
|
|
23
|
+
signal?: AbortSignal
|
|
24
|
+
headers?: HeadersMap
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: HeadersMap
|
|
30
|
+
data: OutputSchema
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toKnownErr(e: any) {
|
|
34
|
+
return e
|
|
35
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 type InputSchema = undefined
|
|
13
|
+
|
|
14
|
+
export interface OutputSchema {
|
|
15
|
+
canUpload: boolean
|
|
16
|
+
remainingDailyVideos?: number
|
|
17
|
+
remainingDailyBytes?: number
|
|
18
|
+
message?: string
|
|
19
|
+
error?: string
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CallOptions {
|
|
24
|
+
signal?: AbortSignal
|
|
25
|
+
headers?: HeadersMap
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface Response {
|
|
29
|
+
success: boolean
|
|
30
|
+
headers: HeadersMap
|
|
31
|
+
data: OutputSchema
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function toKnownErr(e: any) {
|
|
35
|
+
return e
|
|
36
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 AppBskyVideoDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {}
|
|
12
|
+
|
|
13
|
+
export type InputSchema = string | Uint8Array | Blob
|
|
14
|
+
|
|
15
|
+
export interface OutputSchema {
|
|
16
|
+
jobStatus: AppBskyVideoDefs.JobStatus
|
|
17
|
+
[k: string]: unknown
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CallOptions {
|
|
21
|
+
signal?: AbortSignal
|
|
22
|
+
headers?: HeadersMap
|
|
23
|
+
qp?: QueryParams
|
|
24
|
+
encoding?: 'video/mp4'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: HeadersMap
|
|
30
|
+
data: OutputSchema
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toKnownErr(e: any) {
|
|
34
|
+
return e
|
|
35
|
+
}
|
|
@@ -6,13 +6,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
|
6
6
|
import { isObj, hasProp } from '../../../../util'
|
|
7
7
|
import { lexicons } from '../../../../lexicons'
|
|
8
8
|
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as ComAtprotoRepoDefs from './defs'
|
|
9
10
|
|
|
10
11
|
export interface QueryParams {}
|
|
11
12
|
|
|
12
13
|
export interface InputSchema {
|
|
13
14
|
/** The handle or DID of the repo (aka, current account). */
|
|
14
15
|
repo: string
|
|
15
|
-
/** Can be set to 'false' to skip Lexicon schema validation of record data, for
|
|
16
|
+
/** Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons. */
|
|
16
17
|
validate?: boolean
|
|
17
18
|
writes: (Create | Update | Delete)[]
|
|
18
19
|
/** If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. */
|
|
@@ -20,6 +21,12 @@ export interface InputSchema {
|
|
|
20
21
|
[k: string]: unknown
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
export interface OutputSchema {
|
|
25
|
+
commit?: ComAtprotoRepoDefs.CommitMeta
|
|
26
|
+
results?: (CreateResult | UpdateResult | DeleteResult)[]
|
|
27
|
+
[k: string]: unknown
|
|
28
|
+
}
|
|
29
|
+
|
|
23
30
|
export interface CallOptions {
|
|
24
31
|
signal?: AbortSignal
|
|
25
32
|
headers?: HeadersMap
|
|
@@ -30,6 +37,7 @@ export interface CallOptions {
|
|
|
30
37
|
export interface Response {
|
|
31
38
|
success: boolean
|
|
32
39
|
headers: HeadersMap
|
|
40
|
+
data: OutputSchema
|
|
33
41
|
}
|
|
34
42
|
|
|
35
43
|
export class InvalidSwapError extends XRPCError {
|
|
@@ -104,3 +112,57 @@ export function isDelete(v: unknown): v is Delete {
|
|
|
104
112
|
export function validateDelete(v: unknown): ValidationResult {
|
|
105
113
|
return lexicons.validate('com.atproto.repo.applyWrites#delete', v)
|
|
106
114
|
}
|
|
115
|
+
|
|
116
|
+
export interface CreateResult {
|
|
117
|
+
uri: string
|
|
118
|
+
cid: string
|
|
119
|
+
validationStatus?: 'valid' | 'unknown' | (string & {})
|
|
120
|
+
[k: string]: unknown
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function isCreateResult(v: unknown): v is CreateResult {
|
|
124
|
+
return (
|
|
125
|
+
isObj(v) &&
|
|
126
|
+
hasProp(v, '$type') &&
|
|
127
|
+
v.$type === 'com.atproto.repo.applyWrites#createResult'
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function validateCreateResult(v: unknown): ValidationResult {
|
|
132
|
+
return lexicons.validate('com.atproto.repo.applyWrites#createResult', v)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface UpdateResult {
|
|
136
|
+
uri: string
|
|
137
|
+
cid: string
|
|
138
|
+
validationStatus?: 'valid' | 'unknown' | (string & {})
|
|
139
|
+
[k: string]: unknown
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function isUpdateResult(v: unknown): v is UpdateResult {
|
|
143
|
+
return (
|
|
144
|
+
isObj(v) &&
|
|
145
|
+
hasProp(v, '$type') &&
|
|
146
|
+
v.$type === 'com.atproto.repo.applyWrites#updateResult'
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function validateUpdateResult(v: unknown): ValidationResult {
|
|
151
|
+
return lexicons.validate('com.atproto.repo.applyWrites#updateResult', v)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface DeleteResult {
|
|
155
|
+
[k: string]: unknown
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function isDeleteResult(v: unknown): v is DeleteResult {
|
|
159
|
+
return (
|
|
160
|
+
isObj(v) &&
|
|
161
|
+
hasProp(v, '$type') &&
|
|
162
|
+
v.$type === 'com.atproto.repo.applyWrites#deleteResult'
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function validateDeleteResult(v: unknown): ValidationResult {
|
|
167
|
+
return lexicons.validate('com.atproto.repo.applyWrites#deleteResult', v)
|
|
168
|
+
}
|
|
@@ -6,6 +6,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
|
6
6
|
import { isObj, hasProp } from '../../../../util'
|
|
7
7
|
import { lexicons } from '../../../../lexicons'
|
|
8
8
|
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as ComAtprotoRepoDefs from './defs'
|
|
9
10
|
|
|
10
11
|
export interface QueryParams {}
|
|
11
12
|
|
|
@@ -16,7 +17,7 @@ export interface InputSchema {
|
|
|
16
17
|
collection: string
|
|
17
18
|
/** The Record Key. */
|
|
18
19
|
rkey?: string
|
|
19
|
-
/** Can be set to 'false' to skip Lexicon schema validation of record data. */
|
|
20
|
+
/** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. */
|
|
20
21
|
validate?: boolean
|
|
21
22
|
/** The record itself. Must contain a $type field. */
|
|
22
23
|
record: {}
|
|
@@ -28,6 +29,8 @@ export interface InputSchema {
|
|
|
28
29
|
export interface OutputSchema {
|
|
29
30
|
uri: string
|
|
30
31
|
cid: string
|
|
32
|
+
commit?: ComAtprotoRepoDefs.CommitMeta
|
|
33
|
+
validationStatus?: 'valid' | 'unknown' | (string & {})
|
|
31
34
|
[k: string]: unknown
|
|
32
35
|
}
|
|
33
36
|
|
|
@@ -0,0 +1,25 @@
|
|
|
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 CommitMeta {
|
|
10
|
+
cid: string
|
|
11
|
+
rev: string
|
|
12
|
+
[k: string]: unknown
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function isCommitMeta(v: unknown): v is CommitMeta {
|
|
16
|
+
return (
|
|
17
|
+
isObj(v) &&
|
|
18
|
+
hasProp(v, '$type') &&
|
|
19
|
+
v.$type === 'com.atproto.repo.defs#commitMeta'
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function validateCommitMeta(v: unknown): ValidationResult {
|
|
24
|
+
return lexicons.validate('com.atproto.repo.defs#commitMeta', v)
|
|
25
|
+
}
|
|
@@ -6,6 +6,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
|
6
6
|
import { isObj, hasProp } from '../../../../util'
|
|
7
7
|
import { lexicons } from '../../../../lexicons'
|
|
8
8
|
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as ComAtprotoRepoDefs from './defs'
|
|
9
10
|
|
|
10
11
|
export interface QueryParams {}
|
|
11
12
|
|
|
@@ -23,6 +24,11 @@ export interface InputSchema {
|
|
|
23
24
|
[k: string]: unknown
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
export interface OutputSchema {
|
|
28
|
+
commit?: ComAtprotoRepoDefs.CommitMeta
|
|
29
|
+
[k: string]: unknown
|
|
30
|
+
}
|
|
31
|
+
|
|
26
32
|
export interface CallOptions {
|
|
27
33
|
signal?: AbortSignal
|
|
28
34
|
headers?: HeadersMap
|
|
@@ -33,6 +39,7 @@ export interface CallOptions {
|
|
|
33
39
|
export interface Response {
|
|
34
40
|
success: boolean
|
|
35
41
|
headers: HeadersMap
|
|
42
|
+
data: OutputSchema
|
|
36
43
|
}
|
|
37
44
|
|
|
38
45
|
export class InvalidSwapError extends XRPCError {
|
|
@@ -6,6 +6,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
|
6
6
|
import { isObj, hasProp } from '../../../../util'
|
|
7
7
|
import { lexicons } from '../../../../lexicons'
|
|
8
8
|
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as ComAtprotoRepoDefs from './defs'
|
|
9
10
|
|
|
10
11
|
export interface QueryParams {}
|
|
11
12
|
|
|
@@ -16,7 +17,7 @@ export interface InputSchema {
|
|
|
16
17
|
collection: string
|
|
17
18
|
/** The Record Key. */
|
|
18
19
|
rkey: string
|
|
19
|
-
/** Can be set to 'false' to skip Lexicon schema validation of record data. */
|
|
20
|
+
/** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. */
|
|
20
21
|
validate?: boolean
|
|
21
22
|
/** The record to write. */
|
|
22
23
|
record: {}
|
|
@@ -30,6 +31,8 @@ export interface InputSchema {
|
|
|
30
31
|
export interface OutputSchema {
|
|
31
32
|
uri: string
|
|
32
33
|
cid: string
|
|
34
|
+
commit?: ComAtprotoRepoDefs.CommitMeta
|
|
35
|
+
validationStatus?: 'valid' | 'unknown' | (string & {})
|
|
33
36
|
[k: string]: unknown
|
|
34
37
|
}
|
|
35
38
|
|
|
@@ -17,6 +17,8 @@ export interface InputSchema {
|
|
|
17
17
|
contentMarkdown: string
|
|
18
18
|
/** Subject of the message, used in emails. */
|
|
19
19
|
subject: string
|
|
20
|
+
/** Message language. */
|
|
21
|
+
lang?: string
|
|
20
22
|
/** DID of the user who is creating the template. */
|
|
21
23
|
createdBy?: string
|
|
22
24
|
[k: string]: unknown
|
|
@@ -37,6 +39,17 @@ export interface Response {
|
|
|
37
39
|
data: OutputSchema
|
|
38
40
|
}
|
|
39
41
|
|
|
42
|
+
export class DuplicateTemplateNameError extends XRPCError {
|
|
43
|
+
constructor(src: XRPCError) {
|
|
44
|
+
super(src.status, src.error, src.message, src.headers, { cause: src })
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
40
48
|
export function toKnownErr(e: any) {
|
|
49
|
+
if (e instanceof XRPCError) {
|
|
50
|
+
if (e.error === 'DuplicateTemplateName')
|
|
51
|
+
return new DuplicateTemplateNameError(e)
|
|
52
|
+
}
|
|
53
|
+
|
|
41
54
|
return e
|
|
42
55
|
}
|
|
@@ -15,6 +15,8 @@ export interface TemplateView {
|
|
|
15
15
|
/** Subject of the message, used in emails. */
|
|
16
16
|
contentMarkdown: string
|
|
17
17
|
disabled: boolean
|
|
18
|
+
/** Message language. */
|
|
19
|
+
lang?: string
|
|
18
20
|
/** DID of the user who last updated the template. */
|
|
19
21
|
lastUpdatedBy: string
|
|
20
22
|
createdAt: string
|
|
@@ -15,6 +15,8 @@ export interface InputSchema {
|
|
|
15
15
|
id: string
|
|
16
16
|
/** Name of the template. */
|
|
17
17
|
name?: string
|
|
18
|
+
/** Message language. */
|
|
19
|
+
lang?: string
|
|
18
20
|
/** Content of the template, markdown supported, can contain variable placeholders. */
|
|
19
21
|
contentMarkdown?: string
|
|
20
22
|
/** Subject of the message, used in emails. */
|
|
@@ -40,6 +42,17 @@ export interface Response {
|
|
|
40
42
|
data: OutputSchema
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
export class DuplicateTemplateNameError extends XRPCError {
|
|
46
|
+
constructor(src: XRPCError) {
|
|
47
|
+
super(src.status, src.error, src.message, src.headers, { cause: src })
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
43
51
|
export function toKnownErr(e: any) {
|
|
52
|
+
if (e instanceof XRPCError) {
|
|
53
|
+
if (e.error === 'DuplicateTemplateName')
|
|
54
|
+
return new DuplicateTemplateNameError(e)
|
|
55
|
+
}
|
|
56
|
+
|
|
44
57
|
return e
|
|
45
58
|
}
|
|
@@ -25,6 +25,7 @@ export interface InputSchema {
|
|
|
25
25
|
| ToolsOzoneModerationDefs.ModEventMuteReporter
|
|
26
26
|
| ToolsOzoneModerationDefs.ModEventUnmuteReporter
|
|
27
27
|
| ToolsOzoneModerationDefs.ModEventReverseTakedown
|
|
28
|
+
| ToolsOzoneModerationDefs.ModEventResolveAppeal
|
|
28
29
|
| ToolsOzoneModerationDefs.ModEventEmail
|
|
29
30
|
| ToolsOzoneModerationDefs.ModEventTag
|
|
30
31
|
| { $type: string; [k: string]: unknown }
|