@atproto/api 0.5.5 → 0.6.0

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 (94) hide show
  1. package/dist/agent.d.ts +25 -44
  2. package/dist/bsky-agent.d.ts +43 -62
  3. package/dist/client/types/app/bsky/actor/createScene.d.ts +32 -0
  4. package/dist/client/types/app/bsky/actor/defs.d.ts +65 -74
  5. package/dist/client/types/app/bsky/actor/ref.d.ts +28 -0
  6. package/dist/client/types/app/bsky/actor/search.d.ts +22 -0
  7. package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +20 -0
  8. package/dist/client/types/app/bsky/actor/updateProfile.d.ts +40 -0
  9. package/dist/client/types/app/bsky/embed/external.d.ts +23 -23
  10. package/dist/client/types/app/bsky/embed/images.d.ts +20 -20
  11. package/dist/client/types/app/bsky/embed/record.d.ts +41 -53
  12. package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +20 -26
  13. package/dist/client/types/app/bsky/feed/defs.d.ts +107 -141
  14. package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +28 -0
  15. package/dist/client/types/app/bsky/feed/getSavedFeeds.d.ts +21 -0
  16. package/dist/client/types/app/bsky/feed/getVotes.d.ts +36 -0
  17. package/dist/client/types/app/bsky/feed/like.d.ts +7 -7
  18. package/dist/client/types/app/bsky/feed/repost.d.ts +7 -7
  19. package/dist/client/types/app/bsky/feed/saveFeed.d.ts +17 -0
  20. package/dist/client/types/app/bsky/feed/setVote.d.ts +25 -0
  21. package/dist/client/types/app/bsky/feed/trend.d.ts +9 -0
  22. package/dist/client/types/app/bsky/feed/unsaveFeed.d.ts +17 -0
  23. package/dist/client/types/app/bsky/feed/vote.d.ts +10 -0
  24. package/dist/client/types/app/bsky/graph/assertCreator.d.ts +1 -0
  25. package/dist/client/types/app/bsky/graph/assertMember.d.ts +1 -0
  26. package/dist/client/types/app/bsky/graph/assertion.d.ts +10 -0
  27. package/dist/client/types/app/bsky/graph/block.d.ts +6 -6
  28. package/dist/client/types/app/bsky/graph/confirmation.d.ts +11 -0
  29. package/dist/client/types/app/bsky/graph/defs.d.ts +36 -36
  30. package/dist/client/types/app/bsky/graph/follow.d.ts +6 -6
  31. package/dist/client/types/app/bsky/graph/getAssertions.d.ts +48 -0
  32. package/dist/client/types/app/bsky/graph/getListBlocks.d.ts +21 -0
  33. package/dist/client/types/app/bsky/graph/getMembers.d.ts +36 -0
  34. package/dist/client/types/app/bsky/graph/getMemberships.d.ts +36 -0
  35. package/dist/client/types/app/bsky/graph/listblock.d.ts +8 -0
  36. package/dist/client/types/app/bsky/graph/listitem.d.ts +7 -7
  37. package/dist/client/types/app/bsky/graph/mute.d.ts +17 -0
  38. package/dist/client/types/app/bsky/graph/subscribeMuteList.d.ts +17 -0
  39. package/dist/client/types/app/bsky/graph/unmute.d.ts +17 -0
  40. package/dist/client/types/app/bsky/graph/unsubscribeMuteList.d.ts +17 -0
  41. package/dist/client/types/app/bsky/notification/getCount.d.ts +17 -0
  42. package/dist/client/types/app/bsky/notification/list.d.ts +35 -0
  43. package/dist/client/types/app/bsky/richtext/facet.d.ts +22 -26
  44. package/dist/client/types/app/bsky/system/actorScene.d.ts +1 -0
  45. package/dist/client/types/app/bsky/system/actorUser.d.ts +1 -0
  46. package/dist/client/types/app/bsky/system/declRef.d.ts +8 -0
  47. package/dist/client/types/app/bsky/system/declaration.d.ts +7 -0
  48. package/dist/client/types/com/atproto/account/create.d.ts +41 -0
  49. package/dist/client/types/com/atproto/account/createInviteCode.d.ts +22 -0
  50. package/dist/client/types/com/atproto/account/delete.d.ts +25 -0
  51. package/dist/client/types/com/atproto/account/get.d.ts +12 -0
  52. package/dist/client/types/com/atproto/account/requestDelete.d.ts +13 -0
  53. package/dist/client/types/com/atproto/account/requestPasswordReset.d.ts +17 -0
  54. package/dist/client/types/com/atproto/account/resetPassword.d.ts +24 -0
  55. package/dist/client/types/com/atproto/admin/blob.d.ts +37 -0
  56. package/dist/client/types/com/atproto/admin/moderationAction.d.ts +60 -0
  57. package/dist/client/types/com/atproto/admin/moderationReport.d.ts +37 -0
  58. package/dist/client/types/com/atproto/admin/record.d.ts +43 -0
  59. package/dist/client/types/com/atproto/admin/repo.d.ts +45 -0
  60. package/dist/client/types/com/atproto/blob/upload.d.ts +19 -0
  61. package/dist/client/types/com/atproto/handle/resolve.d.ts +18 -0
  62. package/dist/client/types/com/atproto/handle/update.d.ts +17 -0
  63. package/dist/client/types/com/atproto/label/subscribeLabels.d.ts +12 -12
  64. package/dist/client/types/com/atproto/moderation/defs.d.ts +7 -16
  65. package/dist/client/types/com/atproto/repo/batchWrite.d.ts +46 -0
  66. package/dist/client/types/com/atproto/repo/describe.d.ts +22 -0
  67. package/dist/client/types/com/atproto/repo/recordRef.d.ts +8 -0
  68. package/dist/client/types/com/atproto/repo/repoRef.d.ts +7 -0
  69. package/dist/client/types/com/atproto/repo/strongRef.d.ts +6 -6
  70. package/dist/client/types/com/atproto/report/create.d.ts +39 -0
  71. package/dist/client/types/com/atproto/report/reasonType.d.ts +3 -0
  72. package/dist/client/types/com/atproto/report/subject.d.ts +23 -0
  73. package/dist/client/types/com/atproto/server/defs.d.ts +16 -16
  74. package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +27 -0
  75. package/dist/client/types/com/atproto/session/create.d.ts +29 -0
  76. package/dist/client/types/com/atproto/session/delete.d.ts +13 -0
  77. package/dist/client/types/com/atproto/session/get.d.ts +18 -0
  78. package/dist/client/types/com/atproto/session/refresh.d.ts +24 -0
  79. package/dist/client/types/com/atproto/sync/getRoot.d.ts +18 -0
  80. package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +9 -0
  81. package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +46 -46
  82. package/dist/client/types/com/atproto/sync/updateRepo.d.ts +15 -0
  83. package/dist/client/util.d.ts +2 -5
  84. package/dist/helpers/bsky.d.ts +20 -0
  85. package/dist/mixins/bsky.d.ts +23 -0
  86. package/dist/rich-text/detection.d.ts +4 -4
  87. package/dist/rich-text/rich-text.d.ts +31 -31
  88. package/dist/rich-text/sanitization.d.ts +4 -7
  89. package/dist/rich-text/sanitize.d.ts +4 -0
  90. package/dist/rich-text/unicode.d.ts +9 -9
  91. package/dist/session.d.ts +42 -0
  92. package/dist/types.d.ts +22 -34
  93. package/package.json +1 -1
  94. package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,24 @@
1
+ import { Headers, XRPCError } from '@atproto/xrpc';
2
+ export interface QueryParams {
3
+ }
4
+ export declare type InputSchema = undefined;
5
+ export interface OutputSchema {
6
+ accessJwt: string;
7
+ refreshJwt: string;
8
+ handle: string;
9
+ did: string;
10
+ [k: string]: unknown;
11
+ }
12
+ export interface CallOptions {
13
+ headers?: Headers;
14
+ qp?: QueryParams;
15
+ }
16
+ export interface Response {
17
+ success: boolean;
18
+ headers: Headers;
19
+ data: OutputSchema;
20
+ }
21
+ export declare class AccountTakedownError extends XRPCError {
22
+ constructor(src: XRPCError);
23
+ }
24
+ export declare function toKnownErr(e: any): any;
@@ -0,0 +1,18 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ export interface QueryParams {
3
+ did: string;
4
+ }
5
+ export declare type InputSchema = undefined;
6
+ export interface OutputSchema {
7
+ root: string;
8
+ [k: string]: unknown;
9
+ }
10
+ export interface CallOptions {
11
+ headers?: Headers;
12
+ }
13
+ export interface Response {
14
+ success: boolean;
15
+ headers: Headers;
16
+ data: OutputSchema;
17
+ }
18
+ export declare function toKnownErr(e: any): any;
@@ -0,0 +1,9 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ export interface RepoOp {
3
+ action: 'create' | 'update' | 'delete' | (string & {});
4
+ path: string;
5
+ cid: string | null;
6
+ [k: string]: unknown;
7
+ }
8
+ export declare function isRepoOp(v: unknown): v is RepoOp;
9
+ export declare function validateRepoOp(v: unknown): ValidationResult;
@@ -1,58 +1,58 @@
1
- import { ValidationResult } from '@atproto/lexicon'
2
- import { CID } from 'multiformats/cid'
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ import { CID } from 'multiformats/cid';
3
3
  export interface Commit {
4
- seq: number
5
- rebase: boolean
6
- tooBig: boolean
7
- repo: string
8
- commit: CID
9
- prev: CID | null
10
- blocks: Uint8Array
11
- ops: RepoOp[]
12
- blobs: CID[]
13
- time: string
14
- [k: string]: unknown
4
+ seq: number;
5
+ rebase: boolean;
6
+ tooBig: boolean;
7
+ repo: string;
8
+ commit: CID;
9
+ prev: CID | null;
10
+ blocks: Uint8Array;
11
+ ops: RepoOp[];
12
+ blobs: CID[];
13
+ time: string;
14
+ [k: string]: unknown;
15
15
  }
16
- export declare function isCommit(v: unknown): v is Commit
17
- export declare function validateCommit(v: unknown): ValidationResult
16
+ export declare function isCommit(v: unknown): v is Commit;
17
+ export declare function validateCommit(v: unknown): ValidationResult;
18
18
  export interface Handle {
19
- seq: number
20
- did: string
21
- handle: string
22
- time: string
23
- [k: string]: unknown
19
+ seq: number;
20
+ did: string;
21
+ handle: string;
22
+ time: string;
23
+ [k: string]: unknown;
24
24
  }
25
- export declare function isHandle(v: unknown): v is Handle
26
- export declare function validateHandle(v: unknown): ValidationResult
25
+ export declare function isHandle(v: unknown): v is Handle;
26
+ export declare function validateHandle(v: unknown): ValidationResult;
27
27
  export interface Migrate {
28
- seq: number
29
- did: string
30
- migrateTo: string | null
31
- time: string
32
- [k: string]: unknown
28
+ seq: number;
29
+ did: string;
30
+ migrateTo: string | null;
31
+ time: string;
32
+ [k: string]: unknown;
33
33
  }
34
- export declare function isMigrate(v: unknown): v is Migrate
35
- export declare function validateMigrate(v: unknown): ValidationResult
34
+ export declare function isMigrate(v: unknown): v is Migrate;
35
+ export declare function validateMigrate(v: unknown): ValidationResult;
36
36
  export interface Tombstone {
37
- seq: number
38
- did: string
39
- time: string
40
- [k: string]: unknown
37
+ seq: number;
38
+ did: string;
39
+ time: string;
40
+ [k: string]: unknown;
41
41
  }
42
- export declare function isTombstone(v: unknown): v is Tombstone
43
- export declare function validateTombstone(v: unknown): ValidationResult
42
+ export declare function isTombstone(v: unknown): v is Tombstone;
43
+ export declare function validateTombstone(v: unknown): ValidationResult;
44
44
  export interface Info {
45
- name: 'OutdatedCursor' | (string & {})
46
- message?: string
47
- [k: string]: unknown
45
+ name: 'OutdatedCursor' | (string & {});
46
+ message?: string;
47
+ [k: string]: unknown;
48
48
  }
49
- export declare function isInfo(v: unknown): v is Info
50
- export declare function validateInfo(v: unknown): ValidationResult
49
+ export declare function isInfo(v: unknown): v is Info;
50
+ export declare function validateInfo(v: unknown): ValidationResult;
51
51
  export interface RepoOp {
52
- action: 'create' | 'update' | 'delete' | (string & {})
53
- path: string
54
- cid: CID | null
55
- [k: string]: unknown
52
+ action: 'create' | 'update' | 'delete' | (string & {});
53
+ path: string;
54
+ cid: CID | null;
55
+ [k: string]: unknown;
56
56
  }
57
- export declare function isRepoOp(v: unknown): v is RepoOp
58
- export declare function validateRepoOp(v: unknown): ValidationResult
57
+ export declare function isRepoOp(v: unknown): v is RepoOp;
58
+ export declare function validateRepoOp(v: unknown): ValidationResult;
@@ -0,0 +1,15 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ export interface QueryParams {
3
+ did: string;
4
+ }
5
+ export declare type InputSchema = string | Uint8Array;
6
+ export interface CallOptions {
7
+ headers?: Headers;
8
+ qp?: QueryParams;
9
+ encoding: 'application/cbor';
10
+ }
11
+ export interface Response {
12
+ success: boolean;
13
+ headers: Headers;
14
+ }
15
+ export declare function toKnownErr(e: any): any;
@@ -1,5 +1,2 @@
1
- export declare function isObj(v: unknown): v is Record<string, unknown>
2
- export declare function hasProp<K extends PropertyKey>(
3
- data: object,
4
- prop: K,
5
- ): data is Record<K, unknown>
1
+ export declare function isObj(v: unknown): v is Record<string, unknown>;
2
+ export declare function hasProp<K extends PropertyKey>(data: object, prop: K): data is Record<K, unknown>;
@@ -0,0 +1,20 @@
1
+ import { AtpAgent } from '../agent';
2
+ export declare class Bsky {
3
+ private agent;
4
+ constructor(agent: AtpAgent);
5
+ like(uri: string, cid: string): Promise<{
6
+ uri: string;
7
+ cid: string;
8
+ }>;
9
+ unlike(likeUri: string): Promise<void>;
10
+ repost(uri: string, cid: string): Promise<{
11
+ uri: string;
12
+ cid: string;
13
+ }>;
14
+ unrepost(repostUri: string): Promise<void>;
15
+ follow(subjectDid: string): Promise<{
16
+ uri: string;
17
+ cid: string;
18
+ }>;
19
+ unfollow(followUri: string): Promise<void>;
20
+ }
@@ -0,0 +1,23 @@
1
+ import { AtpAgentType } from '../types';
2
+ export declare function addBsky<TBase extends AtpAgentType>(Base: TBase): {
3
+ new (...args: any[]): {
4
+ like(uri: string, cid: string): Promise<{
5
+ uri: string;
6
+ cid: string;
7
+ }>;
8
+ unlike(likeUri: string): Promise<void>;
9
+ repost(uri: string, cid: string): Promise<{
10
+ uri: string;
11
+ cid: string;
12
+ }>;
13
+ unrepost(repostUri: string): Promise<void>;
14
+ follow(subjectDid: string): Promise<{
15
+ uri: string;
16
+ cid: string;
17
+ }>;
18
+ unfollow(followUri: string): Promise<void>;
19
+ service: URL;
20
+ api: import("..").AtpServiceClient;
21
+ session?: import("../types").AtpSessionData | undefined;
22
+ };
23
+ } & TBase;
@@ -1,4 +1,4 @@
1
- import { AppBskyRichtextFacet } from '../client'
2
- import { UnicodeString } from './unicode'
3
- export declare type Facet = AppBskyRichtextFacet.Main
4
- export declare function detectFacets(text: UnicodeString): Facet[] | undefined
1
+ import { AppBskyRichtextFacet } from '../client';
2
+ import { UnicodeString } from './unicode';
3
+ export declare type Facet = AppBskyRichtextFacet.Main;
4
+ export declare function detectFacets(text: UnicodeString): Facet[] | undefined;
@@ -1,39 +1,39 @@
1
- import { AtpAgent } from '../agent'
2
- import { AppBskyFeedPost, AppBskyRichtextFacet } from '../client'
3
- import { UnicodeString } from './unicode'
4
- export declare type Facet = AppBskyRichtextFacet.Main
5
- export declare type FacetLink = AppBskyRichtextFacet.Link
6
- export declare type FacetMention = AppBskyRichtextFacet.Mention
7
- export declare type Entity = AppBskyFeedPost.Entity
1
+ import { AtpAgent } from '../agent';
2
+ import { AppBskyFeedPost, AppBskyRichtextFacet } from '../client';
3
+ import { UnicodeString } from './unicode';
4
+ export declare type Facet = AppBskyRichtextFacet.Main;
5
+ export declare type FacetLink = AppBskyRichtextFacet.Link;
6
+ export declare type FacetMention = AppBskyRichtextFacet.Mention;
7
+ export declare type Entity = AppBskyFeedPost.Entity;
8
8
  export interface RichTextProps {
9
- text: string
10
- facets?: Facet[]
11
- entities?: Entity[]
9
+ text: string;
10
+ facets?: Facet[];
11
+ entities?: Entity[];
12
12
  }
13
13
  export interface RichTextOpts {
14
- cleanNewlines?: boolean
14
+ cleanNewlines?: boolean;
15
15
  }
16
16
  export declare class RichTextSegment {
17
- text: string
18
- facet?: AppBskyRichtextFacet.Main | undefined
19
- constructor(text: string, facet?: AppBskyRichtextFacet.Main | undefined)
20
- get link(): FacetLink | undefined
21
- isLink(): boolean
22
- get mention(): FacetMention | undefined
23
- isMention(): boolean
17
+ text: string;
18
+ facet?: AppBskyRichtextFacet.Main | undefined;
19
+ constructor(text: string, facet?: AppBskyRichtextFacet.Main | undefined);
20
+ get link(): FacetLink | undefined;
21
+ isLink(): boolean;
22
+ get mention(): FacetMention | undefined;
23
+ isMention(): boolean;
24
24
  }
25
25
  export declare class RichText {
26
- unicodeText: UnicodeString
27
- facets?: Facet[]
28
- constructor(props: RichTextProps, opts?: RichTextOpts)
29
- get text(): string
30
- get length(): number
31
- get graphemeLength(): number
32
- clone(): RichText
33
- copyInto(target: RichText): void
34
- segments(): Generator<RichTextSegment, void, void>
35
- insert(insertIndex: number, insertText: string): this
36
- delete(removeStartIndex: number, removeEndIndex: number): this
37
- detectFacets(agent: AtpAgent): Promise<void>
38
- detectFacetsWithoutResolution(): void
26
+ unicodeText: UnicodeString;
27
+ facets?: Facet[];
28
+ constructor(props: RichTextProps, opts?: RichTextOpts);
29
+ get text(): string;
30
+ get length(): number;
31
+ get graphemeLength(): number;
32
+ clone(): RichText;
33
+ copyInto(target: RichText): void;
34
+ segments(): Generator<RichTextSegment, void, void>;
35
+ insert(insertIndex: number, insertText: string): this;
36
+ delete(removeStartIndex: number, removeEndIndex: number): this;
37
+ detectFacets(agent: AtpAgent): Promise<void>;
38
+ detectFacetsWithoutResolution(): void;
39
39
  }
@@ -1,7 +1,4 @@
1
- import { RichText } from './rich-text'
2
- export declare function sanitizeRichText(
3
- richText: RichText,
4
- opts: {
5
- cleanNewlines?: boolean
6
- },
7
- ): RichText
1
+ import { RichText } from './rich-text';
2
+ export declare function sanitizeRichText(richText: RichText, opts: {
3
+ cleanNewlines?: boolean;
4
+ }): RichText;
@@ -0,0 +1,4 @@
1
+ import { RichText } from './rich-text';
2
+ export declare function sanitizeRichText(richText: RichText, opts: {
3
+ cleanNewlines?: boolean;
4
+ }): RichText;
@@ -1,11 +1,11 @@
1
1
  export declare class UnicodeString {
2
- utf16: string
3
- utf8: Uint8Array
4
- private _graphemeLen?
5
- constructor(utf16: string)
6
- get length(): number
7
- get graphemeLength(): number
8
- slice(start?: number, end?: number): string
9
- utf16IndexToUtf8Index(i: number): number
10
- toString(): string
2
+ utf16: string;
3
+ utf8: Uint8Array;
4
+ private _graphemeLen?;
5
+ constructor(utf16: string);
6
+ get length(): number;
7
+ get graphemeLength(): number;
8
+ slice(start?: number, end?: number): string;
9
+ utf16IndexToUtf8Index(i: number): number;
10
+ toString(): string;
11
11
  }
@@ -0,0 +1,42 @@
1
+ import { CallOptions, Client as XrpcClient, ServiceClient as XrpcServiceClient, QueryParams, XRPCResponse } from '@atproto/xrpc';
2
+ import TypedEmitter from 'typed-emitter';
3
+ import { Client, ServiceClient } from './client';
4
+ export declare class SessionClient extends Client {
5
+ service(serviceUri: string | URL): SessionServiceClient;
6
+ }
7
+ declare const defaultInst: SessionClient;
8
+ export default defaultInst;
9
+ export declare class SessionServiceClient extends ServiceClient {
10
+ xrpc: SessionXrpcServiceClient;
11
+ sessionManager: SessionManager;
12
+ constructor(baseClient: Client, xrpcService: SessionXrpcServiceClient);
13
+ }
14
+ export declare class SessionXrpcServiceClient extends XrpcServiceClient {
15
+ sessionManager: SessionManager;
16
+ refreshing?: Promise<XRPCResponse>;
17
+ constructor(baseClient: XrpcClient, serviceUri: string | URL);
18
+ call(methodNsid: string, params?: QueryParams, data?: unknown, opts?: CallOptions): Promise<XRPCResponse>;
19
+ refresh(opts?: CallOptions): Promise<XRPCResponse>;
20
+ private _refresh;
21
+ }
22
+ declare const SessionManager_base: new () => TypedEmitter<SessionEvents>;
23
+ export declare class SessionManager extends SessionManager_base {
24
+ session?: Session;
25
+ get(): Session | undefined;
26
+ set(session: Session): void;
27
+ unset(): void;
28
+ active(): boolean;
29
+ accessHeaders(): {
30
+ authorization: string;
31
+ } | undefined;
32
+ refreshHeaders(): {
33
+ authorization: string;
34
+ } | undefined;
35
+ }
36
+ export declare type Session = {
37
+ refreshJwt: string;
38
+ accessJwt: string;
39
+ };
40
+ declare type SessionEvents = {
41
+ session: (session?: Session) => void;
42
+ };
package/dist/types.d.ts CHANGED
@@ -1,46 +1,34 @@
1
- export declare type AtpSessionEvent =
2
- | 'create'
3
- | 'create-failed'
4
- | 'update'
5
- | 'expired'
1
+ export declare type AtpSessionEvent = 'create' | 'create-failed' | 'update' | 'expired';
6
2
  export interface AtpSessionData {
7
- refreshJwt: string
8
- accessJwt: string
9
- handle: string
10
- did: string
11
- email?: string
3
+ refreshJwt: string;
4
+ accessJwt: string;
5
+ handle: string;
6
+ did: string;
7
+ email?: string;
12
8
  }
13
- export declare type AtpPersistSessionHandler = (
14
- evt: AtpSessionEvent,
15
- session: AtpSessionData | undefined,
16
- ) => void | Promise<void>
9
+ export declare type AtpPersistSessionHandler = (evt: AtpSessionEvent, session: AtpSessionData | undefined) => void | Promise<void>;
17
10
  export interface AtpAgentOpts {
18
- service: string | URL
19
- persistSession?: AtpPersistSessionHandler
11
+ service: string | URL;
12
+ persistSession?: AtpPersistSessionHandler;
20
13
  }
21
14
  export interface AtpAgentCreateAccountOpts {
22
- email: string
23
- password: string
24
- handle: string
25
- inviteCode?: string
15
+ email: string;
16
+ password: string;
17
+ handle: string;
18
+ inviteCode?: string;
26
19
  }
27
20
  export interface AtpAgentLoginOpts {
28
- identifier: string
29
- password: string
21
+ identifier: string;
22
+ password: string;
30
23
  }
31
- declare type AtpAgentFetchHeaders = Record<string, string>
24
+ declare type AtpAgentFetchHeaders = Record<string, string>;
32
25
  export interface AtpAgentFetchHandlerResponse {
33
- status: number
34
- headers: Record<string, string>
35
- body: any
26
+ status: number;
27
+ headers: Record<string, string>;
28
+ body: any;
36
29
  }
37
- export declare type AtpAgentFetchHandler = (
38
- httpUri: string,
39
- httpMethod: string,
40
- httpHeaders: AtpAgentFetchHeaders,
41
- httpReqBody: any,
42
- ) => Promise<AtpAgentFetchHandlerResponse>
30
+ export declare type AtpAgentFetchHandler = (httpUri: string, httpMethod: string, httpHeaders: AtpAgentFetchHeaders, httpReqBody: any) => Promise<AtpAgentFetchHandlerResponse>;
43
31
  export interface AtpAgentGlobalOpts {
44
- fetch: AtpAgentFetchHandler
32
+ fetch: AtpAgentFetchHandler;
45
33
  }
46
- export {}
34
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.5.5",
3
+ "version": "0.6.0",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "codegen": "yarn docgen && node ./scripts/generate-code.mjs && lex gen-api ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",