@tgsnake/skema 3.1.0 → 3.2.1-browser.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.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/dist/src/deps.d.ts +4 -3
  3. package/dist/src/deps.js +4 -4
  4. package/dist/src/errors/RpcError.js +3 -1
  5. package/dist/src/helpers.js +19 -34
  6. package/dist/src/raw/class/All.d.ts +49 -5
  7. package/dist/src/raw/class/All.js +2783 -2739
  8. package/dist/src/raw/class/Raw.d.ts +7856 -7518
  9. package/dist/src/raw/class/Raw.js +27367 -20433
  10. package/dist/src/raw/class/tl/account.d.ts +841 -841
  11. package/dist/src/raw/class/tl/account.js +1983 -1813
  12. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  13. package/dist/src/raw/class/tl/aicompose.js +128 -117
  14. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  15. package/dist/src/raw/class/tl/auth.js +849 -714
  16. package/dist/src/raw/class/tl/bots.d.ts +353 -232
  17. package/dist/src/raw/class/tl/bots.js +871 -504
  18. package/dist/src/raw/class/tl/channels.d.ts +351 -331
  19. package/dist/src/raw/class/tl/channels.js +873 -735
  20. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  21. package/dist/src/raw/class/tl/chatlists.js +196 -183
  22. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  23. package/dist/src/raw/class/tl/communities.js +159 -138
  24. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  25. package/dist/src/raw/class/tl/contacts.js +537 -492
  26. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  27. package/dist/src/raw/class/tl/ephemeral.js +204 -152
  28. package/dist/src/raw/class/tl/feed.d.ts +278 -0
  29. package/dist/src/raw/class/tl/feed.js +671 -0
  30. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  31. package/dist/src/raw/class/tl/folders.js +11 -11
  32. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  33. package/dist/src/raw/class/tl/fragment.js +32 -25
  34. package/dist/src/raw/class/tl/help.d.ts +286 -286
  35. package/dist/src/raw/class/tl/help.js +686 -618
  36. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  37. package/dist/src/raw/class/tl/langpack.js +57 -57
  38. package/dist/src/raw/class/tl/messages.d.ts +1901 -1851
  39. package/dist/src/raw/class/tl/messages.js +6043 -4855
  40. package/dist/src/raw/class/tl/payments.d.ts +677 -641
  41. package/dist/src/raw/class/tl/payments.js +2312 -1734
  42. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  43. package/dist/src/raw/class/tl/phone.js +779 -644
  44. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  45. package/dist/src/raw/class/tl/photos.js +139 -116
  46. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  47. package/dist/src/raw/class/tl/premium.js +133 -111
  48. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  49. package/dist/src/raw/class/tl/smsjobs.js +115 -97
  50. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  51. package/dist/src/raw/class/tl/stats.js +268 -169
  52. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  53. package/dist/src/raw/class/tl/stickers.js +173 -144
  54. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  55. package/dist/src/raw/class/tl/storage.js +71 -71
  56. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  57. package/dist/src/raw/class/tl/stories.js +781 -622
  58. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  59. package/dist/src/raw/class/tl/toncenter.js +52 -47
  60. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  61. package/dist/src/raw/class/tl/updates.js +246 -175
  62. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  63. package/dist/src/raw/class/tl/upload.js +178 -155
  64. package/dist/src/raw/class/tl/users.d.ts +61 -61
  65. package/dist/src/raw/class/tl/users.js +124 -124
  66. package/dist/src/raw/class/tl/wallet.d.ts +257 -206
  67. package/dist/src/raw/class/tl/wallet.js +701 -525
  68. package/dist/src/raw/class/types.d.ts +3 -2
  69. package/dist/src/raw/class/types.js +1 -1
  70. package/dist/src/raw/core/GzipPacked.d.ts +4 -0
  71. package/dist/src/raw/core/GzipPacked.js +9 -1
  72. package/dist/src/raw/core/primitive/Bytes.js +26 -4
  73. package/dist/src/raw/core/primitive/Vector.js +11 -3
  74. package/package.json +7 -5
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  // This file is auto generate. All change made in this file will be lost!
11
11
  import { TLObject, Primitive } from '../../core/index.js';
12
12
  import { BytesIO } from '../../../deps.js';
@@ -15,31 +15,31 @@ export class EditPeerFolders extends TLObject {
15
15
  folderPeers;
16
16
  constructor(params) {
17
17
  super();
18
- this.classType = "functions";
19
- this.className = "folders.EditPeerFolders";
18
+ this.classType = 'functions';
19
+ this.className = 'folders.EditPeerFolders';
20
20
  this.constructorId = 0x6847d0ab;
21
21
  this.subclassOfId = 0x8af52aac;
22
- this._slots = ["folderPeers"];
22
+ this._slots = ['folderPeers'];
23
23
  this.folderPeers = params.folderPeers;
24
24
  }
25
25
  /**
26
- * Generate the TLObject from buffer.
27
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
28
- */
26
+ * Generate the TLObject from buffer.
27
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
28
+ */
29
29
  static async read(_data, ..._args) {
30
30
  // no flags
31
31
  let folderPeers = await TLObject.read(_data);
32
- return new EditPeerFolders({ "folderPeers": folderPeers });
32
+ return new EditPeerFolders({ folderPeers: folderPeers });
33
33
  }
34
34
  /**
35
- * Generate buffer from TLObject.
36
- */
35
+ * Generate buffer from TLObject.
36
+ */
37
37
  write() {
38
38
  const b = new BytesIO();
39
39
  b.write(Primitive.Int.write(this.constructorId, false));
40
40
  // no flags
41
41
  if (this.folderPeers) {
42
- b.write((Primitive.Vector.write(this.folderPeers)));
42
+ b.write(Primitive.Vector.write(this.folderPeers));
43
43
  }
44
44
  return b.buffer;
45
45
  }
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  import { TLObject } from '../../core/index.js';
11
11
  import { Buffer, BytesIO } from '../../../deps.js';
12
12
  import type { int, long } from '../types.js';
@@ -28,13 +28,13 @@ export declare class CollectibleInfo extends TLObject {
28
28
  url: string;
29
29
  });
30
30
  /**
31
- * Generate the TLObject from buffer.
32
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
33
- */
31
+ * Generate the TLObject from buffer.
32
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
33
+ */
34
34
  static read(_data: BytesIO, ..._args: Array<any>): Promise<CollectibleInfo>;
35
35
  /**
36
- * Generate buffer from TLObject.
37
- */
36
+ * Generate buffer from TLObject.
37
+ */
38
38
  write(): Buffer;
39
39
  }
40
40
  export declare class GetCollectibleInfo extends TLObject {
@@ -44,12 +44,12 @@ export declare class GetCollectibleInfo extends TLObject {
44
44
  collectible: raw.TypeInputCollectible;
45
45
  });
46
46
  /**
47
- * Generate the TLObject from buffer.
48
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
49
- */
47
+ * Generate the TLObject from buffer.
48
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
49
+ */
50
50
  static read(_data: BytesIO, ..._args: Array<any>): Promise<GetCollectibleInfo>;
51
51
  /**
52
- * Generate buffer from TLObject.
53
- */
52
+ * Generate buffer from TLObject.
53
+ */
54
54
  write(): Buffer;
55
55
  }
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  // This file is auto generate. All change made in this file will be lost!
11
11
  import { TLObject, Primitive } from '../../core/index.js';
12
12
  import { BytesIO } from '../../../deps.js';
@@ -19,11 +19,11 @@ export class CollectibleInfo extends TLObject {
19
19
  url;
20
20
  constructor(params) {
21
21
  super();
22
- this.classType = "types";
23
- this.className = "fragment.CollectibleInfo";
22
+ this.classType = 'types';
23
+ this.className = 'fragment.CollectibleInfo';
24
24
  this.constructorId = 0x6ebdff91;
25
25
  this.subclassOfId = 0xd4ea5790;
26
- this._slots = ["purchaseDate", "currency", "amount", "cryptoCurrency", "cryptoAmount", "url"];
26
+ this._slots = ['purchaseDate', 'currency', 'amount', 'cryptoCurrency', 'cryptoAmount', 'url'];
27
27
  this.purchaseDate = params.purchaseDate;
28
28
  this.currency = params.currency;
29
29
  this.amount = params.amount;
@@ -32,9 +32,9 @@ export class CollectibleInfo extends TLObject {
32
32
  this.url = params.url;
33
33
  }
34
34
  /**
35
- * Generate the TLObject from buffer.
36
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
37
- */
35
+ * Generate the TLObject from buffer.
36
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
37
+ */
38
38
  static async read(_data, ..._args) {
39
39
  // no flags
40
40
  let purchaseDate = await Primitive.Int.read(_data);
@@ -43,32 +43,39 @@ export class CollectibleInfo extends TLObject {
43
43
  let cryptoCurrency = await Primitive.String.read(_data);
44
44
  let cryptoAmount = await Primitive.Long.read(_data);
45
45
  let url = await Primitive.String.read(_data);
46
- return new CollectibleInfo({ "purchaseDate": purchaseDate, "currency": currency, "amount": amount, "cryptoCurrency": cryptoCurrency, "cryptoAmount": cryptoAmount, "url": url });
46
+ return new CollectibleInfo({
47
+ purchaseDate: purchaseDate,
48
+ currency: currency,
49
+ amount: amount,
50
+ cryptoCurrency: cryptoCurrency,
51
+ cryptoAmount: cryptoAmount,
52
+ url: url,
53
+ });
47
54
  }
48
55
  /**
49
- * Generate buffer from TLObject.
50
- */
56
+ * Generate buffer from TLObject.
57
+ */
51
58
  write() {
52
59
  const b = new BytesIO();
53
60
  b.write(Primitive.Int.write(this.constructorId, false));
54
61
  // no flags
55
62
  if (this.purchaseDate !== undefined) {
56
- b.write((Primitive.Int.write(this.purchaseDate)));
63
+ b.write(Primitive.Int.write(this.purchaseDate));
57
64
  }
58
65
  if (this.currency !== undefined) {
59
- b.write((Primitive.String.write(this.currency)));
66
+ b.write(Primitive.String.write(this.currency));
60
67
  }
61
68
  if (this.amount !== undefined) {
62
- b.write((Primitive.Long.write(this.amount)));
69
+ b.write(Primitive.Long.write(this.amount));
63
70
  }
64
71
  if (this.cryptoCurrency !== undefined) {
65
- b.write((Primitive.String.write(this.cryptoCurrency)));
72
+ b.write(Primitive.String.write(this.cryptoCurrency));
66
73
  }
67
74
  if (this.cryptoAmount !== undefined) {
68
- b.write((Primitive.Long.write(this.cryptoAmount)));
75
+ b.write(Primitive.Long.write(this.cryptoAmount));
69
76
  }
70
77
  if (this.url !== undefined) {
71
- b.write((Primitive.String.write(this.url)));
78
+ b.write(Primitive.String.write(this.url));
72
79
  }
73
80
  return b.buffer;
74
81
  }
@@ -78,25 +85,25 @@ export class GetCollectibleInfo extends TLObject {
78
85
  collectible;
79
86
  constructor(params) {
80
87
  super();
81
- this.classType = "functions";
82
- this.className = "fragment.GetCollectibleInfo";
88
+ this.classType = 'functions';
89
+ this.className = 'fragment.GetCollectibleInfo';
83
90
  this.constructorId = 0xbe1e85ba;
84
91
  this.subclassOfId = 0xd4ea5790;
85
- this._slots = ["collectible"];
92
+ this._slots = ['collectible'];
86
93
  this.collectible = params.collectible;
87
94
  }
88
95
  /**
89
- * Generate the TLObject from buffer.
90
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
91
- */
96
+ * Generate the TLObject from buffer.
97
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
98
+ */
92
99
  static async read(_data, ..._args) {
93
100
  // no flags
94
101
  let collectible = await TLObject.read(_data);
95
- return new GetCollectibleInfo({ "collectible": collectible });
102
+ return new GetCollectibleInfo({ collectible: collectible });
96
103
  }
97
104
  /**
98
- * Generate buffer from TLObject.
99
- */
105
+ * Generate buffer from TLObject.
106
+ */
100
107
  write() {
101
108
  const b = new BytesIO();
102
109
  b.write(Primitive.Int.write(this.constructorId, false));