@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,2DAAkE;AAElE,uDAA+D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/highlevel/types/stories/interactive/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,2DAAkE;AAElE,uDAA+D;AAS3D,4GATK,6CAA2B,OASL;AAR/B,+CAAwD;AASpD,yGATK,sCAAwB,OASL;AAR5B,+CAAwD;AASpD,yGATK,sCAAwB,OASL;AAR5B,qCAA8C;AAS1C,oGATK,4BAAmB,OASL;AARvB,yCAAkD;AAS9C,sGATK,gCAAqB,OASL;AARzB,6CAAsD;AASlD,wGATK,oCAAuB,OASL;AAP3B,6CAA0B;AAkB1B,SAAgB,8BAA8B,CAAC,GAAqB,EAAE,KAAiB;IACnF,QAAQ,GAAG,CAAC,CAAC,EAAE,CAAC;QACZ,KAAK,4BAA4B;YAC7B,OAAO,IAAI,sCAAwB,CAAC,GAAG,CAAC,CAAA;QAC5C,KAAK,mBAAmB;YACpB,OAAO,IAAI,sCAAwB,CAAC,GAAG,CAAC,CAAA;QAC5C,KAAK,gBAAgB;YACjB,OAAO,IAAI,gCAAqB,CAAC,GAAG,CAAC,CAAA;QACzC,KAAK,sBAAsB;YACvB,OAAO,IAAI,6CAA2B,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACtD,KAAK,cAAc;YACf,OAAO,IAAI,4BAAmB,CAAC,GAAG,CAAC,CAAA;QACvC,KAAK,kBAAkB;YACnB,OAAO,IAAI,oCAAuB,CAAC,GAAG,CAAC,CAAA;QAC3C,KAAK,qBAAqB,CAAC;QAC3B,KAAK,2BAA2B;YAC5B,MAAM,IAAI,gCAAoB,CAAC,yBAAyB,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;IACnF,CAAC;AACL,CAAC;AAlBD,wEAkBC","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,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StoryInteractiveWeather = void 0;
|
|
4
|
+
const index_js_1 = require("../../../utils/index.js");
|
|
5
|
+
const base_js_1 = require("./base.js");
|
|
6
|
+
/**
|
|
7
|
+
* Interactive element containing a weather info
|
|
8
|
+
*/
|
|
9
|
+
class StoryInteractiveWeather extends base_js_1.StoryInteractiveArea {
|
|
10
|
+
raw;
|
|
11
|
+
type = 'weather';
|
|
12
|
+
constructor(raw) {
|
|
13
|
+
super(raw);
|
|
14
|
+
this.raw = raw;
|
|
15
|
+
}
|
|
16
|
+
/** Emoji representing the weather */
|
|
17
|
+
get emoji() {
|
|
18
|
+
return this.raw.emoji;
|
|
19
|
+
}
|
|
20
|
+
/** Temperature in Celsius */
|
|
21
|
+
get temperature() {
|
|
22
|
+
return this.raw.temperatureC;
|
|
23
|
+
}
|
|
24
|
+
get color() {
|
|
25
|
+
return this.raw.color;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.StoryInteractiveWeather = StoryInteractiveWeather;
|
|
29
|
+
(0, index_js_1.makeInspectable)(StoryInteractiveWeather);
|
|
30
|
+
//# sourceMappingURL=weather.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weather.js","sourceRoot":"","sources":["../../../../../../src/highlevel/types/stories/interactive/weather.ts"],"names":[],"mappings":";;;AAEA,sDAAyD;AACzD,uCAAgD;AAEhD;;GAEG;AACH,MAAa,uBAAwB,SAAQ,8BAAoB;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;AApBD,0DAoBC;AAED,IAAA,0BAAe,EAAC,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"]}
|
|
@@ -357,6 +357,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
357
357
|
*
|
|
358
358
|
* @param params Parameters to be passed to {@link start}
|
|
359
359
|
* @param then Function to be called after {@link start} returns
|
|
360
|
+
* @deprecated This method provides no real value over {@link start}, please use it instead
|
|
360
361
|
*/
|
|
361
362
|
run(params: Parameters<typeof start>[1], then?: (user: User) => void | Promise<void>): void;
|
|
362
363
|
/**
|