@atproto/api 0.2.5 → 0.2.7

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 (33) hide show
  1. package/dist/client/index.d.ts +19 -0
  2. package/dist/client/lexicons.d.ts +364 -7
  3. package/dist/client/types/app/bsky/actor/defs.d.ts +4 -0
  4. package/dist/client/types/app/bsky/feed/defs.d.ts +2 -0
  5. package/dist/client/types/app/bsky/notification/listNotifications.d.ts +2 -0
  6. package/dist/client/types/com/atproto/admin/defs.d.ts +4 -1
  7. package/dist/client/types/com/atproto/admin/takeModerationAction.d.ts +2 -0
  8. package/dist/client/types/com/atproto/admin/updateAccountHandle.d.ts +18 -0
  9. package/dist/client/types/com/atproto/label/defs.d.ts +12 -0
  10. package/dist/client/types/com/atproto/label/queryLabels.d.ts +23 -0
  11. package/dist/client/types/com/atproto/label/subscribeLabels.d.ts +16 -0
  12. package/dist/client/types/com/atproto/server/createInviteCodes.d.ts +24 -0
  13. package/dist/client/types/com/atproto/server/createSession.d.ts +1 -1
  14. package/dist/client/types/com/atproto/sync/listRepos.d.ts +28 -0
  15. package/dist/index.js +674 -229
  16. package/dist/index.js.map +4 -4
  17. package/package.json +1 -1
  18. package/src/client/index.ts +66 -0
  19. package/src/client/lexicons.ts +377 -10
  20. package/src/client/types/app/bsky/actor/defs.ts +4 -0
  21. package/src/client/types/app/bsky/feed/defs.ts +2 -0
  22. package/src/client/types/app/bsky/notification/listNotifications.ts +2 -0
  23. package/src/client/types/com/atproto/admin/defs.ts +4 -1
  24. package/src/client/types/com/atproto/admin/takeModerationAction.ts +2 -0
  25. package/src/client/types/com/atproto/admin/updateAccountHandle.ts +33 -0
  26. package/src/client/types/com/atproto/label/defs.ts +36 -0
  27. package/src/client/types/com/atproto/label/queryLabels.ts +42 -0
  28. package/src/client/types/com/atproto/label/subscribeLabels.ts +45 -0
  29. package/src/client/types/com/atproto/repo/listRecords.ts +2 -2
  30. package/src/client/types/com/atproto/server/createInviteCodes.ts +40 -0
  31. package/src/client/types/com/atproto/server/createSession.ts +1 -1
  32. package/src/client/types/com/atproto/sync/listRepos.ts +55 -0
  33. package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,18 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ export interface QueryParams {
3
+ }
4
+ export interface InputSchema {
5
+ did: string;
6
+ handle: string;
7
+ [k: string]: unknown;
8
+ }
9
+ export interface CallOptions {
10
+ headers?: Headers;
11
+ qp?: QueryParams;
12
+ encoding: 'application/json';
13
+ }
14
+ export interface Response {
15
+ success: boolean;
16
+ headers: Headers;
17
+ }
18
+ export declare function toKnownErr(e: any): any;
@@ -0,0 +1,12 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ export interface Label {
3
+ src: string;
4
+ uri: string;
5
+ cid?: string;
6
+ val: string;
7
+ neg?: boolean;
8
+ cts: string;
9
+ [k: string]: unknown;
10
+ }
11
+ export declare function isLabel(v: unknown): v is Label;
12
+ export declare function validateLabel(v: unknown): ValidationResult;
@@ -0,0 +1,23 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import * as ComAtprotoLabelDefs from './defs';
3
+ export interface QueryParams {
4
+ uriPatterns: string[];
5
+ sources?: string[];
6
+ limit?: number;
7
+ cursor?: string;
8
+ }
9
+ export declare type InputSchema = undefined;
10
+ export interface OutputSchema {
11
+ cursor?: string;
12
+ labels: ComAtprotoLabelDefs.Label[];
13
+ [k: string]: unknown;
14
+ }
15
+ export interface CallOptions {
16
+ headers?: Headers;
17
+ }
18
+ export interface Response {
19
+ success: boolean;
20
+ headers: Headers;
21
+ data: OutputSchema;
22
+ }
23
+ export declare function toKnownErr(e: any): any;
@@ -0,0 +1,16 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ import * as ComAtprotoLabelDefs from './defs';
3
+ export interface Labels {
4
+ seq: number;
5
+ labels: ComAtprotoLabelDefs.Label[];
6
+ [k: string]: unknown;
7
+ }
8
+ export declare function isLabels(v: unknown): v is Labels;
9
+ export declare function validateLabels(v: unknown): ValidationResult;
10
+ export interface Info {
11
+ name: 'OutdatedCursor' | (string & {});
12
+ message?: string;
13
+ [k: string]: unknown;
14
+ }
15
+ export declare function isInfo(v: unknown): v is Info;
16
+ export declare function validateInfo(v: unknown): ValidationResult;
@@ -0,0 +1,24 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ export interface QueryParams {
3
+ }
4
+ export interface InputSchema {
5
+ codeCount: number;
6
+ useCount: number;
7
+ forAccount?: string;
8
+ [k: string]: unknown;
9
+ }
10
+ export interface OutputSchema {
11
+ codes: string[];
12
+ [k: string]: unknown;
13
+ }
14
+ export interface CallOptions {
15
+ headers?: Headers;
16
+ qp?: QueryParams;
17
+ encoding: 'application/json';
18
+ }
19
+ export interface Response {
20
+ success: boolean;
21
+ headers: Headers;
22
+ data: OutputSchema;
23
+ }
24
+ export declare function toKnownErr(e: any): any;
@@ -2,7 +2,7 @@ import { Headers, XRPCError } from '@atproto/xrpc';
2
2
  export interface QueryParams {
3
3
  }
4
4
  export interface InputSchema {
5
- identifier?: string;
5
+ identifier: string;
6
6
  password: string;
7
7
  [k: string]: unknown;
8
8
  }
@@ -0,0 +1,28 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
3
+ export interface QueryParams {
4
+ limit?: number;
5
+ cursor?: string;
6
+ }
7
+ export declare type InputSchema = undefined;
8
+ export interface OutputSchema {
9
+ cursor?: string;
10
+ repos: Repo[];
11
+ [k: string]: unknown;
12
+ }
13
+ export interface CallOptions {
14
+ headers?: Headers;
15
+ }
16
+ export interface Response {
17
+ success: boolean;
18
+ headers: Headers;
19
+ data: OutputSchema;
20
+ }
21
+ export declare function toKnownErr(e: any): any;
22
+ export interface Repo {
23
+ did: string;
24
+ head: string;
25
+ [k: string]: unknown;
26
+ }
27
+ export declare function isRepo(v: unknown): v is Repo;
28
+ export declare function validateRepo(v: unknown): ValidationResult;