@atproto/api 0.0.3 → 0.0.5

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 (109) hide show
  1. package/dist/client/index.d.ts +9 -0
  2. package/dist/client/lexicons.d.ts +129 -0
  3. package/dist/client/types/app/bsky/actor/getProfile.d.ts +4 -0
  4. package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +5 -0
  5. package/dist/client/types/app/bsky/actor/profile.d.ts +3 -0
  6. package/dist/client/types/app/bsky/actor/ref.d.ts +12 -0
  7. package/dist/client/types/app/bsky/actor/search.d.ts +3 -0
  8. package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +3 -0
  9. package/dist/client/types/app/bsky/embed/external.d.ts +9 -0
  10. package/dist/client/types/app/bsky/embed/images.d.ts +9 -0
  11. package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +9 -0
  12. package/dist/client/types/app/bsky/feed/getPostThread.d.ts +5 -0
  13. package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +3 -0
  14. package/dist/client/types/app/bsky/feed/getVotes.d.ts +3 -0
  15. package/dist/client/types/app/bsky/feed/post.d.ts +13 -0
  16. package/dist/client/types/app/bsky/feed/repost.d.ts +3 -0
  17. package/dist/client/types/app/bsky/feed/trend.d.ts +3 -0
  18. package/dist/client/types/app/bsky/feed/vote.d.ts +3 -0
  19. package/dist/client/types/app/bsky/graph/assertion.d.ts +3 -0
  20. package/dist/client/types/app/bsky/graph/confirmation.d.ts +3 -0
  21. package/dist/client/types/app/bsky/graph/follow.d.ts +3 -0
  22. package/dist/client/types/app/bsky/graph/getAssertions.d.ts +5 -0
  23. package/dist/client/types/app/bsky/graph/getFollowers.d.ts +3 -0
  24. package/dist/client/types/app/bsky/graph/getFollows.d.ts +3 -0
  25. package/dist/client/types/app/bsky/graph/getMembers.d.ts +3 -0
  26. package/dist/client/types/app/bsky/graph/getMemberships.d.ts +3 -0
  27. package/dist/client/types/app/bsky/graph/getMutes.d.ts +32 -0
  28. package/dist/client/types/app/bsky/graph/mute.d.ts +17 -0
  29. package/dist/client/types/app/bsky/graph/unmute.d.ts +17 -0
  30. package/dist/client/types/app/bsky/notification/list.d.ts +3 -0
  31. package/dist/client/types/app/bsky/system/declRef.d.ts +3 -0
  32. package/dist/client/types/app/bsky/system/declaration.d.ts +3 -0
  33. package/dist/client/types/com/atproto/repo/batchWrite.d.ts +7 -0
  34. package/dist/client/types/com/atproto/repo/listRecords.d.ts +3 -0
  35. package/dist/client/types/com/atproto/repo/strongRef.d.ts +3 -0
  36. package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +3 -0
  37. package/dist/client/util.d.ts +2 -0
  38. package/dist/index.js +713 -34
  39. package/dist/index.js.map +4 -4
  40. package/package.json +1 -1
  41. package/src/client/index.ts +39 -0
  42. package/src/client/lexicons.ts +138 -9
  43. package/src/client/types/app/bsky/actor/createScene.ts +3 -0
  44. package/src/client/types/app/bsky/actor/getProfile.ts +16 -0
  45. package/src/client/types/app/bsky/actor/getSuggestions.ts +27 -0
  46. package/src/client/types/app/bsky/actor/profile.ts +17 -0
  47. package/src/client/types/app/bsky/actor/ref.ts +43 -0
  48. package/src/client/types/app/bsky/actor/search.ts +13 -0
  49. package/src/client/types/app/bsky/actor/searchTypeahead.ts +15 -0
  50. package/src/client/types/app/bsky/actor/updateProfile.ts +3 -0
  51. package/src/client/types/app/bsky/embed/external.ts +53 -0
  52. package/src/client/types/app/bsky/embed/images.ts +51 -0
  53. package/src/client/types/app/bsky/feed/feedViewPost.ts +52 -0
  54. package/src/client/types/app/bsky/feed/getAuthorFeed.ts +3 -0
  55. package/src/client/types/app/bsky/feed/getPostThread.ts +27 -0
  56. package/src/client/types/app/bsky/feed/getRepostedBy.ts +15 -0
  57. package/src/client/types/app/bsky/feed/getTimeline.ts +3 -0
  58. package/src/client/types/app/bsky/feed/getVotes.ts +13 -0
  59. package/src/client/types/app/bsky/feed/post.ts +70 -0
  60. package/src/client/types/app/bsky/feed/repost.ts +16 -0
  61. package/src/client/types/app/bsky/feed/setVote.ts +3 -0
  62. package/src/client/types/app/bsky/feed/trend.ts +16 -0
  63. package/src/client/types/app/bsky/feed/vote.ts +15 -0
  64. package/src/client/types/app/bsky/graph/assertCreator.ts +4 -0
  65. package/src/client/types/app/bsky/graph/assertMember.ts +4 -0
  66. package/src/client/types/app/bsky/graph/assertion.ts +16 -0
  67. package/src/client/types/app/bsky/graph/confirmation.ts +16 -0
  68. package/src/client/types/app/bsky/graph/follow.ts +16 -0
  69. package/src/client/types/app/bsky/graph/getAssertions.ts +27 -0
  70. package/src/client/types/app/bsky/graph/getFollowers.ts +15 -0
  71. package/src/client/types/app/bsky/graph/getFollows.ts +15 -0
  72. package/src/client/types/app/bsky/graph/getMembers.ts +15 -0
  73. package/src/client/types/app/bsky/graph/getMemberships.ts +15 -0
  74. package/src/client/types/app/bsky/graph/getMutes.ts +58 -0
  75. package/src/client/types/app/bsky/graph/mute.ts +31 -0
  76. package/src/client/types/app/bsky/graph/unmute.ts +31 -0
  77. package/src/client/types/app/bsky/notification/getCount.ts +3 -0
  78. package/src/client/types/app/bsky/notification/list.ts +15 -0
  79. package/src/client/types/app/bsky/notification/updateSeen.ts +3 -0
  80. package/src/client/types/app/bsky/system/actorScene.ts +4 -0
  81. package/src/client/types/app/bsky/system/actorUser.ts +4 -0
  82. package/src/client/types/app/bsky/system/declRef.ts +17 -0
  83. package/src/client/types/app/bsky/system/declaration.ts +17 -0
  84. package/src/client/types/com/atproto/account/create.ts +3 -0
  85. package/src/client/types/com/atproto/account/createInviteCode.ts +3 -0
  86. package/src/client/types/com/atproto/account/delete.ts +3 -0
  87. package/src/client/types/com/atproto/account/get.ts +3 -0
  88. package/src/client/types/com/atproto/account/requestPasswordReset.ts +3 -0
  89. package/src/client/types/com/atproto/account/resetPassword.ts +3 -0
  90. package/src/client/types/com/atproto/blob/upload.ts +3 -0
  91. package/src/client/types/com/atproto/handle/resolve.ts +3 -0
  92. package/src/client/types/com/atproto/repo/batchWrite.ts +39 -0
  93. package/src/client/types/com/atproto/repo/createRecord.ts +3 -0
  94. package/src/client/types/com/atproto/repo/deleteRecord.ts +3 -0
  95. package/src/client/types/com/atproto/repo/describe.ts +3 -0
  96. package/src/client/types/com/atproto/repo/getRecord.ts +3 -0
  97. package/src/client/types/com/atproto/repo/listRecords.ts +15 -0
  98. package/src/client/types/com/atproto/repo/putRecord.ts +3 -0
  99. package/src/client/types/com/atproto/repo/strongRef.ts +17 -0
  100. package/src/client/types/com/atproto/server/getAccountsConfig.ts +15 -0
  101. package/src/client/types/com/atproto/session/create.ts +3 -0
  102. package/src/client/types/com/atproto/session/delete.ts +3 -0
  103. package/src/client/types/com/atproto/session/get.ts +3 -0
  104. package/src/client/types/com/atproto/session/refresh.ts +3 -0
  105. package/src/client/types/com/atproto/sync/getRepo.ts +3 -0
  106. package/src/client/types/com/atproto/sync/getRoot.ts +3 -0
  107. package/src/client/types/com/atproto/sync/updateRepo.ts +3 -0
  108. package/src/client/util.ts +13 -0
  109. package/tsconfig.build.tsbuildinfo +1 -1
@@ -47,6 +47,9 @@ import * as AppBskyGraphGetFollowers from './types/app/bsky/graph/getFollowers';
47
47
  import * as AppBskyGraphGetFollows from './types/app/bsky/graph/getFollows';
48
48
  import * as AppBskyGraphGetMembers from './types/app/bsky/graph/getMembers';
49
49
  import * as AppBskyGraphGetMemberships from './types/app/bsky/graph/getMemberships';
50
+ import * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes';
51
+ import * as AppBskyGraphMute from './types/app/bsky/graph/mute';
52
+ import * as AppBskyGraphUnmute from './types/app/bsky/graph/unmute';
50
53
  import * as AppBskyNotificationGetCount from './types/app/bsky/notification/getCount';
51
54
  import * as AppBskyNotificationList from './types/app/bsky/notification/list';
52
55
  import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen';
@@ -106,6 +109,9 @@ export * as AppBskyGraphGetFollowers from './types/app/bsky/graph/getFollowers';
106
109
  export * as AppBskyGraphGetFollows from './types/app/bsky/graph/getFollows';
107
110
  export * as AppBskyGraphGetMembers from './types/app/bsky/graph/getMembers';
108
111
  export * as AppBskyGraphGetMemberships from './types/app/bsky/graph/getMemberships';
112
+ export * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes';
113
+ export * as AppBskyGraphMute from './types/app/bsky/graph/mute';
114
+ export * as AppBskyGraphUnmute from './types/app/bsky/graph/unmute';
109
115
  export * as AppBskyNotificationGetCount from './types/app/bsky/notification/getCount';
110
116
  export * as AppBskyNotificationList from './types/app/bsky/notification/list';
111
117
  export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen';
@@ -363,6 +369,9 @@ export declare class GraphNS {
363
369
  getFollows(params?: AppBskyGraphGetFollows.QueryParams, opts?: AppBskyGraphGetFollows.CallOptions): Promise<AppBskyGraphGetFollows.Response>;
364
370
  getMembers(params?: AppBskyGraphGetMembers.QueryParams, opts?: AppBskyGraphGetMembers.CallOptions): Promise<AppBskyGraphGetMembers.Response>;
365
371
  getMemberships(params?: AppBskyGraphGetMemberships.QueryParams, opts?: AppBskyGraphGetMemberships.CallOptions): Promise<AppBskyGraphGetMemberships.Response>;
372
+ getMutes(params?: AppBskyGraphGetMutes.QueryParams, opts?: AppBskyGraphGetMutes.CallOptions): Promise<AppBskyGraphGetMutes.Response>;
373
+ mute(data?: AppBskyGraphMute.InputSchema, opts?: AppBskyGraphMute.CallOptions): Promise<AppBskyGraphMute.Response>;
374
+ unmute(data?: AppBskyGraphUnmute.InputSchema, opts?: AppBskyGraphUnmute.CallOptions): Promise<AppBskyGraphUnmute.Response>;
366
375
  }
367
376
  export declare class AssertionRecord {
368
377
  _service: ServiceClient;
@@ -999,6 +999,9 @@ export declare const schemaDict: {
999
999
  member: {
1000
1000
  type: string;
1001
1001
  };
1002
+ muted: {
1003
+ type: string;
1004
+ };
1002
1005
  };
1003
1006
  };
1004
1007
  };
@@ -1163,6 +1166,18 @@ export declare const schemaDict: {
1163
1166
  avatar: {
1164
1167
  type: string;
1165
1168
  };
1169
+ viewer: {
1170
+ type: string;
1171
+ ref: string;
1172
+ };
1173
+ };
1174
+ };
1175
+ viewerState: {
1176
+ type: string;
1177
+ properties: {
1178
+ muted: {
1179
+ type: string;
1180
+ };
1166
1181
  };
1167
1182
  };
1168
1183
  };
@@ -1964,6 +1979,7 @@ export declare const schemaDict: {
1964
1979
  };
1965
1980
  textSlice: {
1966
1981
  type: string;
1982
+ description: string;
1967
1983
  required: string[];
1968
1984
  properties: {
1969
1985
  start: {
@@ -2662,6 +2678,116 @@ export declare const schemaDict: {
2662
2678
  };
2663
2679
  };
2664
2680
  };
2681
+ AppBskyGraphGetMutes: {
2682
+ lexicon: number;
2683
+ id: string;
2684
+ defs: {
2685
+ main: {
2686
+ type: string;
2687
+ description: string;
2688
+ parameters: {
2689
+ type: string;
2690
+ properties: {
2691
+ limit: {
2692
+ type: string;
2693
+ minimum: number;
2694
+ maximum: number;
2695
+ default: number;
2696
+ };
2697
+ before: {
2698
+ type: string;
2699
+ };
2700
+ };
2701
+ };
2702
+ output: {
2703
+ encoding: string;
2704
+ schema: {
2705
+ type: string;
2706
+ required: string[];
2707
+ properties: {
2708
+ cursor: {
2709
+ type: string;
2710
+ };
2711
+ mutes: {
2712
+ type: string;
2713
+ items: {
2714
+ type: string;
2715
+ ref: string;
2716
+ };
2717
+ };
2718
+ };
2719
+ };
2720
+ };
2721
+ };
2722
+ mute: {
2723
+ type: string;
2724
+ required: string[];
2725
+ properties: {
2726
+ did: {
2727
+ type: string;
2728
+ };
2729
+ declaration: {
2730
+ type: string;
2731
+ ref: string;
2732
+ };
2733
+ handle: {
2734
+ type: string;
2735
+ };
2736
+ displayName: {
2737
+ type: string;
2738
+ maxLength: number;
2739
+ };
2740
+ createdAt: {
2741
+ type: string;
2742
+ };
2743
+ };
2744
+ };
2745
+ };
2746
+ };
2747
+ AppBskyGraphMute: {
2748
+ lexicon: number;
2749
+ id: string;
2750
+ defs: {
2751
+ main: {
2752
+ type: string;
2753
+ description: string;
2754
+ input: {
2755
+ encoding: string;
2756
+ schema: {
2757
+ type: string;
2758
+ required: string[];
2759
+ properties: {
2760
+ user: {
2761
+ type: string;
2762
+ };
2763
+ };
2764
+ };
2765
+ };
2766
+ };
2767
+ };
2768
+ };
2769
+ AppBskyGraphUnmute: {
2770
+ lexicon: number;
2771
+ id: string;
2772
+ defs: {
2773
+ main: {
2774
+ type: string;
2775
+ description: string;
2776
+ input: {
2777
+ encoding: string;
2778
+ schema: {
2779
+ type: string;
2780
+ required: string[];
2781
+ properties: {
2782
+ user: {
2783
+ type: string;
2784
+ };
2785
+ };
2786
+ };
2787
+ };
2788
+ };
2789
+ };
2790
+ };
2665
2791
  AppBskyNotificationGetCount: {
2666
2792
  lexicon: number;
2667
2793
  id: string;
@@ -2900,6 +3026,9 @@ export declare const ids: {
2900
3026
  AppBskyGraphGetFollows: string;
2901
3027
  AppBskyGraphGetMembers: string;
2902
3028
  AppBskyGraphGetMemberships: string;
3029
+ AppBskyGraphGetMutes: string;
3030
+ AppBskyGraphMute: string;
3031
+ AppBskyGraphUnmute: string;
2903
3032
  AppBskyNotificationGetCount: string;
2904
3033
  AppBskyNotificationList: string;
2905
3034
  AppBskyNotificationUpdateSeen: string;
@@ -1,4 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskySystemDeclRef from '../system/declRef';
3
4
  export interface QueryParams {
4
5
  actor: string;
@@ -32,5 +33,8 @@ export declare function toKnownErr(e: any): any;
32
33
  export interface MyState {
33
34
  follow?: string;
34
35
  member?: string;
36
+ muted?: boolean;
35
37
  [k: string]: unknown;
36
38
  }
39
+ export declare function isMyState(v: unknown): v is MyState;
40
+ export declare function validateMyState(v: unknown): ValidationResult;
@@ -1,4 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskySystemDeclRef from '../system/declRef';
3
4
  export interface QueryParams {
4
5
  limit?: number;
@@ -30,7 +31,11 @@ export interface Actor {
30
31
  myState?: MyState;
31
32
  [k: string]: unknown;
32
33
  }
34
+ export declare function isActor(v: unknown): v is Actor;
35
+ export declare function validateActor(v: unknown): ValidationResult;
33
36
  export interface MyState {
34
37
  follow?: string;
35
38
  [k: string]: unknown;
36
39
  }
40
+ export declare function isMyState(v: unknown): v is MyState;
41
+ export declare function validateMyState(v: unknown): ValidationResult;
@@ -1,3 +1,4 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  export interface Record {
2
3
  displayName: string;
3
4
  description?: string;
@@ -13,3 +14,5 @@ export interface Record {
13
14
  };
14
15
  [k: string]: unknown;
15
16
  }
17
+ export declare function isRecord(v: unknown): v is Record;
18
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -1,14 +1,26 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  import * as AppBskySystemDeclRef from '../system/declRef';
2
3
  export interface Main {
3
4
  did: string;
4
5
  declarationCid: string;
5
6
  [k: string]: unknown;
6
7
  }
8
+ export declare function isMain(v: unknown): v is Main;
9
+ export declare function validateMain(v: unknown): ValidationResult;
7
10
  export interface WithInfo {
8
11
  did: string;
9
12
  declaration: AppBskySystemDeclRef.Main;
10
13
  handle: string;
11
14
  displayName?: string;
12
15
  avatar?: string;
16
+ viewer?: ViewerState;
13
17
  [k: string]: unknown;
14
18
  }
19
+ export declare function isWithInfo(v: unknown): v is WithInfo;
20
+ export declare function validateWithInfo(v: unknown): ValidationResult;
21
+ export interface ViewerState {
22
+ muted?: boolean;
23
+ [k: string]: unknown;
24
+ }
25
+ export declare function isViewerState(v: unknown): v is ViewerState;
26
+ export declare function validateViewerState(v: unknown): ValidationResult;
@@ -1,4 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskySystemDeclRef from '../system/declRef';
3
4
  export interface QueryParams {
4
5
  term: string;
@@ -30,3 +31,5 @@ export interface User {
30
31
  indexedAt?: string;
31
32
  [k: string]: unknown;
32
33
  }
34
+ export declare function isUser(v: unknown): v is User;
35
+ export declare function validateUser(v: unknown): ValidationResult;
@@ -1,4 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskySystemDeclRef from '../system/declRef';
3
4
  export interface QueryParams {
4
5
  term: string;
@@ -26,3 +27,5 @@ export interface User {
26
27
  avatar?: string;
27
28
  [k: string]: unknown;
28
29
  }
30
+ export declare function isUser(v: unknown): v is User;
31
+ export declare function validateUser(v: unknown): ValidationResult;
@@ -1,7 +1,10 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  export interface Main {
2
3
  external: External;
3
4
  [k: string]: unknown;
4
5
  }
6
+ export declare function isMain(v: unknown): v is Main;
7
+ export declare function validateMain(v: unknown): ValidationResult;
5
8
  export interface External {
6
9
  uri: string;
7
10
  title: string;
@@ -13,10 +16,14 @@ export interface External {
13
16
  };
14
17
  [k: string]: unknown;
15
18
  }
19
+ export declare function isExternal(v: unknown): v is External;
20
+ export declare function validateExternal(v: unknown): ValidationResult;
16
21
  export interface Presented {
17
22
  external: PresentedExternal;
18
23
  [k: string]: unknown;
19
24
  }
25
+ export declare function isPresented(v: unknown): v is Presented;
26
+ export declare function validatePresented(v: unknown): ValidationResult;
20
27
  export interface PresentedExternal {
21
28
  uri: string;
22
29
  title: string;
@@ -24,3 +31,5 @@ export interface PresentedExternal {
24
31
  thumb?: string;
25
32
  [k: string]: unknown;
26
33
  }
34
+ export declare function isPresentedExternal(v: unknown): v is PresentedExternal;
35
+ export declare function validatePresentedExternal(v: unknown): ValidationResult;
@@ -1,7 +1,10 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  export interface Main {
2
3
  images: Image[];
3
4
  [k: string]: unknown;
4
5
  }
6
+ export declare function isMain(v: unknown): v is Main;
7
+ export declare function validateMain(v: unknown): ValidationResult;
5
8
  export interface Image {
6
9
  image: {
7
10
  cid: string;
@@ -11,13 +14,19 @@ export interface Image {
11
14
  alt: string;
12
15
  [k: string]: unknown;
13
16
  }
17
+ export declare function isImage(v: unknown): v is Image;
18
+ export declare function validateImage(v: unknown): ValidationResult;
14
19
  export interface Presented {
15
20
  images: PresentedImage[];
16
21
  [k: string]: unknown;
17
22
  }
23
+ export declare function isPresented(v: unknown): v is Presented;
24
+ export declare function validatePresented(v: unknown): ValidationResult;
18
25
  export interface PresentedImage {
19
26
  thumb: string;
20
27
  fullsize: string;
21
28
  alt: string;
22
29
  [k: string]: unknown;
23
30
  }
31
+ export declare function isPresentedImage(v: unknown): v is PresentedImage;
32
+ export declare function validatePresentedImage(v: unknown): ValidationResult;
@@ -1,3 +1,4 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  import * as AppBskyFeedPost from './post';
2
3
  import * as AppBskyActorRef from '../actor/ref';
3
4
  export interface Main {
@@ -9,18 +10,26 @@ export interface Main {
9
10
  };
10
11
  [k: string]: unknown;
11
12
  }
13
+ export declare function isMain(v: unknown): v is Main;
14
+ export declare function validateMain(v: unknown): ValidationResult;
12
15
  export interface ReplyRef {
13
16
  root: AppBskyFeedPost.View;
14
17
  parent: AppBskyFeedPost.View;
15
18
  [k: string]: unknown;
16
19
  }
20
+ export declare function isReplyRef(v: unknown): v is ReplyRef;
21
+ export declare function validateReplyRef(v: unknown): ValidationResult;
17
22
  export interface ReasonTrend {
18
23
  by: AppBskyActorRef.WithInfo;
19
24
  indexedAt: string;
20
25
  [k: string]: unknown;
21
26
  }
27
+ export declare function isReasonTrend(v: unknown): v is ReasonTrend;
28
+ export declare function validateReasonTrend(v: unknown): ValidationResult;
22
29
  export interface ReasonRepost {
23
30
  by: AppBskyActorRef.WithInfo;
24
31
  indexedAt: string;
25
32
  [k: string]: unknown;
26
33
  }
34
+ export declare function isReasonRepost(v: unknown): v is ReasonRepost;
35
+ export declare function validateReasonRepost(v: unknown): ValidationResult;
@@ -1,4 +1,5 @@
1
1
  import { Headers, XRPCError } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskyFeedPost from './post';
3
4
  export interface QueryParams {
4
5
  uri: string;
@@ -36,8 +37,12 @@ export interface ThreadViewPost {
36
37
  })[];
37
38
  [k: string]: unknown;
38
39
  }
40
+ export declare function isThreadViewPost(v: unknown): v is ThreadViewPost;
41
+ export declare function validateThreadViewPost(v: unknown): ValidationResult;
39
42
  export interface NotFoundPost {
40
43
  uri: string;
41
44
  notFound: true;
42
45
  [k: string]: unknown;
43
46
  }
47
+ export declare function isNotFoundPost(v: unknown): v is NotFoundPost;
48
+ export declare function validateNotFoundPost(v: unknown): ValidationResult;
@@ -1,4 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskySystemDeclRef from '../system/declRef';
3
4
  export interface QueryParams {
4
5
  uri: string;
@@ -33,3 +34,5 @@ export interface RepostedBy {
33
34
  indexedAt: string;
34
35
  [k: string]: unknown;
35
36
  }
37
+ export declare function isRepostedBy(v: unknown): v is RepostedBy;
38
+ export declare function validateRepostedBy(v: unknown): ValidationResult;
@@ -1,4 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskyActorRef from '../actor/ref';
3
4
  export interface QueryParams {
4
5
  uri: string;
@@ -31,3 +32,5 @@ export interface Vote {
31
32
  actor: AppBskyActorRef.WithInfo;
32
33
  [k: string]: unknown;
33
34
  }
35
+ export declare function isVote(v: unknown): v is Vote;
36
+ export declare function validateVote(v: unknown): ValidationResult;
@@ -1,3 +1,4 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  import * as AppBskyEmbedImages from '../embed/images';
2
3
  import * as AppBskyEmbedExternal from '../embed/external';
3
4
  import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
@@ -13,22 +14,30 @@ export interface Record {
13
14
  createdAt: string;
14
15
  [k: string]: unknown;
15
16
  }
17
+ export declare function isRecord(v: unknown): v is Record;
18
+ export declare function validateRecord(v: unknown): ValidationResult;
16
19
  export interface ReplyRef {
17
20
  root: ComAtprotoRepoStrongRef.Main;
18
21
  parent: ComAtprotoRepoStrongRef.Main;
19
22
  [k: string]: unknown;
20
23
  }
24
+ export declare function isReplyRef(v: unknown): v is ReplyRef;
25
+ export declare function validateReplyRef(v: unknown): ValidationResult;
21
26
  export interface Entity {
22
27
  index: TextSlice;
23
28
  type: string;
24
29
  value: string;
25
30
  [k: string]: unknown;
26
31
  }
32
+ export declare function isEntity(v: unknown): v is Entity;
33
+ export declare function validateEntity(v: unknown): ValidationResult;
27
34
  export interface TextSlice {
28
35
  start: number;
29
36
  end: number;
30
37
  [k: string]: unknown;
31
38
  }
39
+ export declare function isTextSlice(v: unknown): v is TextSlice;
40
+ export declare function validateTextSlice(v: unknown): ValidationResult;
32
41
  export interface View {
33
42
  uri: string;
34
43
  cid: string;
@@ -46,9 +55,13 @@ export interface View {
46
55
  viewer: ViewerState;
47
56
  [k: string]: unknown;
48
57
  }
58
+ export declare function isView(v: unknown): v is View;
59
+ export declare function validateView(v: unknown): ValidationResult;
49
60
  export interface ViewerState {
50
61
  repost?: string;
51
62
  upvote?: string;
52
63
  downvote?: string;
53
64
  [k: string]: unknown;
54
65
  }
66
+ export declare function isViewerState(v: unknown): v is ViewerState;
67
+ export declare function validateViewerState(v: unknown): ValidationResult;
@@ -1,6 +1,9 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
2
3
  export interface Record {
3
4
  subject: ComAtprotoRepoStrongRef.Main;
4
5
  createdAt: string;
5
6
  [k: string]: unknown;
6
7
  }
8
+ export declare function isRecord(v: unknown): v is Record;
9
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -1,6 +1,9 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
2
3
  export interface Record {
3
4
  subject: ComAtprotoRepoStrongRef.Main;
4
5
  createdAt: string;
5
6
  [k: string]: unknown;
6
7
  }
8
+ export declare function isRecord(v: unknown): v is Record;
9
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -1,3 +1,4 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
2
3
  export interface Record {
3
4
  subject: ComAtprotoRepoStrongRef.Main;
@@ -5,3 +6,5 @@ export interface Record {
5
6
  createdAt: string;
6
7
  [k: string]: unknown;
7
8
  }
9
+ export declare function isRecord(v: unknown): v is Record;
10
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -1,3 +1,4 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  import * as AppBskyActorRef from '../actor/ref';
2
3
  export interface Record {
3
4
  assertion: string;
@@ -5,3 +6,5 @@ export interface Record {
5
6
  createdAt: string;
6
7
  [k: string]: unknown;
7
8
  }
9
+ export declare function isRecord(v: unknown): v is Record;
10
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -1,3 +1,4 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  import * as AppBskyActorRef from '../actor/ref';
2
3
  import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
3
4
  export interface Record {
@@ -6,3 +7,5 @@ export interface Record {
6
7
  createdAt: string;
7
8
  [k: string]: unknown;
8
9
  }
10
+ export declare function isRecord(v: unknown): v is Record;
11
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -1,6 +1,9 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
1
2
  import * as AppBskyActorRef from '../actor/ref';
2
3
  export interface Record {
3
4
  subject: AppBskyActorRef.Main;
4
5
  createdAt: string;
5
6
  [k: string]: unknown;
6
7
  }
8
+ export declare function isRecord(v: unknown): v is Record;
9
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -1,4 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskyActorRef from '../actor/ref';
3
4
  export interface QueryParams {
4
5
  author?: string;
@@ -34,6 +35,8 @@ export interface Assertion {
34
35
  createdAt: string;
35
36
  [k: string]: unknown;
36
37
  }
38
+ export declare function isAssertion(v: unknown): v is Assertion;
39
+ export declare function validateAssertion(v: unknown): ValidationResult;
37
40
  export interface Confirmation {
38
41
  uri: string;
39
42
  cid: string;
@@ -41,3 +44,5 @@ export interface Confirmation {
41
44
  createdAt: string;
42
45
  [k: string]: unknown;
43
46
  }
47
+ export declare function isConfirmation(v: unknown): v is Confirmation;
48
+ export declare function validateConfirmation(v: unknown): ValidationResult;
@@ -1,4 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskyActorRef from '../actor/ref';
3
4
  import * as AppBskySystemDeclRef from '../system/declRef';
4
5
  export interface QueryParams {
@@ -32,3 +33,5 @@ export interface Follower {
32
33
  indexedAt: string;
33
34
  [k: string]: unknown;
34
35
  }
36
+ export declare function isFollower(v: unknown): v is Follower;
37
+ export declare function validateFollower(v: unknown): ValidationResult;
@@ -1,4 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskyActorRef from '../actor/ref';
3
4
  import * as AppBskySystemDeclRef from '../system/declRef';
4
5
  export interface QueryParams {
@@ -31,3 +32,5 @@ export interface Follow {
31
32
  indexedAt: string;
32
33
  [k: string]: unknown;
33
34
  }
35
+ export declare function isFollow(v: unknown): v is Follow;
36
+ export declare function validateFollow(v: unknown): ValidationResult;
@@ -1,4 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskyActorRef from '../actor/ref';
3
4
  import * as AppBskySystemDeclRef from '../system/declRef';
4
5
  export interface QueryParams {
@@ -31,3 +32,5 @@ export interface Member {
31
32
  indexedAt: string;
32
33
  [k: string]: unknown;
33
34
  }
35
+ export declare function isMember(v: unknown): v is Member;
36
+ export declare function validateMember(v: unknown): ValidationResult;
@@ -1,4 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
2
3
  import * as AppBskyActorRef from '../actor/ref';
3
4
  import * as AppBskySystemDeclRef from '../system/declRef';
4
5
  export interface QueryParams {
@@ -31,3 +32,5 @@ export interface Membership {
31
32
  indexedAt: string;
32
33
  [k: string]: unknown;
33
34
  }
35
+ export declare function isMembership(v: unknown): v is Membership;
36
+ export declare function validateMembership(v: unknown): ValidationResult;
@@ -0,0 +1,32 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
3
+ import * as AppBskySystemDeclRef from '../system/declRef';
4
+ export interface QueryParams {
5
+ limit?: number;
6
+ before?: string;
7
+ }
8
+ export declare type InputSchema = undefined;
9
+ export interface OutputSchema {
10
+ cursor?: string;
11
+ mutes: Mute[];
12
+ [k: string]: unknown;
13
+ }
14
+ export interface CallOptions {
15
+ headers?: Headers;
16
+ }
17
+ export interface Response {
18
+ success: boolean;
19
+ headers: Headers;
20
+ data: OutputSchema;
21
+ }
22
+ export declare function toKnownErr(e: any): any;
23
+ export interface Mute {
24
+ did: string;
25
+ declaration: AppBskySystemDeclRef.Main;
26
+ handle: string;
27
+ displayName?: string;
28
+ createdAt: string;
29
+ [k: string]: unknown;
30
+ }
31
+ export declare function isMute(v: unknown): v is Mute;
32
+ export declare function validateMute(v: unknown): ValidationResult;
@@ -0,0 +1,17 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ export interface QueryParams {
3
+ }
4
+ export interface InputSchema {
5
+ user: string;
6
+ [k: string]: unknown;
7
+ }
8
+ export interface CallOptions {
9
+ headers?: Headers;
10
+ qp?: QueryParams;
11
+ encoding: 'application/json';
12
+ }
13
+ export interface Response {
14
+ success: boolean;
15
+ headers: Headers;
16
+ }
17
+ export declare function toKnownErr(e: any): any;