@atproto/pds 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1670,6 +1670,8 @@ export declare const schemaDict: {
1670
1670
  };
1671
1671
  reason: {
1672
1672
  type: string;
1673
+ maxGraphemes: number;
1674
+ maxLength: number;
1673
1675
  };
1674
1676
  subject: {
1675
1677
  type: string;
@@ -2914,6 +2916,18 @@ export declare const schemaDict: {
2914
2916
  main: {
2915
2917
  type: string;
2916
2918
  description: string;
2919
+ input: {
2920
+ encoding: string;
2921
+ schema: {
2922
+ type: string;
2923
+ properties: {
2924
+ did: {
2925
+ type: string;
2926
+ description: string;
2927
+ };
2928
+ };
2929
+ };
2930
+ };
2917
2931
  output: {
2918
2932
  encoding: string;
2919
2933
  schema: {
@@ -3,13 +3,13 @@ import { HandlerAuth } from '@atproto/xrpc-server';
3
3
  export interface QueryParams {
4
4
  }
5
5
  export interface InputSchema {
6
- email: string;
6
+ email?: string;
7
7
  handle: string;
8
8
  did?: string;
9
9
  inviteCode?: string;
10
- password: string;
10
+ password?: string;
11
11
  recoveryKey?: string;
12
- plcOp?: Uint8Array;
12
+ plcOp?: {};
13
13
  [k: string]: unknown;
14
14
  }
15
15
  export interface OutputSchema {
@@ -2,12 +2,18 @@ import express from 'express';
2
2
  import { HandlerAuth } from '@atproto/xrpc-server';
3
3
  export interface QueryParams {
4
4
  }
5
- export declare type InputSchema = undefined;
5
+ export interface InputSchema {
6
+ did?: string;
7
+ [k: string]: unknown;
8
+ }
6
9
  export interface OutputSchema {
7
10
  signingKey: string;
8
11
  [k: string]: unknown;
9
12
  }
10
- export declare type HandlerInput = undefined;
13
+ export interface HandlerInput {
14
+ encoding: 'application/json';
15
+ body: InputSchema;
16
+ }
11
17
  export interface HandlerSuccess {
12
18
  encoding: 'application/json';
13
19
  body: OutputSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/pds",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of atproto Personal Data Server (PDS)",
6
6
  "keywords": [
@@ -43,16 +43,16 @@
43
43
  "typed-emitter": "^2.1.0",
44
44
  "uint8arrays": "3.0.0",
45
45
  "zod": "^3.21.4",
46
- "@atproto/api": "^0.6.21",
47
- "@atproto/aws": "^0.1.3",
48
- "@atproto/common": "^0.3.2",
49
- "@atproto/crypto": "^0.2.2",
50
- "@atproto/identity": "^0.3.0",
51
- "@atproto/lexicon": "^0.2.3",
52
- "@atproto/repo": "^0.3.3",
53
- "@atproto/syntax": "^0.1.3",
54
- "@atproto/xrpc": "^0.3.3",
55
- "@atproto/xrpc-server": "^0.3.3"
46
+ "@atproto/api": "^0.6.22",
47
+ "@atproto/aws": "^0.1.4",
48
+ "@atproto/common": "^0.3.3",
49
+ "@atproto/crypto": "^0.2.3",
50
+ "@atproto/identity": "^0.3.1",
51
+ "@atproto/lexicon": "^0.3.0",
52
+ "@atproto/repo": "^0.3.4",
53
+ "@atproto/syntax": "^0.1.4",
54
+ "@atproto/xrpc": "^0.4.0",
55
+ "@atproto/xrpc-server": "^0.4.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@did-plc/server": "^0.0.1",
@@ -67,10 +67,10 @@
67
67
  "@types/sharp": "^0.31.0",
68
68
  "axios": "^0.27.2",
69
69
  "ws": "^8.12.0",
70
- "@atproto/api": "^0.6.21",
71
- "@atproto/bsky": "^0.0.12",
72
- "@atproto/dev-env": "^0.2.12",
73
- "@atproto/lex-cli": "^0.2.3"
70
+ "@atproto/api": "^0.6.22",
71
+ "@atproto/bsky": "^0.0.13",
72
+ "@atproto/dev-env": "^0.2.13",
73
+ "@atproto/lex-cli": "^0.2.4"
74
74
  },
75
75
  "scripts": {
76
76
  "codegen": "lex gen-server ./src/lexicon ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",
@@ -21,7 +21,11 @@ export default function (server: Server, ctx: AppContext) {
21
21
  },
22
22
  handler: async ({ input, req }) => {
23
23
  const { email, password, inviteCode } = input.body
24
- if (input.body.plcOp) {
24
+ if (!email) {
25
+ throw new InvalidRequestError('Missing input: "email"')
26
+ } else if (!password) {
27
+ throw new InvalidRequestError('Missing input: "password"')
28
+ } else if (input.body.plcOp) {
25
29
  throw new InvalidRequestError('Unsupported input: "plcOp"')
26
30
  }
27
31
 
@@ -1826,6 +1826,8 @@ export const schemaDict = {
1826
1826
  },
1827
1827
  reason: {
1828
1828
  type: 'string',
1829
+ maxGraphemes: 2000,
1830
+ maxLength: 20000,
1829
1831
  },
1830
1832
  subject: {
1831
1833
  type: 'union',
@@ -2487,7 +2489,7 @@ export const schemaDict = {
2487
2489
  encoding: 'application/json',
2488
2490
  schema: {
2489
2491
  type: 'object',
2490
- required: ['handle', 'email', 'password'],
2492
+ required: ['handle'],
2491
2493
  properties: {
2492
2494
  email: {
2493
2495
  type: 'string',
@@ -2510,7 +2512,7 @@ export const schemaDict = {
2510
2512
  type: 'string',
2511
2513
  },
2512
2514
  plcOp: {
2513
- type: 'bytes',
2515
+ type: 'unknown',
2514
2516
  },
2515
2517
  },
2516
2518
  },
@@ -3168,6 +3170,18 @@ export const schemaDict = {
3168
3170
  main: {
3169
3171
  type: 'procedure',
3170
3172
  description: 'Reserve a repo signing key for account creation.',
3173
+ input: {
3174
+ encoding: 'application/json',
3175
+ schema: {
3176
+ type: 'object',
3177
+ properties: {
3178
+ did: {
3179
+ type: 'string',
3180
+ description: 'The did to reserve a new did:key for',
3181
+ },
3182
+ },
3183
+ },
3184
+ },
3171
3185
  output: {
3172
3186
  encoding: 'application/json',
3173
3187
  schema: {
@@ -11,13 +11,13 @@ import { HandlerAuth } from '@atproto/xrpc-server'
11
11
  export interface QueryParams {}
12
12
 
13
13
  export interface InputSchema {
14
- email: string
14
+ email?: string
15
15
  handle: string
16
16
  did?: string
17
17
  inviteCode?: string
18
- password: string
18
+ password?: string
19
19
  recoveryKey?: string
20
- plcOp?: Uint8Array
20
+ plcOp?: {}
21
21
  [k: string]: unknown
22
22
  }
23
23
 
@@ -10,7 +10,11 @@ import { HandlerAuth } from '@atproto/xrpc-server'
10
10
 
11
11
  export interface QueryParams {}
12
12
 
13
- export type InputSchema = undefined
13
+ export interface InputSchema {
14
+ /** The did to reserve a new did:key for */
15
+ did?: string
16
+ [k: string]: unknown
17
+ }
14
18
 
15
19
  export interface OutputSchema {
16
20
  /** Public signing key in the form of a did:key. */
@@ -18,7 +22,10 @@ export interface OutputSchema {
18
22
  [k: string]: unknown
19
23
  }
20
24
 
21
- export type HandlerInput = undefined
25
+ export interface HandlerInput {
26
+ encoding: 'application/json'
27
+ body: InputSchema
28
+ }
22
29
 
23
30
  export interface HandlerSuccess {
24
31
  encoding: 'application/json'
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022-2023 Bluesky PBC
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.