@mtkruto/node 0.14.0 → 0.15.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/esm/3_types.d.ts +4 -0
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +4 -0
- package/esm/client/0_params.d.ts +16 -2
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_update_processor.d.ts +7 -0
- package/esm/client/0_update_processor.d.ts.map +1 -0
- package/esm/client/0_update_processor.js +1 -0
- package/esm/client/2_business_connection_manager.d.ts +3 -2
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +1 -1
- package/esm/client/2_gift_manager.d.ts +29 -0
- package/esm/client/2_gift_manager.d.ts.map +1 -0
- package/esm/client/2_gift_manager.js +62 -0
- package/esm/client/2_payment_manager.d.ts +3 -2
- package/esm/client/2_payment_manager.d.ts.map +1 -1
- package/esm/client/2_payment_manager.js +1 -1
- package/esm/client/2_reaction_manager.d.ts +3 -2
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +1 -1
- package/esm/client/2_translations_manager.d.ts +3 -2
- package/esm/client/2_translations_manager.d.ts.map +1 -1
- package/esm/client/2_translations_manager.js +1 -1
- package/esm/client/3_message_manager.d.ts +8 -25
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +26 -238
- package/esm/client/3_video_chat_manager.d.ts +3 -2
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.js +1 -1
- package/esm/client/4_callback_query_manager.d.ts +3 -2
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +1 -1
- package/esm/client/4_chat_list_manager.d.ts +4 -3
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +2 -1
- package/esm/client/4_chat_manager.d.ts +61 -0
- package/esm/client/4_chat_manager.d.ts.map +1 -0
- package/esm/client/4_chat_manager.js +293 -0
- package/esm/client/4_inline_query_manager.d.ts +3 -2
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +1 -1
- package/esm/client/4_poll_manager.d.ts +3 -2
- package/esm/client/4_poll_manager.d.ts.map +1 -1
- package/esm/client/4_poll_manager.js +1 -1
- package/esm/client/4_story_manager.d.ts +3 -2
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +1 -1
- package/esm/client/5_client.d.ts +33 -6
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +163 -71
- package/esm/types/1_sticker.d.ts +1 -0
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_sticker.js +6 -2
- package/esm/types/2_gift_upgraded_component.d.ts +95 -0
- package/esm/types/2_gift_upgraded_component.d.ts.map +1 -0
- package/esm/types/2_gift_upgraded_component.js +88 -0
- package/esm/types/3_gift.d.ts +84 -0
- package/esm/types/3_gift.d.ts.map +1 -0
- package/esm/types/3_gift.js +90 -0
- package/esm/types/4_user_gift.d.ts +44 -0
- package/esm/types/4_user_gift.d.ts.map +1 -0
- package/esm/types/4_user_gift.js +43 -0
- package/esm/types/5_user_gifts.d.ts +32 -0
- package/esm/types/5_user_gifts.d.ts.map +1 -0
- package/esm/types/5_user_gifts.js +29 -0
- package/package.json +1 -1
- package/script/3_types.d.ts +4 -0
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +4 -0
- package/script/client/0_params.d.ts +16 -2
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_update_processor.d.ts +7 -0
- package/script/client/0_update_processor.d.ts.map +1 -0
- package/script/client/0_update_processor.js +2 -0
- package/script/client/2_business_connection_manager.d.ts +3 -2
- package/script/client/2_business_connection_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.js +1 -1
- package/script/client/2_gift_manager.d.ts +29 -0
- package/script/client/2_gift_manager.d.ts.map +1 -0
- package/script/client/2_gift_manager.js +66 -0
- package/script/client/2_payment_manager.d.ts +3 -2
- package/script/client/2_payment_manager.d.ts.map +1 -1
- package/script/client/2_payment_manager.js +1 -1
- package/script/client/2_reaction_manager.d.ts +3 -2
- package/script/client/2_reaction_manager.d.ts.map +1 -1
- package/script/client/2_reaction_manager.js +1 -1
- package/script/client/2_translations_manager.d.ts +3 -2
- package/script/client/2_translations_manager.d.ts.map +1 -1
- package/script/client/2_translations_manager.js +1 -1
- package/script/client/3_message_manager.d.ts +8 -25
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +23 -235
- package/script/client/3_video_chat_manager.d.ts +3 -2
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.js +1 -1
- package/script/client/4_callback_query_manager.d.ts +3 -2
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +1 -1
- package/script/client/4_chat_list_manager.d.ts +4 -3
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +2 -1
- package/script/client/4_chat_manager.d.ts +61 -0
- package/script/client/4_chat_manager.d.ts.map +1 -0
- package/script/client/4_chat_manager.js +297 -0
- package/script/client/4_inline_query_manager.d.ts +3 -2
- package/script/client/4_inline_query_manager.d.ts.map +1 -1
- package/script/client/4_inline_query_manager.js +1 -1
- package/script/client/4_poll_manager.d.ts +3 -2
- package/script/client/4_poll_manager.d.ts.map +1 -1
- package/script/client/4_poll_manager.js +1 -1
- package/script/client/4_story_manager.d.ts +3 -2
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +1 -1
- package/script/client/5_client.d.ts +33 -6
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +163 -71
- package/script/types/1_sticker.d.ts +1 -0
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_sticker.js +7 -2
- package/script/types/2_gift_upgraded_component.d.ts +95 -0
- package/script/types/2_gift_upgraded_component.d.ts.map +1 -0
- package/script/types/2_gift_upgraded_component.js +91 -0
- package/script/types/3_gift.d.ts +84 -0
- package/script/types/3_gift.d.ts.map +1 -0
- package/script/types/3_gift.js +95 -0
- package/script/types/4_user_gift.d.ts +44 -0
- package/script/types/4_user_gift.d.ts.map +1 -0
- package/script/types/4_user_gift.js +46 -0
- package/script/types/5_user_gifts.d.ts +32 -0
- package/script/types/5_user_gifts.d.ts.map +1 -0
- package/script/types/5_user_gifts.js +32 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
|
+
import { MessageEntity } from "./0_message_entity.js";
|
|
22
|
+
import { Sticker } from "./1_sticker.js";
|
|
23
|
+
/**
|
|
24
|
+
* The model of an upgraded gift.
|
|
25
|
+
*
|
|
26
|
+
* @unlisted
|
|
27
|
+
*/
|
|
28
|
+
export interface GiftUpgradedComponentModel {
|
|
29
|
+
/** @discriminator */
|
|
30
|
+
type: "model";
|
|
31
|
+
/** The name of the model. */
|
|
32
|
+
name: string;
|
|
33
|
+
/** The sticker belonging to the model. */
|
|
34
|
+
sticker: Sticker;
|
|
35
|
+
/** A number determining how rare this type of model is out of a thousand of others. */
|
|
36
|
+
rarityLevel: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The pattern of an upgraded gift.
|
|
40
|
+
*
|
|
41
|
+
* @unlisted
|
|
42
|
+
*/
|
|
43
|
+
export interface GiftUpgradedComponentPattern {
|
|
44
|
+
/** @discriminator */
|
|
45
|
+
type: "pattern";
|
|
46
|
+
/** The name of the pattern. */
|
|
47
|
+
name: string;
|
|
48
|
+
/** The sticker belonging to the pattern. */
|
|
49
|
+
sticker: Sticker;
|
|
50
|
+
/** A number determining how rare this type of pattern is out of a thousand of others. */
|
|
51
|
+
rarityLevel: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The backdrop of an upgraded gift.
|
|
55
|
+
*
|
|
56
|
+
* @unlisted
|
|
57
|
+
*/
|
|
58
|
+
export interface GiftUpgradedComponentBackdrop {
|
|
59
|
+
/** @discriminator */
|
|
60
|
+
type: "backdrop";
|
|
61
|
+
/** The name of the backdrop. */
|
|
62
|
+
name: string;
|
|
63
|
+
/** The center color of the backdrop. */
|
|
64
|
+
centerColor: number;
|
|
65
|
+
/** The edge color of the backdrop. */
|
|
66
|
+
edgeColor: number;
|
|
67
|
+
/** The pattern color of the backdrop. */
|
|
68
|
+
patternColor: number;
|
|
69
|
+
/** The text color of the backdrop. */
|
|
70
|
+
textColor: number;
|
|
71
|
+
/** A number determining how rare this type of backdrop is out of a thousand of others. */
|
|
72
|
+
rarityLevel: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The original details of an upgraded gift.
|
|
76
|
+
*
|
|
77
|
+
* @unlisted
|
|
78
|
+
*/
|
|
79
|
+
export interface GiftUpgradedComponentOriginalDetails {
|
|
80
|
+
/** @discriminator */
|
|
81
|
+
type: "originalDetails";
|
|
82
|
+
senderId?: number;
|
|
83
|
+
recipientId: number;
|
|
84
|
+
date: Date;
|
|
85
|
+
message?: string;
|
|
86
|
+
entities?: MessageEntity[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* A component of an upgraded gift.
|
|
90
|
+
*
|
|
91
|
+
* @unlisted
|
|
92
|
+
*/
|
|
93
|
+
export type GiftUpgradedComponent = GiftUpgradedComponentModel | GiftUpgradedComponentPattern | GiftUpgradedComponentBackdrop | GiftUpgradedComponentOriginalDetails;
|
|
94
|
+
export declare function constructGiftUpgradedComponent(attribute: Api.StarGiftAttribute): GiftUpgradedComponent;
|
|
95
|
+
//# sourceMappingURL=2_gift_upgraded_component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2_gift_upgraded_component.d.ts","sourceRoot":"","sources":["../../src/types/2_gift_upgraded_component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AAErC,OAAO,EAA0B,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAqB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,uFAAuF;IACvF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,yFAAyF;IACzF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,qBAAqB;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,0FAA0F;IAC1F,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,oCAAoC;IACnD,qBAAqB;IACrB,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,GAAG,4BAA4B,GAAG,6BAA6B,GAAG,oCAAoC,CAAC;AAErK,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,GAAG,CAAC,iBAAiB,GAAG,qBAAqB,CA+DtG"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
5
|
+
*
|
|
6
|
+
* This file is part of MTKruto.
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU Lesser General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.constructGiftUpgradedComponent = constructGiftUpgradedComponent;
|
|
23
|
+
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
26
|
+
const _file_id_js_1 = require("./_file_id.js");
|
|
27
|
+
const _0_message_entity_js_1 = require("./0_message_entity.js");
|
|
28
|
+
const _1_sticker_js_1 = require("./1_sticker.js");
|
|
29
|
+
function constructGiftUpgradedComponent(attribute) {
|
|
30
|
+
const name = "name" in attribute ? attribute.name : "";
|
|
31
|
+
const rarityLevel = "rarity_permille" in attribute ? attribute.rarity_permille : 0;
|
|
32
|
+
switch (attribute._) {
|
|
33
|
+
case "starGiftAttributeModel": {
|
|
34
|
+
if (!(0, _2_tl_js_1.is)("document", attribute.document)) {
|
|
35
|
+
(0, _0_deps_js_1.unreachable)();
|
|
36
|
+
}
|
|
37
|
+
const fileId = {
|
|
38
|
+
type: _file_id_js_1.FileType.Sticker,
|
|
39
|
+
dcId: attribute.document.dc_id,
|
|
40
|
+
fileReference: attribute.document.file_reference,
|
|
41
|
+
location: { type: "common", id: attribute.document.id, accessHash: attribute.document.access_hash },
|
|
42
|
+
};
|
|
43
|
+
const sticker = (0, _1_sticker_js_1.constructSticker2)(attribute.document, (0, _file_id_js_1.serializeFileId)(fileId), (0, _file_id_js_1.toUniqueFileId)(fileId), undefined, "");
|
|
44
|
+
return {
|
|
45
|
+
type: "model",
|
|
46
|
+
name,
|
|
47
|
+
sticker,
|
|
48
|
+
rarityLevel,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
case "starGiftAttributePattern": {
|
|
52
|
+
if (!(0, _2_tl_js_1.is)("document", attribute.document)) {
|
|
53
|
+
(0, _0_deps_js_1.unreachable)();
|
|
54
|
+
}
|
|
55
|
+
const fileId = {
|
|
56
|
+
type: _file_id_js_1.FileType.Sticker,
|
|
57
|
+
dcId: attribute.document.dc_id,
|
|
58
|
+
fileReference: attribute.document.file_reference,
|
|
59
|
+
location: { type: "common", id: attribute.document.id, accessHash: attribute.document.access_hash },
|
|
60
|
+
};
|
|
61
|
+
const sticker = (0, _1_sticker_js_1.constructSticker2)(attribute.document, (0, _file_id_js_1.serializeFileId)(fileId), (0, _file_id_js_1.toUniqueFileId)(fileId), undefined, "");
|
|
62
|
+
return {
|
|
63
|
+
type: "pattern",
|
|
64
|
+
name,
|
|
65
|
+
sticker,
|
|
66
|
+
rarityLevel,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
case "starGiftAttributeBackdrop":
|
|
70
|
+
return {
|
|
71
|
+
type: "backdrop",
|
|
72
|
+
name,
|
|
73
|
+
centerColor: attribute.center_color,
|
|
74
|
+
edgeColor: attribute.edge_color,
|
|
75
|
+
patternColor: attribute.pattern_color,
|
|
76
|
+
textColor: attribute.text_color,
|
|
77
|
+
rarityLevel,
|
|
78
|
+
};
|
|
79
|
+
case "starGiftAttributeOriginalDetails":
|
|
80
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
81
|
+
type: "originalDetails",
|
|
82
|
+
senderId: attribute.sender_id ? Number(attribute.sender_id) : undefined,
|
|
83
|
+
recipientId: Number(attribute.recipient_id),
|
|
84
|
+
date: (0, _1_utilities_js_1.fromUnixTimestamp)(attribute.date),
|
|
85
|
+
message: attribute.message?.text,
|
|
86
|
+
entities: attribute.message ? attribute.message.entities.map(_0_message_entity_js_1.constructMessageEntity).filter((v) => !!v) : undefined,
|
|
87
|
+
});
|
|
88
|
+
default:
|
|
89
|
+
(0, _0_deps_js_1.unreachable)();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
|
+
import { Sticker } from "./1_sticker.js";
|
|
22
|
+
import { GiftUpgradedComponent } from "./2_gift_upgraded_component.js";
|
|
23
|
+
/**
|
|
24
|
+
* An non-upgraded gift.
|
|
25
|
+
*
|
|
26
|
+
* @unlisted
|
|
27
|
+
*/
|
|
28
|
+
export interface GiftNonUpgraded {
|
|
29
|
+
/** @discriminator */
|
|
30
|
+
type: "nonupgraded";
|
|
31
|
+
/** The identifier of the gift. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** The sticker that represents the gift. */
|
|
34
|
+
sticker: Sticker;
|
|
35
|
+
/** The price of the sticker in Telegram Stars. */
|
|
36
|
+
price: number;
|
|
37
|
+
/** Whether the supply of this gift is limited. */
|
|
38
|
+
limited: boolean;
|
|
39
|
+
/** The remaining supply of the gift if limited. */
|
|
40
|
+
remaining?: number;
|
|
41
|
+
/** The total supply of the gift if limited. */
|
|
42
|
+
total?: number;
|
|
43
|
+
/** Whether the gift is sold out if limited. */
|
|
44
|
+
soldOut?: boolean;
|
|
45
|
+
/** Whether the gift is dedicated to birthdays. */
|
|
46
|
+
birthday: boolean;
|
|
47
|
+
/** The amount of Telegram Stars that the gift can be swapped with. */
|
|
48
|
+
conversionPrice: number;
|
|
49
|
+
/** The date of the first sale of the gift if sold out. */
|
|
50
|
+
firstSaleDate?: Date;
|
|
51
|
+
/** The date of the last sale of the gift if sold out. */
|
|
52
|
+
lastSaleDate?: Date;
|
|
53
|
+
/** The amount of stars required to upgrade the gift. */
|
|
54
|
+
upgradePrice?: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* An upgraded gift.
|
|
58
|
+
*
|
|
59
|
+
* @unlisted
|
|
60
|
+
*/
|
|
61
|
+
export interface GiftUpgraded {
|
|
62
|
+
/** @discriminator */
|
|
63
|
+
type: "upgraded";
|
|
64
|
+
/** The identifier of the gift. */
|
|
65
|
+
id: string;
|
|
66
|
+
/** The title of the gift. */
|
|
67
|
+
title: string;
|
|
68
|
+
/** The unique index of the gift among others of the same type. */
|
|
69
|
+
index: number;
|
|
70
|
+
/** The identifier of the user that owns the gift. */
|
|
71
|
+
ownerId: number;
|
|
72
|
+
/** The count of the amount of upgraded gifts of the same type. */
|
|
73
|
+
currentUpgrades: number;
|
|
74
|
+
/** The maximum count of gifts of the same type that can be upgraded. */
|
|
75
|
+
maxUpgrades: number;
|
|
76
|
+
/** The components of the gift. */
|
|
77
|
+
components: GiftUpgradedComponent[];
|
|
78
|
+
}
|
|
79
|
+
/** A gift. */
|
|
80
|
+
export type Gift = GiftNonUpgraded | GiftUpgraded;
|
|
81
|
+
export declare function constructGift(gift: Api.StarGift): Gift;
|
|
82
|
+
export declare function constructGiftUpgraded(gift: Api.starGiftUnique): GiftUpgraded;
|
|
83
|
+
export declare function constructGiftNonUpgraded(gift: Api.starGift): Gift;
|
|
84
|
+
//# sourceMappingURL=3_gift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3_gift.d.ts","sourceRoot":"","sources":["../../src/types/3_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AAErC,OAAO,EAAqB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAkC,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvG;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,OAAO,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,eAAe,EAAE,MAAM,CAAC;IACxB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,yDAAyD;IACzD,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,UAAU,EAAE,qBAAqB,EAAE,CAAC;CACrC;AAED,cAAc;AACd,MAAM,MAAM,IAAI,GAAG,eAAe,GAAG,YAAY,CAAC;AAElD,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAMtD;AACD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,cAAc,GAAG,YAAY,CAkB5E;AACD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAqCjE"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
5
|
+
*
|
|
6
|
+
* This file is part of MTKruto.
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU Lesser General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.constructGift = constructGift;
|
|
23
|
+
exports.constructGiftUpgraded = constructGiftUpgraded;
|
|
24
|
+
exports.constructGiftNonUpgraded = constructGiftNonUpgraded;
|
|
25
|
+
const _0_deps_js_1 = require("../0_deps.js");
|
|
26
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
27
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
28
|
+
const _file_id_js_1 = require("./_file_id.js");
|
|
29
|
+
const _1_sticker_js_1 = require("./1_sticker.js");
|
|
30
|
+
const _2_gift_upgraded_component_js_1 = require("./2_gift_upgraded_component.js");
|
|
31
|
+
function constructGift(gift) {
|
|
32
|
+
if ((0, _2_tl_js_1.is)("starGiftUnique", gift)) {
|
|
33
|
+
return constructGiftUpgraded(gift);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return constructGiftNonUpgraded(gift);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function constructGiftUpgraded(gift) {
|
|
40
|
+
const id = String(gift.id);
|
|
41
|
+
const title = gift.title;
|
|
42
|
+
const index = gift.num;
|
|
43
|
+
const ownerId = Number(gift.owner_id);
|
|
44
|
+
const currentUpgrades = gift.availability_issued;
|
|
45
|
+
const maxUpgrades = gift.availability_total;
|
|
46
|
+
const components = gift.attributes.map(_2_gift_upgraded_component_js_1.constructGiftUpgradedComponent);
|
|
47
|
+
return {
|
|
48
|
+
type: "upgraded",
|
|
49
|
+
id,
|
|
50
|
+
title,
|
|
51
|
+
index,
|
|
52
|
+
ownerId,
|
|
53
|
+
currentUpgrades,
|
|
54
|
+
maxUpgrades,
|
|
55
|
+
components,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function constructGiftNonUpgraded(gift) {
|
|
59
|
+
if (!(0, _2_tl_js_1.is)("document", gift.sticker)) {
|
|
60
|
+
(0, _0_deps_js_1.unreachable)();
|
|
61
|
+
}
|
|
62
|
+
const id = String(gift.id);
|
|
63
|
+
const fileId = {
|
|
64
|
+
type: _file_id_js_1.FileType.Sticker,
|
|
65
|
+
dcId: gift.sticker.dc_id,
|
|
66
|
+
fileReference: gift.sticker.file_reference,
|
|
67
|
+
location: { type: "common", id: gift.sticker.id, accessHash: gift.sticker.access_hash },
|
|
68
|
+
};
|
|
69
|
+
const sticker = (0, _1_sticker_js_1.constructSticker2)(gift.sticker, (0, _file_id_js_1.serializeFileId)(fileId), (0, _file_id_js_1.toUniqueFileId)(fileId), undefined, "");
|
|
70
|
+
const price = Number(gift.stars);
|
|
71
|
+
const limited = !!gift.limited;
|
|
72
|
+
const remaining = limited ? gift.availability_remains ?? 0 : undefined;
|
|
73
|
+
const total = limited ? gift.availability_total ?? 0 : undefined;
|
|
74
|
+
const soldOut = limited ? !!gift.sold_out : undefined;
|
|
75
|
+
const birthday = !!gift.birthday;
|
|
76
|
+
const conversionPrice = Number(gift.convert_stars);
|
|
77
|
+
const firstSaleDate = limited ? gift.first_sale_date ? (0, _1_utilities_js_1.fromUnixTimestamp)(gift.first_sale_date) : undefined : undefined;
|
|
78
|
+
const lastSaleDate = limited ? gift.last_sale_date ? (0, _1_utilities_js_1.fromUnixTimestamp)(gift.last_sale_date) : undefined : undefined;
|
|
79
|
+
const upgradePrice = gift.upgrade_stars ? Number(gift.upgrade_stars) : undefined;
|
|
80
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
81
|
+
type: "nonupgraded",
|
|
82
|
+
id,
|
|
83
|
+
sticker,
|
|
84
|
+
price,
|
|
85
|
+
limited,
|
|
86
|
+
remaining,
|
|
87
|
+
total,
|
|
88
|
+
soldOut,
|
|
89
|
+
birthday,
|
|
90
|
+
conversionPrice,
|
|
91
|
+
firstSaleDate,
|
|
92
|
+
lastSaleDate,
|
|
93
|
+
upgradePrice,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
|
+
import { MessageEntity } from "./0_message_entity.js";
|
|
22
|
+
import { User } from "./1_user.js";
|
|
23
|
+
import { Gift } from "./3_gift.js";
|
|
24
|
+
/** A gift claimed by a user. */
|
|
25
|
+
export interface UserGift {
|
|
26
|
+
/** The time when the gift was claimed. */
|
|
27
|
+
date: Date;
|
|
28
|
+
/** The gift. */
|
|
29
|
+
gift: Gift;
|
|
30
|
+
/** Whether the gift is publicly visible. */
|
|
31
|
+
public: boolean;
|
|
32
|
+
/** The user who sent the gift. */
|
|
33
|
+
fromUser?: User;
|
|
34
|
+
/** A message shared when the gift was sent. */
|
|
35
|
+
message?: string;
|
|
36
|
+
/** The entities of the message. */
|
|
37
|
+
entities?: MessageEntity[];
|
|
38
|
+
/** The identifier of the service message announcing the receival of the gift. */
|
|
39
|
+
messageId?: number;
|
|
40
|
+
/** The amount of stars the gift would be worth. */
|
|
41
|
+
convertionStars?: number;
|
|
42
|
+
}
|
|
43
|
+
export declare function constructUserGift(userGift: Api.UserStarGift, user?: Api.user): UserGift;
|
|
44
|
+
//# sourceMappingURL=4_user_gift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"4_user_gift.d.ts","sourceRoot":"","sources":["../../src/types/4_user_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAA0B,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,gCAAgC;AAChC,MAAM,WAAW,QAAQ;IACvB,0CAA0C;IAC1C,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,4CAA4C;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE,GAAG,CAAC,IAAI,GAAG,QAAQ,CAmBvF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
5
|
+
*
|
|
6
|
+
* This file is part of MTKruto.
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU Lesser General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.constructUserGift = constructUserGift;
|
|
23
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
|
+
const _0_message_entity_js_1 = require("./0_message_entity.js");
|
|
25
|
+
const _1_user_js_1 = require("./1_user.js");
|
|
26
|
+
const _3_gift_js_1 = require("./3_gift.js");
|
|
27
|
+
function constructUserGift(userGift, user) {
|
|
28
|
+
const gift = (0, _3_gift_js_1.constructGift)(userGift.gift);
|
|
29
|
+
const date = (0, _1_utilities_js_1.fromUnixTimestamp)(userGift.date);
|
|
30
|
+
const public_ = !!userGift.unsaved;
|
|
31
|
+
const fromUser = user ? (0, _1_user_js_1.constructUser)(user) : undefined;
|
|
32
|
+
const message = userGift.message?.text;
|
|
33
|
+
const entities = userGift.message ? userGift.message.entities.map(_0_message_entity_js_1.constructMessageEntity).filter((v) => !!v) : undefined;
|
|
34
|
+
const messageId = userGift.msg_id;
|
|
35
|
+
const conversionStars = userGift.convert_stars;
|
|
36
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
37
|
+
date,
|
|
38
|
+
gift,
|
|
39
|
+
public: public_,
|
|
40
|
+
fromUser,
|
|
41
|
+
message,
|
|
42
|
+
entities,
|
|
43
|
+
messageId,
|
|
44
|
+
conversionStars,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
|
+
import { UserGift } from "./4_user_gift.js";
|
|
22
|
+
/** Gifts claimed by a user. */
|
|
23
|
+
export interface UserGifts {
|
|
24
|
+
/** The number of all gifts claimed by the user. */
|
|
25
|
+
all: number;
|
|
26
|
+
/** Offset of the results. */
|
|
27
|
+
offset?: string;
|
|
28
|
+
/** Gifts claimed by the user. */
|
|
29
|
+
gifts: UserGift[];
|
|
30
|
+
}
|
|
31
|
+
export declare function constructUserGifts(userGifts: Api.payments_UserStarGifts): UserGifts;
|
|
32
|
+
//# sourceMappingURL=5_user_gifts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"5_user_gifts.d.ts","sourceRoot":"","sources":["../../src/types/5_user_gifts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAqB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE/D,+BAA+B;AAC/B,MAAM,WAAW,SAAS;IACxB,mDAAmD;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,GAAG,CAAC,sBAAsB,GAAG,SAAS,CAMnF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
5
|
+
*
|
|
6
|
+
* This file is part of MTKruto.
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU Lesser General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.constructUserGifts = constructUserGifts;
|
|
23
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
|
+
const _4_user_gift_js_1 = require("./4_user_gift.js");
|
|
26
|
+
function constructUserGifts(userGifts) {
|
|
27
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
28
|
+
all: userGifts.count,
|
|
29
|
+
offset: userGifts.next_offset,
|
|
30
|
+
gifts: userGifts.gifts.map((v) => [v, v.from_id ? userGifts.users.find((u) => (0, _2_tl_js_1.is)("user", u) && u.id == v.from_id) : undefined]).map((v) => (0, _4_user_gift_js_1.constructUserGift)(v[0], v[1])),
|
|
31
|
+
});
|
|
32
|
+
}
|