@mtkruto/node 0.1.600 → 0.1.701
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/4_errors.js +2 -4
- package/esm/5_client.d.ts +1 -1
- package/esm/5_client.js +1 -1
- package/esm/client/0_params.d.ts +5 -1
- package/esm/client/0_storage_operations.d.ts +182 -0
- package/esm/client/0_storage_operations.js +611 -0
- package/esm/client/1_composer.d.ts +2 -0
- package/esm/client/1_composer.js +28 -0
- package/{script/client/0_types.d.ts → esm/client/1_types.d.ts} +3 -3
- package/{script/client/1_account_manager.d.ts → esm/client/2_account_manager.d.ts} +1 -1
- package/{script/client/1_bot_info_manager.d.ts → esm/client/2_bot_info_manager.d.ts} +1 -1
- package/esm/client/{1_business_connection_manager.d.ts → 2_business_connection_manager.d.ts} +1 -1
- package/{script/client/1_file_manager.d.ts → esm/client/2_file_manager.d.ts} +1 -1
- package/esm/client/{1_file_manager.js → 2_file_manager.js} +5 -3
- package/esm/client/{1_network_statistics_manager.d.ts → 2_network_statistics_manager.d.ts} +1 -1
- package/{script/client/1_reaction_manager.d.ts → esm/client/2_reaction_manager.d.ts} +1 -1
- package/{script/client/1_update_manager.d.ts → esm/client/2_update_manager.d.ts} +1 -1
- package/{script/client/2_message_manager.d.ts → esm/client/3_message_manager.d.ts} +2 -2
- package/esm/client/{2_video_chat_manager.d.ts → 3_video_chat_manager.d.ts} +2 -2
- package/{script/client/3_callback_query_manager.d.ts → esm/client/4_callback_query_manager.d.ts} +2 -2
- package/{script/client/3_chat_list_manager.d.ts → esm/client/4_chat_list_manager.d.ts} +3 -3
- package/{script/client/3_inline_query_manager.d.ts → esm/client/4_inline_query_manager.d.ts} +2 -2
- package/esm/client/{3_story_manager.d.ts → 4_story_manager.d.ts} +3 -3
- package/{script/client/4_client.d.ts → esm/client/5_client.d.ts} +39 -29
- package/esm/client/{4_client.js → 5_client.js} +83 -73
- package/esm/connection/0_connection.d.ts +6 -15
- package/esm/connection/0_connection.js +1 -38
- package/esm/connection/1_connection_web_socket.d.ts +3 -2
- package/esm/connection/1_connection_web_socket.js +7 -3
- package/esm/mod.d.ts +1 -1
- package/esm/mod.js +1 -1
- package/esm/storage/0_storage.d.ts +9 -159
- package/esm/storage/0_storage.js +1 -563
- package/esm/storage/2_storage_indexed_db.d.ts +3 -2
- package/esm/storage/2_storage_indexed_db.js +9 -8
- package/esm/storage/2_storage_local_storage.d.ts +3 -2
- package/esm/storage/2_storage_local_storage.js +5 -4
- package/esm/storage/2_storage_memory.d.ts +4 -4
- package/esm/storage/2_storage_memory.js +12 -19
- package/esm/storage/2_storage_session_storage.d.ts +2 -1
- package/esm/storage/2_storage_session_storage.js +5 -4
- package/esm/types/0_id.d.ts +1 -1
- package/package.json +1 -1
- package/script/4_errors.js +2 -4
- package/script/5_client.d.ts +1 -1
- package/script/5_client.js +1 -1
- package/script/client/0_params.d.ts +5 -1
- package/script/client/0_storage_operations.d.ts +182 -0
- package/script/client/0_storage_operations.js +615 -0
- package/script/client/1_composer.d.ts +2 -0
- package/script/client/1_composer.js +28 -0
- package/{esm/client/0_types.d.ts → script/client/1_types.d.ts} +3 -3
- package/{esm/client/1_account_manager.d.ts → script/client/2_account_manager.d.ts} +1 -1
- package/{esm/client/1_bot_info_manager.d.ts → script/client/2_bot_info_manager.d.ts} +1 -1
- package/script/client/{1_business_connection_manager.d.ts → 2_business_connection_manager.d.ts} +1 -1
- package/{esm/client/1_file_manager.d.ts → script/client/2_file_manager.d.ts} +1 -1
- package/script/client/{1_file_manager.js → 2_file_manager.js} +4 -2
- package/script/client/{1_network_statistics_manager.d.ts → 2_network_statistics_manager.d.ts} +1 -1
- package/{esm/client/1_reaction_manager.d.ts → script/client/2_reaction_manager.d.ts} +1 -1
- package/{esm/client/1_update_manager.d.ts → script/client/2_update_manager.d.ts} +1 -1
- package/{esm/client/2_message_manager.d.ts → script/client/3_message_manager.d.ts} +2 -2
- package/script/client/{2_video_chat_manager.d.ts → 3_video_chat_manager.d.ts} +2 -2
- package/{esm/client/3_callback_query_manager.d.ts → script/client/4_callback_query_manager.d.ts} +2 -2
- package/{esm/client/3_chat_list_manager.d.ts → script/client/4_chat_list_manager.d.ts} +3 -3
- package/{esm/client/3_inline_query_manager.d.ts → script/client/4_inline_query_manager.d.ts} +2 -2
- package/script/client/{3_story_manager.d.ts → 4_story_manager.d.ts} +3 -3
- package/{esm/client/4_client.d.ts → script/client/5_client.d.ts} +39 -29
- package/script/client/{4_client.js → 5_client.js} +105 -95
- package/script/connection/0_connection.d.ts +6 -15
- package/script/connection/0_connection.js +0 -41
- package/script/connection/1_connection_web_socket.d.ts +3 -2
- package/script/connection/1_connection_web_socket.js +7 -3
- package/script/mod.d.ts +1 -1
- package/script/mod.js +1 -1
- package/script/storage/0_storage.d.ts +9 -159
- package/script/storage/0_storage.js +0 -565
- package/script/storage/2_storage_indexed_db.d.ts +3 -2
- package/script/storage/2_storage_indexed_db.js +9 -8
- package/script/storage/2_storage_local_storage.d.ts +3 -2
- package/script/storage/2_storage_local_storage.js +5 -4
- package/script/storage/2_storage_memory.d.ts +4 -4
- package/script/storage/2_storage_memory.js +12 -19
- package/script/storage/2_storage_session_storage.d.ts +2 -1
- package/script/storage/2_storage_session_storage.js +5 -4
- package/script/types/0_id.d.ts +1 -1
- /package/esm/{3_storage.d.ts → 2_storage.d.ts} +0 -0
- /package/esm/{3_storage.js → 2_storage.js} +0 -0
- /package/esm/client/{0_types.js → 1_types.js} +0 -0
- /package/esm/client/{1_account_manager.js → 2_account_manager.js} +0 -0
- /package/esm/client/{1_bot_info_manager.js → 2_bot_info_manager.js} +0 -0
- /package/esm/client/{1_business_connection_manager.js → 2_business_connection_manager.js} +0 -0
- /package/esm/client/{1_network_statistics_manager.js → 2_network_statistics_manager.js} +0 -0
- /package/esm/client/{1_reaction_manager.js → 2_reaction_manager.js} +0 -0
- /package/esm/client/{1_update_manager.js → 2_update_manager.js} +0 -0
- /package/esm/client/{2_message_manager.js → 3_message_manager.js} +0 -0
- /package/esm/client/{2_video_chat_manager.js → 3_video_chat_manager.js} +0 -0
- /package/esm/client/{3_callback_query_manager.js → 4_callback_query_manager.js} +0 -0
- /package/esm/client/{3_chat_list_manager.js → 4_chat_list_manager.js} +0 -0
- /package/esm/client/{3_inline_query_manager.js → 4_inline_query_manager.js} +0 -0
- /package/esm/client/{3_story_manager.js → 4_story_manager.js} +0 -0
- /package/script/{3_storage.d.ts → 2_storage.d.ts} +0 -0
- /package/script/{3_storage.js → 2_storage.js} +0 -0
- /package/script/client/{0_types.js → 1_types.js} +0 -0
- /package/script/client/{1_account_manager.js → 2_account_manager.js} +0 -0
- /package/script/client/{1_bot_info_manager.js → 2_bot_info_manager.js} +0 -0
- /package/script/client/{1_business_connection_manager.js → 2_business_connection_manager.js} +0 -0
- /package/script/client/{1_network_statistics_manager.js → 2_network_statistics_manager.js} +0 -0
- /package/script/client/{1_reaction_manager.js → 2_reaction_manager.js} +0 -0
- /package/script/client/{1_update_manager.js → 2_update_manager.js} +0 -0
- /package/script/client/{2_message_manager.js → 3_message_manager.js} +0 -0
- /package/script/client/{2_video_chat_manager.js → 3_video_chat_manager.js} +0 -0
- /package/script/client/{3_callback_query_manager.js → 4_callback_query_manager.js} +0 -0
- /package/script/client/{3_chat_list_manager.js → 4_chat_list_manager.js} +0 -0
- /package/script/client/{3_inline_query_manager.js → 4_inline_query_manager.js} +0 -0
- /package/script/client/{3_story_manager.js → 4_story_manager.js} +0 -0
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { MaybePromise } from "../1_utilities.js";
|
|
21
21
|
import { GetManyFilter, Storage, StorageKeyPart } from "./0_storage.js";
|
|
22
|
-
export declare class StorageMemory
|
|
22
|
+
export declare class StorageMemory implements Storage {
|
|
23
23
|
#private;
|
|
24
24
|
protected map: Map<string, unknown>;
|
|
25
|
-
constructor(
|
|
26
|
-
get
|
|
27
|
-
initialize():
|
|
25
|
+
constructor();
|
|
26
|
+
get mustSerialize(): boolean;
|
|
27
|
+
initialize(): void;
|
|
28
28
|
branch(id: string): Storage;
|
|
29
29
|
get supportsFiles(): boolean;
|
|
30
30
|
get<T>(key: readonly StorageKeyPart[]): T | null;
|
|
@@ -18,25 +18,23 @@
|
|
|
18
18
|
* You should have received a copy of the GNU Lesser General Public License
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
22
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
23
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
24
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
25
|
+
};
|
|
21
26
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
22
27
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
23
28
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
24
29
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
25
30
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
26
31
|
};
|
|
27
|
-
var
|
|
28
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
29
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
30
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
31
|
-
};
|
|
32
|
-
var _StorageMemory_instances, _StorageMemory_id, _StorageMemory_authString, _StorageMemory_fixKey, _StorageMemory_getEntries;
|
|
32
|
+
var _StorageMemory_instances, _StorageMemory_id, _StorageMemory_fixKey, _StorageMemory_getEntries;
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.StorageMemory = void 0;
|
|
35
|
-
const _0_storage_js_1 = require("./0_storage.js");
|
|
36
35
|
const _1_utilities_js_1 = require("./1_utilities.js");
|
|
37
|
-
class StorageMemory
|
|
38
|
-
constructor(
|
|
39
|
-
super();
|
|
36
|
+
class StorageMemory {
|
|
37
|
+
constructor() {
|
|
40
38
|
_StorageMemory_instances.add(this);
|
|
41
39
|
Object.defineProperty(this, "map", {
|
|
42
40
|
enumerable: true,
|
|
@@ -45,16 +43,11 @@ class StorageMemory extends _0_storage_js_1.Storage {
|
|
|
45
43
|
value: new Map()
|
|
46
44
|
});
|
|
47
45
|
_StorageMemory_id.set(this, null);
|
|
48
|
-
_StorageMemory_authString.set(this, void 0);
|
|
49
|
-
__classPrivateFieldSet(this, _StorageMemory_authString, authString, "f");
|
|
50
46
|
}
|
|
51
|
-
get
|
|
52
|
-
return
|
|
47
|
+
get mustSerialize() {
|
|
48
|
+
return false;
|
|
53
49
|
}
|
|
54
|
-
|
|
55
|
-
if (__classPrivateFieldGet(this, _StorageMemory_authString, "f")) {
|
|
56
|
-
await this.importAuthString(__classPrivateFieldGet(this, _StorageMemory_authString, "f"));
|
|
57
|
-
}
|
|
50
|
+
initialize() {
|
|
58
51
|
}
|
|
59
52
|
branch(id) {
|
|
60
53
|
const storage = new StorageMemory();
|
|
@@ -110,7 +103,7 @@ class StorageMemory extends _0_storage_js_1.Storage {
|
|
|
110
103
|
}
|
|
111
104
|
}
|
|
112
105
|
exports.StorageMemory = StorageMemory;
|
|
113
|
-
_StorageMemory_id = new WeakMap(),
|
|
106
|
+
_StorageMemory_id = new WeakMap(), _StorageMemory_instances = new WeakSet(), _StorageMemory_fixKey = function _StorageMemory_fixKey(key) {
|
|
114
107
|
if (__classPrivateFieldGet(this, _StorageMemory_id, "f") !== null) {
|
|
115
108
|
return ["__S" + __classPrivateFieldGet(this, _StorageMemory_id, "f"), ...key];
|
|
116
109
|
}
|
|
@@ -19,9 +19,10 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { MaybePromise } from "../1_utilities.js";
|
|
21
21
|
import { GetManyFilter, Storage, StorageKeyPart } from "./0_storage.js";
|
|
22
|
-
export declare class StorageSessionStorage
|
|
22
|
+
export declare class StorageSessionStorage implements Storage {
|
|
23
23
|
#private;
|
|
24
24
|
constructor(prefix: string);
|
|
25
|
+
get mustSerialize(): boolean;
|
|
25
26
|
get prefix(): string;
|
|
26
27
|
branch(id: string): StorageSessionStorage;
|
|
27
28
|
initialize(): void;
|
|
@@ -32,20 +32,21 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
32
32
|
var _StorageSessionStorage_prefix;
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.StorageSessionStorage = void 0;
|
|
35
|
-
const _0_storage_js_1 = require("./0_storage.js");
|
|
36
35
|
const _1_utilities_js_1 = require("./1_utilities.js");
|
|
37
|
-
class StorageSessionStorage
|
|
36
|
+
class StorageSessionStorage {
|
|
38
37
|
constructor(prefix) {
|
|
38
|
+
_StorageSessionStorage_prefix.set(this, void 0);
|
|
39
39
|
if (typeof sessionStorage === "undefined") {
|
|
40
40
|
throw new Error("Unavailable in current environment");
|
|
41
41
|
}
|
|
42
42
|
if (prefix.length <= 0) {
|
|
43
43
|
throw new Error("Empty prefix");
|
|
44
44
|
}
|
|
45
|
-
super();
|
|
46
|
-
_StorageSessionStorage_prefix.set(this, void 0);
|
|
47
45
|
__classPrivateFieldSet(this, _StorageSessionStorage_prefix, prefix, "f");
|
|
48
46
|
}
|
|
47
|
+
get mustSerialize() {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
49
50
|
get prefix() {
|
|
50
51
|
return __classPrivateFieldGet(this, _StorageSessionStorage_prefix, "f");
|
|
51
52
|
}
|
package/script/types/0_id.d.ts
CHANGED
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
/**
|
|
21
|
-
* The identifier of a channel, a group, or a user (as provided by MTKruto), a username, or a chat link (e.g., https://mtkruto.t.me, https://telegram.me/mtkruto). `"me"` resolves to the
|
|
21
|
+
* The identifier of a channel, a group, or a user (as provided by MTKruto), a username, or a chat link (e.g., https://mtkruto.t.me, https://telegram.me/mtkruto). `"me"` resolves to current the account.
|
|
22
22
|
*/
|
|
23
23
|
export type ID = number | string | "me";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/script/client/{1_business_connection_manager.js → 2_business_connection_manager.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|