@4players/odin-common 4.0.1 → 4.0.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/package.json +1 -1
- package/rpc/commands.d.ts +12 -12
- package/rpc/notifications.d.ts +80 -80
- package/schema/message.d.ts +3 -3
- package/schema/peer.d.ts +6 -6
- package/schema/room.d.ts +186 -186
- package/schema/serialization.d.ts +5 -5
- package/utility/bytearray.d.ts +3 -3
- package/utility/json.d.ts +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const ByteArraySchema: z.ZodType<Uint8Array
|
|
2
|
+
export declare const ByteArraySchema: z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>;
|
|
3
3
|
export type ByteArray = z.infer<typeof ByteArraySchema>;
|
|
4
4
|
declare const LiteralSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
5
5
|
type Literal = z.infer<typeof LiteralSchema>;
|
|
6
|
-
export type
|
|
7
|
-
[key: string]:
|
|
8
|
-
} |
|
|
9
|
-
export declare const JsonSchema: z.ZodType<
|
|
6
|
+
export type JsonValue = Literal | {
|
|
7
|
+
[key: string]: JsonValue;
|
|
8
|
+
} | JsonValue[];
|
|
9
|
+
export declare const JsonSchema: z.ZodType<JsonValue>;
|
|
10
10
|
export declare const MessagePackRpcSchema: z.ZodUnion<[z.ZodTuple<[z.ZodLiteral<0>, z.ZodNumber, z.ZodString, z.ZodUnknown], null>, z.ZodTuple<[z.ZodLiteral<1>, z.ZodNumber, z.ZodNullable<z.ZodString>, z.ZodUnknown], null>, z.ZodTuple<[z.ZodLiteral<2>, z.ZodString, z.ZodUnknown], null>]>;
|
|
11
11
|
export type MessagePackRpc = z.infer<typeof MessagePackRpcSchema>;
|
|
12
12
|
export {};
|
package/utility/bytearray.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ByteArray,
|
|
1
|
+
import type { ByteArray, JsonValue } from "../schema/serialization.ts";
|
|
2
2
|
import { type Result } from "./result.ts";
|
|
3
|
-
export declare function toBytes(value:
|
|
4
|
-
export declare function fromBytes(bytes: ByteArray): Result<
|
|
3
|
+
export declare function toBytes(value: JsonValue): Result<ByteArray>;
|
|
4
|
+
export declare function fromBytes(bytes: ByteArray): Result<JsonValue>;
|
package/utility/json.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function toRaw<T extends
|
|
1
|
+
import type { JsonValue } from "../schema/serialization.ts";
|
|
2
|
+
export declare function toRaw<T extends JsonValue>(value: T): JsonValue;
|