@atproto/api 0.0.6 → 0.0.8

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 (86) hide show
  1. package/dist/client/index.d.ts +75 -44
  2. package/dist/client/lexicons.d.ts +1075 -407
  3. package/dist/client/types/app/bsky/actor/getProfile.d.ts +0 -2
  4. package/dist/client/types/app/bsky/actor/search.d.ts +1 -1
  5. package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +1 -1
  6. package/dist/client/types/app/bsky/actor/updateProfile.d.ts +0 -1
  7. package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +1 -8
  8. package/dist/client/types/app/bsky/graph/getFollows.d.ts +1 -0
  9. package/dist/client/types/app/bsky/notification/list.d.ts +1 -1
  10. package/dist/client/types/app/bsky/system/declRef.d.ts +1 -1
  11. package/dist/client/types/app/bsky/system/declaration.d.ts +1 -1
  12. package/dist/client/types/com/atproto/account/delete.d.ts +14 -2
  13. package/dist/client/types/com/atproto/account/requestDelete.d.ts +13 -0
  14. package/dist/client/types/com/atproto/admin/getModerationAction.d.ts +16 -0
  15. package/dist/client/types/com/atproto/admin/getModerationActions.d.ts +22 -0
  16. package/dist/client/types/com/atproto/admin/getModerationReport.d.ts +16 -0
  17. package/dist/client/types/com/atproto/admin/getModerationReports.d.ts +23 -0
  18. package/dist/client/types/com/atproto/admin/getRecord.d.ts +17 -0
  19. package/dist/client/types/com/atproto/admin/getRepo.d.ts +16 -0
  20. package/dist/client/types/com/atproto/admin/moderationAction.d.ts +49 -0
  21. package/dist/client/types/com/atproto/admin/moderationReport.d.ts +37 -0
  22. package/dist/client/types/com/atproto/admin/record.d.ts +40 -0
  23. package/dist/client/types/com/atproto/admin/repo.d.ts +45 -0
  24. package/dist/client/types/com/atproto/admin/resolveModerationReports.d.ts +22 -0
  25. package/dist/client/types/com/atproto/admin/reverseModerationAction.d.ts +22 -0
  26. package/dist/client/types/com/atproto/admin/searchRepos.d.ts +22 -0
  27. package/dist/client/types/com/atproto/admin/takeModerationAction.d.ts +28 -0
  28. package/dist/client/types/com/atproto/repo/recordRef.d.ts +8 -0
  29. package/dist/client/types/com/atproto/repo/repoRef.d.ts +7 -0
  30. package/dist/client/types/com/atproto/report/create.d.ts +39 -0
  31. package/dist/client/types/com/atproto/report/reasonType.d.ts +3 -0
  32. package/dist/client/types/com/atproto/report/subject.d.ts +23 -0
  33. package/dist/client/types/com/atproto/session/create.d.ts +5 -2
  34. package/dist/client/types/com/atproto/session/refresh.d.ts +4 -1
  35. package/dist/client/types/com/atproto/sync/getCheckout.d.ts +15 -0
  36. package/dist/client/types/com/atproto/sync/getCommitPath.d.ts +20 -0
  37. package/dist/client/types/com/atproto/sync/getHead.d.ts +18 -0
  38. package/dist/client/types/com/atproto/sync/getRecord.d.ts +17 -0
  39. package/dist/index.js +1997 -927
  40. package/dist/index.js.map +4 -4
  41. package/package.json +1 -1
  42. package/src/client/index.ts +249 -142
  43. package/src/client/lexicons.ts +1223 -478
  44. package/src/client/types/app/bsky/actor/getProfile.ts +0 -2
  45. package/src/client/types/app/bsky/actor/search.ts +1 -1
  46. package/src/client/types/app/bsky/actor/searchTypeahead.ts +1 -1
  47. package/src/client/types/app/bsky/actor/updateProfile.ts +0 -1
  48. package/src/client/types/app/bsky/feed/feedViewPost.ts +1 -19
  49. package/src/client/types/app/bsky/graph/getFollows.ts +1 -0
  50. package/src/client/types/app/bsky/notification/list.ts +1 -2
  51. package/src/client/types/app/bsky/system/declRef.ts +1 -4
  52. package/src/client/types/app/bsky/system/declaration.ts +1 -4
  53. package/src/client/types/com/atproto/account/delete.ts +21 -1
  54. package/src/client/types/com/atproto/account/requestDelete.ts +27 -0
  55. package/src/client/types/com/atproto/admin/getModerationAction.ts +31 -0
  56. package/src/client/types/com/atproto/admin/getModerationActions.ts +38 -0
  57. package/src/client/types/com/atproto/admin/getModerationReport.ts +31 -0
  58. package/src/client/types/com/atproto/admin/getModerationReports.ts +39 -0
  59. package/src/client/types/com/atproto/admin/getRecord.ts +32 -0
  60. package/src/client/types/com/atproto/admin/getRepo.ts +31 -0
  61. package/src/client/types/com/atproto/admin/moderationAction.ts +99 -0
  62. package/src/client/types/com/atproto/admin/moderationReport.ts +64 -0
  63. package/src/client/types/com/atproto/admin/record.ts +89 -0
  64. package/src/client/types/com/atproto/admin/repo.ts +103 -0
  65. package/src/client/types/com/atproto/admin/resolveModerationReports.ts +37 -0
  66. package/src/client/types/com/atproto/admin/reverseModerationAction.ts +37 -0
  67. package/src/client/types/com/atproto/admin/searchRepos.ts +38 -0
  68. package/src/client/types/com/atproto/admin/takeModerationAction.ts +47 -0
  69. package/src/client/types/com/atproto/repo/recordRef.ts +25 -0
  70. package/src/client/types/com/atproto/repo/repoRef.ts +24 -0
  71. package/src/client/types/com/atproto/report/create.ts +54 -0
  72. package/src/client/types/com/atproto/report/reasonType.ts +16 -0
  73. package/src/client/types/com/atproto/report/subject.ts +66 -0
  74. package/src/client/types/com/atproto/session/create.ts +9 -1
  75. package/src/client/types/com/atproto/session/refresh.ts +7 -0
  76. package/src/client/types/com/atproto/sync/{updateRepo.ts → getCheckout.ts} +4 -3
  77. package/src/client/types/com/atproto/sync/getCommitPath.ts +39 -0
  78. package/src/client/types/com/atproto/sync/{getRoot.ts → getHead.ts} +0 -0
  79. package/src/client/types/com/atproto/sync/getRecord.ts +34 -0
  80. package/tsconfig.build.tsbuildinfo +1 -1
  81. package/src/client/types/app/bsky/actor/createScene.ts +0 -55
  82. package/src/client/types/app/bsky/feed/trend.ts +0 -26
  83. package/src/client/types/app/bsky/graph/getAssertions.ts +0 -85
  84. package/src/client/types/app/bsky/graph/getMembers.ts +0 -62
  85. package/src/client/types/app/bsky/graph/getMemberships.ts +0 -62
  86. package/src/client/types/app/bsky/system/actorScene.ts +0 -9
@@ -0,0 +1,103 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult } from '@atproto/lexicon'
5
+ import { isObj, hasProp } from '../../../../util'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import * as ComAtprotoAdminModerationAction from './moderationAction'
8
+ import * as ComAtprotoAdminModerationReport from './moderationReport'
9
+
10
+ export interface View {
11
+ did: string
12
+ handle: string
13
+ account?: Account
14
+ relatedRecords: {}[]
15
+ indexedAt: string
16
+ moderation: Moderation
17
+ [k: string]: unknown
18
+ }
19
+
20
+ export function isView(v: unknown): v is View {
21
+ return (
22
+ isObj(v) && hasProp(v, '$type') && v.$type === 'com.atproto.admin.repo#view'
23
+ )
24
+ }
25
+
26
+ export function validateView(v: unknown): ValidationResult {
27
+ return lexicons.validate('com.atproto.admin.repo#view', v)
28
+ }
29
+
30
+ export interface ViewDetail {
31
+ did: string
32
+ handle: string
33
+ account?: Account
34
+ relatedRecords: {}[]
35
+ indexedAt: string
36
+ moderation: ModerationDetail
37
+ [k: string]: unknown
38
+ }
39
+
40
+ export function isViewDetail(v: unknown): v is ViewDetail {
41
+ return (
42
+ isObj(v) &&
43
+ hasProp(v, '$type') &&
44
+ v.$type === 'com.atproto.admin.repo#viewDetail'
45
+ )
46
+ }
47
+
48
+ export function validateViewDetail(v: unknown): ValidationResult {
49
+ return lexicons.validate('com.atproto.admin.repo#viewDetail', v)
50
+ }
51
+
52
+ export interface Account {
53
+ email: string
54
+ [k: string]: unknown
55
+ }
56
+
57
+ export function isAccount(v: unknown): v is Account {
58
+ return (
59
+ isObj(v) &&
60
+ hasProp(v, '$type') &&
61
+ v.$type === 'com.atproto.admin.repo#account'
62
+ )
63
+ }
64
+
65
+ export function validateAccount(v: unknown): ValidationResult {
66
+ return lexicons.validate('com.atproto.admin.repo#account', v)
67
+ }
68
+
69
+ export interface Moderation {
70
+ takedownId?: number
71
+ [k: string]: unknown
72
+ }
73
+
74
+ export function isModeration(v: unknown): v is Moderation {
75
+ return (
76
+ isObj(v) &&
77
+ hasProp(v, '$type') &&
78
+ v.$type === 'com.atproto.admin.repo#moderation'
79
+ )
80
+ }
81
+
82
+ export function validateModeration(v: unknown): ValidationResult {
83
+ return lexicons.validate('com.atproto.admin.repo#moderation', v)
84
+ }
85
+
86
+ export interface ModerationDetail {
87
+ actions: ComAtprotoAdminModerationAction.View[]
88
+ reports: ComAtprotoAdminModerationReport.View[]
89
+ takedownId?: number
90
+ [k: string]: unknown
91
+ }
92
+
93
+ export function isModerationDetail(v: unknown): v is ModerationDetail {
94
+ return (
95
+ isObj(v) &&
96
+ hasProp(v, '$type') &&
97
+ v.$type === 'com.atproto.admin.repo#moderationDetail'
98
+ )
99
+ }
100
+
101
+ export function validateModerationDetail(v: unknown): ValidationResult {
102
+ return lexicons.validate('com.atproto.admin.repo#moderationDetail', v)
103
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import * as ComAtprotoAdminModerationAction from './moderationAction'
9
+
10
+ export interface QueryParams {}
11
+
12
+ export interface InputSchema {
13
+ actionId: number
14
+ reportIds: number[]
15
+ createdBy: string
16
+ [k: string]: unknown
17
+ }
18
+
19
+ export type OutputSchema = ComAtprotoAdminModerationAction.View
20
+
21
+ export interface CallOptions {
22
+ headers?: Headers
23
+ qp?: QueryParams
24
+ encoding: 'application/json'
25
+ }
26
+
27
+ export interface Response {
28
+ success: boolean
29
+ headers: Headers
30
+ data: OutputSchema
31
+ }
32
+
33
+ export function toKnownErr(e: any) {
34
+ if (e instanceof XRPCError) {
35
+ }
36
+ return e
37
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import * as ComAtprotoAdminModerationAction from './moderationAction'
9
+
10
+ export interface QueryParams {}
11
+
12
+ export interface InputSchema {
13
+ id: number
14
+ reason: string
15
+ createdBy: string
16
+ [k: string]: unknown
17
+ }
18
+
19
+ export type OutputSchema = ComAtprotoAdminModerationAction.View
20
+
21
+ export interface CallOptions {
22
+ headers?: Headers
23
+ qp?: QueryParams
24
+ encoding: 'application/json'
25
+ }
26
+
27
+ export interface Response {
28
+ success: boolean
29
+ headers: Headers
30
+ data: OutputSchema
31
+ }
32
+
33
+ export function toKnownErr(e: any) {
34
+ if (e instanceof XRPCError) {
35
+ }
36
+ return e
37
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import * as ComAtprotoAdminRepo from './repo'
9
+
10
+ export interface QueryParams {
11
+ term?: string
12
+ limit?: number
13
+ before?: string
14
+ }
15
+
16
+ export type InputSchema = undefined
17
+
18
+ export interface OutputSchema {
19
+ cursor?: string
20
+ repos: ComAtprotoAdminRepo.View[]
21
+ [k: string]: unknown
22
+ }
23
+
24
+ export interface CallOptions {
25
+ headers?: Headers
26
+ }
27
+
28
+ export interface Response {
29
+ success: boolean
30
+ headers: Headers
31
+ data: OutputSchema
32
+ }
33
+
34
+ export function toKnownErr(e: any) {
35
+ if (e instanceof XRPCError) {
36
+ }
37
+ return e
38
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import * as ComAtprotoRepoRepoRef from '../repo/repoRef'
9
+ import * as ComAtprotoRepoRecordRef from '../repo/recordRef'
10
+ import * as ComAtprotoAdminModerationAction from './moderationAction'
11
+
12
+ export interface QueryParams {}
13
+
14
+ export interface InputSchema {
15
+ action:
16
+ | 'com.atproto.admin.moderationAction#takedown'
17
+ | 'com.atproto.admin.moderationAction#flag'
18
+ | 'com.atproto.admin.moderationAction#acknowledge'
19
+ | (string & {})
20
+ subject:
21
+ | ComAtprotoRepoRepoRef.Main
22
+ | ComAtprotoRepoRecordRef.Main
23
+ | { $type: string; [k: string]: unknown }
24
+ reason: string
25
+ createdBy: string
26
+ [k: string]: unknown
27
+ }
28
+
29
+ export type OutputSchema = ComAtprotoAdminModerationAction.View
30
+
31
+ export interface CallOptions {
32
+ headers?: Headers
33
+ qp?: QueryParams
34
+ encoding: 'application/json'
35
+ }
36
+
37
+ export interface Response {
38
+ success: boolean
39
+ headers: Headers
40
+ data: OutputSchema
41
+ }
42
+
43
+ export function toKnownErr(e: any) {
44
+ if (e instanceof XRPCError) {
45
+ }
46
+ return e
47
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult } from '@atproto/lexicon'
5
+ import { isObj, hasProp } from '../../../../util'
6
+ import { lexicons } from '../../../../lexicons'
7
+
8
+ export interface Main {
9
+ uri: string
10
+ cid?: string
11
+ [k: string]: unknown
12
+ }
13
+
14
+ export function isMain(v: unknown): v is Main {
15
+ return (
16
+ isObj(v) &&
17
+ hasProp(v, '$type') &&
18
+ (v.$type === 'com.atproto.repo.recordRef#main' ||
19
+ v.$type === 'com.atproto.repo.recordRef')
20
+ )
21
+ }
22
+
23
+ export function validateMain(v: unknown): ValidationResult {
24
+ return lexicons.validate('com.atproto.repo.recordRef#main', v)
25
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult } from '@atproto/lexicon'
5
+ import { isObj, hasProp } from '../../../../util'
6
+ import { lexicons } from '../../../../lexicons'
7
+
8
+ export interface Main {
9
+ did: string
10
+ [k: string]: unknown
11
+ }
12
+
13
+ export function isMain(v: unknown): v is Main {
14
+ return (
15
+ isObj(v) &&
16
+ hasProp(v, '$type') &&
17
+ (v.$type === 'com.atproto.repo.repoRef#main' ||
18
+ v.$type === 'com.atproto.repo.repoRef')
19
+ )
20
+ }
21
+
22
+ export function validateMain(v: unknown): ValidationResult {
23
+ return lexicons.validate('com.atproto.repo.repoRef#main', v)
24
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import * as ComAtprotoReportReasonType from './reasonType'
9
+ import * as ComAtprotoRepoRepoRef from '../repo/repoRef'
10
+ import * as ComAtprotoRepoRecordRef from '../repo/recordRef'
11
+ import * as ComAtprotoRepoStrongRef from '../repo/strongRef'
12
+
13
+ export interface QueryParams {}
14
+
15
+ export interface InputSchema {
16
+ reasonType: ComAtprotoReportReasonType.Main
17
+ reason?: string
18
+ subject:
19
+ | ComAtprotoRepoRepoRef.Main
20
+ | ComAtprotoRepoRecordRef.Main
21
+ | { $type: string; [k: string]: unknown }
22
+ [k: string]: unknown
23
+ }
24
+
25
+ export interface OutputSchema {
26
+ id: number
27
+ reasonType: ComAtprotoReportReasonType.Main
28
+ reason?: string
29
+ subject:
30
+ | ComAtprotoRepoRepoRef.Main
31
+ | ComAtprotoRepoStrongRef.Main
32
+ | { $type: string; [k: string]: unknown }
33
+ reportedByDid: string
34
+ createdAt: string
35
+ [k: string]: unknown
36
+ }
37
+
38
+ export interface CallOptions {
39
+ headers?: Headers
40
+ qp?: QueryParams
41
+ encoding: 'application/json'
42
+ }
43
+
44
+ export interface Response {
45
+ success: boolean
46
+ headers: Headers
47
+ data: OutputSchema
48
+ }
49
+
50
+ export function toKnownErr(e: any) {
51
+ if (e instanceof XRPCError) {
52
+ }
53
+ return e
54
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult } from '@atproto/lexicon'
5
+ import { isObj, hasProp } from '../../../../util'
6
+ import { lexicons } from '../../../../lexicons'
7
+
8
+ export type Main =
9
+ | 'com.atproto.report.reason#spam'
10
+ | 'com.atproto.report.reason#other'
11
+ | (string & {})
12
+
13
+ /** Moderation report reason: Spam. */
14
+ export const SPAM = 'com.atproto.report.reasonType#spam'
15
+ /** Moderation report reason: Other. */
16
+ export const OTHER = 'com.atproto.report.reasonType#other'
@@ -0,0 +1,66 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult } from '@atproto/lexicon'
5
+ import { isObj, hasProp } from '../../../../util'
6
+ import { lexicons } from '../../../../lexicons'
7
+
8
+ export interface Repo {
9
+ /** The DID of the repo. */
10
+ did: string
11
+ [k: string]: unknown
12
+ }
13
+
14
+ export function isRepo(v: unknown): v is Repo {
15
+ return (
16
+ isObj(v) &&
17
+ hasProp(v, '$type') &&
18
+ v.$type === 'com.atproto.report.subject#repo'
19
+ )
20
+ }
21
+
22
+ export function validateRepo(v: unknown): ValidationResult {
23
+ return lexicons.validate('com.atproto.report.subject#repo', v)
24
+ }
25
+
26
+ export interface Record {
27
+ /** The DID of the repo. */
28
+ did: string
29
+ /** The NSID of the collection. */
30
+ collection: string
31
+ /** The key of the record. */
32
+ rkey: string
33
+ /** The CID of the version of the record. If not specified, defaults to the most recent version. */
34
+ cid?: string
35
+ [k: string]: unknown
36
+ }
37
+
38
+ export function isRecord(v: unknown): v is Record {
39
+ return (
40
+ isObj(v) &&
41
+ hasProp(v, '$type') &&
42
+ v.$type === 'com.atproto.report.subject#record'
43
+ )
44
+ }
45
+
46
+ export function validateRecord(v: unknown): ValidationResult {
47
+ return lexicons.validate('com.atproto.report.subject#record', v)
48
+ }
49
+
50
+ export interface RecordRef {
51
+ uri: string
52
+ cid: string
53
+ [k: string]: unknown
54
+ }
55
+
56
+ export function isRecordRef(v: unknown): v is RecordRef {
57
+ return (
58
+ isObj(v) &&
59
+ hasProp(v, '$type') &&
60
+ v.$type === 'com.atproto.report.subject#recordRef'
61
+ )
62
+ }
63
+
64
+ export function validateRecordRef(v: unknown): ValidationResult {
65
+ return lexicons.validate('com.atproto.report.subject#recordRef', v)
66
+ }
@@ -9,7 +9,8 @@ import { lexicons } from '../../../../lexicons'
9
9
  export interface QueryParams {}
10
10
 
11
11
  export interface InputSchema {
12
- handle: string
12
+ /** Handle or other identifier supported by the server for the authenticating user. */
13
+ identifier?: string
13
14
  password: string
14
15
  [k: string]: unknown
15
16
  }
@@ -34,8 +35,15 @@ export interface Response {
34
35
  data: OutputSchema
35
36
  }
36
37
 
38
+ export class AccountTakedownError extends XRPCError {
39
+ constructor(src: XRPCError) {
40
+ super(src.status, src.error, src.message)
41
+ }
42
+ }
43
+
37
44
  export function toKnownErr(e: any) {
38
45
  if (e instanceof XRPCError) {
46
+ if (e.error === 'AccountTakedown') return new AccountTakedownError(e)
39
47
  }
40
48
  return e
41
49
  }
@@ -29,8 +29,15 @@ export interface Response {
29
29
  data: OutputSchema
30
30
  }
31
31
 
32
+ export class AccountTakedownError extends XRPCError {
33
+ constructor(src: XRPCError) {
34
+ super(src.status, src.error, src.message)
35
+ }
36
+ }
37
+
32
38
  export function toKnownErr(e: any) {
33
39
  if (e instanceof XRPCError) {
40
+ if (e.error === 'AccountTakedown') return new AccountTakedownError(e)
34
41
  }
35
42
  return e
36
43
  }
@@ -9,19 +9,20 @@ import { lexicons } from '../../../../lexicons'
9
9
  export interface QueryParams {
10
10
  /** The DID of the repo. */
11
11
  did: string
12
+ /** The commit to get the checkout from. Defaults to current HEAD. */
13
+ commit?: string
12
14
  }
13
15
 
14
- export type InputSchema = string | Uint8Array
16
+ export type InputSchema = undefined
15
17
 
16
18
  export interface CallOptions {
17
19
  headers?: Headers
18
- qp?: QueryParams
19
- encoding: 'application/cbor'
20
20
  }
21
21
 
22
22
  export interface Response {
23
23
  success: boolean
24
24
  headers: Headers
25
+ data: Uint8Array
25
26
  }
26
27
 
27
28
  export function toKnownErr(e: any) {
@@ -0,0 +1,39 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+
9
+ export interface QueryParams {
10
+ /** The DID of the repo. */
11
+ did: string
12
+ /** The most recent commit */
13
+ latest?: string
14
+ /** The earliest commit to start from */
15
+ earliest?: string
16
+ }
17
+
18
+ export type InputSchema = undefined
19
+
20
+ export interface OutputSchema {
21
+ commits: string[]
22
+ [k: string]: unknown
23
+ }
24
+
25
+ export interface CallOptions {
26
+ headers?: Headers
27
+ }
28
+
29
+ export interface Response {
30
+ success: boolean
31
+ headers: Headers
32
+ data: OutputSchema
33
+ }
34
+
35
+ export function toKnownErr(e: any) {
36
+ if (e instanceof XRPCError) {
37
+ }
38
+ return e
39
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+
9
+ export interface QueryParams {
10
+ /** The DID of the repo. */
11
+ did: string
12
+ collection: string
13
+ rkey: string
14
+ /** An optional past commit CID. */
15
+ commit?: string
16
+ }
17
+
18
+ export type InputSchema = undefined
19
+
20
+ export interface CallOptions {
21
+ headers?: Headers
22
+ }
23
+
24
+ export interface Response {
25
+ success: boolean
26
+ headers: Headers
27
+ data: Uint8Array
28
+ }
29
+
30
+ export function toKnownErr(e: any) {
31
+ if (e instanceof XRPCError) {
32
+ }
33
+ return e
34
+ }