@atproto/xrpc 0.4.1 → 0.4.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.
- package/CHANGELOG.md +7 -0
- package/LICENSE.txt +1 -1
- package/dist/index.js.map +2 -2
- package/dist/types.d.ts +4 -4
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ValidationError } from '@atproto/lexicon';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type QueryParams = Record<string, any>;
|
|
4
|
+
export type Headers = Record<string, string>;
|
|
5
5
|
export interface CallOptions {
|
|
6
6
|
encoding?: string;
|
|
7
7
|
headers?: Headers;
|
|
@@ -11,7 +11,7 @@ export interface FetchHandlerResponse {
|
|
|
11
11
|
headers: Headers;
|
|
12
12
|
body: ArrayBuffer | undefined;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type FetchHandler = (httpUri: string, httpMethod: string, httpHeaders: Headers, httpReqBody: any) => Promise<FetchHandlerResponse>;
|
|
15
15
|
export declare const errorResponseBody: z.ZodObject<{
|
|
16
16
|
error: z.ZodOptional<z.ZodString>;
|
|
17
17
|
message: z.ZodOptional<z.ZodString>;
|
|
@@ -22,7 +22,7 @@ export declare const errorResponseBody: z.ZodObject<{
|
|
|
22
22
|
error?: string | undefined;
|
|
23
23
|
message?: string | undefined;
|
|
24
24
|
}>;
|
|
25
|
-
export
|
|
25
|
+
export type ErrorResponseBody = z.infer<typeof errorResponseBody>;
|
|
26
26
|
export declare enum ResponseType {
|
|
27
27
|
Unknown = 1,
|
|
28
28
|
InvalidResponse = 2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/xrpc",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "atproto HTTP API (XRPC) client library",
|
|
6
6
|
"keywords": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"main": "dist/index.js",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"zod": "^3.21.4",
|
|
19
|
-
"@atproto/lexicon": "^0.3.
|
|
19
|
+
"@atproto/lexicon": "^0.3.2"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "node ./build.js",
|