@tinywork/glass 1.0.35 → 1.0.37

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 (2) hide show
  1. package/index.d.ts +26 -16
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -412,7 +412,7 @@ declare global {
412
412
 
413
413
  /** 获取cookie */
414
414
  getCookie(
415
- params: Omit<Cookie, "value">
415
+ params: Omit<Cookie, "value">,
416
416
  ): IGlassExtensionInvokeResponse<string>;
417
417
 
418
418
  /** 保存文档组 */
@@ -432,43 +432,53 @@ declare global {
432
432
  pathname: string;
433
433
  params: { key: string; value?: string }[];
434
434
  }>;
435
- }
435
+ },
436
436
  ): IGlassExtensionInvokeResponse<{
437
437
  apiId: string;
438
438
  ruleId?: string;
439
439
  }>;
440
440
 
441
- getDoc(id: string): IGlassExtensionInvokeResponse<DocSchema>;
441
+ deleteDoc(apiId: string): IGlassExtensionInvokeResponse<void>;
442
+
443
+ getDoc(
444
+ params: { apiId: string } | { pathname: string },
445
+ ): IGlassExtensionInvokeResponse<DocSchema>;
442
446
  getGroup(
443
- id: string
447
+ id: string,
444
448
  ): IGlassExtensionInvokeResponse<GroupSchema & { docs?: DocSchema[] }>;
445
449
 
446
450
  agentConfirm<T extends SyncDataParams>(
447
451
  params: T & {
448
452
  conversationId: string;
449
- }
453
+ },
450
454
  ): IGlassExtensionInvokeResponse<T["data"]>;
451
455
 
456
+ sendAgentMessage(params: {
457
+ conversationId: string;
458
+ message?: string;
459
+ isFinish: boolean;
460
+ }): IGlassExtensionInvokeResponse<void>;
461
+
452
462
  getRule(
453
- params: { apiId: string } | { ruleId: string }
463
+ params: { apiId: string } | { ruleId: string },
454
464
  ): IGlassExtensionInvokeResponse<RuleSchema>;
455
465
  transformDocToRule(
456
- apiId: string
466
+ apiId: string,
457
467
  ): IGlassExtensionInvokeResponse<RuleSchema>;
458
468
  saveRule(rule: RuleSchema): IGlassExtensionInvokeResponse<void>;
459
469
  getCurrentVersion(): IGlassExtensionInvokeResponse<Version>;
460
470
  getVersionDocs(
461
- versionId: string
471
+ versionId: string,
462
472
  ): IGlassExtensionInvokeResponse<DocSchema[]>;
463
473
  saveVersionDocs(
464
474
  versionId: string,
465
- apiIds: string[]
475
+ apiIds: string[],
466
476
  ): IGlassExtensionInvokeResponse<void>;
467
477
 
468
478
  getVersionCases(versionId: string): IGlassExtensionInvokeResponse<Case[]>;
469
479
  saveVersionCases(
470
480
  versionId: string,
471
- cases: Case[]
481
+ cases: Case[],
472
482
  ): IGlassExtensionInvokeResponse<void>;
473
483
  execVersionCases(versionId: string): IGlassExtensionInvokeResponse<void>;
474
484
 
@@ -484,7 +494,7 @@ declare global {
484
494
  apiId: string;
485
495
  params?: { key: string; value?: string }[] | null;
486
496
  }[];
487
- }
497
+ },
488
498
  ): IGlassExtensionInvokeResponse<void>;
489
499
  /** 批量更新rule的本地数据 */
490
500
  saveExamples(
@@ -496,12 +506,12 @@ declare global {
496
506
  name?: string;
497
507
  statusCode?: number;
498
508
  status?: boolean;
499
- }[]
509
+ }[],
500
510
  ): IGlassExtensionInvokeResponse<void>;
501
511
  /** 注册菜单项 */
502
512
  registerMenu(
503
513
  id: string,
504
- options: MenuItem
514
+ options: MenuItem,
505
515
  ): IGlassExtensionInvokeResponse<void>;
506
516
  /** 移除菜单 */
507
517
  unregisterMenu(id: string): IGlassExtensionInvokeResponse<void>;
@@ -523,14 +533,14 @@ declare global {
523
533
  closeProgress(): IGlassExtensionInvokeResponse<void>;
524
534
 
525
535
  transformDocToJsonSchema(
526
- doc: DocFullSchema
536
+ doc: DocFullSchema,
527
537
  ): IGlassExtensionInvokeResponse<JSONSchema>;
528
538
  genDataFromDocSchema(
529
- doc: DocFullSchema
539
+ doc: DocFullSchema,
530
540
  ): IGlassExtensionInvokeResponse<Record<string, any>>;
531
541
 
532
542
  postMessage(
533
- message: Partial<NetLog>
543
+ message: Partial<NetLog>,
534
544
  ): IGlassExtensionInvokeResponse<void>;
535
545
  openBrowserWindow(browserWindowOptions: {
536
546
  width?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinywork/glass",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "",
5
5
  "types": "index.d.ts",
6
6
  "files": [