@mtcute/core 0.16.1 → 0.16.3
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/README.md +2 -3
- package/cjs/highlevel/client.d.ts +1 -0
- package/cjs/highlevel/client.js.map +1 -1
- package/cjs/highlevel/methods/auth/run.d.ts +1 -0
- package/cjs/highlevel/methods/auth/run.js +1 -0
- package/cjs/highlevel/methods/auth/run.js.map +1 -1
- package/cjs/highlevel/methods/files/normalize-input-media.js +1 -1
- package/cjs/highlevel/methods/files/normalize-input-media.js.map +1 -1
- package/cjs/highlevel/types/media/video.d.ts +1 -0
- package/cjs/highlevel/types/media/video.js +3 -0
- package/cjs/highlevel/types/media/video.js.map +1 -1
- package/cjs/highlevel/types/messages/message-action.d.ts +15 -1
- package/cjs/highlevel/types/messages/message-action.js +9 -0
- package/cjs/highlevel/types/messages/message-action.js.map +1 -1
- package/cjs/highlevel/types/peers/user.d.ts +4 -0
- package/cjs/highlevel/types/peers/user.js +8 -0
- package/cjs/highlevel/types/peers/user.js.map +1 -1
- package/cjs/highlevel/types/stories/interactive/index.d.ts +3 -2
- package/cjs/highlevel/types/stories/interactive/index.js +5 -1
- package/cjs/highlevel/types/stories/interactive/index.js.map +1 -1
- package/cjs/highlevel/types/stories/interactive/weather.d.ts +15 -0
- package/cjs/highlevel/types/stories/interactive/weather.js +30 -0
- package/cjs/highlevel/types/stories/interactive/weather.js.map +1 -0
- package/cjs/network/network-manager.js +1 -1
- package/esm/highlevel/client.d.ts +1 -0
- package/esm/highlevel/client.js.map +1 -1
- package/esm/highlevel/methods/auth/run.d.ts +1 -0
- package/esm/highlevel/methods/auth/run.js +1 -0
- package/esm/highlevel/methods/auth/run.js.map +1 -1
- package/esm/highlevel/methods/files/normalize-input-media.js +1 -1
- package/esm/highlevel/methods/files/normalize-input-media.js.map +1 -1
- package/esm/highlevel/types/media/video.d.ts +1 -0
- package/esm/highlevel/types/media/video.js +3 -0
- package/esm/highlevel/types/media/video.js.map +1 -1
- package/esm/highlevel/types/messages/message-action.d.ts +15 -1
- package/esm/highlevel/types/messages/message-action.js +9 -0
- package/esm/highlevel/types/messages/message-action.js.map +1 -1
- package/esm/highlevel/types/peers/user.d.ts +4 -0
- package/esm/highlevel/types/peers/user.js +8 -0
- package/esm/highlevel/types/peers/user.js.map +1 -1
- package/esm/highlevel/types/stories/interactive/index.d.ts +3 -2
- package/esm/highlevel/types/stories/interactive/index.js +4 -1
- package/esm/highlevel/types/stories/interactive/index.js.map +1 -1
- package/esm/highlevel/types/stories/interactive/weather.d.ts +15 -0
- package/esm/highlevel/types/stories/interactive/weather.js +27 -0
- package/esm/highlevel/types/stories/interactive/weather.js.map +1 -0
- package/esm/network/network-manager.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/highlevel/types/stories/interactive/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAElE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/highlevel/types/stories/interactive/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAElE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,cAAc,YAAY,CAAA;AAC1B,OAAO,EACH,2BAA2B,EAC3B,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,GAC1B,CAAA;AAUD,MAAM,UAAU,8BAA8B,CAAC,GAAqB,EAAE,KAAiB;IACnF,QAAQ,GAAG,CAAC,CAAC,EAAE,CAAC;QACZ,KAAK,4BAA4B;YAC7B,OAAO,IAAI,wBAAwB,CAAC,GAAG,CAAC,CAAA;QAC5C,KAAK,mBAAmB;YACpB,OAAO,IAAI,wBAAwB,CAAC,GAAG,CAAC,CAAA;QAC5C,KAAK,gBAAgB;YACjB,OAAO,IAAI,qBAAqB,CAAC,GAAG,CAAC,CAAA;QACzC,KAAK,sBAAsB;YACvB,OAAO,IAAI,2BAA2B,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACtD,KAAK,cAAc;YACf,OAAO,IAAI,mBAAmB,CAAC,GAAG,CAAC,CAAA;QACvC,KAAK,kBAAkB;YACnB,OAAO,IAAI,uBAAuB,CAAC,GAAG,CAAC,CAAA;QAC3C,KAAK,qBAAqB,CAAC;QAC3B,KAAK,2BAA2B;YAC5B,MAAM,IAAI,oBAAoB,CAAC,yBAAyB,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;IACnF,CAAC;AACL,CAAC","sourcesContent":["import { tl } from '@mtcute/tl'\n\nimport { MtTypeAssertionError } from '../../../../types/errors.js'\nimport { PeersIndex } from '../../peers/index.js'\nimport { StoryInteractiveChannelPost } from './channel-post.js'\nimport { StoryInteractiveLocation } from './location.js'\nimport { StoryInteractiveReaction } from './reaction.js'\nimport { StoryInteractiveUrl } from './url.js'\nimport { StoryInteractiveVenue } from './venue.js'\nimport { StoryInteractiveWeather } from './weather.js'\n\nexport * from './input.js'\nexport {\n StoryInteractiveChannelPost,\n StoryInteractiveLocation,\n StoryInteractiveReaction,\n StoryInteractiveUrl,\n StoryInteractiveVenue,\n StoryInteractiveWeather,\n}\n\nexport type StoryInteractiveElement =\n | StoryInteractiveReaction\n | StoryInteractiveLocation\n | StoryInteractiveVenue\n | StoryInteractiveChannelPost\n | StoryInteractiveUrl\n | StoryInteractiveWeather\n\nexport function _storyInteractiveElementFromTl(raw: tl.TypeMediaArea, peers: PeersIndex): StoryInteractiveElement {\n switch (raw._) {\n case 'mediaAreaSuggestedReaction':\n return new StoryInteractiveReaction(raw)\n case 'mediaAreaGeoPoint':\n return new StoryInteractiveLocation(raw)\n case 'mediaAreaVenue':\n return new StoryInteractiveVenue(raw)\n case 'mediaAreaChannelPost':\n return new StoryInteractiveChannelPost(raw, peers)\n case 'mediaAreaUrl':\n return new StoryInteractiveUrl(raw)\n case 'mediaAreaWeather':\n return new StoryInteractiveWeather(raw)\n case 'inputMediaAreaVenue':\n case 'inputMediaAreaChannelPost':\n throw new MtTypeAssertionError('StoryInteractiveElement', '!input*', raw._)\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { StoryInteractiveArea } from './base.js';
|
|
3
|
+
/**
|
|
4
|
+
* Interactive element containing a weather info
|
|
5
|
+
*/
|
|
6
|
+
export declare class StoryInteractiveWeather extends StoryInteractiveArea {
|
|
7
|
+
readonly raw: tl.RawMediaAreaWeather;
|
|
8
|
+
readonly type: "weather";
|
|
9
|
+
constructor(raw: tl.RawMediaAreaWeather);
|
|
10
|
+
/** Emoji representing the weather */
|
|
11
|
+
get emoji(): string;
|
|
12
|
+
/** Temperature in Celsius */
|
|
13
|
+
get temperature(): number;
|
|
14
|
+
get color(): number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { makeInspectable } from '../../../utils/index.js';
|
|
2
|
+
import { StoryInteractiveArea } from './base.js';
|
|
3
|
+
/**
|
|
4
|
+
* Interactive element containing a weather info
|
|
5
|
+
*/
|
|
6
|
+
class StoryInteractiveWeather extends StoryInteractiveArea {
|
|
7
|
+
raw;
|
|
8
|
+
type = 'weather';
|
|
9
|
+
constructor(raw) {
|
|
10
|
+
super(raw);
|
|
11
|
+
this.raw = raw;
|
|
12
|
+
}
|
|
13
|
+
/** Emoji representing the weather */
|
|
14
|
+
get emoji() {
|
|
15
|
+
return this.raw.emoji;
|
|
16
|
+
}
|
|
17
|
+
/** Temperature in Celsius */
|
|
18
|
+
get temperature() {
|
|
19
|
+
return this.raw.temperatureC;
|
|
20
|
+
}
|
|
21
|
+
get color() {
|
|
22
|
+
return this.raw.color;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const StoryInteractiveWeather$1 = /*#__PURE__*/makeInspectable(StoryInteractiveWeather, );
|
|
26
|
+
//# sourceMappingURL=weather.js.map
|
|
27
|
+
export { StoryInteractiveWeather$1 as StoryInteractiveWeather }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weather.js","sourceRoot":"","sources":["../../../../../../src/highlevel/types/stories/interactive/weather.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAEhD;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,oBAAoB;IAGxC;IAFZ,IAAI,GAAG,SAAkB,CAAA;IAElC,YAAqB,GAA2B;QAC5C,KAAK,CAAC,GAAG,CAAC,CAAA;QADO,QAAG,GAAH,GAAG,CAAwB;IAEhD,CAAC;IAED,qCAAqC;IACrC,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAA;IACzB,CAAC;IAED,6BAA6B;IAC7B,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,CAAA;IAChC,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAA;IACzB,CAAC;CACJ;AAED,eAAe,CAAC,uBAAuB,CAAC,CAAA","sourcesContent":["import { tl } from '@mtcute/tl'\n\nimport { makeInspectable } from '../../../utils/index.js'\nimport { StoryInteractiveArea } from './base.js'\n\n/**\n * Interactive element containing a weather info\n */\nexport class StoryInteractiveWeather extends StoryInteractiveArea {\n readonly type = 'weather' as const\n\n constructor(readonly raw: tl.RawMediaAreaWeather) {\n super(raw)\n }\n\n /** Emoji representing the weather */\n get emoji(): string {\n return this.raw.emoji\n }\n\n /** Temperature in Celsius */\n get temperature(): number {\n return this.raw.temperatureC\n }\n\n get color(): number {\n return this.raw.color\n }\n}\n\nmakeInspectable(StoryInteractiveWeather)\n"]}
|
|
@@ -255,7 +255,7 @@ export class NetworkManager {
|
|
|
255
255
|
_: 'initConnection',
|
|
256
256
|
deviceModel,
|
|
257
257
|
systemVersion: '1.0',
|
|
258
|
-
appVersion: '0.16.
|
|
258
|
+
appVersion: '0.16.3',
|
|
259
259
|
systemLangCode: 'en',
|
|
260
260
|
langPack: '', // "langPacks are for official apps only"
|
|
261
261
|
langCode: 'en',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtcute/core",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.3",
|
|
4
4
|
"description": "Type-safe library for MTProto (Telegram API)",
|
|
5
5
|
"author": "alina sireneva <alina@tei.su>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@mtcute/tl": "^
|
|
37
|
+
"@mtcute/tl": "^185.0.0",
|
|
38
38
|
"@mtcute/tl-runtime": "^0.16.0",
|
|
39
39
|
"@mtcute/file-id": "^0.16.0",
|
|
40
40
|
"@types/events": "3.0.0",
|