@fuzdev/fuz_app 0.166.0 → 0.168.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.
- package/dist/actions/CLAUDE.md +10 -9
- package/dist/actions/action_codegen.d.ts +10 -1
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +17 -8
- package/dist/actions/action_dispatcher.d.ts +1 -1
- package/dist/actions/action_dispatcher.d.ts.map +1 -1
- package/dist/actions/action_dispatcher.js +1 -1
- package/dist/actions/action_event.d.ts.map +1 -1
- package/dist/actions/action_event.js +1 -1
- package/dist/actions/action_event_data.d.ts +260 -65
- package/dist/actions/action_event_data.d.ts.map +1 -1
- package/dist/actions/action_event_data.js +11 -11
- package/dist/actions/action_event_types.d.ts +5 -14
- package/dist/actions/action_event_types.d.ts.map +1 -1
- package/dist/actions/action_event_types.js +3 -3
- package/dist/actions/action_rpc.js +5 -5
- package/dist/actions/action_spec.d.ts +8 -26
- package/dist/actions/action_spec.d.ts.map +1 -1
- package/dist/actions/action_spec.js +4 -4
- package/dist/actions/broadcast_api.d.ts +1 -1
- package/dist/actions/broadcast_api.js +1 -1
- package/dist/actions/cancel.d.ts +17 -9
- package/dist/actions/cancel.d.ts.map +1 -1
- package/dist/actions/cancel.js +3 -3
- package/dist/actions/heartbeat.d.ts +3 -4
- package/dist/actions/heartbeat.d.ts.map +1 -1
- package/dist/actions/heartbeat.js +4 -4
- package/dist/actions/peer_ping.d.ts +63 -23
- package/dist/actions/peer_ping.d.ts.map +1 -1
- package/dist/actions/peer_ping.js +20 -19
- package/dist/actions/peer_request.d.ts +6 -3
- package/dist/actions/peer_request.d.ts.map +1 -1
- package/dist/actions/peer_request.js +8 -2
- package/dist/actions/perform_action.d.ts +1 -1
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/transports.d.ts +2 -3
- package/dist/actions/transports.d.ts.map +1 -1
- package/dist/actions/transports.js +0 -4
- package/dist/actions/transports_http.d.ts.map +1 -1
- package/dist/actions/transports_http.js +4 -3
- package/dist/actions/transports_ws.d.ts.map +1 -1
- package/dist/actions/ws_socket_session.d.ts.map +1 -1
- package/dist/actions/ws_socket_session.js +6 -5
- package/dist/auth/CLAUDE.md +10 -8
- package/dist/auth/cell_action_specs.d.ts +6092 -1092
- package/dist/auth/cell_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_action_specs.js +96 -97
- package/dist/auth/cell_actions.d.ts.map +1 -1
- package/dist/auth/cell_actions.js +1 -0
- package/dist/auth/cell_audit_action_specs.d.ts +301 -69
- package/dist/auth/cell_audit_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_audit_action_specs.js +21 -16
- package/dist/auth/cell_audit_actions.js +2 -2
- package/dist/auth/cell_audit_events.d.ts +2 -2
- package/dist/auth/cell_audit_events.d.ts.map +1 -1
- package/dist/auth/cell_audit_metadata.d.ts +93 -30
- package/dist/auth/cell_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_audit_metadata.js +15 -14
- package/dist/auth/cell_authorize.d.ts +3 -3
- package/dist/auth/cell_authorize.js +3 -3
- package/dist/auth/cell_data_schema.d.ts +17 -9
- package/dist/auth/cell_data_schema.d.ts.map +1 -1
- package/dist/auth/cell_data_schema.js +9 -7
- package/dist/auth/cell_field_action_specs.d.ts +697 -130
- package/dist/auth/cell_field_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_field_action_specs.js +25 -27
- package/dist/auth/cell_field_actions.d.ts.map +1 -1
- package/dist/auth/cell_field_actions.js +2 -0
- package/dist/auth/cell_field_audit_metadata.d.ts +49 -13
- package/dist/auth/cell_field_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_field_audit_metadata.js +6 -6
- package/dist/auth/cell_grant_action_specs.d.ts +1044 -208
- package/dist/auth/cell_grant_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_grant_action_specs.js +36 -33
- package/dist/auth/cell_grant_actions.js +2 -2
- package/dist/auth/cell_grant_audit_metadata.d.ts +188 -40
- package/dist/auth/cell_grant_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_grant_audit_metadata.js +12 -11
- package/dist/auth/cell_item_action_specs.d.ts +949 -175
- package/dist/auth/cell_item_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_item_action_specs.js +30 -34
- package/dist/auth/cell_item_actions.js +1 -1
- package/dist/auth/cell_item_audit_metadata.d.ts +68 -19
- package/dist/auth/cell_item_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_item_audit_metadata.js +9 -9
- package/dist/auth/cell_relation_list_limit.d.ts +1 -2
- package/dist/auth/cell_relation_list_limit.d.ts.map +1 -1
- package/dist/auth/cell_relation_list_limit.js +3 -8
- package/dist/db/cell_moderation.d.ts +6 -7
- package/dist/db/cell_moderation.d.ts.map +1 -1
- package/dist/db/cell_moderation.js +6 -7
- package/dist/http/CLAUDE.md +9 -8
- package/dist/http/jsonrpc.d.ts +231 -152
- package/dist/http/jsonrpc.d.ts.map +1 -1
- package/dist/http/jsonrpc.js +55 -85
- package/dist/http/jsonrpc_errors.d.ts +22 -4
- package/dist/http/jsonrpc_errors.d.ts.map +1 -1
- package/dist/http/jsonrpc_errors.js +37 -4
- package/dist/http/jsonrpc_helpers.d.ts.map +1 -1
- package/dist/http/jsonrpc_helpers.js +13 -12
- package/dist/testing/CLAUDE.md +6 -3
- package/dist/testing/cross_backend/cell_crud.js +2 -2
- package/dist/testing/cross_backend/cell_relations.js +2 -2
- package/dist/testing/cross_backend/peer_ping_ws.d.ts +3 -2
- package/dist/testing/cross_backend/peer_ping_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/peer_ping_ws.js +49 -2
- package/dist/testing/rpc_helpers.d.ts +1 -1
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +13 -14
- package/dist/testing/rpc_round_trip.d.ts.map +1 -1
- package/dist/testing/rpc_round_trip.js +11 -11
- package/dist/testing/transports/ws_client.js +1 -1
- package/dist/ui/SurfaceExplorer.svelte +2 -2
- package/package.json +2 -2
package/dist/http/jsonrpc.d.ts
CHANGED
|
@@ -2,82 +2,94 @@
|
|
|
2
2
|
* JSON-RPC 2.0 envelope schemas for RPC dispatch and SAES transport.
|
|
3
3
|
*
|
|
4
4
|
* Params are object-only following MCP (no positional arrays); per-action
|
|
5
|
-
* spec.input narrows further. Result is
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* inherited from MCP would reject any action with `output: z.null()` /
|
|
10
|
-
* `z.string()` / etc. on the wire, so we relax it here while keeping
|
|
11
|
-
* MCP-superset shape on params + _meta.
|
|
5
|
+
* spec.input narrows further. Result is any value per spec §5 ("determined
|
|
6
|
+
* by the method invoked") — the per-action spec.output is the actual
|
|
7
|
+
* contract, so an action whose output is `null` or a string travels in the
|
|
8
|
+
* same envelope as one whose output is an object.
|
|
12
9
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* schemas where it produces the correct error code (`invalid_params`, not
|
|
17
|
-
* `invalid_request`).
|
|
10
|
+
* The envelopes are `loose_object`s: JSON-RPC and MCP both extend them with
|
|
11
|
+
* members a reader passes over, so an unknown key is kept rather than
|
|
12
|
+
* refused. A parse returns the frame itself, not a copy.
|
|
18
13
|
*
|
|
19
14
|
* @source https://github.com/modelcontextprotocol/typescript-sdk
|
|
20
15
|
* @see https://www.jsonrpc.org/specification
|
|
21
16
|
* @module
|
|
22
17
|
*/
|
|
23
|
-
import {
|
|
18
|
+
import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
|
|
24
19
|
export declare const JSONRPC_VERSION = "2.0";
|
|
25
20
|
/** A uniquely identifying id for a request in JSON-RPC. Like MCP, excludes null. */
|
|
26
|
-
export declare const JsonrpcRequestId:
|
|
27
|
-
export type JsonrpcRequestId =
|
|
21
|
+
export declare const JsonrpcRequestId: import("@fuzdev/fuz_schema/schema.ts").Schema<string | number, string | number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>]>;
|
|
22
|
+
export type JsonrpcRequestId = Infer<typeof JsonrpcRequestId>;
|
|
28
23
|
/** A JSON-RPC method name. */
|
|
29
|
-
export declare const JsonrpcMethod:
|
|
30
|
-
export type JsonrpcMethod =
|
|
31
|
-
/**
|
|
32
|
-
export declare const
|
|
33
|
-
export type
|
|
34
|
-
/**
|
|
35
|
-
export declare const
|
|
36
|
-
export type
|
|
37
|
-
/** Request params metadata — extends MCP meta with optional progress token. */
|
|
38
|
-
export declare const JsonrpcRequestParamsMeta: z.ZodObject<{
|
|
39
|
-
progressToken: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
40
|
-
}, z.core.$loose>;
|
|
41
|
-
export type JsonrpcRequestParamsMeta = z.infer<typeof JsonrpcRequestParamsMeta>;
|
|
42
|
-
/** Request params — loose object. Per-action schemas validate `_meta` content. */
|
|
43
|
-
export declare const JsonrpcRequestParams: z.ZodObject<{}, z.core.$loose>;
|
|
44
|
-
export type JsonrpcRequestParams = z.infer<typeof JsonrpcRequestParams>;
|
|
45
|
-
/** Notification params — loose object. Per-action schemas validate `_meta` content. */
|
|
46
|
-
export declare const JsonrpcNotificationParams: z.ZodObject<{}, z.core.$loose>;
|
|
47
|
-
export type JsonrpcNotificationParams = z.infer<typeof JsonrpcNotificationParams>;
|
|
24
|
+
export declare const JsonrpcMethod: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
25
|
+
export type JsonrpcMethod = Infer<typeof JsonrpcMethod>;
|
|
26
|
+
/** Request params — an object, its keys kept. Per-action schemas validate the content. */
|
|
27
|
+
export declare const JsonrpcRequestParams: import("@fuzdev/fuz_schema/schema.ts").Schema<{} & Record<string, unknown>, {} & Record<string, unknown>, "loose_object", {}>;
|
|
28
|
+
export type JsonrpcRequestParams = Infer<typeof JsonrpcRequestParams>;
|
|
29
|
+
/** Notification params — an object, its keys kept. Per-action schemas validate the content. */
|
|
30
|
+
export declare const JsonrpcNotificationParams: import("@fuzdev/fuz_schema/schema.ts").Schema<{} & Record<string, unknown>, {} & Record<string, unknown>, "loose_object", {}>;
|
|
31
|
+
export type JsonrpcNotificationParams = Infer<typeof JsonrpcNotificationParams>;
|
|
48
32
|
/**
|
|
49
|
-
* Result — any
|
|
50
|
-
*
|
|
33
|
+
* Result — any value per JSON-RPC 2.0 §5. Per-action `spec.output` is the
|
|
34
|
+
* actual contract; the envelope asserts only that the key is present.
|
|
51
35
|
*
|
|
52
|
-
* `
|
|
53
|
-
* `
|
|
54
|
-
*
|
|
55
|
-
*
|
|
36
|
+
* `unknown` needs its key, so an error envelope `{jsonrpc, id, error}` fails
|
|
37
|
+
* the success envelope at `result` and the two stay apart in a union. It
|
|
38
|
+
* also takes what isn't a JSON value: `undefined` at a present key or a
|
|
39
|
+
* `Date`, which no parsed frame holds, and `±Infinity`, which `JSON.parse`
|
|
40
|
+
* makes of an out-of-range number such as `1e400` and which no server
|
|
41
|
+
* writes.
|
|
56
42
|
*/
|
|
57
|
-
export declare const JsonrpcResult:
|
|
58
|
-
export type JsonrpcResult =
|
|
43
|
+
export declare const JsonrpcResult: import("@fuzdev/fuz_schema/schema.ts").Schema<unknown, unknown, "unknown", undefined>;
|
|
44
|
+
export type JsonrpcResult = Infer<typeof JsonrpcResult>;
|
|
59
45
|
/** A request that expects a response. */
|
|
60
|
-
export declare const JsonrpcRequest:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
params
|
|
65
|
-
},
|
|
66
|
-
|
|
46
|
+
export declare const JsonrpcRequest: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
47
|
+
id: string | number;
|
|
48
|
+
method: string;
|
|
49
|
+
jsonrpc: "2.0";
|
|
50
|
+
params?: ({} & Record<string, unknown>) | undefined;
|
|
51
|
+
} & Record<string, unknown>, {
|
|
52
|
+
id: string | number;
|
|
53
|
+
method: string;
|
|
54
|
+
jsonrpc: "2.0";
|
|
55
|
+
params?: ({} & Record<string, unknown>) | undefined;
|
|
56
|
+
} & Record<string, unknown>, "loose_object", {
|
|
57
|
+
jsonrpc: import("@fuzdev/fuz_schema/schema.ts").Schema<"2.0", "2.0", "literal", "2.0">;
|
|
58
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Schema<string | number, string | number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>]>;
|
|
59
|
+
method: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
60
|
+
params: import("@fuzdev/fuz_schema/schema.ts").Schema<({} & Record<string, unknown>) | undefined, ({} & Record<string, unknown>) | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<{} & Record<string, unknown>, {} & Record<string, unknown>, "loose_object", {}>>>;
|
|
61
|
+
}>;
|
|
62
|
+
export type JsonrpcRequest = Infer<typeof JsonrpcRequest>;
|
|
67
63
|
/** A notification which does not expect a response. */
|
|
68
|
-
export declare const JsonrpcNotification:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
params
|
|
72
|
-
},
|
|
73
|
-
|
|
64
|
+
export declare const JsonrpcNotification: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
65
|
+
method: string;
|
|
66
|
+
jsonrpc: "2.0";
|
|
67
|
+
params?: ({} & Record<string, unknown>) | undefined;
|
|
68
|
+
} & Record<string, unknown>, {
|
|
69
|
+
method: string;
|
|
70
|
+
jsonrpc: "2.0";
|
|
71
|
+
params?: ({} & Record<string, unknown>) | undefined;
|
|
72
|
+
} & Record<string, unknown>, "loose_object", {
|
|
73
|
+
jsonrpc: import("@fuzdev/fuz_schema/schema.ts").Schema<"2.0", "2.0", "literal", "2.0">;
|
|
74
|
+
method: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
75
|
+
params: import("@fuzdev/fuz_schema/schema.ts").Schema<({} & Record<string, unknown>) | undefined, ({} & Record<string, unknown>) | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<{} & Record<string, unknown>, {} & Record<string, unknown>, "loose_object", {}>>>;
|
|
76
|
+
}>;
|
|
77
|
+
export type JsonrpcNotification = Infer<typeof JsonrpcNotification>;
|
|
74
78
|
/** A successful (non-error) response to a request. */
|
|
75
|
-
export declare const JsonrpcResponse:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
result:
|
|
79
|
-
},
|
|
80
|
-
|
|
79
|
+
export declare const JsonrpcResponse: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
80
|
+
id: string | number;
|
|
81
|
+
jsonrpc: "2.0";
|
|
82
|
+
result: unknown;
|
|
83
|
+
} & Record<string, unknown>, {
|
|
84
|
+
id: string | number;
|
|
85
|
+
jsonrpc: "2.0";
|
|
86
|
+
result: unknown;
|
|
87
|
+
} & Record<string, unknown>, "loose_object", {
|
|
88
|
+
jsonrpc: import("@fuzdev/fuz_schema/schema.ts").Schema<"2.0", "2.0", "literal", "2.0">;
|
|
89
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Schema<string | number, string | number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>]>;
|
|
90
|
+
result: import("@fuzdev/fuz_schema/schema.ts").Schema<unknown, unknown, "unknown", undefined>;
|
|
91
|
+
}>;
|
|
92
|
+
export type JsonrpcResponse = Infer<typeof JsonrpcResponse>;
|
|
81
93
|
export declare const JSONRPC_PARSE_ERROR = -32700;
|
|
82
94
|
export declare const JSONRPC_INVALID_REQUEST = -32600;
|
|
83
95
|
export declare const JSONRPC_METHOD_NOT_FOUND = -32601;
|
|
@@ -87,110 +99,177 @@ export declare const JSONRPC_INTERNAL_ERROR = -32603;
|
|
|
87
99
|
export declare const JSONRPC_SERVER_ERROR_START = -32000;
|
|
88
100
|
/** End of the server-defined error code range (-32099). */
|
|
89
101
|
export declare const JSONRPC_SERVER_ERROR_END = -32099;
|
|
90
|
-
/** A server-defined error code in the -32000 to -32099 range. */
|
|
91
|
-
export declare const JsonrpcServerErrorCode: z.core.$ZodBranded<z.ZodNumber, "JsonrpcServerErrorCode", "out">;
|
|
92
|
-
export type JsonrpcServerErrorCode = z.infer<typeof JsonrpcServerErrorCode>;
|
|
93
102
|
/**
|
|
94
|
-
* A
|
|
95
|
-
*
|
|
103
|
+
* A server-defined error code, an integer in the -32000 to -32099 range (the
|
|
104
|
+
* Rust spine's codes are `i32`s).
|
|
96
105
|
*/
|
|
97
|
-
export declare const
|
|
98
|
-
|
|
106
|
+
export declare const JsonrpcServerErrorCode: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
|
|
107
|
+
readonly '~types'?: {
|
|
108
|
+
readonly input: number;
|
|
109
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
|
|
110
|
+
} | undefined;
|
|
111
|
+
};
|
|
112
|
+
export type JsonrpcServerErrorCode = Infer<typeof JsonrpcServerErrorCode>;
|
|
113
|
+
/**
|
|
114
|
+
* A valid JSON-RPC error code — one of the standard codes or a
|
|
115
|
+
* server-defined code in the -32000 to -32099 range.
|
|
116
|
+
*/
|
|
117
|
+
export declare const JsonrpcErrorCode: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
|
|
118
|
+
readonly '~types'?: {
|
|
119
|
+
readonly input: number;
|
|
120
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
|
|
121
|
+
} | undefined;
|
|
122
|
+
}]>;
|
|
123
|
+
export type JsonrpcErrorCode = Infer<typeof JsonrpcErrorCode>;
|
|
99
124
|
/**
|
|
100
125
|
* Whether `value` is a valid JSON-RPC error code — the codes `JsonrpcErrorCode`
|
|
101
|
-
* parses
|
|
102
|
-
*
|
|
126
|
+
* parses. A numeric `code` alone doesn't make an error a JSON-RPC one: a
|
|
127
|
+
* `DOMException`'s `code` is a small positive number.
|
|
103
128
|
*
|
|
104
129
|
* @param value - the candidate code
|
|
105
130
|
* @returns whether `value` is one of the standard codes or an integer in the server range
|
|
106
131
|
*/
|
|
107
132
|
export declare const is_jsonrpc_error_code: (value: unknown) => value is JsonrpcErrorCode;
|
|
108
133
|
/** Error object within a JSON-RPC error response. */
|
|
109
|
-
export declare const JsonrpcErrorObject:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
data
|
|
113
|
-
},
|
|
114
|
-
|
|
134
|
+
export declare const JsonrpcErrorObject: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
135
|
+
message: string;
|
|
136
|
+
code: -32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">;
|
|
137
|
+
data?: unknown;
|
|
138
|
+
} & Record<string, unknown>, {
|
|
139
|
+
message: string;
|
|
140
|
+
code: number;
|
|
141
|
+
data?: unknown;
|
|
142
|
+
} & Record<string, unknown>, "loose_object", {
|
|
143
|
+
code: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
|
|
144
|
+
readonly '~types'?: {
|
|
145
|
+
readonly input: number;
|
|
146
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
|
|
147
|
+
} | undefined;
|
|
148
|
+
}]>;
|
|
149
|
+
message: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
150
|
+
data: import("@fuzdev/fuz_schema/schema.ts").Schema<unknown, unknown, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<unknown, unknown, "unknown", undefined>>>;
|
|
151
|
+
}>;
|
|
152
|
+
export type JsonrpcErrorObject = Infer<typeof JsonrpcErrorObject>;
|
|
115
153
|
/** A response that indicates an error occurred. */
|
|
116
|
-
export declare const JsonrpcErrorResponse:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
|
|
154
|
+
export declare const JsonrpcErrorResponse: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
155
|
+
error: {
|
|
156
|
+
message: string;
|
|
157
|
+
code: -32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">;
|
|
158
|
+
data?: unknown;
|
|
159
|
+
} & Record<string, unknown>;
|
|
160
|
+
id: string | number | null;
|
|
161
|
+
jsonrpc: "2.0";
|
|
162
|
+
} & Record<string, unknown>, {
|
|
163
|
+
error: {
|
|
164
|
+
message: string;
|
|
165
|
+
code: number;
|
|
166
|
+
data?: unknown;
|
|
167
|
+
} & Record<string, unknown>;
|
|
168
|
+
id: string | number | null;
|
|
169
|
+
jsonrpc: "2.0";
|
|
170
|
+
} & Record<string, unknown>, "loose_object", {
|
|
171
|
+
jsonrpc: import("@fuzdev/fuz_schema/schema.ts").Schema<"2.0", "2.0", "literal", "2.0">;
|
|
172
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Schema<string | number | null, string | number | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<string | number, string | number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>]>>>;
|
|
173
|
+
error: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
174
|
+
message: string;
|
|
175
|
+
code: -32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">;
|
|
176
|
+
data?: unknown;
|
|
177
|
+
} & Record<string, unknown>, {
|
|
178
|
+
message: string;
|
|
179
|
+
code: number;
|
|
180
|
+
data?: unknown;
|
|
181
|
+
} & Record<string, unknown>, "loose_object", {
|
|
182
|
+
code: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
|
|
183
|
+
readonly '~types'?: {
|
|
184
|
+
readonly input: number;
|
|
185
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
|
|
186
|
+
} | undefined;
|
|
187
|
+
}]>;
|
|
188
|
+
message: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
189
|
+
data: import("@fuzdev/fuz_schema/schema.ts").Schema<unknown, unknown, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<unknown, unknown, "unknown", undefined>>>;
|
|
190
|
+
}>;
|
|
191
|
+
}>;
|
|
192
|
+
export type JsonrpcErrorResponse = Infer<typeof JsonrpcErrorResponse>;
|
|
126
193
|
/** A successful response or an error response. */
|
|
127
|
-
export declare const JsonrpcResponseOrError:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
result:
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
},
|
|
140
|
-
|
|
194
|
+
export declare const JsonrpcResponseOrError: import("@fuzdev/fuz_schema/schema.ts").Schema<({
|
|
195
|
+
id: string | number;
|
|
196
|
+
jsonrpc: "2.0";
|
|
197
|
+
result: unknown;
|
|
198
|
+
} & Record<string, unknown>) | ({
|
|
199
|
+
error: {
|
|
200
|
+
message: string;
|
|
201
|
+
code: -32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">;
|
|
202
|
+
data?: unknown;
|
|
203
|
+
} & Record<string, unknown>;
|
|
204
|
+
id: string | number | null;
|
|
205
|
+
jsonrpc: "2.0";
|
|
206
|
+
} & Record<string, unknown>), ({
|
|
207
|
+
id: string | number;
|
|
208
|
+
jsonrpc: "2.0";
|
|
209
|
+
result: unknown;
|
|
210
|
+
} & Record<string, unknown>) | ({
|
|
211
|
+
error: {
|
|
212
|
+
message: string;
|
|
213
|
+
code: number;
|
|
214
|
+
data?: unknown;
|
|
215
|
+
} & Record<string, unknown>;
|
|
216
|
+
id: string | number | null;
|
|
217
|
+
jsonrpc: "2.0";
|
|
218
|
+
} & Record<string, unknown>), "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
219
|
+
id: string | number;
|
|
220
|
+
jsonrpc: "2.0";
|
|
221
|
+
result: unknown;
|
|
222
|
+
} & Record<string, unknown>, {
|
|
223
|
+
id: string | number;
|
|
224
|
+
jsonrpc: "2.0";
|
|
225
|
+
result: unknown;
|
|
226
|
+
} & Record<string, unknown>, "loose_object", {
|
|
227
|
+
jsonrpc: import("@fuzdev/fuz_schema/schema.ts").Schema<"2.0", "2.0", "literal", "2.0">;
|
|
228
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Schema<string | number, string | number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>]>;
|
|
229
|
+
result: import("@fuzdev/fuz_schema/schema.ts").Schema<unknown, unknown, "unknown", undefined>;
|
|
230
|
+
}>, import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
231
|
+
error: {
|
|
232
|
+
message: string;
|
|
233
|
+
code: -32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">;
|
|
234
|
+
data?: unknown;
|
|
235
|
+
} & Record<string, unknown>;
|
|
236
|
+
id: string | number | null;
|
|
237
|
+
jsonrpc: "2.0";
|
|
238
|
+
} & Record<string, unknown>, {
|
|
239
|
+
error: {
|
|
240
|
+
message: string;
|
|
241
|
+
code: number;
|
|
242
|
+
data?: unknown;
|
|
243
|
+
} & Record<string, unknown>;
|
|
244
|
+
id: string | number | null;
|
|
245
|
+
jsonrpc: "2.0";
|
|
246
|
+
} & Record<string, unknown>, "loose_object", {
|
|
247
|
+
jsonrpc: import("@fuzdev/fuz_schema/schema.ts").Schema<"2.0", "2.0", "literal", "2.0">;
|
|
248
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Schema<string | number | null, string | number | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<string | number, string | number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>]>>>;
|
|
249
|
+
error: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
250
|
+
message: string;
|
|
251
|
+
code: -32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">;
|
|
252
|
+
data?: unknown;
|
|
253
|
+
} & Record<string, unknown>, {
|
|
254
|
+
message: string;
|
|
255
|
+
code: number;
|
|
256
|
+
data?: unknown;
|
|
257
|
+
} & Record<string, unknown>, "loose_object", {
|
|
258
|
+
code: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
|
|
259
|
+
readonly '~types'?: {
|
|
260
|
+
readonly input: number;
|
|
261
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
|
|
262
|
+
} | undefined;
|
|
263
|
+
}]>;
|
|
264
|
+
message: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
265
|
+
data: import("@fuzdev/fuz_schema/schema.ts").Schema<unknown, unknown, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<unknown, unknown, "unknown", undefined>>>;
|
|
266
|
+
}>;
|
|
267
|
+
}>]>;
|
|
268
|
+
export type JsonrpcResponseOrError = Infer<typeof JsonrpcResponseOrError>;
|
|
141
269
|
/** Any valid JSON-RPC message (request, notification, response, or error response). */
|
|
142
|
-
export
|
|
143
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
144
|
-
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
145
|
-
method: z.ZodString;
|
|
146
|
-
params: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
147
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
148
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
149
|
-
method: z.ZodString;
|
|
150
|
-
params: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
151
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
152
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
153
|
-
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
154
|
-
result: z.ZodJSONSchema;
|
|
155
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
156
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
157
|
-
id: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
158
|
-
error: z.ZodObject<{
|
|
159
|
-
code: z.ZodUnion<readonly [z.ZodLiteral<-32700>, z.ZodLiteral<-32600>, z.ZodLiteral<-32601>, z.ZodLiteral<-32602>, z.ZodLiteral<-32603>, z.core.$ZodBranded<z.ZodNumber, "JsonrpcServerErrorCode", "out">]>;
|
|
160
|
-
message: z.ZodString;
|
|
161
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
162
|
-
}, z.core.$loose>;
|
|
163
|
-
}, z.core.$loose>]>;
|
|
164
|
-
export type JsonrpcMessage = z.infer<typeof JsonrpcMessage>;
|
|
270
|
+
export type JsonrpcMessage = JsonrpcRequest | JsonrpcNotification | JsonrpcResponse | JsonrpcErrorResponse;
|
|
165
271
|
/** Messages a client can send to a server (request or notification). */
|
|
166
|
-
export
|
|
167
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
168
|
-
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
169
|
-
method: z.ZodString;
|
|
170
|
-
params: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
171
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
172
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
173
|
-
method: z.ZodString;
|
|
174
|
-
params: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
175
|
-
}, z.core.$loose>]>;
|
|
176
|
-
export type JsonrpcMessageFromClientToServer = z.infer<typeof JsonrpcMessageFromClientToServer>;
|
|
272
|
+
export type JsonrpcMessageFromClientToServer = JsonrpcRequest | JsonrpcNotification;
|
|
177
273
|
/** Messages a server can send to a client (notification, response, or error response). */
|
|
178
|
-
export
|
|
179
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
180
|
-
method: z.ZodString;
|
|
181
|
-
params: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
182
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
183
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
184
|
-
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
185
|
-
result: z.ZodJSONSchema;
|
|
186
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
187
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
188
|
-
id: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
189
|
-
error: z.ZodObject<{
|
|
190
|
-
code: z.ZodUnion<readonly [z.ZodLiteral<-32700>, z.ZodLiteral<-32600>, z.ZodLiteral<-32601>, z.ZodLiteral<-32602>, z.ZodLiteral<-32603>, z.core.$ZodBranded<z.ZodNumber, "JsonrpcServerErrorCode", "out">]>;
|
|
191
|
-
message: z.ZodString;
|
|
192
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
193
|
-
}, z.core.$loose>;
|
|
194
|
-
}, z.core.$loose>]>;
|
|
195
|
-
export type JsonrpcMessageFromServerToClient = z.infer<typeof JsonrpcMessageFromServerToClient>;
|
|
274
|
+
export type JsonrpcMessageFromServerToClient = JsonrpcNotification | JsonrpcResponse | JsonrpcErrorResponse;
|
|
196
275
|
//# sourceMappingURL=jsonrpc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonrpc.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/jsonrpc.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"jsonrpc.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/jsonrpc.ts"],"names":[],"mappings":"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"}
|