@atproto/bsky 0.0.80 → 0.0.81

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 (26) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/lexicon/lexicons.d.ts +110 -3
  3. package/dist/lexicon/lexicons.d.ts.map +1 -1
  4. package/dist/lexicon/lexicons.js +117 -6
  5. package/dist/lexicon/lexicons.js.map +1 -1
  6. package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts +38 -4
  7. package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts.map +1 -1
  8. package/dist/lexicon/types/com/atproto/repo/applyWrites.js +31 -1
  9. package/dist/lexicon/types/com/atproto/repo/applyWrites.js.map +1 -1
  10. package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts +5 -2
  11. package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts.map +1 -1
  12. package/dist/lexicon/types/com/atproto/repo/defs.d.ts +12 -0
  13. package/dist/lexicon/types/com/atproto/repo/defs.d.ts.map +1 -0
  14. package/dist/lexicon/types/com/atproto/repo/defs.js +16 -0
  15. package/dist/lexicon/types/com/atproto/repo/defs.js.map +1 -0
  16. package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts +14 -2
  17. package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  18. package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts +5 -2
  19. package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts.map +1 -1
  20. package/package.json +4 -4
  21. package/src/lexicon/lexicons.ts +117 -6
  22. package/src/lexicon/types/com/atproto/repo/applyWrites.ts +70 -3
  23. package/src/lexicon/types/com/atproto/repo/createRecord.ts +5 -2
  24. package/src/lexicon/types/com/atproto/repo/defs.ts +25 -0
  25. package/src/lexicon/types/com/atproto/repo/deleteRecord.ts +13 -1
  26. package/src/lexicon/types/com/atproto/repo/putRecord.ts +5 -2
@@ -0,0 +1,25 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { lexicons } from '../../../../lexicons'
6
+ import { isObj, hasProp } from '../../../../util'
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
+ }
@@ -7,6 +7,7 @@ import { lexicons } from '../../../../lexicons'
7
7
  import { isObj, hasProp } from '../../../../util'
8
8
  import { CID } from 'multiformats/cid'
9
9
  import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
+ import * as ComAtprotoRepoDefs from './defs'
10
11
 
11
12
  export interface QueryParams {}
12
13
 
@@ -24,18 +25,29 @@ export interface InputSchema {
24
25
  [k: string]: unknown
25
26
  }
26
27
 
28
+ export interface OutputSchema {
29
+ commit?: ComAtprotoRepoDefs.CommitMeta
30
+ [k: string]: unknown
31
+ }
32
+
27
33
  export interface HandlerInput {
28
34
  encoding: 'application/json'
29
35
  body: InputSchema
30
36
  }
31
37
 
38
+ export interface HandlerSuccess {
39
+ encoding: 'application/json'
40
+ body: OutputSchema
41
+ headers?: { [key: string]: string }
42
+ }
43
+
32
44
  export interface HandlerError {
33
45
  status: number
34
46
  message?: string
35
47
  error?: 'InvalidSwap'
36
48
  }
37
49
 
38
- export type HandlerOutput = HandlerError | void
50
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
39
51
  export type HandlerReqCtx<HA extends HandlerAuth = never> = {
40
52
  auth: HA
41
53
  params: QueryParams
@@ -7,6 +7,7 @@ import { lexicons } from '../../../../lexicons'
7
7
  import { isObj, hasProp } from '../../../../util'
8
8
  import { CID } from 'multiformats/cid'
9
9
  import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
+ import * as ComAtprotoRepoDefs from './defs'
10
11
 
11
12
  export interface QueryParams {}
12
13
 
@@ -17,8 +18,8 @@ export interface InputSchema {
17
18
  collection: string
18
19
  /** The Record Key. */
19
20
  rkey: string
20
- /** Can be set to 'false' to skip Lexicon schema validation of record data. */
21
- validate: boolean
21
+ /** 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. */
22
+ validate?: boolean
22
23
  /** The record to write. */
23
24
  record: {}
24
25
  /** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation */
@@ -31,6 +32,8 @@ export interface InputSchema {
31
32
  export interface OutputSchema {
32
33
  uri: string
33
34
  cid: string
35
+ commit?: ComAtprotoRepoDefs.CommitMeta
36
+ validationStatus?: 'valid' | 'unknown' | (string & {})
34
37
  [k: string]: unknown
35
38
  }
36
39