@tma.js/init-data-node 2.0.0 → 2.0.1
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/parsing.d.ts +49 -1
- package/package.json +6 -6
package/dist/parsing.d.ts
CHANGED
|
@@ -2,7 +2,55 @@ import { parseInitDataQueryFp, ParseInitDataQueryError } from '@tma.js/transform
|
|
|
2
2
|
/**
|
|
3
3
|
* Parses an incoming value as init data.
|
|
4
4
|
*/
|
|
5
|
-
export declare const parse: (value: string | URLSearchParams) =>
|
|
5
|
+
export declare const parse: (value: string | URLSearchParams) => {
|
|
6
|
+
auth_date: Date;
|
|
7
|
+
can_send_after?: number | undefined;
|
|
8
|
+
chat?: ({
|
|
9
|
+
id: number;
|
|
10
|
+
photo_url?: string | undefined;
|
|
11
|
+
type: string;
|
|
12
|
+
title: string;
|
|
13
|
+
username?: string | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}) | undefined;
|
|
17
|
+
chat_type?: string | undefined;
|
|
18
|
+
chat_instance?: string | undefined;
|
|
19
|
+
hash: string;
|
|
20
|
+
query_id?: string | undefined;
|
|
21
|
+
receiver?: ({
|
|
22
|
+
added_to_attachment_menu?: boolean | undefined;
|
|
23
|
+
allows_write_to_pm?: boolean | undefined;
|
|
24
|
+
first_name: string;
|
|
25
|
+
id: number;
|
|
26
|
+
is_bot?: boolean | undefined;
|
|
27
|
+
is_premium?: boolean | undefined;
|
|
28
|
+
last_name?: string | undefined;
|
|
29
|
+
language_code?: string | undefined;
|
|
30
|
+
photo_url?: string | undefined;
|
|
31
|
+
username?: string | undefined;
|
|
32
|
+
} & {
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}) | undefined;
|
|
35
|
+
start_param?: string | undefined;
|
|
36
|
+
signature: string;
|
|
37
|
+
user?: ({
|
|
38
|
+
added_to_attachment_menu?: boolean | undefined;
|
|
39
|
+
allows_write_to_pm?: boolean | undefined;
|
|
40
|
+
first_name: string;
|
|
41
|
+
id: number;
|
|
42
|
+
is_bot?: boolean | undefined;
|
|
43
|
+
is_premium?: boolean | undefined;
|
|
44
|
+
last_name?: string | undefined;
|
|
45
|
+
language_code?: string | undefined;
|
|
46
|
+
photo_url?: string | undefined;
|
|
47
|
+
username?: string | undefined;
|
|
48
|
+
} & {
|
|
49
|
+
[key: string]: unknown;
|
|
50
|
+
}) | undefined;
|
|
51
|
+
} & {
|
|
52
|
+
[key: string]: unknown;
|
|
53
|
+
};
|
|
6
54
|
/**
|
|
7
55
|
* Parses an incoming value as init data.
|
|
8
56
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tma.js/init-data-node",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "TypeScript Node library to operate with Telegram init data.",
|
|
5
5
|
"author": "Vladislav Kibenko <wolfram.deus@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Telegram-Mini-Apps/telegram-apps#readme",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^22.9.0",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
46
|
+
"tsconfig": "0.0.2",
|
|
47
|
+
"test-utils": "0.0.1"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"better-promises": "^1.0.0",
|
|
54
54
|
"error-kid": "^1.0.2",
|
|
55
55
|
"fp-ts": "^2.16.11",
|
|
56
|
-
"@tma.js/
|
|
57
|
-
"@tma.js/transformers": "^1.0.
|
|
58
|
-
"@tma.js/
|
|
56
|
+
"@tma.js/types": "^1.0.0",
|
|
57
|
+
"@tma.js/transformers": "^1.0.1",
|
|
58
|
+
"@tma.js/toolkit": "^1.0.1"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"test": "vitest --run",
|