redai-automation-web-sdk 1.10.1 → 1.11.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.
package/dist/index.cjs CHANGED
@@ -139,7 +139,7 @@ var HttpClient = class {
139
139
  timeout: this.config.timeout || 3e4,
140
140
  headers: {
141
141
  "Content-Type": "application/json",
142
- "User-Agent": this.config.userAgent || "redai-automation-web-sdk/1.10.1",
142
+ "User-Agent": this.config.userAgent || "redai-automation-web-sdk/1.11.0",
143
143
  ...this.config.apiKey && { Authorization: `Bearer ${this.config.apiKey}` }
144
144
  }
145
145
  });
@@ -385,7 +385,7 @@ var DEFAULT_CONFIG = {
385
385
  timeout: 3e4,
386
386
  retryCount: 0,
387
387
  retryDelay: 0,
388
- userAgent: "redai-automation-web-sdk/1.10.1",
388
+ userAgent: "redai-automation-web-sdk/1.11.0",
389
389
  logging: false
390
390
  };
391
391
  var ThreadType = /* @__PURE__ */ ((ThreadType4) => {
@@ -3815,6 +3815,39 @@ var TelegramPersonalMessagingService = class {
3815
3815
  request
3816
3816
  );
3817
3817
  }
3818
+ /**
3819
+ * Lấy danh sách các cuộc trò chuyện gần nhất (Dialogs)
3820
+ */
3821
+ async getDialogs(request) {
3822
+ return this.httpClient.post(
3823
+ "/v1/telegram-personal/messaging/dialogs",
3824
+ request
3825
+ );
3826
+ }
3827
+ /**
3828
+ * Lấy danh sách bạn bè / danh bạ Telegram (Contacts)
3829
+ */
3830
+ async getContacts(request) {
3831
+ return this.httpClient.post(
3832
+ "/v1/telegram-personal/messaging/contacts",
3833
+ request
3834
+ );
3835
+ }
3836
+ /**
3837
+ * Lấy lịch sử tin nhắn của cuộc trò chuyện (History)
3838
+ */
3839
+ async getHistory(request) {
3840
+ return this.httpClient.post(
3841
+ "/v1/telegram-personal/messaging/history",
3842
+ request
3843
+ );
3844
+ }
3845
+ /**
3846
+ * Alias cho getHistory để lấy tin nhắn
3847
+ */
3848
+ async getMessages(request) {
3849
+ return this.getHistory(request);
3850
+ }
3818
3851
  };
3819
3852
 
3820
3853
  // src/client/AutomationWebClient.ts
@@ -4160,7 +4193,7 @@ var AutomationWebClient = class {
4160
4193
  * Get SDK version
4161
4194
  */
4162
4195
  getVersion() {
4163
- return "1.10.1";
4196
+ return "1.11.0";
4164
4197
  }
4165
4198
  /**
4166
4199
  * Test connection to automation-web API