assistsx-js 0.0.2025 → 0.0.2026

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.
@@ -120,6 +120,7 @@ export declare class AssistsX {
120
120
  * @returns 是否设置成功
121
121
  */
122
122
  static setNodeText(node: Node, text: string): boolean;
123
+ static isAppInstalled(packageName: string): boolean;
123
124
  /**
124
125
  * 对指定节点进行截图
125
126
  * @param nodes 要截图的节点数组
package/dist/AssistsX.js CHANGED
@@ -159,6 +159,12 @@ export class AssistsX {
159
159
  });
160
160
  return response.getDataOrDefault(false);
161
161
  }
162
+ static isAppInstalled(packageName) {
163
+ const response = this.call(CallMethod.isAppInstalled, {
164
+ args: { packageName },
165
+ });
166
+ return response.getDataOrDefault(false);
167
+ }
162
168
  /**
163
169
  * 对指定节点进行截图
164
170
  * @param nodes 要截图的节点数组
@@ -47,5 +47,6 @@ export declare const CallMethod: {
47
47
  readonly httpRequest: "httpRequest";
48
48
  readonly getDeviceInfo: "getDeviceInfo";
49
49
  readonly getNetworkType: "getNetworkType";
50
+ readonly isAppInstalled: "isAppInstalled";
50
51
  };
51
52
  export type CallMethodType = (typeof CallMethod)[keyof typeof CallMethod];
@@ -48,4 +48,5 @@ export const CallMethod = {
48
48
  httpRequest: "httpRequest",
49
49
  getDeviceInfo: "getDeviceInfo",
50
50
  getNetworkType: "getNetworkType",
51
+ isAppInstalled: "isAppInstalled",
51
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistsx-js",
3
- "version": "0.0.2025",
3
+ "version": "0.0.2026",
4
4
  "description": "assistsx-js自动化开发SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
package/src/AssistsX.ts CHANGED
@@ -255,6 +255,12 @@ export class AssistsX {
255
255
  });
256
256
  return response.getDataOrDefault(false);
257
257
  }
258
+ public static isAppInstalled(packageName: string): boolean {
259
+ const response = this.call(CallMethod.isAppInstalled, {
260
+ args: { packageName },
261
+ });
262
+ return response.getDataOrDefault(false);
263
+ }
258
264
 
259
265
  /**
260
266
  * 对指定节点进行截图
package/src/CallMethod.ts CHANGED
@@ -52,6 +52,7 @@ export const CallMethod = {
52
52
  httpRequest: "httpRequest",
53
53
  getDeviceInfo: "getDeviceInfo",
54
54
  getNetworkType: "getNetworkType",
55
+ isAppInstalled: "isAppInstalled",
55
56
  } as const;
56
57
 
57
58
  // 导出类型定义