@atproto/api 0.1.2 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "codegen": "lex gen-api ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",
@@ -49,11 +49,14 @@ import * as ComAtprotoSessionCreate from './types/com/atproto/session/create'
49
49
  import * as ComAtprotoSessionDelete from './types/com/atproto/session/delete'
50
50
  import * as ComAtprotoSessionGet from './types/com/atproto/session/get'
51
51
  import * as ComAtprotoSessionRefresh from './types/com/atproto/session/refresh'
52
+ import * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks'
52
53
  import * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout'
53
54
  import * as ComAtprotoSyncGetCommitPath from './types/com/atproto/sync/getCommitPath'
54
55
  import * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead'
55
56
  import * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord'
56
57
  import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo'
58
+ import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
59
+ import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'
57
60
  import * as ComAtprotoSyncSubscribeAllRepos from './types/com/atproto/sync/subscribeAllRepos'
58
61
  import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'
59
62
  import * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles'
@@ -65,6 +68,7 @@ import * as AppBskyActorSearchTypeahead from './types/app/bsky/actor/searchTypea
65
68
  import * as AppBskyActorUpdateProfile from './types/app/bsky/actor/updateProfile'
66
69
  import * as AppBskyEmbedExternal from './types/app/bsky/embed/external'
67
70
  import * as AppBskyEmbedImages from './types/app/bsky/embed/images'
71
+ import * as AppBskyEmbedRecord from './types/app/bsky/embed/record'
68
72
  import * as AppBskyFeedFeedViewPost from './types/app/bsky/feed/feedViewPost'
69
73
  import * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed'
70
74
  import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread'
@@ -135,11 +139,14 @@ export * as ComAtprotoSessionCreate from './types/com/atproto/session/create'
135
139
  export * as ComAtprotoSessionDelete from './types/com/atproto/session/delete'
136
140
  export * as ComAtprotoSessionGet from './types/com/atproto/session/get'
137
141
  export * as ComAtprotoSessionRefresh from './types/com/atproto/session/refresh'
142
+ export * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks'
138
143
  export * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout'
139
144
  export * as ComAtprotoSyncGetCommitPath from './types/com/atproto/sync/getCommitPath'
140
145
  export * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead'
141
146
  export * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord'
142
147
  export * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo'
148
+ export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
149
+ export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'
143
150
  export * as ComAtprotoSyncSubscribeAllRepos from './types/com/atproto/sync/subscribeAllRepos'
144
151
  export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'
145
152
  export * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles'
@@ -151,6 +158,7 @@ export * as AppBskyActorSearchTypeahead from './types/app/bsky/actor/searchTypea
151
158
  export * as AppBskyActorUpdateProfile from './types/app/bsky/actor/updateProfile'
152
159
  export * as AppBskyEmbedExternal from './types/app/bsky/embed/external'
153
160
  export * as AppBskyEmbedImages from './types/app/bsky/embed/images'
161
+ export * as AppBskyEmbedRecord from './types/app/bsky/embed/record'
154
162
  export * as AppBskyFeedFeedViewPost from './types/app/bsky/feed/feedViewPost'
155
163
  export * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed'
156
164
  export * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread'
@@ -695,6 +703,17 @@ export class SyncNS {
695
703
  this._service = service
696
704
  }
697
705
 
706
+ getBlocks(
707
+ params?: ComAtprotoSyncGetBlocks.QueryParams,
708
+ opts?: ComAtprotoSyncGetBlocks.CallOptions,
709
+ ): Promise<ComAtprotoSyncGetBlocks.Response> {
710
+ return this._service.xrpc
711
+ .call('com.atproto.sync.getBlocks', params, undefined, opts)
712
+ .catch((e) => {
713
+ throw ComAtprotoSyncGetBlocks.toKnownErr(e)
714
+ })
715
+ }
716
+
698
717
  getCheckout(
699
718
  params?: ComAtprotoSyncGetCheckout.QueryParams,
700
719
  opts?: ComAtprotoSyncGetCheckout.CallOptions,
@@ -749,6 +768,28 @@ export class SyncNS {
749
768
  throw ComAtprotoSyncGetRepo.toKnownErr(e)
750
769
  })
751
770
  }
771
+
772
+ notifyOfUpdate(
773
+ params?: ComAtprotoSyncNotifyOfUpdate.QueryParams,
774
+ opts?: ComAtprotoSyncNotifyOfUpdate.CallOptions,
775
+ ): Promise<ComAtprotoSyncNotifyOfUpdate.Response> {
776
+ return this._service.xrpc
777
+ .call('com.atproto.sync.notifyOfUpdate', params, undefined, opts)
778
+ .catch((e) => {
779
+ throw ComAtprotoSyncNotifyOfUpdate.toKnownErr(e)
780
+ })
781
+ }
782
+
783
+ requestCrawl(
784
+ params?: ComAtprotoSyncRequestCrawl.QueryParams,
785
+ opts?: ComAtprotoSyncRequestCrawl.CallOptions,
786
+ ): Promise<ComAtprotoSyncRequestCrawl.Response> {
787
+ return this._service.xrpc
788
+ .call('com.atproto.sync.requestCrawl', params, undefined, opts)
789
+ .catch((e) => {
790
+ throw ComAtprotoSyncRequestCrawl.toKnownErr(e)
791
+ })
792
+ }
752
793
  }
753
794
 
754
795
  export class AppNS {
@@ -2025,6 +2025,35 @@ export const schemaDict = {
2025
2025
  },
2026
2026
  },
2027
2027
  },
2028
+ ComAtprotoSyncGetBlocks: {
2029
+ lexicon: 1,
2030
+ id: 'com.atproto.sync.getBlocks',
2031
+ defs: {
2032
+ main: {
2033
+ type: 'query',
2034
+ description: 'Gets blocks from a given repo.',
2035
+ parameters: {
2036
+ type: 'params',
2037
+ required: ['did', 'cids'],
2038
+ properties: {
2039
+ did: {
2040
+ type: 'string',
2041
+ description: 'The DID of the repo.',
2042
+ },
2043
+ cids: {
2044
+ type: 'array',
2045
+ items: {
2046
+ type: 'string',
2047
+ },
2048
+ },
2049
+ },
2050
+ },
2051
+ output: {
2052
+ encoding: 'application/vnd.ipld.car',
2053
+ },
2054
+ },
2055
+ },
2056
+ },
2028
2057
  ComAtprotoSyncGetCheckout: {
2029
2058
  lexicon: 1,
2030
2059
  id: 'com.atproto.sync.getCheckout',
@@ -2195,6 +2224,38 @@ export const schemaDict = {
2195
2224
  },
2196
2225
  },
2197
2226
  },
2227
+ ComAtprotoSyncNotifyOfUpdate: {
2228
+ lexicon: 1,
2229
+ id: 'com.atproto.sync.notifyOfUpdate',
2230
+ defs: {
2231
+ main: {
2232
+ type: 'query',
2233
+ description:
2234
+ 'Notify a crawling service of a recent update. Often when a long break between updates causes the connection with the crawling service to break.',
2235
+ },
2236
+ },
2237
+ },
2238
+ ComAtprotoSyncRequestCrawl: {
2239
+ lexicon: 1,
2240
+ id: 'com.atproto.sync.requestCrawl',
2241
+ defs: {
2242
+ main: {
2243
+ type: 'query',
2244
+ description: 'Request a service to persistently crawl hosted repos.',
2245
+ parameters: {
2246
+ type: 'params',
2247
+ required: ['hostname'],
2248
+ properties: {
2249
+ host: {
2250
+ type: 'string',
2251
+ description:
2252
+ 'Hostname of the service that is requesting to be crawled.',
2253
+ },
2254
+ },
2255
+ },
2256
+ },
2257
+ },
2258
+ },
2198
2259
  ComAtprotoSyncSubscribeAllRepos: {
2199
2260
  lexicon: 1,
2200
2261
  id: 'com.atproto.sync.subscribeAllRepos',
@@ -2205,68 +2266,68 @@ export const schemaDict = {
2205
2266
  parameters: {
2206
2267
  type: 'params',
2207
2268
  properties: {
2208
- backfillFrom: {
2209
- type: 'datetime',
2210
- description:
2211
- 'The last known event to backfill from. Does not dedupe as there may be an overlap in timestamps.',
2269
+ cursor: {
2270
+ type: 'integer',
2271
+ description: 'The last known event to backfill from.',
2212
2272
  },
2213
2273
  },
2214
2274
  },
2215
2275
  message: {
2216
2276
  schema: {
2217
- type: 'union',
2218
- refs: [
2219
- 'lex:com.atproto.sync.subscribeAllRepos#repoAppend',
2220
- 'lex:com.atproto.sync.subscribeAllRepos#repoRebase',
2277
+ type: 'object',
2278
+ required: [
2279
+ 'seq',
2280
+ 'event',
2281
+ 'repo',
2282
+ 'commit',
2283
+ 'prev',
2284
+ 'blocks',
2285
+ 'blobs',
2286
+ 'time',
2221
2287
  ],
2222
- },
2223
- codes: {
2224
- 'lex:com.atproto.sync.subscribeAllRepos#repoAppend': 0,
2225
- 'lex:com.atproto.sync.subscribeAllRepos#repoRebase': 1,
2226
- },
2227
- },
2228
- },
2229
- repoAppend: {
2230
- type: 'object',
2231
- required: ['time', 'repo', 'commit', 'blocks', 'blobs'],
2232
- properties: {
2233
- time: {
2234
- type: 'datetime',
2235
- },
2236
- repo: {
2237
- type: 'string',
2238
- },
2239
- commit: {
2240
- type: 'string',
2241
- },
2242
- prev: {
2243
- type: 'string',
2244
- },
2245
- blocks: {
2246
- type: 'unknown',
2247
- },
2248
- blobs: {
2249
- type: 'array',
2250
- items: {
2251
- type: 'string',
2288
+ nullable: ['prev'],
2289
+ properties: {
2290
+ seq: {
2291
+ type: 'integer',
2292
+ },
2293
+ event: {
2294
+ type: 'string',
2295
+ knownValues: ['repo_append', 'rebase'],
2296
+ },
2297
+ repo: {
2298
+ type: 'string',
2299
+ },
2300
+ commit: {
2301
+ type: 'string',
2302
+ },
2303
+ prev: {
2304
+ type: 'string',
2305
+ },
2306
+ blocks: {
2307
+ type: 'unknown',
2308
+ },
2309
+ blobs: {
2310
+ type: 'array',
2311
+ items: {
2312
+ type: 'string',
2313
+ },
2314
+ },
2315
+ time: {
2316
+ type: 'datetime',
2317
+ },
2252
2318
  },
2253
2319
  },
2254
2320
  },
2255
- },
2256
- repoRebase: {
2257
- type: 'object',
2258
- required: ['time', 'repo', 'commit'],
2259
- properties: {
2260
- time: {
2261
- type: 'datetime',
2262
- },
2263
- repo: {
2264
- type: 'string',
2321
+ infos: [
2322
+ {
2323
+ name: 'OutdatedCursor',
2265
2324
  },
2266
- commit: {
2267
- type: 'string',
2325
+ ],
2326
+ errors: [
2327
+ {
2328
+ name: 'FutureCursor',
2268
2329
  },
2269
- },
2330
+ ],
2270
2331
  },
2271
2332
  },
2272
2333
  },
@@ -2694,6 +2755,7 @@ export const schemaDict = {
2694
2755
  encoding: 'application/json',
2695
2756
  schema: {
2696
2757
  type: 'object',
2758
+ nullable: ['description', 'avatar', 'banner'],
2697
2759
  properties: {
2698
2760
  displayName: {
2699
2761
  type: 'string',
@@ -2889,6 +2951,65 @@ export const schemaDict = {
2889
2951
  },
2890
2952
  },
2891
2953
  },
2954
+ AppBskyEmbedRecord: {
2955
+ lexicon: 1,
2956
+ id: 'app.bsky.embed.record',
2957
+ description:
2958
+ 'An representation of a record embedded in another form of content',
2959
+ defs: {
2960
+ main: {
2961
+ type: 'object',
2962
+ required: ['record'],
2963
+ properties: {
2964
+ record: {
2965
+ type: 'ref',
2966
+ ref: 'lex:com.atproto.repo.strongRef',
2967
+ },
2968
+ },
2969
+ },
2970
+ presented: {
2971
+ type: 'object',
2972
+ required: ['record'],
2973
+ properties: {
2974
+ record: {
2975
+ type: 'union',
2976
+ refs: [
2977
+ 'lex:app.bsky.embed.record#presentedRecord',
2978
+ 'lex:app.bsky.embed.record#presentedNotFound',
2979
+ ],
2980
+ },
2981
+ },
2982
+ },
2983
+ presentedRecord: {
2984
+ type: 'object',
2985
+ required: ['uri', 'cid', 'author', 'record'],
2986
+ properties: {
2987
+ uri: {
2988
+ type: 'string',
2989
+ },
2990
+ cid: {
2991
+ type: 'string',
2992
+ },
2993
+ author: {
2994
+ type: 'ref',
2995
+ ref: 'lex:app.bsky.actor.ref#withInfo',
2996
+ },
2997
+ record: {
2998
+ type: 'unknown',
2999
+ },
3000
+ },
3001
+ },
3002
+ presentedNotFound: {
3003
+ type: 'object',
3004
+ required: ['uri'],
3005
+ properties: {
3006
+ uri: {
3007
+ type: 'string',
3008
+ },
3009
+ },
3010
+ },
3011
+ },
3012
+ },
2892
3013
  AppBskyFeedFeedViewPost: {
2893
3014
  lexicon: 1,
2894
3015
  id: 'app.bsky.feed.feedViewPost',
@@ -3280,6 +3401,7 @@ export const schemaDict = {
3280
3401
  refs: [
3281
3402
  'lex:app.bsky.embed.images',
3282
3403
  'lex:app.bsky.embed.external',
3404
+ 'lex:app.bsky.embed.record',
3283
3405
  ],
3284
3406
  },
3285
3407
  createdAt: {
@@ -3368,6 +3490,7 @@ export const schemaDict = {
3368
3490
  refs: [
3369
3491
  'lex:app.bsky.embed.images#presented',
3370
3492
  'lex:app.bsky.embed.external#presented',
3493
+ 'lex:app.bsky.embed.record#presented',
3371
3494
  ],
3372
3495
  },
3373
3496
  replyCount: {
@@ -4023,11 +4146,14 @@ export const ids = {
4023
4146
  ComAtprotoSessionDelete: 'com.atproto.session.delete',
4024
4147
  ComAtprotoSessionGet: 'com.atproto.session.get',
4025
4148
  ComAtprotoSessionRefresh: 'com.atproto.session.refresh',
4149
+ ComAtprotoSyncGetBlocks: 'com.atproto.sync.getBlocks',
4026
4150
  ComAtprotoSyncGetCheckout: 'com.atproto.sync.getCheckout',
4027
4151
  ComAtprotoSyncGetCommitPath: 'com.atproto.sync.getCommitPath',
4028
4152
  ComAtprotoSyncGetHead: 'com.atproto.sync.getHead',
4029
4153
  ComAtprotoSyncGetRecord: 'com.atproto.sync.getRecord',
4030
4154
  ComAtprotoSyncGetRepo: 'com.atproto.sync.getRepo',
4155
+ ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
4156
+ ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl',
4031
4157
  ComAtprotoSyncSubscribeAllRepos: 'com.atproto.sync.subscribeAllRepos',
4032
4158
  AppBskyActorGetProfile: 'app.bsky.actor.getProfile',
4033
4159
  AppBskyActorGetProfiles: 'app.bsky.actor.getProfiles',
@@ -4039,6 +4165,7 @@ export const ids = {
4039
4165
  AppBskyActorUpdateProfile: 'app.bsky.actor.updateProfile',
4040
4166
  AppBskyEmbedExternal: 'app.bsky.embed.external',
4041
4167
  AppBskyEmbedImages: 'app.bsky.embed.images',
4168
+ AppBskyEmbedRecord: 'app.bsky.embed.record',
4042
4169
  AppBskyFeedFeedViewPost: 'app.bsky.feed.feedViewPost',
4043
4170
  AppBskyFeedGetAuthorFeed: 'app.bsky.feed.getAuthorFeed',
4044
4171
  AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
@@ -10,9 +10,9 @@ export interface QueryParams {}
10
10
 
11
11
  export interface InputSchema {
12
12
  displayName?: string
13
- description?: string
14
- avatar?: { cid: string; mimeType: string; [k: string]: unknown }
15
- banner?: { cid: string; mimeType: string; [k: string]: unknown }
13
+ description?: string | null
14
+ avatar?: { cid: string; mimeType: string; [k: string]: unknown } | null
15
+ banner?: { cid: string; mimeType: string; [k: string]: unknown } | null
16
16
  [k: string]: unknown
17
17
  }
18
18
 
@@ -0,0 +1,83 @@
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 ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
8
+ import * as AppBskyActorRef from '../actor/ref'
9
+
10
+ export interface Main {
11
+ record: ComAtprotoRepoStrongRef.Main
12
+ [k: string]: unknown
13
+ }
14
+
15
+ export function isMain(v: unknown): v is Main {
16
+ return (
17
+ isObj(v) &&
18
+ hasProp(v, '$type') &&
19
+ (v.$type === 'app.bsky.embed.record#main' ||
20
+ v.$type === 'app.bsky.embed.record')
21
+ )
22
+ }
23
+
24
+ export function validateMain(v: unknown): ValidationResult {
25
+ return lexicons.validate('app.bsky.embed.record#main', v)
26
+ }
27
+
28
+ export interface Presented {
29
+ record:
30
+ | PresentedRecord
31
+ | PresentedNotFound
32
+ | { $type: string; [k: string]: unknown }
33
+ [k: string]: unknown
34
+ }
35
+
36
+ export function isPresented(v: unknown): v is Presented {
37
+ return (
38
+ isObj(v) &&
39
+ hasProp(v, '$type') &&
40
+ v.$type === 'app.bsky.embed.record#presented'
41
+ )
42
+ }
43
+
44
+ export function validatePresented(v: unknown): ValidationResult {
45
+ return lexicons.validate('app.bsky.embed.record#presented', v)
46
+ }
47
+
48
+ export interface PresentedRecord {
49
+ uri: string
50
+ cid: string
51
+ author: AppBskyActorRef.WithInfo
52
+ record: {}
53
+ [k: string]: unknown
54
+ }
55
+
56
+ export function isPresentedRecord(v: unknown): v is PresentedRecord {
57
+ return (
58
+ isObj(v) &&
59
+ hasProp(v, '$type') &&
60
+ v.$type === 'app.bsky.embed.record#presentedRecord'
61
+ )
62
+ }
63
+
64
+ export function validatePresentedRecord(v: unknown): ValidationResult {
65
+ return lexicons.validate('app.bsky.embed.record#presentedRecord', v)
66
+ }
67
+
68
+ export interface PresentedNotFound {
69
+ uri: string
70
+ [k: string]: unknown
71
+ }
72
+
73
+ export function isPresentedNotFound(v: unknown): v is PresentedNotFound {
74
+ return (
75
+ isObj(v) &&
76
+ hasProp(v, '$type') &&
77
+ v.$type === 'app.bsky.embed.record#presentedNotFound'
78
+ )
79
+ }
80
+
81
+ export function validatePresentedNotFound(v: unknown): ValidationResult {
82
+ return lexicons.validate('app.bsky.embed.record#presentedNotFound', v)
83
+ }
@@ -6,6 +6,7 @@ import { isObj, hasProp } from '../../../../util'
6
6
  import { lexicons } from '../../../../lexicons'
7
7
  import * as AppBskyEmbedImages from '../embed/images'
8
8
  import * as AppBskyEmbedExternal from '../embed/external'
9
+ import * as AppBskyEmbedRecord from '../embed/record'
9
10
  import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
10
11
  import * as AppBskyActorRef from '../actor/ref'
11
12
 
@@ -16,6 +17,7 @@ export interface Record {
16
17
  embed?:
17
18
  | AppBskyEmbedImages.Main
18
19
  | AppBskyEmbedExternal.Main
20
+ | AppBskyEmbedRecord.Main
19
21
  | { $type: string; [k: string]: unknown }
20
22
  createdAt: string
21
23
  [k: string]: unknown
@@ -94,6 +96,7 @@ export interface View {
94
96
  embed?:
95
97
  | AppBskyEmbedImages.Presented
96
98
  | AppBskyEmbedExternal.Presented
99
+ | AppBskyEmbedRecord.Presented
97
100
  | { $type: string; [k: string]: unknown }
98
101
  replyCount: number
99
102
  repostCount: number
@@ -0,0 +1,31 @@
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
+ cids: string[]
13
+ }
14
+
15
+ export type InputSchema = undefined
16
+
17
+ export interface CallOptions {
18
+ headers?: Headers
19
+ }
20
+
21
+ export interface Response {
22
+ success: boolean
23
+ headers: Headers
24
+ data: Uint8Array
25
+ }
26
+
27
+ export function toKnownErr(e: any) {
28
+ if (e instanceof XRPCError) {
29
+ }
30
+ return e
31
+ }
@@ -0,0 +1,26 @@
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
+
11
+ export type InputSchema = undefined
12
+
13
+ export interface CallOptions {
14
+ headers?: Headers
15
+ }
16
+
17
+ export interface Response {
18
+ success: boolean
19
+ headers: Headers
20
+ }
21
+
22
+ export function toKnownErr(e: any) {
23
+ if (e instanceof XRPCError) {
24
+ }
25
+ return e
26
+ }
@@ -0,0 +1,29 @@
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
+ /** Hostname of the service that is requesting to be crawled. */
11
+ host?: string
12
+ }
13
+
14
+ export type InputSchema = undefined
15
+
16
+ export interface CallOptions {
17
+ headers?: Headers
18
+ }
19
+
20
+ export interface Response {
21
+ success: boolean
22
+ headers: Headers
23
+ }
24
+
25
+ export function toKnownErr(e: any) {
26
+ if (e instanceof XRPCError) {
27
+ }
28
+ return e
29
+ }
@@ -5,44 +5,3 @@ import { Headers, XRPCError } from '@atproto/xrpc'
5
5
  import { ValidationResult } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
-
9
- export interface RepoAppend {
10
- time: string
11
- repo: string
12
- commit: string
13
- prev?: string
14
- blocks: {}
15
- blobs: string[]
16
- [k: string]: unknown
17
- }
18
-
19
- export function isRepoAppend(v: unknown): v is RepoAppend {
20
- return (
21
- isObj(v) &&
22
- hasProp(v, '$type') &&
23
- v.$type === 'com.atproto.sync.subscribeAllRepos#repoAppend'
24
- )
25
- }
26
-
27
- export function validateRepoAppend(v: unknown): ValidationResult {
28
- return lexicons.validate('com.atproto.sync.subscribeAllRepos#repoAppend', v)
29
- }
30
-
31
- export interface RepoRebase {
32
- time: string
33
- repo: string
34
- commit: string
35
- [k: string]: unknown
36
- }
37
-
38
- export function isRepoRebase(v: unknown): v is RepoRebase {
39
- return (
40
- isObj(v) &&
41
- hasProp(v, '$type') &&
42
- v.$type === 'com.atproto.sync.subscribeAllRepos#repoRebase'
43
- )
44
- }
45
-
46
- export function validateRepoRebase(v: unknown): ValidationResult {
47
- return lexicons.validate('com.atproto.sync.subscribeAllRepos#repoRebase', v)
48
- }