@atproto/api 0.9.0 → 0.9.1

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.
package/dist/types.d.ts CHANGED
@@ -13,12 +13,6 @@ export interface AtpAgentOpts {
13
13
  service: string | URL;
14
14
  persistSession?: AtpPersistSessionHandler;
15
15
  }
16
- export interface AtpAgentCreateAccountOpts {
17
- email: string;
18
- password: string;
19
- handle: string;
20
- inviteCode?: string;
21
- }
22
16
  export interface AtpAgentLoginOpts {
23
17
  identifier: string;
24
18
  password: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "license": "MIT",
5
5
  "description": "Client library for atproto and Bluesky",
6
6
  "keywords": [
@@ -20,15 +20,15 @@
20
20
  "tlds": "^1.234.0",
21
21
  "typed-emitter": "^2.1.0",
22
22
  "zod": "^3.21.4",
23
- "@atproto/xrpc": "^0.4.1",
24
- "@atproto/syntax": "^0.1.5",
25
23
  "@atproto/lexicon": "^0.3.1",
26
- "@atproto/common-web": "^0.2.3"
24
+ "@atproto/common-web": "^0.2.3",
25
+ "@atproto/syntax": "^0.1.5",
26
+ "@atproto/xrpc": "^0.4.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "common-tags": "^1.8.2",
30
- "@atproto/lex-cli": "^0.3.0",
31
- "@atproto/dev-env": "^0.2.23"
30
+ "@atproto/dev-env": "^0.2.24",
31
+ "@atproto/lex-cli": "^0.3.0"
32
32
  },
33
33
  "scripts": {
34
34
  "codegen": "pnpm docgen && node ./scripts/generate-code.mjs && lex gen-api ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",
package/src/agent.ts CHANGED
@@ -11,7 +11,6 @@ import {
11
11
  } from './client'
12
12
  import {
13
13
  AtpSessionData,
14
- AtpAgentCreateAccountOpts,
15
14
  AtpAgentLoginOpts,
16
15
  AtpAgentFetchHandler,
17
16
  AtpAgentFetchHandlerResponse,
@@ -86,15 +85,10 @@ export class AtpAgent {
86
85
  * Create a new account and hydrate its session in this agent.
87
86
  */
88
87
  async createAccount(
89
- opts: AtpAgentCreateAccountOpts,
88
+ opts: ComAtprotoServerCreateAccount.InputSchema,
90
89
  ): Promise<ComAtprotoServerCreateAccount.Response> {
91
90
  try {
92
- const res = await this.api.com.atproto.server.createAccount({
93
- handle: opts.handle,
94
- password: opts.password,
95
- email: opts.email,
96
- inviteCode: opts.inviteCode,
97
- })
91
+ const res = await this.api.com.atproto.server.createAccount(opts)
98
92
  this.session = {
99
93
  accessJwt: res.data.accessJwt,
100
94
  refreshJwt: res.data.refreshJwt,
package/src/types.ts CHANGED
@@ -38,16 +38,6 @@ export interface AtpAgentOpts {
38
38
  persistSession?: AtpPersistSessionHandler
39
39
  }
40
40
 
41
- /**
42
- * AtpAgent createAccount() opts
43
- */
44
- export interface AtpAgentCreateAccountOpts {
45
- email: string
46
- password: string
47
- handle: string
48
- inviteCode?: string
49
- }
50
-
51
41
  /**
52
42
  * AtpAgent login() opts
53
43
  */