@atproto/api 0.1.1 → 0.1.2

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 (34) hide show
  1. package/dist/client/index.d.ts +4 -0
  2. package/dist/client/lexicons.d.ts +158 -244
  3. package/dist/client/types/app/bsky/actor/getProfile.d.ts +2 -24
  4. package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +2 -15
  5. package/dist/client/types/app/bsky/actor/profile.d.ts +24 -1
  6. package/dist/client/types/app/bsky/actor/ref.d.ts +2 -0
  7. package/dist/client/types/app/bsky/actor/search.d.ts +2 -15
  8. package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +2 -13
  9. package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +2 -15
  10. package/dist/client/types/app/bsky/graph/getFollowers.d.ts +1 -15
  11. package/dist/client/types/app/bsky/graph/getFollows.d.ts +1 -15
  12. package/dist/client/types/app/bsky/graph/getMutes.d.ts +2 -13
  13. package/dist/client/types/com/atproto/handle/update.d.ts +17 -0
  14. package/dist/client/types/com/atproto/report/reasonType.d.ts +1 -1
  15. package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +20 -0
  16. package/dist/index.js +471 -524
  17. package/dist/index.js.map +4 -4
  18. package/package.json +1 -1
  19. package/src/client/index.ts +15 -0
  20. package/src/client/lexicons.ts +177 -267
  21. package/src/client/types/app/bsky/actor/getProfile.ts +2 -35
  22. package/src/client/types/app/bsky/actor/getSuggestions.ts +2 -25
  23. package/src/client/types/app/bsky/actor/profile.ts +47 -1
  24. package/src/client/types/app/bsky/actor/ref.ts +2 -0
  25. package/src/client/types/app/bsky/actor/search.ts +2 -23
  26. package/src/client/types/app/bsky/actor/searchTypeahead.ts +2 -23
  27. package/src/client/types/app/bsky/feed/getRepostedBy.ts +2 -25
  28. package/src/client/types/app/bsky/graph/getFollowers.ts +1 -25
  29. package/src/client/types/app/bsky/graph/getFollows.ts +1 -25
  30. package/src/client/types/app/bsky/graph/getMutes.ts +2 -23
  31. package/src/client/types/com/atproto/handle/update.ts +31 -0
  32. package/src/client/types/com/atproto/report/reasonType.ts +2 -2
  33. package/src/client/types/com/atproto/sync/subscribeAllRepos.ts +48 -0
  34. package/tsconfig.build.tsbuildinfo +1 -1
@@ -18,6 +18,7 @@ import * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRep
18
18
  import * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction';
19
19
  import * as ComAtprotoBlobUpload from './types/com/atproto/blob/upload';
20
20
  import * as ComAtprotoHandleResolve from './types/com/atproto/handle/resolve';
21
+ import * as ComAtprotoHandleUpdate from './types/com/atproto/handle/update';
21
22
  import * as ComAtprotoRepoBatchWrite from './types/com/atproto/repo/batchWrite';
22
23
  import * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord';
23
24
  import * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord';
@@ -88,6 +89,7 @@ export * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRep
88
89
  export * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction';
89
90
  export * as ComAtprotoBlobUpload from './types/com/atproto/blob/upload';
90
91
  export * as ComAtprotoHandleResolve from './types/com/atproto/handle/resolve';
92
+ export * as ComAtprotoHandleUpdate from './types/com/atproto/handle/update';
91
93
  export * as ComAtprotoRepoBatchWrite from './types/com/atproto/repo/batchWrite';
92
94
  export * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord';
93
95
  export * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord';
@@ -111,6 +113,7 @@ export * as ComAtprotoSyncGetCommitPath from './types/com/atproto/sync/getCommit
111
113
  export * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead';
112
114
  export * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord';
113
115
  export * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo';
116
+ export * as ComAtprotoSyncSubscribeAllRepos from './types/com/atproto/sync/subscribeAllRepos';
114
117
  export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile';
115
118
  export * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles';
116
119
  export * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions';
@@ -228,6 +231,7 @@ export declare class HandleNS {
228
231
  _service: AtpServiceClient;
229
232
  constructor(service: AtpServiceClient);
230
233
  resolve(params?: ComAtprotoHandleResolve.QueryParams, opts?: ComAtprotoHandleResolve.CallOptions): Promise<ComAtprotoHandleResolve.Response>;
234
+ update(data?: ComAtprotoHandleUpdate.InputSchema, opts?: ComAtprotoHandleUpdate.CallOptions): Promise<ComAtprotoHandleUpdate.Response>;
231
235
  }
232
236
  export declare class RepoNS {
233
237
  _service: AtpServiceClient;
@@ -1107,6 +1107,28 @@ export declare const schemaDict: {
1107
1107
  };
1108
1108
  };
1109
1109
  };
1110
+ ComAtprotoHandleUpdate: {
1111
+ lexicon: number;
1112
+ id: string;
1113
+ defs: {
1114
+ main: {
1115
+ type: string;
1116
+ description: string;
1117
+ input: {
1118
+ encoding: string;
1119
+ schema: {
1120
+ type: string;
1121
+ required: string[];
1122
+ properties: {
1123
+ handle: {
1124
+ type: string;
1125
+ };
1126
+ };
1127
+ };
1128
+ };
1129
+ };
1130
+ };
1131
+ };
1110
1132
  ComAtprotoRepoBatchWrite: {
1111
1133
  lexicon: number;
1112
1134
  id: string;
@@ -2017,80 +2039,98 @@ export declare const schemaDict: {
2017
2039
  };
2018
2040
  };
2019
2041
  };
2020
- AppBskyActorGetProfile: {
2042
+ ComAtprotoSyncSubscribeAllRepos: {
2021
2043
  lexicon: number;
2022
2044
  id: string;
2023
2045
  defs: {
2024
2046
  main: {
2025
2047
  type: string;
2048
+ description: string;
2026
2049
  parameters: {
2027
2050
  type: string;
2028
- required: string[];
2029
2051
  properties: {
2030
- actor: {
2052
+ backfillFrom: {
2031
2053
  type: string;
2054
+ description: string;
2032
2055
  };
2033
2056
  };
2034
2057
  };
2035
- output: {
2036
- encoding: string;
2058
+ message: {
2037
2059
  schema: {
2038
2060
  type: string;
2039
- required: string[];
2040
- properties: {
2041
- did: {
2042
- type: string;
2043
- };
2044
- declaration: {
2045
- type: string;
2046
- ref: string;
2047
- };
2048
- handle: {
2049
- type: string;
2050
- };
2051
- creator: {
2052
- type: string;
2053
- };
2054
- displayName: {
2055
- type: string;
2056
- maxLength: number;
2057
- };
2058
- description: {
2059
- type: string;
2060
- maxLength: number;
2061
- };
2062
- avatar: {
2063
- type: string;
2064
- };
2065
- banner: {
2066
- type: string;
2067
- };
2068
- followersCount: {
2069
- type: string;
2070
- };
2071
- followsCount: {
2072
- type: string;
2073
- };
2074
- postsCount: {
2075
- type: string;
2076
- };
2077
- myState: {
2078
- type: string;
2079
- ref: string;
2080
- };
2061
+ refs: string[];
2062
+ };
2063
+ codes: {
2064
+ 'lex:com.atproto.sync.subscribeAllRepos#repoAppend': number;
2065
+ 'lex:com.atproto.sync.subscribeAllRepos#repoRebase': number;
2066
+ };
2067
+ };
2068
+ };
2069
+ repoAppend: {
2070
+ type: string;
2071
+ required: string[];
2072
+ properties: {
2073
+ time: {
2074
+ type: string;
2075
+ };
2076
+ repo: {
2077
+ type: string;
2078
+ };
2079
+ commit: {
2080
+ type: string;
2081
+ };
2082
+ prev: {
2083
+ type: string;
2084
+ };
2085
+ blocks: {
2086
+ type: string;
2087
+ };
2088
+ blobs: {
2089
+ type: string;
2090
+ items: {
2091
+ type: string;
2081
2092
  };
2082
2093
  };
2083
2094
  };
2084
2095
  };
2085
- myState: {
2096
+ repoRebase: {
2086
2097
  type: string;
2098
+ required: string[];
2087
2099
  properties: {
2088
- follow: {
2100
+ time: {
2089
2101
  type: string;
2090
2102
  };
2091
- muted: {
2103
+ repo: {
2092
2104
  type: string;
2093
2105
  };
2106
+ commit: {
2107
+ type: string;
2108
+ };
2109
+ };
2110
+ };
2111
+ };
2112
+ };
2113
+ AppBskyActorGetProfile: {
2114
+ lexicon: number;
2115
+ id: string;
2116
+ defs: {
2117
+ main: {
2118
+ type: string;
2119
+ parameters: {
2120
+ type: string;
2121
+ required: string[];
2122
+ properties: {
2123
+ actor: {
2124
+ type: string;
2125
+ };
2126
+ };
2127
+ };
2128
+ output: {
2129
+ encoding: string;
2130
+ schema: {
2131
+ type: string;
2132
+ ref: string;
2133
+ };
2094
2134
  };
2095
2135
  };
2096
2136
  };
@@ -2174,35 +2214,6 @@ export declare const schemaDict: {
2174
2214
  };
2175
2215
  };
2176
2216
  };
2177
- actor: {
2178
- type: string;
2179
- required: string[];
2180
- properties: {
2181
- did: {
2182
- type: string;
2183
- };
2184
- declaration: {
2185
- type: string;
2186
- ref: string;
2187
- };
2188
- handle: {
2189
- type: string;
2190
- };
2191
- displayName: {
2192
- type: string;
2193
- maxLength: number;
2194
- };
2195
- description: {
2196
- type: string;
2197
- };
2198
- avatar: {
2199
- type: string;
2200
- };
2201
- indexedAt: {
2202
- type: string;
2203
- };
2204
- };
2205
- };
2206
2217
  };
2207
2218
  };
2208
2219
  AppBskyActorProfile: {
@@ -2255,9 +2266,6 @@ export declare const schemaDict: {
2255
2266
  handle: {
2256
2267
  type: string;
2257
2268
  };
2258
- creator: {
2259
- type: string;
2260
- };
2261
2269
  displayName: {
2262
2270
  type: string;
2263
2271
  maxLength: number;
@@ -2281,14 +2289,74 @@ export declare const schemaDict: {
2281
2289
  postsCount: {
2282
2290
  type: string;
2283
2291
  };
2292
+ creator: {
2293
+ type: string;
2294
+ };
2295
+ indexedAt: {
2296
+ type: string;
2297
+ };
2298
+ viewer: {
2299
+ type: string;
2300
+ ref: string;
2301
+ };
2284
2302
  myState: {
2285
2303
  type: string;
2286
2304
  ref: string;
2305
+ description: string;
2306
+ };
2307
+ };
2308
+ };
2309
+ viewBasic: {
2310
+ type: string;
2311
+ required: string[];
2312
+ properties: {
2313
+ did: {
2314
+ type: string;
2315
+ };
2316
+ declaration: {
2317
+ type: string;
2318
+ ref: string;
2319
+ };
2320
+ handle: {
2321
+ type: string;
2322
+ };
2323
+ displayName: {
2324
+ type: string;
2325
+ maxLength: number;
2326
+ };
2327
+ description: {
2328
+ type: string;
2329
+ maxLength: number;
2330
+ };
2331
+ avatar: {
2332
+ type: string;
2333
+ };
2334
+ indexedAt: {
2335
+ type: string;
2336
+ };
2337
+ viewer: {
2338
+ type: string;
2339
+ ref: string;
2340
+ };
2341
+ };
2342
+ };
2343
+ viewerState: {
2344
+ type: string;
2345
+ properties: {
2346
+ muted: {
2347
+ type: string;
2348
+ };
2349
+ following: {
2350
+ type: string;
2351
+ };
2352
+ followedBy: {
2353
+ type: string;
2287
2354
  };
2288
2355
  };
2289
2356
  };
2290
2357
  myState: {
2291
2358
  type: string;
2359
+ description: string;
2292
2360
  properties: {
2293
2361
  follow: {
2294
2362
  type: string;
@@ -2350,6 +2418,12 @@ export declare const schemaDict: {
2350
2418
  muted: {
2351
2419
  type: string;
2352
2420
  };
2421
+ following: {
2422
+ type: string;
2423
+ };
2424
+ followedBy: {
2425
+ type: string;
2426
+ };
2353
2427
  };
2354
2428
  };
2355
2429
  };
@@ -2398,35 +2472,6 @@ export declare const schemaDict: {
2398
2472
  };
2399
2473
  };
2400
2474
  };
2401
- user: {
2402
- type: string;
2403
- required: string[];
2404
- properties: {
2405
- did: {
2406
- type: string;
2407
- };
2408
- declaration: {
2409
- type: string;
2410
- ref: string;
2411
- };
2412
- handle: {
2413
- type: string;
2414
- };
2415
- displayName: {
2416
- type: string;
2417
- maxLength: number;
2418
- };
2419
- avatar: {
2420
- type: string;
2421
- };
2422
- description: {
2423
- type: string;
2424
- };
2425
- indexedAt: {
2426
- type: string;
2427
- };
2428
- };
2429
- };
2430
2475
  };
2431
2476
  };
2432
2477
  AppBskyActorSearchTypeahead: {
@@ -2467,29 +2512,6 @@ export declare const schemaDict: {
2467
2512
  };
2468
2513
  };
2469
2514
  };
2470
- user: {
2471
- type: string;
2472
- required: string[];
2473
- properties: {
2474
- did: {
2475
- type: string;
2476
- };
2477
- declaration: {
2478
- type: string;
2479
- ref: string;
2480
- };
2481
- handle: {
2482
- type: string;
2483
- };
2484
- displayName: {
2485
- type: string;
2486
- maxLength: number;
2487
- };
2488
- avatar: {
2489
- type: string;
2490
- };
2491
- };
2492
- };
2493
2515
  };
2494
2516
  };
2495
2517
  AppBskyActorUpdateProfile: {
@@ -2908,35 +2930,6 @@ export declare const schemaDict: {
2908
2930
  };
2909
2931
  };
2910
2932
  };
2911
- repostedBy: {
2912
- type: string;
2913
- required: string[];
2914
- properties: {
2915
- did: {
2916
- type: string;
2917
- };
2918
- declaration: {
2919
- type: string;
2920
- ref: string;
2921
- };
2922
- handle: {
2923
- type: string;
2924
- };
2925
- displayName: {
2926
- type: string;
2927
- maxLength: number;
2928
- };
2929
- avatar: {
2930
- type: string;
2931
- };
2932
- createdAt: {
2933
- type: string;
2934
- };
2935
- indexedAt: {
2936
- type: string;
2937
- };
2938
- };
2939
- };
2940
2933
  };
2941
2934
  };
2942
2935
  AppBskyFeedGetTimeline: {
@@ -3441,35 +3434,6 @@ export declare const schemaDict: {
3441
3434
  };
3442
3435
  };
3443
3436
  };
3444
- follower: {
3445
- type: string;
3446
- required: string[];
3447
- properties: {
3448
- did: {
3449
- type: string;
3450
- };
3451
- declaration: {
3452
- type: string;
3453
- ref: string;
3454
- };
3455
- handle: {
3456
- type: string;
3457
- };
3458
- displayName: {
3459
- type: string;
3460
- maxLength: number;
3461
- };
3462
- avatar: {
3463
- type: string;
3464
- };
3465
- createdAt: {
3466
- type: string;
3467
- };
3468
- indexedAt: {
3469
- type: string;
3470
- };
3471
- };
3472
- };
3473
3437
  };
3474
3438
  };
3475
3439
  AppBskyGraphGetFollows: {
@@ -3521,35 +3485,6 @@ export declare const schemaDict: {
3521
3485
  };
3522
3486
  };
3523
3487
  };
3524
- follow: {
3525
- type: string;
3526
- required: string[];
3527
- properties: {
3528
- did: {
3529
- type: string;
3530
- };
3531
- declaration: {
3532
- type: string;
3533
- ref: string;
3534
- };
3535
- handle: {
3536
- type: string;
3537
- };
3538
- displayName: {
3539
- type: string;
3540
- maxLength: number;
3541
- };
3542
- avatar: {
3543
- type: string;
3544
- };
3545
- createdAt: {
3546
- type: string;
3547
- };
3548
- indexedAt: {
3549
- type: string;
3550
- };
3551
- };
3552
- };
3553
3488
  };
3554
3489
  };
3555
3490
  AppBskyGraphGetMutes: {
@@ -3593,29 +3528,6 @@ export declare const schemaDict: {
3593
3528
  };
3594
3529
  };
3595
3530
  };
3596
- mute: {
3597
- type: string;
3598
- required: string[];
3599
- properties: {
3600
- did: {
3601
- type: string;
3602
- };
3603
- declaration: {
3604
- type: string;
3605
- ref: string;
3606
- };
3607
- handle: {
3608
- type: string;
3609
- };
3610
- displayName: {
3611
- type: string;
3612
- maxLength: number;
3613
- };
3614
- createdAt: {
3615
- type: string;
3616
- };
3617
- };
3618
- };
3619
3531
  };
3620
3532
  };
3621
3533
  AppBskyGraphMute: {
@@ -3859,6 +3771,7 @@ export declare const ids: {
3859
3771
  ComAtprotoAdminTakeModerationAction: string;
3860
3772
  ComAtprotoBlobUpload: string;
3861
3773
  ComAtprotoHandleResolve: string;
3774
+ ComAtprotoHandleUpdate: string;
3862
3775
  ComAtprotoRepoBatchWrite: string;
3863
3776
  ComAtprotoRepoCreateRecord: string;
3864
3777
  ComAtprotoRepoDeleteRecord: string;
@@ -3882,6 +3795,7 @@ export declare const ids: {
3882
3795
  ComAtprotoSyncGetHead: string;
3883
3796
  ComAtprotoSyncGetRecord: string;
3884
3797
  ComAtprotoSyncGetRepo: string;
3798
+ ComAtprotoSyncSubscribeAllRepos: string;
3885
3799
  AppBskyActorGetProfile: string;
3886
3800
  AppBskyActorGetProfiles: string;
3887
3801
  AppBskyActorGetSuggestions: string;
@@ -1,25 +1,10 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
- import { ValidationResult } from '@atproto/lexicon';
3
- import * as AppBskySystemDeclRef from '../system/declRef';
2
+ import * as AppBskyActorProfile from './profile';
4
3
  export interface QueryParams {
5
4
  actor: string;
6
5
  }
7
6
  export declare type InputSchema = undefined;
8
- export interface OutputSchema {
9
- did: string;
10
- declaration: AppBskySystemDeclRef.Main;
11
- handle: string;
12
- creator: string;
13
- displayName?: string;
14
- description?: string;
15
- avatar?: string;
16
- banner?: string;
17
- followersCount: number;
18
- followsCount: number;
19
- postsCount: number;
20
- myState?: MyState;
21
- [k: string]: unknown;
22
- }
7
+ export declare type OutputSchema = AppBskyActorProfile.View;
23
8
  export interface CallOptions {
24
9
  headers?: Headers;
25
10
  }
@@ -29,10 +14,3 @@ export interface Response {
29
14
  data: OutputSchema;
30
15
  }
31
16
  export declare function toKnownErr(e: any): any;
32
- export interface MyState {
33
- follow?: string;
34
- muted?: boolean;
35
- [k: string]: unknown;
36
- }
37
- export declare function isMyState(v: unknown): v is MyState;
38
- export declare function validateMyState(v: unknown): ValidationResult;
@@ -1,6 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
- import { ValidationResult } from '@atproto/lexicon';
3
- import * as AppBskySystemDeclRef from '../system/declRef';
2
+ import * as AppBskyActorProfile from './profile';
4
3
  export interface QueryParams {
5
4
  limit?: number;
6
5
  cursor?: string;
@@ -8,7 +7,7 @@ export interface QueryParams {
8
7
  export declare type InputSchema = undefined;
9
8
  export interface OutputSchema {
10
9
  cursor?: string;
11
- actors: Actor[];
10
+ actors: AppBskyActorProfile.ViewBasic[];
12
11
  [k: string]: unknown;
13
12
  }
14
13
  export interface CallOptions {
@@ -20,15 +19,3 @@ export interface Response {
20
19
  data: OutputSchema;
21
20
  }
22
21
  export declare function toKnownErr(e: any): any;
23
- export interface Actor {
24
- did: string;
25
- declaration: AppBskySystemDeclRef.Main;
26
- handle: string;
27
- displayName?: string;
28
- description?: string;
29
- avatar?: string;
30
- indexedAt?: string;
31
- [k: string]: unknown;
32
- }
33
- export declare function isActor(v: unknown): v is Actor;
34
- export declare function validateActor(v: unknown): ValidationResult;
@@ -21,7 +21,6 @@ export interface View {
21
21
  did: string;
22
22
  declaration: AppBskySystemDeclRef.Main;
23
23
  handle: string;
24
- creator: string;
25
24
  displayName?: string;
26
25
  description?: string;
27
26
  avatar?: string;
@@ -29,11 +28,35 @@ export interface View {
29
28
  followersCount: number;
30
29
  followsCount: number;
31
30
  postsCount: number;
31
+ creator: string;
32
+ indexedAt?: string;
33
+ viewer?: ViewerState;
32
34
  myState?: MyState;
33
35
  [k: string]: unknown;
34
36
  }
35
37
  export declare function isView(v: unknown): v is View;
36
38
  export declare function validateView(v: unknown): ValidationResult;
39
+ export interface ViewBasic {
40
+ did: string;
41
+ declaration: AppBskySystemDeclRef.Main;
42
+ handle: string;
43
+ displayName?: string;
44
+ description?: string;
45
+ avatar?: string;
46
+ indexedAt?: string;
47
+ viewer?: ViewerState;
48
+ [k: string]: unknown;
49
+ }
50
+ export declare function isViewBasic(v: unknown): v is ViewBasic;
51
+ export declare function validateViewBasic(v: unknown): ValidationResult;
52
+ export interface ViewerState {
53
+ muted?: boolean;
54
+ following?: string;
55
+ followedBy?: string;
56
+ [k: string]: unknown;
57
+ }
58
+ export declare function isViewerState(v: unknown): v is ViewerState;
59
+ export declare function validateViewerState(v: unknown): ValidationResult;
37
60
  export interface MyState {
38
61
  follow?: string;
39
62
  muted?: boolean;
@@ -20,6 +20,8 @@ export declare function isWithInfo(v: unknown): v is WithInfo;
20
20
  export declare function validateWithInfo(v: unknown): ValidationResult;
21
21
  export interface ViewerState {
22
22
  muted?: boolean;
23
+ following?: string;
24
+ followedBy?: string;
23
25
  [k: string]: unknown;
24
26
  }
25
27
  export declare function isViewerState(v: unknown): v is ViewerState;