assistsx-js 0.0.2048 → 0.0.2049

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.
@@ -420,6 +420,18 @@ export declare class AssistsX {
420
420
  static getMacAddress(timeout?: number): Promise<any>;
421
421
  static getDeviceInfo(timeout?: number): Promise<DeviceInfo>;
422
422
  static getNetworkType(timeout?: number): Promise<any>;
423
+ /**
424
+ * 播放系统电话铃声
425
+ * @param timeout 超时时间(秒),默认30秒
426
+ * @returns 播放结果消息
427
+ */
428
+ static audioPlayRingtone(timeout?: number): Promise<string>;
429
+ /**
430
+ * 停止播放系统电话铃声
431
+ * @param timeout 超时时间(秒),默认30秒
432
+ * @returns 停止结果消息
433
+ */
434
+ static audioStopRingtone(timeout?: number): Promise<string>;
423
435
  static setAccessibilityEventFilters(value: AccessibilityEventFilter[]): Promise<any>;
424
436
  static addAccessibilityEventFilter(value: AccessibilityEventFilter): Promise<any>;
425
437
  /**
package/dist/AssistsX.js CHANGED
@@ -637,6 +637,28 @@ export class AssistsX {
637
637
  });
638
638
  return response.getDataOrDefault({});
639
639
  }
640
+ /**
641
+ * 播放系统电话铃声
642
+ * @param timeout 超时时间(秒),默认30秒
643
+ * @returns 播放结果消息
644
+ */
645
+ static async audioPlayRingtone(timeout) {
646
+ const response = await this.asyncCall(CallMethod.audioPlayRingtone, {
647
+ timeout,
648
+ });
649
+ return response.getDataOrDefault("");
650
+ }
651
+ /**
652
+ * 停止播放系统电话铃声
653
+ * @param timeout 超时时间(秒),默认30秒
654
+ * @returns 停止结果消息
655
+ */
656
+ static async audioStopRingtone(timeout) {
657
+ const response = await this.asyncCall(CallMethod.audioStopRingtone, {
658
+ timeout,
659
+ });
660
+ return response.getDataOrDefault("");
661
+ }
640
662
  static async setAccessibilityEventFilters(value) {
641
663
  const response = this.call(CallMethod.setAccessibilityEventFilters, {
642
664
  args: { value },
@@ -442,6 +442,22 @@ export declare class AssistsXAsync {
442
442
  static audioStop({ timeout, }: {
443
443
  timeout?: number;
444
444
  }): Promise<boolean | null | undefined>;
445
+ /**
446
+ * 播放系统电话铃声
447
+ * @param timeout 超时时间(秒),默认30秒
448
+ * @returns 播放结果消息
449
+ */
450
+ static audioPlayRingtone({ timeout, }: {
451
+ timeout?: number;
452
+ }): Promise<string>;
453
+ /**
454
+ * 停止播放系统电话铃声
455
+ * @param timeout 超时时间(秒),默认30秒
456
+ * @returns 停止结果消息
457
+ */
458
+ static audioStopRingtone({ timeout, }: {
459
+ timeout?: number;
460
+ }): Promise<string>;
445
461
  /**
446
462
  * 添加联系人
447
463
  * @param name 联系人姓名(必填)
@@ -681,6 +681,28 @@ export class AssistsXAsync {
681
681
  });
682
682
  return response.getDataOrDefault(false);
683
683
  }
684
+ /**
685
+ * 播放系统电话铃声
686
+ * @param timeout 超时时间(秒),默认30秒
687
+ * @returns 播放结果消息
688
+ */
689
+ static async audioPlayRingtone({ timeout = 30, }) {
690
+ const response = await this.asyncCall(CallMethod.audioPlayRingtone, {
691
+ timeout,
692
+ });
693
+ return response.getDataOrDefault("");
694
+ }
695
+ /**
696
+ * 停止播放系统电话铃声
697
+ * @param timeout 超时时间(秒),默认30秒
698
+ * @returns 停止结果消息
699
+ */
700
+ static async audioStopRingtone({ timeout = 30, }) {
701
+ const response = await this.asyncCall(CallMethod.audioStopRingtone, {
702
+ timeout,
703
+ });
704
+ return response.getDataOrDefault("");
705
+ }
684
706
  /**
685
707
  * 添加联系人
686
708
  * @param name 联系人姓名(必填)
@@ -56,6 +56,8 @@ export declare const CallMethod: {
56
56
  readonly download: "download";
57
57
  readonly audioPlayFromFile: "audioPlayFromFile";
58
58
  readonly audioStop: "audioStop";
59
+ readonly audioPlayRingtone: "audioPlayRingtone";
60
+ readonly audioStopRingtone: "audioStopRingtone";
59
61
  readonly addContact: "addContact";
60
62
  readonly getAllContacts: "getAllContacts";
61
63
  };
@@ -57,6 +57,8 @@ export const CallMethod = {
57
57
  download: "download",
58
58
  audioPlayFromFile: "audioPlayFromFile",
59
59
  audioStop: "audioStop",
60
+ audioPlayRingtone: "audioPlayRingtone",
61
+ audioStopRingtone: "audioStopRingtone",
60
62
  // 通讯录相关方法
61
63
  addContact: "addContact",
62
64
  getAllContacts: "getAllContacts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistsx-js",
3
- "version": "0.0.2048",
3
+ "version": "0.0.2049",
4
4
  "description": "assistsx-js自动化开发SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",