assistsx-js 0.0.2025 → 0.0.2027

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,12 @@ export declare class AssistsX {
120
120
  * @returns 是否设置成功
121
121
  */
122
122
  static setNodeText(node: Node, text: string): boolean;
123
+ /**
124
+ * 获取剪贴板最新文本
125
+ * @returns 剪贴板最新文本
126
+ */
127
+ static getClipboardLatestText(): any;
128
+ static isAppInstalled(packageName: string): boolean;
123
129
  /**
124
130
  * 对指定节点进行截图
125
131
  * @param nodes 要截图的节点数组
package/dist/AssistsX.js CHANGED
@@ -159,6 +159,20 @@ export class AssistsX {
159
159
  });
160
160
  return response.getDataOrDefault(false);
161
161
  }
162
+ /**
163
+ * 获取剪贴板最新文本
164
+ * @returns 剪贴板最新文本
165
+ */
166
+ static getClipboardLatestText() {
167
+ const response = this.call(CallMethod.getClipboardLatestText);
168
+ return response.getDataOrDefault({});
169
+ }
170
+ static isAppInstalled(packageName) {
171
+ const response = this.call(CallMethod.isAppInstalled, {
172
+ args: { packageName },
173
+ });
174
+ return response.getDataOrDefault(false);
175
+ }
162
176
  /**
163
177
  * 对指定节点进行截图
164
178
  * @param nodes 要截图的节点数组
@@ -47,5 +47,7 @@ export declare const CallMethod: {
47
47
  readonly httpRequest: "httpRequest";
48
48
  readonly getDeviceInfo: "getDeviceInfo";
49
49
  readonly getNetworkType: "getNetworkType";
50
+ readonly isAppInstalled: "isAppInstalled";
51
+ readonly getClipboardLatestText: "getClipboardLatestText";
50
52
  };
51
53
  export type CallMethodType = (typeof CallMethod)[keyof typeof CallMethod];
@@ -48,4 +48,6 @@ export const CallMethod = {
48
48
  httpRequest: "httpRequest",
49
49
  getDeviceInfo: "getDeviceInfo",
50
50
  getNetworkType: "getNetworkType",
51
+ isAppInstalled: "isAppInstalled",
52
+ getClipboardLatestText: "getClipboardLatestText",
51
53
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistsx-js",
3
- "version": "0.0.2025",
3
+ "version": "0.0.2027",
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,21 @@ export class AssistsX {
255
255
  });
256
256
  return response.getDataOrDefault(false);
257
257
  }
258
+ /**
259
+ * 获取剪贴板最新文本
260
+ * @returns 剪贴板最新文本
261
+ */
262
+ public static getClipboardLatestText(): any {
263
+ const response = this.call(CallMethod.getClipboardLatestText);
264
+ return response.getDataOrDefault({});
265
+ }
266
+
267
+ public static isAppInstalled(packageName: string): boolean {
268
+ const response = this.call(CallMethod.isAppInstalled, {
269
+ args: { packageName },
270
+ });
271
+ return response.getDataOrDefault(false);
272
+ }
258
273
 
259
274
  /**
260
275
  * 对指定节点进行截图
package/src/CallMethod.ts CHANGED
@@ -52,6 +52,8 @@ export const CallMethod = {
52
52
  httpRequest: "httpRequest",
53
53
  getDeviceInfo: "getDeviceInfo",
54
54
  getNetworkType: "getNetworkType",
55
+ isAppInstalled: "isAppInstalled",
56
+ getClipboardLatestText: "getClipboardLatestText",
55
57
  } as const;
56
58
 
57
59
  // 导出类型定义