@types/telegram-web-app 7.3.1 → 7.8.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.
- telegram-web-app/README.md +1 -1
- telegram-web-app/index.d.ts +23 -0
- telegram-web-app/package.json +2 -2
telegram-web-app/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for telegram-web-app (https://telegram.or
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/telegram-web-app.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 31 Jul 2024 21:35:43 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
telegram-web-app/index.d.ts
CHANGED
|
@@ -268,6 +268,10 @@ interface WebApp {
|
|
|
268
268
|
* event qrTextReceived.
|
|
269
269
|
*/
|
|
270
270
|
closeScanQrPopup(): void;
|
|
271
|
+
/** A method that opens the native story editor with the media specified in
|
|
272
|
+
* the media_url parameter as an HTTPS URL. An optional params argument of
|
|
273
|
+
* the type StoryShareParams describes additional sharing settings. */
|
|
274
|
+
shareToStory(media_url: string, params?: StoryShareParams): void;
|
|
271
275
|
/**
|
|
272
276
|
* A method that requests text from the clipboard. The Web App will receive
|
|
273
277
|
* the event clipboardTextReceived. If an optional callback parameter was
|
|
@@ -1046,3 +1050,22 @@ interface RequestContactResponseCancelled {
|
|
|
1046
1050
|
}
|
|
1047
1051
|
|
|
1048
1052
|
type RequestContactResponse = RequestContactResponseSent | RequestContactResponseCancelled;
|
|
1053
|
+
|
|
1054
|
+
/** This object describes additional sharing settings for the native story
|
|
1055
|
+
* editor. */
|
|
1056
|
+
interface StoryShareParams {
|
|
1057
|
+
/** The caption to be added to the media, 0-200 characters for regular users
|
|
1058
|
+
* and 0-2048 characters for premium subscribers. */
|
|
1059
|
+
text?: string;
|
|
1060
|
+
/** An object that describes a widget link to be included in the story. Note
|
|
1061
|
+
* that only premium subscribers can post stories with links. */
|
|
1062
|
+
widget_link?: StoryWidgetLink;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/** This object describes a widget link to be included in the story. */
|
|
1066
|
+
interface StoryWidgetLink {
|
|
1067
|
+
/** The URL to be included in the story. */
|
|
1068
|
+
url: string;
|
|
1069
|
+
/** The name to be displayed for the widget link, 0-48 characters. */
|
|
1070
|
+
name?: string;
|
|
1071
|
+
}
|
telegram-web-app/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/telegram-web-app",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0",
|
|
4
4
|
"description": "TypeScript definitions for telegram-web-app",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/telegram-web-app",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
},
|
|
31
31
|
"scripts": {},
|
|
32
32
|
"dependencies": {},
|
|
33
|
-
"typesPublisherContentHash": "
|
|
33
|
+
"typesPublisherContentHash": "40e04a535cf869443b04b0769fea07cd7a7d391643414bdddc0785e3f10585d3",
|
|
34
34
|
"typeScriptVersion": "4.8"
|
|
35
35
|
}
|