@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.
Files changed (103) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/client/index.d.ts +18 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +53 -7
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +367 -18
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +390 -24
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/app/bsky/embed/defs.d.ts +13 -0
  11. package/dist/client/types/app/bsky/embed/defs.d.ts.map +1 -0
  12. package/dist/client/types/app/bsky/embed/defs.js +16 -0
  13. package/dist/client/types/app/bsky/embed/defs.js.map +1 -0
  14. package/dist/client/types/app/bsky/embed/images.d.ts +3 -10
  15. package/dist/client/types/app/bsky/embed/images.d.ts.map +1 -1
  16. package/dist/client/types/app/bsky/embed/images.js +1 -11
  17. package/dist/client/types/app/bsky/embed/images.js.map +1 -1
  18. package/dist/client/types/app/bsky/embed/record.d.ts +2 -1
  19. package/dist/client/types/app/bsky/embed/record.d.ts.map +1 -1
  20. package/dist/client/types/app/bsky/embed/record.js.map +1 -1
  21. package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +3 -2
  22. package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts.map +1 -1
  23. package/dist/client/types/app/bsky/embed/recordWithMedia.js.map +1 -1
  24. package/dist/client/types/app/bsky/embed/video.d.ts +33 -0
  25. package/dist/client/types/app/bsky/embed/video.d.ts.map +1 -0
  26. package/dist/client/types/app/bsky/embed/video.js +35 -0
  27. package/dist/client/types/app/bsky/embed/video.js.map +1 -0
  28. package/dist/client/types/app/bsky/feed/defs.d.ts +2 -1
  29. package/dist/client/types/app/bsky/feed/defs.d.ts.map +1 -1
  30. package/dist/client/types/app/bsky/feed/defs.js.map +1 -1
  31. package/dist/client/types/app/bsky/feed/post.d.ts +2 -1
  32. package/dist/client/types/app/bsky/feed/post.d.ts.map +1 -1
  33. package/dist/client/types/app/bsky/feed/post.js.map +1 -1
  34. package/dist/client/types/app/bsky/video/defs.d.ts +19 -0
  35. package/dist/client/types/app/bsky/video/defs.d.ts.map +1 -0
  36. package/dist/client/types/app/bsky/video/defs.js +16 -0
  37. package/dist/client/types/app/bsky/video/defs.js.map +1 -0
  38. package/dist/client/types/app/bsky/video/getJobStatus.d.ts +24 -0
  39. package/dist/client/types/app/bsky/video/getJobStatus.d.ts.map +1 -0
  40. package/dist/client/types/app/bsky/video/getJobStatus.js +8 -0
  41. package/dist/client/types/app/bsky/video/getJobStatus.js.map +1 -0
  42. package/dist/client/types/app/bsky/video/getUploadLimits.d.ts +26 -0
  43. package/dist/client/types/app/bsky/video/getUploadLimits.d.ts.map +1 -0
  44. package/dist/client/types/app/bsky/video/getUploadLimits.js +8 -0
  45. package/dist/client/types/app/bsky/video/getUploadLimits.js.map +1 -0
  46. package/dist/client/types/app/bsky/video/uploadVideo.d.ts +25 -0
  47. package/dist/client/types/app/bsky/video/uploadVideo.d.ts.map +1 -0
  48. package/dist/client/types/app/bsky/video/uploadVideo.js +8 -0
  49. package/dist/client/types/app/bsky/video/uploadVideo.js.map +1 -0
  50. package/dist/client/types/com/atproto/repo/applyWrites.d.ts +29 -1
  51. package/dist/client/types/com/atproto/repo/applyWrites.d.ts.map +1 -1
  52. package/dist/client/types/com/atproto/repo/applyWrites.js +31 -1
  53. package/dist/client/types/com/atproto/repo/applyWrites.js.map +1 -1
  54. package/dist/client/types/com/atproto/repo/createRecord.d.ts +4 -1
  55. package/dist/client/types/com/atproto/repo/createRecord.d.ts.map +1 -1
  56. package/dist/client/types/com/atproto/repo/createRecord.js.map +1 -1
  57. package/dist/client/types/com/atproto/repo/defs.d.ts +12 -0
  58. package/dist/client/types/com/atproto/repo/defs.d.ts.map +1 -0
  59. package/dist/client/types/com/atproto/repo/defs.js +16 -0
  60. package/dist/client/types/com/atproto/repo/defs.js.map +1 -0
  61. package/dist/client/types/com/atproto/repo/deleteRecord.d.ts +6 -0
  62. package/dist/client/types/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  63. package/dist/client/types/com/atproto/repo/deleteRecord.js.map +1 -1
  64. package/dist/client/types/com/atproto/repo/putRecord.d.ts +4 -1
  65. package/dist/client/types/com/atproto/repo/putRecord.d.ts.map +1 -1
  66. package/dist/client/types/com/atproto/repo/putRecord.js.map +1 -1
  67. package/dist/client/types/tools/ozone/communication/createTemplate.d.ts +6 -1
  68. package/dist/client/types/tools/ozone/communication/createTemplate.d.ts.map +1 -1
  69. package/dist/client/types/tools/ozone/communication/createTemplate.js +15 -1
  70. package/dist/client/types/tools/ozone/communication/createTemplate.js.map +1 -1
  71. package/dist/client/types/tools/ozone/communication/defs.d.ts +2 -0
  72. package/dist/client/types/tools/ozone/communication/defs.d.ts.map +1 -1
  73. package/dist/client/types/tools/ozone/communication/defs.js.map +1 -1
  74. package/dist/client/types/tools/ozone/communication/updateTemplate.d.ts +6 -1
  75. package/dist/client/types/tools/ozone/communication/updateTemplate.d.ts.map +1 -1
  76. package/dist/client/types/tools/ozone/communication/updateTemplate.js +15 -1
  77. package/dist/client/types/tools/ozone/communication/updateTemplate.js.map +1 -1
  78. package/dist/client/types/tools/ozone/moderation/emitEvent.d.ts +1 -1
  79. package/dist/client/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
  80. package/dist/client/types/tools/ozone/moderation/emitEvent.js.map +1 -1
  81. package/package.json +1 -1
  82. package/src/client/index.ts +65 -12
  83. package/src/client/lexicons.ts +393 -25
  84. package/src/client/types/app/bsky/embed/defs.ts +26 -0
  85. package/src/client/types/app/bsky/embed/images.ts +3 -21
  86. package/src/client/types/app/bsky/embed/record.ts +2 -0
  87. package/src/client/types/app/bsky/embed/recordWithMedia.ts +3 -0
  88. package/src/client/types/app/bsky/embed/video.ts +67 -0
  89. package/src/client/types/app/bsky/feed/defs.ts +2 -0
  90. package/src/client/types/app/bsky/feed/post.ts +2 -0
  91. package/src/client/types/app/bsky/video/defs.ts +32 -0
  92. package/src/client/types/app/bsky/video/getJobStatus.ts +35 -0
  93. package/src/client/types/app/bsky/video/getUploadLimits.ts +36 -0
  94. package/src/client/types/app/bsky/video/uploadVideo.ts +35 -0
  95. package/src/client/types/com/atproto/repo/applyWrites.ts +63 -1
  96. package/src/client/types/com/atproto/repo/createRecord.ts +4 -1
  97. package/src/client/types/com/atproto/repo/defs.ts +25 -0
  98. package/src/client/types/com/atproto/repo/deleteRecord.ts +7 -0
  99. package/src/client/types/com/atproto/repo/putRecord.ts +4 -1
  100. package/src/client/types/tools/ozone/communication/createTemplate.ts +13 -0
  101. package/src/client/types/tools/ozone/communication/defs.ts +2 -0
  102. package/src/client/types/tools/ozone/communication/updateTemplate.ts +13 -0
  103. 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 all operations. */
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 }