libshv-js 3.17.0 → 3.20.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/access.d.ts +69 -0
- package/dist/access.js +98 -0
- package/dist/chainpack.d.ts +39 -0
- package/dist/chainpack.js +562 -0
- package/dist/cpcontext.d.ts +18 -0
- package/dist/cpcontext.js +78 -0
- package/dist/cpon.d.ts +55 -0
- package/dist/cpon.js +900 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +26 -0
- package/dist/json.d.ts +3 -0
- package/dist/json.js +118 -0
- package/dist/rpcmessage.d.ts +285 -0
- package/dist/rpcmessage.js +111 -0
- package/dist/rpcvalue.d.ts +56 -0
- package/dist/rpcvalue.js +100 -0
- package/dist/vue-shv.d.ts +91 -0
- package/dist/vue-shv.js +424 -0
- package/dist/ws-client.d.ts +232 -0
- package/dist/ws-client.js +586 -0
- package/dist/zod.d.ts +30 -0
- package/dist/zod.js +112 -0
- package/package.json +1 -1
package/dist/cpon.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type RpcValue, type RpcValueType, type DateTime, type List, Decimal, Double, type IMap, type Int, type MetaMap, RpcValueWithMetaData, type ShvMap, UInt } from './rpcvalue';
|
|
2
|
+
import { PackContext, UnpackContext } from './cpcontext';
|
|
3
|
+
export declare const stringifyDate: (dt: DateTime) => string;
|
|
4
|
+
declare const utf8ToString: (bytearray: ArrayBuffer) => string;
|
|
5
|
+
declare class CponReader {
|
|
6
|
+
ctx: UnpackContext;
|
|
7
|
+
constructor(unpackContext: UnpackContext);
|
|
8
|
+
read(): RpcValue;
|
|
9
|
+
skipWhitespace(): void;
|
|
10
|
+
readDateTime(): DateTime;
|
|
11
|
+
readDateTimeInner(): DateTime;
|
|
12
|
+
readCString(): string;
|
|
13
|
+
readBlobEsc(): ArrayBuffer;
|
|
14
|
+
readBlobHex(): ArrayBuffer;
|
|
15
|
+
readList(): (string | number | boolean | Double | Decimal | ArrayBuffer | DateTime | UInt<number> | List | ShvMap<Record<string, any>> | IMap<Record<number, any>> | RpcValueWithMetaData<MetaMap<Record<string | number, RpcValue>>, RpcValueType> | undefined)[];
|
|
16
|
+
readMetaMap(): MetaMap;
|
|
17
|
+
readMap(): ShvMap;
|
|
18
|
+
readIMap(): IMap;
|
|
19
|
+
readInt(): number;
|
|
20
|
+
readNumber(): number | Decimal | UInt<number>;
|
|
21
|
+
private implReadMap;
|
|
22
|
+
}
|
|
23
|
+
declare class CponWriter {
|
|
24
|
+
private readonly indentString?;
|
|
25
|
+
private oneLiners;
|
|
26
|
+
ctx: PackContext;
|
|
27
|
+
nestLevel: number;
|
|
28
|
+
constructor(indentString?: string | undefined, oneLiners?: OneLiners);
|
|
29
|
+
write(rpcVal: RpcValue): void;
|
|
30
|
+
writeJSString(str: string): void;
|
|
31
|
+
writeBlob(buffer: ArrayBuffer): void;
|
|
32
|
+
writeDateTime(dt: DateTime): void;
|
|
33
|
+
writeBool(b: boolean): void;
|
|
34
|
+
writeMeta(map: MetaMap): void;
|
|
35
|
+
writeIMap(map: IMap): void;
|
|
36
|
+
writeMap(map: ShvMap): void;
|
|
37
|
+
writeMapContent(map: MetaMap | ShvMap | IMap, delimiterStart: string, delimiterEnd: string): void;
|
|
38
|
+
writeList(lst: RpcValue[]): void;
|
|
39
|
+
writeUInt(num: UInt): void;
|
|
40
|
+
writeInt(num: Int): void;
|
|
41
|
+
writeDouble(num: Double): void;
|
|
42
|
+
writeDecimal(val: Decimal): void;
|
|
43
|
+
private doIndentIfNotOneliner;
|
|
44
|
+
private isOneLiner;
|
|
45
|
+
private increaseIndentIfNotOneLiner;
|
|
46
|
+
private decreaseIndentIfNotOneLiner;
|
|
47
|
+
}
|
|
48
|
+
export declare enum OneLiners {
|
|
49
|
+
Yes = 0,
|
|
50
|
+
No = 1
|
|
51
|
+
}
|
|
52
|
+
declare const toCpon: (value: RpcValue, indentString?: string, oneLiners?: OneLiners) => string;
|
|
53
|
+
declare const fromCpon: (str: string | Uint8Array) => RpcValue;
|
|
54
|
+
declare const CPON_PROTOCOL_TYPE = 2;
|
|
55
|
+
export { utf8ToString, CponWriter, CponReader, CPON_PROTOCOL_TYPE, toCpon, fromCpon };
|