@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
@@ -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
  term?: string;
6
5
  limit?: number;
@@ -9,7 +8,7 @@ export interface QueryParams {
9
8
  export declare type InputSchema = undefined;
10
9
  export interface OutputSchema {
11
10
  cursor?: string;
12
- users: User[];
11
+ users: AppBskyActorProfile.ViewBasic[];
13
12
  [k: string]: unknown;
14
13
  }
15
14
  export interface CallOptions {
@@ -21,15 +20,3 @@ export interface Response {
21
20
  data: OutputSchema;
22
21
  }
23
22
  export declare function toKnownErr(e: any): any;
24
- export interface User {
25
- did: string;
26
- declaration: AppBskySystemDeclRef.Main;
27
- handle: string;
28
- displayName?: string;
29
- avatar?: string;
30
- description?: string;
31
- indexedAt?: string;
32
- [k: string]: unknown;
33
- }
34
- export declare function isUser(v: unknown): v is User;
35
- export declare function validateUser(v: unknown): ValidationResult;
@@ -1,13 +1,12 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
- import { ValidationResult } from '@atproto/lexicon';
3
- import * as AppBskySystemDeclRef from '../system/declRef';
2
+ import * as AppBskyActorRef from './ref';
4
3
  export interface QueryParams {
5
4
  term?: string;
6
5
  limit?: number;
7
6
  }
8
7
  export declare type InputSchema = undefined;
9
8
  export interface OutputSchema {
10
- users: User[];
9
+ users: AppBskyActorRef.WithInfo[];
11
10
  [k: string]: unknown;
12
11
  }
13
12
  export interface CallOptions {
@@ -19,13 +18,3 @@ export interface Response {
19
18
  data: OutputSchema;
20
19
  }
21
20
  export declare function toKnownErr(e: any): any;
22
- export interface User {
23
- did: string;
24
- declaration: AppBskySystemDeclRef.Main;
25
- handle: string;
26
- displayName?: string;
27
- avatar?: string;
28
- [k: string]: unknown;
29
- }
30
- export declare function isUser(v: unknown): v is User;
31
- export declare function validateUser(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 AppBskyActorRef from '../actor/ref';
4
3
  export interface QueryParams {
5
4
  uri: string;
6
5
  cid?: string;
@@ -12,7 +11,7 @@ export interface OutputSchema {
12
11
  uri: string;
13
12
  cid?: string;
14
13
  cursor?: string;
15
- repostedBy: RepostedBy[];
14
+ repostedBy: AppBskyActorRef.WithInfo[];
16
15
  [k: string]: unknown;
17
16
  }
18
17
  export interface CallOptions {
@@ -24,15 +23,3 @@ export interface Response {
24
23
  data: OutputSchema;
25
24
  }
26
25
  export declare function toKnownErr(e: any): any;
27
- export interface RepostedBy {
28
- did: string;
29
- declaration: AppBskySystemDeclRef.Main;
30
- handle: string;
31
- displayName?: string;
32
- avatar?: string;
33
- createdAt?: string;
34
- indexedAt: string;
35
- [k: string]: unknown;
36
- }
37
- export declare function isRepostedBy(v: unknown): v is RepostedBy;
38
- export declare function validateRepostedBy(v: unknown): ValidationResult;
@@ -1,7 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
- import { ValidationResult } from '@atproto/lexicon';
3
2
  import * as AppBskyActorRef from '../actor/ref';
4
- import * as AppBskySystemDeclRef from '../system/declRef';
5
3
  export interface QueryParams {
6
4
  user: string;
7
5
  limit?: number;
@@ -11,7 +9,7 @@ export declare type InputSchema = undefined;
11
9
  export interface OutputSchema {
12
10
  subject: AppBskyActorRef.WithInfo;
13
11
  cursor?: string;
14
- followers: Follower[];
12
+ followers: AppBskyActorRef.WithInfo[];
15
13
  [k: string]: unknown;
16
14
  }
17
15
  export interface CallOptions {
@@ -23,15 +21,3 @@ export interface Response {
23
21
  data: OutputSchema;
24
22
  }
25
23
  export declare function toKnownErr(e: any): any;
26
- export interface Follower {
27
- did: string;
28
- declaration: AppBskySystemDeclRef.Main;
29
- handle: string;
30
- displayName?: string;
31
- avatar?: string;
32
- createdAt?: string;
33
- indexedAt: string;
34
- [k: string]: unknown;
35
- }
36
- export declare function isFollower(v: unknown): v is Follower;
37
- export declare function validateFollower(v: unknown): ValidationResult;
@@ -1,7 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
- import { ValidationResult } from '@atproto/lexicon';
3
2
  import * as AppBskyActorRef from '../actor/ref';
4
- import * as AppBskySystemDeclRef from '../system/declRef';
5
3
  export interface QueryParams {
6
4
  user: string;
7
5
  limit?: number;
@@ -11,7 +9,7 @@ export declare type InputSchema = undefined;
11
9
  export interface OutputSchema {
12
10
  subject: AppBskyActorRef.WithInfo;
13
11
  cursor?: string;
14
- follows: Follow[];
12
+ follows: AppBskyActorRef.WithInfo[];
15
13
  [k: string]: unknown;
16
14
  }
17
15
  export interface CallOptions {
@@ -23,15 +21,3 @@ export interface Response {
23
21
  data: OutputSchema;
24
22
  }
25
23
  export declare function toKnownErr(e: any): any;
26
- export interface Follow {
27
- did: string;
28
- declaration: AppBskySystemDeclRef.Main;
29
- handle: string;
30
- displayName?: string;
31
- avatar?: string;
32
- createdAt?: string;
33
- indexedAt: string;
34
- [k: string]: unknown;
35
- }
36
- export declare function isFollow(v: unknown): v is Follow;
37
- export declare function validateFollow(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 AppBskyActorRef from '../actor/ref';
4
3
  export interface QueryParams {
5
4
  limit?: number;
6
5
  before?: 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
- mutes: Mute[];
10
+ mutes: AppBskyActorRef.WithInfo[];
12
11
  [k: string]: unknown;
13
12
  }
14
13
  export interface CallOptions {
@@ -20,13 +19,3 @@ export interface Response {
20
19
  data: OutputSchema;
21
20
  }
22
21
  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
+ handle: 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;
@@ -1,3 +1,3 @@
1
- export declare type Main = 'com.atproto.report.reason#spam' | 'com.atproto.report.reason#other' | (string & {});
1
+ export declare type Main = 'com.atproto.report.reasonType#spam' | 'com.atproto.report.reasonType#other' | (string & {});
2
2
  export declare const SPAM = "com.atproto.report.reasonType#spam";
3
3
  export declare const OTHER = "com.atproto.report.reasonType#other";
@@ -0,0 +1,20 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ export interface RepoAppend {
3
+ time: string;
4
+ repo: string;
5
+ commit: string;
6
+ prev?: string;
7
+ blocks: {};
8
+ blobs: string[];
9
+ [k: string]: unknown;
10
+ }
11
+ export declare function isRepoAppend(v: unknown): v is RepoAppend;
12
+ export declare function validateRepoAppend(v: unknown): ValidationResult;
13
+ export interface RepoRebase {
14
+ time: string;
15
+ repo: string;
16
+ commit: string;
17
+ [k: string]: unknown;
18
+ }
19
+ export declare function isRepoRebase(v: unknown): v is RepoRebase;
20
+ export declare function validateRepoRebase(v: unknown): ValidationResult;