@atproto/api 0.0.1

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 (153) hide show
  1. package/README.md +34 -0
  2. package/babel.config.js +3 -0
  3. package/build.js +22 -0
  4. package/dist/index.js +8724 -0
  5. package/dist/index.js.map +7 -0
  6. package/dist/src/client/index.d.ts +462 -0
  7. package/dist/src/client/lexicons.d.ts +2910 -0
  8. package/dist/src/client/schemas.d.ts +17 -0
  9. package/dist/src/client/types/app/bsky/actor/createScene.d.ts +32 -0
  10. package/dist/src/client/types/app/bsky/actor/getProfile.d.ts +36 -0
  11. package/dist/src/client/types/app/bsky/actor/getSuggestions.d.ts +36 -0
  12. package/dist/src/client/types/app/bsky/actor/profile.d.ts +15 -0
  13. package/dist/src/client/types/app/bsky/actor/ref.d.ts +14 -0
  14. package/dist/src/client/types/app/bsky/actor/search.d.ts +32 -0
  15. package/dist/src/client/types/app/bsky/actor/searchTypeahead.d.ts +28 -0
  16. package/dist/src/client/types/app/bsky/actor/updateProfile.d.ts +48 -0
  17. package/dist/src/client/types/app/bsky/embed/external.d.ts +26 -0
  18. package/dist/src/client/types/app/bsky/embed/images.d.ts +23 -0
  19. package/dist/src/client/types/app/bsky/feed/debug.d.ts +57 -0
  20. package/dist/src/client/types/app/bsky/feed/embed.d.ts +36 -0
  21. package/dist/src/client/types/app/bsky/feed/feedViewPost.d.ts +26 -0
  22. package/dist/src/client/types/app/bsky/feed/getAuthorFeed.d.ts +22 -0
  23. package/dist/src/client/types/app/bsky/feed/getLikedBy.d.ts +29 -0
  24. package/dist/src/client/types/app/bsky/feed/getPostThread.d.ts +43 -0
  25. package/dist/src/client/types/app/bsky/feed/getRepostedBy.d.ts +35 -0
  26. package/dist/src/client/types/app/bsky/feed/getTimeline.d.ts +22 -0
  27. package/dist/src/client/types/app/bsky/feed/getVotes.d.ts +33 -0
  28. package/dist/src/client/types/app/bsky/feed/like.d.ts +10 -0
  29. package/dist/src/client/types/app/bsky/feed/mediaEmbed.d.ts +18 -0
  30. package/dist/src/client/types/app/bsky/feed/post.d.ts +54 -0
  31. package/dist/src/client/types/app/bsky/feed/repost.d.ts +6 -0
  32. package/dist/src/client/types/app/bsky/feed/setVote.d.ts +25 -0
  33. package/dist/src/client/types/app/bsky/feed/trend.d.ts +6 -0
  34. package/dist/src/client/types/app/bsky/feed/vote.d.ts +7 -0
  35. package/dist/src/client/types/app/bsky/graph/assertCreator.d.ts +1 -0
  36. package/dist/src/client/types/app/bsky/graph/assertMember.d.ts +1 -0
  37. package/dist/src/client/types/app/bsky/graph/assertion.d.ts +7 -0
  38. package/dist/src/client/types/app/bsky/graph/confirmation.d.ts +8 -0
  39. package/dist/src/client/types/app/bsky/graph/follow.d.ts +6 -0
  40. package/dist/src/client/types/app/bsky/graph/getAssertions.d.ts +43 -0
  41. package/dist/src/client/types/app/bsky/graph/getFollowers.d.ts +34 -0
  42. package/dist/src/client/types/app/bsky/graph/getFollows.d.ts +33 -0
  43. package/dist/src/client/types/app/bsky/graph/getMembers.d.ts +33 -0
  44. package/dist/src/client/types/app/bsky/graph/getMemberships.d.ts +33 -0
  45. package/dist/src/client/types/app/bsky/graph/invite.d.ts +10 -0
  46. package/dist/src/client/types/app/bsky/graph/inviteAccept.d.ts +14 -0
  47. package/dist/src/client/types/app/bsky/notification/getCount.d.ts +17 -0
  48. package/dist/src/client/types/app/bsky/notification/list.d.ts +32 -0
  49. package/dist/src/client/types/app/bsky/notification/updateSeen.d.ts +17 -0
  50. package/dist/src/client/types/app/bsky/system/actorScene.d.ts +1 -0
  51. package/dist/src/client/types/app/bsky/system/actorUser.d.ts +1 -0
  52. package/dist/src/client/types/app/bsky/system/declRef.d.ts +5 -0
  53. package/dist/src/client/types/app/bsky/system/declaration.d.ts +4 -0
  54. package/dist/src/client/types/com/atproto/account/create.d.ts +41 -0
  55. package/dist/src/client/types/com/atproto/account/createInviteCode.d.ts +22 -0
  56. package/dist/src/client/types/com/atproto/account/delete.d.ts +13 -0
  57. package/dist/src/client/types/com/atproto/account/get.d.ts +12 -0
  58. package/dist/src/client/types/com/atproto/account/requestPasswordReset.d.ts +17 -0
  59. package/dist/src/client/types/com/atproto/account/resetPassword.d.ts +24 -0
  60. package/dist/src/client/types/com/atproto/blob/upload.d.ts +19 -0
  61. package/dist/src/client/types/com/atproto/data/uploadFile.d.ts +22 -0
  62. package/dist/src/client/types/com/atproto/handle/resolve.d.ts +18 -0
  63. package/dist/src/client/types/com/atproto/repo/batchWrite.d.ts +39 -0
  64. package/dist/src/client/types/com/atproto/repo/createRecord.d.ts +26 -0
  65. package/dist/src/client/types/com/atproto/repo/deleteRecord.d.ts +19 -0
  66. package/dist/src/client/types/com/atproto/repo/describe.d.ts +22 -0
  67. package/dist/src/client/types/com/atproto/repo/getRecord.d.ts +23 -0
  68. package/dist/src/client/types/com/atproto/repo/listRecords.d.ts +30 -0
  69. package/dist/src/client/types/com/atproto/repo/putRecord.d.ts +27 -0
  70. package/dist/src/client/types/com/atproto/repo/strongRef.d.ts +5 -0
  71. package/dist/src/client/types/com/atproto/server/getAccountsConfig.d.ts +24 -0
  72. package/dist/src/client/types/com/atproto/session/create.d.ts +26 -0
  73. package/dist/src/client/types/com/atproto/session/delete.d.ts +13 -0
  74. package/dist/src/client/types/com/atproto/session/get.d.ts +18 -0
  75. package/dist/src/client/types/com/atproto/session/refresh.d.ts +21 -0
  76. package/dist/src/client/types/com/atproto/sync/getRepo.d.ts +15 -0
  77. package/dist/src/client/types/com/atproto/sync/getRoot.d.ts +18 -0
  78. package/dist/src/client/types/com/atproto/sync/updateRepo.d.ts +15 -0
  79. package/dist/src/index.d.ts +4 -0
  80. package/dist/src/session.d.ts +42 -0
  81. package/dist/tsconfig.build.tsbuildinfo +1 -0
  82. package/jest.config.js +6 -0
  83. package/package.json +21 -0
  84. package/src/client/index.ts +1393 -0
  85. package/src/client/lexicons.ts +3041 -0
  86. package/src/client/types/app/bsky/actor/createScene.ts +52 -0
  87. package/src/client/types/app/bsky/actor/getProfile.ts +50 -0
  88. package/src/client/types/app/bsky/actor/getSuggestions.ts +51 -0
  89. package/src/client/types/app/bsky/actor/profile.ts +10 -0
  90. package/src/client/types/app/bsky/actor/ref.ts +19 -0
  91. package/src/client/types/app/bsky/actor/search.ts +46 -0
  92. package/src/client/types/app/bsky/actor/searchTypeahead.ts +42 -0
  93. package/src/client/types/app/bsky/actor/updateProfile.ts +69 -0
  94. package/src/client/types/app/bsky/embed/external.ts +28 -0
  95. package/src/client/types/app/bsky/embed/images.ts +25 -0
  96. package/src/client/types/app/bsky/feed/feedViewPost.ts +30 -0
  97. package/src/client/types/app/bsky/feed/getAuthorFeed.ts +35 -0
  98. package/src/client/types/app/bsky/feed/getPostThread.ts +63 -0
  99. package/src/client/types/app/bsky/feed/getRepostedBy.ts +49 -0
  100. package/src/client/types/app/bsky/feed/getTimeline.ts +35 -0
  101. package/src/client/types/app/bsky/feed/getVotes.ts +47 -0
  102. package/src/client/types/app/bsky/feed/post.ts +64 -0
  103. package/src/client/types/app/bsky/feed/repost.ts +10 -0
  104. package/src/client/types/app/bsky/feed/setVote.ts +37 -0
  105. package/src/client/types/app/bsky/feed/trend.ts +10 -0
  106. package/src/client/types/app/bsky/feed/vote.ts +11 -0
  107. package/src/client/types/app/bsky/graph/assertCreator.ts +5 -0
  108. package/src/client/types/app/bsky/graph/assertMember.ts +5 -0
  109. package/src/client/types/app/bsky/graph/assertion.ts +11 -0
  110. package/src/client/types/app/bsky/graph/confirmation.ts +12 -0
  111. package/src/client/types/app/bsky/graph/follow.ts +10 -0
  112. package/src/client/types/app/bsky/graph/getAssertions.ts +58 -0
  113. package/src/client/types/app/bsky/graph/getFollowers.ts +48 -0
  114. package/src/client/types/app/bsky/graph/getFollows.ts +47 -0
  115. package/src/client/types/app/bsky/graph/getMembers.ts +47 -0
  116. package/src/client/types/app/bsky/graph/getMemberships.ts +47 -0
  117. package/src/client/types/app/bsky/notification/getCount.ts +29 -0
  118. package/src/client/types/app/bsky/notification/list.ts +55 -0
  119. package/src/client/types/app/bsky/notification/updateSeen.ts +28 -0
  120. package/src/client/types/app/bsky/system/actorScene.ts +5 -0
  121. package/src/client/types/app/bsky/system/actorUser.ts +5 -0
  122. package/src/client/types/app/bsky/system/declRef.ts +12 -0
  123. package/src/client/types/app/bsky/system/declaration.ts +10 -0
  124. package/src/client/types/com/atproto/account/create.ts +69 -0
  125. package/src/client/types/com/atproto/account/createInviteCode.ts +34 -0
  126. package/src/client/types/com/atproto/account/delete.ts +24 -0
  127. package/src/client/types/com/atproto/account/get.ts +23 -0
  128. package/src/client/types/com/atproto/account/requestPasswordReset.ts +28 -0
  129. package/src/client/types/com/atproto/account/resetPassword.ts +43 -0
  130. package/src/client/types/com/atproto/blob/upload.ts +31 -0
  131. package/src/client/types/com/atproto/handle/resolve.ts +32 -0
  132. package/src/client/types/com/atproto/repo/batchWrite.ts +55 -0
  133. package/src/client/types/com/atproto/repo/createRecord.ts +42 -0
  134. package/src/client/types/com/atproto/repo/deleteRecord.ts +33 -0
  135. package/src/client/types/com/atproto/repo/describe.ts +36 -0
  136. package/src/client/types/com/atproto/repo/getRecord.ts +40 -0
  137. package/src/client/types/com/atproto/repo/listRecords.ts +50 -0
  138. package/src/client/types/com/atproto/repo/putRecord.ts +44 -0
  139. package/src/client/types/com/atproto/repo/strongRef.ts +8 -0
  140. package/src/client/types/com/atproto/server/getAccountsConfig.ts +37 -0
  141. package/src/client/types/com/atproto/session/create.ts +38 -0
  142. package/src/client/types/com/atproto/session/delete.ts +24 -0
  143. package/src/client/types/com/atproto/session/get.ts +30 -0
  144. package/src/client/types/com/atproto/session/refresh.ts +33 -0
  145. package/src/client/types/com/atproto/sync/getRepo.ts +29 -0
  146. package/src/client/types/com/atproto/sync/getRoot.ts +32 -0
  147. package/src/client/types/com/atproto/sync/updateRepo.ts +28 -0
  148. package/src/index.ts +4 -0
  149. package/src/session.ts +194 -0
  150. package/tests/errors.test.ts +39 -0
  151. package/tests/session.test.ts +239 -0
  152. package/tsconfig.build.json +4 -0
  153. package/tsconfig.json +12 -0
@@ -0,0 +1,24 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export type InputSchema = undefined
9
+
10
+ export interface CallOptions {
11
+ headers?: Headers
12
+ qp?: QueryParams
13
+ }
14
+
15
+ export interface Response {
16
+ success: boolean
17
+ headers: Headers
18
+ }
19
+
20
+ export function toKnownErr(e: any) {
21
+ if (e instanceof XRPCError) {
22
+ }
23
+ return e
24
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export type InputSchema = undefined
9
+
10
+ export interface CallOptions {
11
+ headers?: Headers
12
+ }
13
+
14
+ export interface Response {
15
+ success: boolean
16
+ headers: Headers
17
+ }
18
+
19
+ export function toKnownErr(e: any) {
20
+ if (e instanceof XRPCError) {
21
+ }
22
+ return e
23
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export interface InputSchema {
9
+ email: string
10
+ [k: string]: unknown
11
+ }
12
+
13
+ export interface CallOptions {
14
+ headers?: Headers
15
+ qp?: QueryParams
16
+ encoding: 'application/json'
17
+ }
18
+
19
+ export interface Response {
20
+ success: boolean
21
+ headers: Headers
22
+ }
23
+
24
+ export function toKnownErr(e: any) {
25
+ if (e instanceof XRPCError) {
26
+ }
27
+ return e
28
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export interface InputSchema {
9
+ token: string
10
+ password: string
11
+ [k: string]: unknown
12
+ }
13
+
14
+ export interface CallOptions {
15
+ headers?: Headers
16
+ qp?: QueryParams
17
+ encoding: 'application/json'
18
+ }
19
+
20
+ export interface Response {
21
+ success: boolean
22
+ headers: Headers
23
+ }
24
+
25
+ export class ExpiredTokenError extends XRPCError {
26
+ constructor(src: XRPCError) {
27
+ super(src.status, src.error, src.message)
28
+ }
29
+ }
30
+
31
+ export class InvalidTokenError extends XRPCError {
32
+ constructor(src: XRPCError) {
33
+ super(src.status, src.error, src.message)
34
+ }
35
+ }
36
+
37
+ export function toKnownErr(e: any) {
38
+ if (e instanceof XRPCError) {
39
+ if (e.error === 'ExpiredToken') return new ExpiredTokenError(e)
40
+ if (e.error === 'InvalidToken') return new InvalidTokenError(e)
41
+ }
42
+ return e
43
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export type InputSchema = string | Uint8Array
9
+
10
+ export interface OutputSchema {
11
+ cid: string
12
+ [k: string]: unknown
13
+ }
14
+
15
+ export interface CallOptions {
16
+ headers?: Headers
17
+ qp?: QueryParams
18
+ encoding: string
19
+ }
20
+
21
+ export interface Response {
22
+ success: boolean
23
+ headers: Headers
24
+ data: OutputSchema
25
+ }
26
+
27
+ export function toKnownErr(e: any) {
28
+ if (e instanceof XRPCError) {
29
+ }
30
+ return e
31
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {
7
+ /** The handle to resolve. If not supplied, will resolve the host's own handle. */
8
+ handle?: string
9
+ }
10
+
11
+ export type InputSchema = undefined
12
+
13
+ export interface OutputSchema {
14
+ did: string
15
+ [k: string]: unknown
16
+ }
17
+
18
+ export interface CallOptions {
19
+ headers?: Headers
20
+ }
21
+
22
+ export interface Response {
23
+ success: boolean
24
+ headers: Headers
25
+ data: OutputSchema
26
+ }
27
+
28
+ export function toKnownErr(e: any) {
29
+ if (e instanceof XRPCError) {
30
+ }
31
+ return e
32
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export interface InputSchema {
9
+ /** The DID of the repo. */
10
+ did: string
11
+ /** Validate the records? */
12
+ validate?: boolean
13
+ writes: (Create | Update | Delete)[]
14
+ [k: string]: unknown
15
+ }
16
+
17
+ export interface CallOptions {
18
+ headers?: Headers
19
+ qp?: QueryParams
20
+ encoding: 'application/json'
21
+ }
22
+
23
+ export interface Response {
24
+ success: boolean
25
+ headers: Headers
26
+ }
27
+
28
+ export function toKnownErr(e: any) {
29
+ if (e instanceof XRPCError) {
30
+ }
31
+ return e
32
+ }
33
+
34
+ export interface Create {
35
+ action: 'create'
36
+ collection: string
37
+ rkey?: string
38
+ value: {}
39
+ [k: string]: unknown
40
+ }
41
+
42
+ export interface Update {
43
+ action: 'update'
44
+ collection: string
45
+ rkey: string
46
+ value: {}
47
+ [k: string]: unknown
48
+ }
49
+
50
+ export interface Delete {
51
+ action: 'delete'
52
+ collection: string
53
+ rkey: string
54
+ [k: string]: unknown
55
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export interface InputSchema {
9
+ /** The DID of the repo. */
10
+ did: string
11
+ /** The NSID of the record collection. */
12
+ collection: string
13
+ /** Validate the record? */
14
+ validate?: boolean
15
+ /** The record to create. */
16
+ record: {}
17
+ [k: string]: unknown
18
+ }
19
+
20
+ export interface OutputSchema {
21
+ uri: string
22
+ cid: string
23
+ [k: string]: unknown
24
+ }
25
+
26
+ export interface CallOptions {
27
+ headers?: Headers
28
+ qp?: QueryParams
29
+ encoding: 'application/json'
30
+ }
31
+
32
+ export interface Response {
33
+ success: boolean
34
+ headers: Headers
35
+ data: OutputSchema
36
+ }
37
+
38
+ export function toKnownErr(e: any) {
39
+ if (e instanceof XRPCError) {
40
+ }
41
+ return e
42
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export interface InputSchema {
9
+ /** The DID of the repo. */
10
+ did: string
11
+ /** The NSID of the record collection. */
12
+ collection: string
13
+ /** The key of the record. */
14
+ rkey: string
15
+ [k: string]: unknown
16
+ }
17
+
18
+ export interface CallOptions {
19
+ headers?: Headers
20
+ qp?: QueryParams
21
+ encoding: 'application/json'
22
+ }
23
+
24
+ export interface Response {
25
+ success: boolean
26
+ headers: Headers
27
+ }
28
+
29
+ export function toKnownErr(e: any) {
30
+ if (e instanceof XRPCError) {
31
+ }
32
+ return e
33
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {
7
+ /** The handle or DID of the repo. */
8
+ user: string
9
+ }
10
+
11
+ export type InputSchema = undefined
12
+
13
+ export interface OutputSchema {
14
+ handle: string
15
+ did: string
16
+ didDoc: {}
17
+ collections: string[]
18
+ handleIsCorrect: boolean
19
+ [k: string]: unknown
20
+ }
21
+
22
+ export interface CallOptions {
23
+ headers?: Headers
24
+ }
25
+
26
+ export interface Response {
27
+ success: boolean
28
+ headers: Headers
29
+ data: OutputSchema
30
+ }
31
+
32
+ export function toKnownErr(e: any) {
33
+ if (e instanceof XRPCError) {
34
+ }
35
+ return e
36
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {
7
+ /** The handle or DID of the repo. */
8
+ user: string
9
+ /** The NSID of the collection. */
10
+ collection: string
11
+ /** The key of the record. */
12
+ rkey: string
13
+ /** The CID of the version of the record. If not specified, then return the most recent version. */
14
+ cid?: string
15
+ }
16
+
17
+ export type InputSchema = undefined
18
+
19
+ export interface OutputSchema {
20
+ uri: string
21
+ cid?: string
22
+ value: {}
23
+ [k: string]: unknown
24
+ }
25
+
26
+ export interface CallOptions {
27
+ headers?: Headers
28
+ }
29
+
30
+ export interface Response {
31
+ success: boolean
32
+ headers: Headers
33
+ data: OutputSchema
34
+ }
35
+
36
+ export function toKnownErr(e: any) {
37
+ if (e instanceof XRPCError) {
38
+ }
39
+ return e
40
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {
7
+ /** The handle or DID of the repo. */
8
+ user: string
9
+ /** The NSID of the record type. */
10
+ collection: string
11
+ /** The number of records to return. */
12
+ limit?: number
13
+ /** A TID to filter the range of records returned. */
14
+ before?: string
15
+ /** A TID to filter the range of records returned. */
16
+ after?: string
17
+ /** Reverse the order of the returned records? */
18
+ reverse?: boolean
19
+ }
20
+
21
+ export type InputSchema = undefined
22
+
23
+ export interface OutputSchema {
24
+ cursor?: string
25
+ records: Record[]
26
+ [k: string]: unknown
27
+ }
28
+
29
+ export interface CallOptions {
30
+ headers?: Headers
31
+ }
32
+
33
+ export interface Response {
34
+ success: boolean
35
+ headers: Headers
36
+ data: OutputSchema
37
+ }
38
+
39
+ export function toKnownErr(e: any) {
40
+ if (e instanceof XRPCError) {
41
+ }
42
+ return e
43
+ }
44
+
45
+ export interface Record {
46
+ uri: string
47
+ cid: string
48
+ value: {}
49
+ [k: string]: unknown
50
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export interface InputSchema {
9
+ /** The DID of the repo. */
10
+ did: string
11
+ /** The NSID of the record type. */
12
+ collection: string
13
+ /** The TID of the record. */
14
+ rkey: string
15
+ /** Validate the record? */
16
+ validate?: boolean
17
+ /** The record to create. */
18
+ record: {}
19
+ [k: string]: unknown
20
+ }
21
+
22
+ export interface OutputSchema {
23
+ uri: string
24
+ cid: string
25
+ [k: string]: unknown
26
+ }
27
+
28
+ export interface CallOptions {
29
+ headers?: Headers
30
+ qp?: QueryParams
31
+ encoding: 'application/json'
32
+ }
33
+
34
+ export interface Response {
35
+ success: boolean
36
+ headers: Headers
37
+ data: OutputSchema
38
+ }
39
+
40
+ export function toKnownErr(e: any) {
41
+ if (e instanceof XRPCError) {
42
+ }
43
+ return e
44
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ export interface Main {
5
+ uri: string
6
+ cid: string
7
+ [k: string]: unknown
8
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export type InputSchema = undefined
9
+
10
+ export interface OutputSchema {
11
+ inviteCodeRequired?: boolean
12
+ availableUserDomains: string[]
13
+ links?: Links
14
+ [k: string]: unknown
15
+ }
16
+
17
+ export interface CallOptions {
18
+ headers?: Headers
19
+ }
20
+
21
+ export interface Response {
22
+ success: boolean
23
+ headers: Headers
24
+ data: OutputSchema
25
+ }
26
+
27
+ export function toKnownErr(e: any) {
28
+ if (e instanceof XRPCError) {
29
+ }
30
+ return e
31
+ }
32
+
33
+ export interface Links {
34
+ privacyPolicy?: string
35
+ termsOfService?: string
36
+ [k: string]: unknown
37
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export interface InputSchema {
9
+ handle: string
10
+ password: string
11
+ [k: string]: unknown
12
+ }
13
+
14
+ export interface OutputSchema {
15
+ accessJwt: string
16
+ refreshJwt: string
17
+ handle: string
18
+ did: string
19
+ [k: string]: unknown
20
+ }
21
+
22
+ export interface CallOptions {
23
+ headers?: Headers
24
+ qp?: QueryParams
25
+ encoding: 'application/json'
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,24 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export type InputSchema = undefined
9
+
10
+ export interface CallOptions {
11
+ headers?: Headers
12
+ qp?: QueryParams
13
+ }
14
+
15
+ export interface Response {
16
+ success: boolean
17
+ headers: Headers
18
+ }
19
+
20
+ export function toKnownErr(e: any) {
21
+ if (e instanceof XRPCError) {
22
+ }
23
+ return e
24
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export type InputSchema = undefined
9
+
10
+ export interface OutputSchema {
11
+ handle: string
12
+ did: string
13
+ [k: string]: unknown
14
+ }
15
+
16
+ export interface CallOptions {
17
+ headers?: Headers
18
+ }
19
+
20
+ export interface Response {
21
+ success: boolean
22
+ headers: Headers
23
+ data: OutputSchema
24
+ }
25
+
26
+ export function toKnownErr(e: any) {
27
+ if (e instanceof XRPCError) {
28
+ }
29
+ return e
30
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {}
7
+
8
+ export type InputSchema = undefined
9
+
10
+ export interface OutputSchema {
11
+ accessJwt: string
12
+ refreshJwt: string
13
+ handle: string
14
+ did: string
15
+ [k: string]: unknown
16
+ }
17
+
18
+ export interface CallOptions {
19
+ headers?: Headers
20
+ qp?: QueryParams
21
+ }
22
+
23
+ export interface Response {
24
+ success: boolean
25
+ headers: Headers
26
+ data: OutputSchema
27
+ }
28
+
29
+ export function toKnownErr(e: any) {
30
+ if (e instanceof XRPCError) {
31
+ }
32
+ return e
33
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+
6
+ export interface QueryParams {
7
+ /** The DID of the repo. */
8
+ did: string
9
+ /** A past commit CID. */
10
+ from?: string
11
+ }
12
+
13
+ export type InputSchema = undefined
14
+
15
+ export interface CallOptions {
16
+ headers?: Headers
17
+ }
18
+
19
+ export interface Response {
20
+ success: boolean
21
+ headers: Headers
22
+ data: Uint8Array
23
+ }
24
+
25
+ export function toKnownErr(e: any) {
26
+ if (e instanceof XRPCError) {
27
+ }
28
+ return e
29
+ }