@atproto/api 0.1.1 → 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.
Files changed (47) hide show
  1. package/build.js +8 -0
  2. package/dist/client/index.d.ts +14 -0
  3. package/dist/client/lexicons.d.ts +251 -227
  4. package/dist/client/types/app/bsky/actor/getProfile.d.ts +2 -24
  5. package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +2 -15
  6. package/dist/client/types/app/bsky/actor/profile.d.ts +24 -1
  7. package/dist/client/types/app/bsky/actor/ref.d.ts +2 -0
  8. package/dist/client/types/app/bsky/actor/search.d.ts +2 -15
  9. package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +2 -13
  10. package/dist/client/types/app/bsky/actor/updateProfile.d.ts +3 -3
  11. package/dist/client/types/app/bsky/embed/record.d.ts +33 -0
  12. package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +2 -15
  13. package/dist/client/types/app/bsky/feed/post.d.ts +3 -2
  14. package/dist/client/types/app/bsky/graph/getFollowers.d.ts +1 -15
  15. package/dist/client/types/app/bsky/graph/getFollows.d.ts +1 -15
  16. package/dist/client/types/app/bsky/graph/getMutes.d.ts +2 -13
  17. package/dist/client/types/com/atproto/handle/update.d.ts +17 -0
  18. package/dist/client/types/com/atproto/report/reasonType.d.ts +1 -1
  19. package/dist/client/types/com/atproto/sync/getBlocks.d.ts +15 -0
  20. package/dist/client/types/com/atproto/sync/notifyOfUpdate.d.ts +12 -0
  21. package/dist/client/types/com/atproto/sync/requestCrawl.d.ts +13 -0
  22. package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +1 -0
  23. package/dist/index.js +709 -545
  24. package/dist/index.js.map +4 -4
  25. package/package.json +1 -1
  26. package/src/client/index.ts +56 -0
  27. package/src/client/lexicons.ts +290 -253
  28. package/src/client/types/app/bsky/actor/getProfile.ts +2 -35
  29. package/src/client/types/app/bsky/actor/getSuggestions.ts +2 -25
  30. package/src/client/types/app/bsky/actor/profile.ts +47 -1
  31. package/src/client/types/app/bsky/actor/ref.ts +2 -0
  32. package/src/client/types/app/bsky/actor/search.ts +2 -23
  33. package/src/client/types/app/bsky/actor/searchTypeahead.ts +2 -23
  34. package/src/client/types/app/bsky/actor/updateProfile.ts +3 -3
  35. package/src/client/types/app/bsky/embed/record.ts +83 -0
  36. package/src/client/types/app/bsky/feed/getRepostedBy.ts +2 -25
  37. package/src/client/types/app/bsky/feed/post.ts +3 -0
  38. package/src/client/types/app/bsky/graph/getFollowers.ts +1 -25
  39. package/src/client/types/app/bsky/graph/getFollows.ts +1 -25
  40. package/src/client/types/app/bsky/graph/getMutes.ts +2 -23
  41. package/src/client/types/com/atproto/handle/update.ts +31 -0
  42. package/src/client/types/com/atproto/report/reasonType.ts +2 -2
  43. package/src/client/types/com/atproto/sync/getBlocks.ts +31 -0
  44. package/src/client/types/com/atproto/sync/notifyOfUpdate.ts +26 -0
  45. package/src/client/types/com/atproto/sync/requestCrawl.ts +29 -0
  46. package/src/client/types/com/atproto/sync/subscribeAllRepos.ts +7 -0
  47. package/tsconfig.build.tsbuildinfo +1 -1
@@ -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;
@@ -1851,6 +1873,35 @@ export declare const schemaDict: {
1851
1873
  };
1852
1874
  };
1853
1875
  };
1876
+ ComAtprotoSyncGetBlocks: {
1877
+ lexicon: number;
1878
+ id: string;
1879
+ defs: {
1880
+ main: {
1881
+ type: string;
1882
+ description: string;
1883
+ parameters: {
1884
+ type: string;
1885
+ required: string[];
1886
+ properties: {
1887
+ did: {
1888
+ type: string;
1889
+ description: string;
1890
+ };
1891
+ cids: {
1892
+ type: string;
1893
+ items: {
1894
+ type: string;
1895
+ };
1896
+ };
1897
+ };
1898
+ };
1899
+ output: {
1900
+ encoding: string;
1901
+ };
1902
+ };
1903
+ };
1904
+ };
1854
1905
  ComAtprotoSyncGetCheckout: {
1855
1906
  lexicon: number;
1856
1907
  id: string;
@@ -2017,79 +2068,118 @@ export declare const schemaDict: {
2017
2068
  };
2018
2069
  };
2019
2070
  };
2020
- AppBskyActorGetProfile: {
2071
+ ComAtprotoSyncNotifyOfUpdate: {
2072
+ lexicon: number;
2073
+ id: string;
2074
+ defs: {
2075
+ main: {
2076
+ type: string;
2077
+ description: string;
2078
+ };
2079
+ };
2080
+ };
2081
+ ComAtprotoSyncRequestCrawl: {
2021
2082
  lexicon: number;
2022
2083
  id: string;
2023
2084
  defs: {
2024
2085
  main: {
2025
2086
  type: string;
2087
+ description: string;
2026
2088
  parameters: {
2027
2089
  type: string;
2028
2090
  required: string[];
2029
2091
  properties: {
2030
- actor: {
2092
+ host: {
2031
2093
  type: string;
2094
+ description: string;
2032
2095
  };
2033
2096
  };
2034
2097
  };
2035
- output: {
2036
- encoding: string;
2098
+ };
2099
+ };
2100
+ };
2101
+ ComAtprotoSyncSubscribeAllRepos: {
2102
+ lexicon: number;
2103
+ id: string;
2104
+ defs: {
2105
+ main: {
2106
+ type: string;
2107
+ description: string;
2108
+ parameters: {
2109
+ type: string;
2110
+ properties: {
2111
+ cursor: {
2112
+ type: string;
2113
+ description: string;
2114
+ };
2115
+ };
2116
+ };
2117
+ message: {
2037
2118
  schema: {
2038
2119
  type: string;
2039
2120
  required: string[];
2121
+ nullable: string[];
2040
2122
  properties: {
2041
- did: {
2042
- type: string;
2043
- };
2044
- declaration: {
2045
- type: string;
2046
- ref: string;
2047
- };
2048
- handle: {
2123
+ seq: {
2049
2124
  type: string;
2050
2125
  };
2051
- creator: {
2052
- type: string;
2053
- };
2054
- displayName: {
2055
- type: string;
2056
- maxLength: number;
2057
- };
2058
- description: {
2126
+ event: {
2059
2127
  type: string;
2060
- maxLength: number;
2128
+ knownValues: string[];
2061
2129
  };
2062
- avatar: {
2130
+ repo: {
2063
2131
  type: string;
2064
2132
  };
2065
- banner: {
2133
+ commit: {
2066
2134
  type: string;
2067
2135
  };
2068
- followersCount: {
2136
+ prev: {
2069
2137
  type: string;
2070
2138
  };
2071
- followsCount: {
2139
+ blocks: {
2072
2140
  type: string;
2073
2141
  };
2074
- postsCount: {
2142
+ blobs: {
2075
2143
  type: string;
2144
+ items: {
2145
+ type: string;
2146
+ };
2076
2147
  };
2077
- myState: {
2148
+ time: {
2078
2149
  type: string;
2079
- ref: string;
2080
2150
  };
2081
2151
  };
2082
2152
  };
2083
2153
  };
2154
+ infos: {
2155
+ name: string;
2156
+ }[];
2157
+ errors: {
2158
+ name: string;
2159
+ }[];
2084
2160
  };
2085
- myState: {
2161
+ };
2162
+ };
2163
+ AppBskyActorGetProfile: {
2164
+ lexicon: number;
2165
+ id: string;
2166
+ defs: {
2167
+ main: {
2086
2168
  type: string;
2087
- properties: {
2088
- follow: {
2089
- type: string;
2169
+ parameters: {
2170
+ type: string;
2171
+ required: string[];
2172
+ properties: {
2173
+ actor: {
2174
+ type: string;
2175
+ };
2090
2176
  };
2091
- muted: {
2177
+ };
2178
+ output: {
2179
+ encoding: string;
2180
+ schema: {
2092
2181
  type: string;
2182
+ ref: string;
2093
2183
  };
2094
2184
  };
2095
2185
  };
@@ -2174,35 +2264,6 @@ export declare const schemaDict: {
2174
2264
  };
2175
2265
  };
2176
2266
  };
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
2267
  };
2207
2268
  };
2208
2269
  AppBskyActorProfile: {
@@ -2255,9 +2316,6 @@ export declare const schemaDict: {
2255
2316
  handle: {
2256
2317
  type: string;
2257
2318
  };
2258
- creator: {
2259
- type: string;
2260
- };
2261
2319
  displayName: {
2262
2320
  type: string;
2263
2321
  maxLength: number;
@@ -2281,14 +2339,74 @@ export declare const schemaDict: {
2281
2339
  postsCount: {
2282
2340
  type: string;
2283
2341
  };
2342
+ creator: {
2343
+ type: string;
2344
+ };
2345
+ indexedAt: {
2346
+ type: string;
2347
+ };
2348
+ viewer: {
2349
+ type: string;
2350
+ ref: string;
2351
+ };
2284
2352
  myState: {
2285
2353
  type: string;
2286
2354
  ref: string;
2355
+ description: string;
2356
+ };
2357
+ };
2358
+ };
2359
+ viewBasic: {
2360
+ type: string;
2361
+ required: string[];
2362
+ properties: {
2363
+ did: {
2364
+ type: string;
2365
+ };
2366
+ declaration: {
2367
+ type: string;
2368
+ ref: string;
2369
+ };
2370
+ handle: {
2371
+ type: string;
2372
+ };
2373
+ displayName: {
2374
+ type: string;
2375
+ maxLength: number;
2376
+ };
2377
+ description: {
2378
+ type: string;
2379
+ maxLength: number;
2380
+ };
2381
+ avatar: {
2382
+ type: string;
2383
+ };
2384
+ indexedAt: {
2385
+ type: string;
2386
+ };
2387
+ viewer: {
2388
+ type: string;
2389
+ ref: string;
2390
+ };
2391
+ };
2392
+ };
2393
+ viewerState: {
2394
+ type: string;
2395
+ properties: {
2396
+ muted: {
2397
+ type: string;
2398
+ };
2399
+ following: {
2400
+ type: string;
2401
+ };
2402
+ followedBy: {
2403
+ type: string;
2287
2404
  };
2288
2405
  };
2289
2406
  };
2290
2407
  myState: {
2291
2408
  type: string;
2409
+ description: string;
2292
2410
  properties: {
2293
2411
  follow: {
2294
2412
  type: string;
@@ -2350,6 +2468,12 @@ export declare const schemaDict: {
2350
2468
  muted: {
2351
2469
  type: string;
2352
2470
  };
2471
+ following: {
2472
+ type: string;
2473
+ };
2474
+ followedBy: {
2475
+ type: string;
2476
+ };
2353
2477
  };
2354
2478
  };
2355
2479
  };
@@ -2398,35 +2522,6 @@ export declare const schemaDict: {
2398
2522
  };
2399
2523
  };
2400
2524
  };
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
2525
  };
2431
2526
  };
2432
2527
  AppBskyActorSearchTypeahead: {
@@ -2467,29 +2562,6 @@ export declare const schemaDict: {
2467
2562
  };
2468
2563
  };
2469
2564
  };
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
2565
  };
2494
2566
  };
2495
2567
  AppBskyActorUpdateProfile: {
@@ -2503,6 +2575,7 @@ export declare const schemaDict: {
2503
2575
  encoding: string;
2504
2576
  schema: {
2505
2577
  type: string;
2578
+ nullable: string[];
2506
2579
  properties: {
2507
2580
  displayName: {
2508
2581
  type: string;
@@ -2686,6 +2759,61 @@ export declare const schemaDict: {
2686
2759
  };
2687
2760
  };
2688
2761
  };
2762
+ AppBskyEmbedRecord: {
2763
+ lexicon: number;
2764
+ id: string;
2765
+ description: string;
2766
+ defs: {
2767
+ main: {
2768
+ type: string;
2769
+ required: string[];
2770
+ properties: {
2771
+ record: {
2772
+ type: string;
2773
+ ref: string;
2774
+ };
2775
+ };
2776
+ };
2777
+ presented: {
2778
+ type: string;
2779
+ required: string[];
2780
+ properties: {
2781
+ record: {
2782
+ type: string;
2783
+ refs: string[];
2784
+ };
2785
+ };
2786
+ };
2787
+ presentedRecord: {
2788
+ type: string;
2789
+ required: string[];
2790
+ properties: {
2791
+ uri: {
2792
+ type: string;
2793
+ };
2794
+ cid: {
2795
+ type: string;
2796
+ };
2797
+ author: {
2798
+ type: string;
2799
+ ref: string;
2800
+ };
2801
+ record: {
2802
+ type: string;
2803
+ };
2804
+ };
2805
+ };
2806
+ presentedNotFound: {
2807
+ type: string;
2808
+ required: string[];
2809
+ properties: {
2810
+ uri: {
2811
+ type: string;
2812
+ };
2813
+ };
2814
+ };
2815
+ };
2816
+ };
2689
2817
  AppBskyFeedFeedViewPost: {
2690
2818
  lexicon: number;
2691
2819
  id: string;
@@ -2908,35 +3036,6 @@ export declare const schemaDict: {
2908
3036
  };
2909
3037
  };
2910
3038
  };
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
3039
  };
2941
3040
  };
2942
3041
  AppBskyFeedGetTimeline: {
@@ -3441,35 +3540,6 @@ export declare const schemaDict: {
3441
3540
  };
3442
3541
  };
3443
3542
  };
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
3543
  };
3474
3544
  };
3475
3545
  AppBskyGraphGetFollows: {
@@ -3521,35 +3591,6 @@ export declare const schemaDict: {
3521
3591
  };
3522
3592
  };
3523
3593
  };
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
3594
  };
3554
3595
  };
3555
3596
  AppBskyGraphGetMutes: {
@@ -3593,29 +3634,6 @@ export declare const schemaDict: {
3593
3634
  };
3594
3635
  };
3595
3636
  };
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
3637
  };
3620
3638
  };
3621
3639
  AppBskyGraphMute: {
@@ -3859,6 +3877,7 @@ export declare const ids: {
3859
3877
  ComAtprotoAdminTakeModerationAction: string;
3860
3878
  ComAtprotoBlobUpload: string;
3861
3879
  ComAtprotoHandleResolve: string;
3880
+ ComAtprotoHandleUpdate: string;
3862
3881
  ComAtprotoRepoBatchWrite: string;
3863
3882
  ComAtprotoRepoCreateRecord: string;
3864
3883
  ComAtprotoRepoDeleteRecord: string;
@@ -3877,11 +3896,15 @@ export declare const ids: {
3877
3896
  ComAtprotoSessionDelete: string;
3878
3897
  ComAtprotoSessionGet: string;
3879
3898
  ComAtprotoSessionRefresh: string;
3899
+ ComAtprotoSyncGetBlocks: string;
3880
3900
  ComAtprotoSyncGetCheckout: string;
3881
3901
  ComAtprotoSyncGetCommitPath: string;
3882
3902
  ComAtprotoSyncGetHead: string;
3883
3903
  ComAtprotoSyncGetRecord: string;
3884
3904
  ComAtprotoSyncGetRepo: string;
3905
+ ComAtprotoSyncNotifyOfUpdate: string;
3906
+ ComAtprotoSyncRequestCrawl: string;
3907
+ ComAtprotoSyncSubscribeAllRepos: string;
3885
3908
  AppBskyActorGetProfile: string;
3886
3909
  AppBskyActorGetProfiles: string;
3887
3910
  AppBskyActorGetSuggestions: string;
@@ -3892,6 +3915,7 @@ export declare const ids: {
3892
3915
  AppBskyActorUpdateProfile: string;
3893
3916
  AppBskyEmbedExternal: string;
3894
3917
  AppBskyEmbedImages: string;
3918
+ AppBskyEmbedRecord: string;
3895
3919
  AppBskyFeedFeedViewPost: string;
3896
3920
  AppBskyFeedGetAuthorFeed: string;
3897
3921
  AppBskyFeedGetPostThread: 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;