@tinywork/glass 1.0.34 → 1.0.36
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/index.d.ts +25 -17
- 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,7 +432,7 @@ 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;
|
|
@@ -440,33 +440,41 @@ declare global {
|
|
|
440
440
|
|
|
441
441
|
getDoc(id: string): IGlassExtensionInvokeResponse<DocSchema>;
|
|
442
442
|
getGroup(
|
|
443
|
-
id: string
|
|
443
|
+
id: string,
|
|
444
444
|
): IGlassExtensionInvokeResponse<GroupSchema & { docs?: DocSchema[] }>;
|
|
445
445
|
|
|
446
|
-
agentConfirm(
|
|
447
|
-
params:
|
|
448
|
-
|
|
446
|
+
agentConfirm<T extends SyncDataParams>(
|
|
447
|
+
params: T & {
|
|
448
|
+
conversationId: string;
|
|
449
|
+
},
|
|
450
|
+
): IGlassExtensionInvokeResponse<T["data"]>;
|
|
451
|
+
|
|
452
|
+
sendAgentMessage(params: {
|
|
453
|
+
conversationId: string;
|
|
454
|
+
message?: string;
|
|
455
|
+
isFinish: boolean;
|
|
456
|
+
}): IGlassExtensionInvokeResponse<void>;
|
|
449
457
|
|
|
450
458
|
getRule(
|
|
451
|
-
params: { apiId: string } | { ruleId: string }
|
|
459
|
+
params: { apiId: string } | { ruleId: string },
|
|
452
460
|
): IGlassExtensionInvokeResponse<RuleSchema>;
|
|
453
461
|
transformDocToRule(
|
|
454
|
-
apiId: string
|
|
462
|
+
apiId: string,
|
|
455
463
|
): IGlassExtensionInvokeResponse<RuleSchema>;
|
|
456
464
|
saveRule(rule: RuleSchema): IGlassExtensionInvokeResponse<void>;
|
|
457
465
|
getCurrentVersion(): IGlassExtensionInvokeResponse<Version>;
|
|
458
466
|
getVersionDocs(
|
|
459
|
-
versionId: string
|
|
467
|
+
versionId: string,
|
|
460
468
|
): IGlassExtensionInvokeResponse<DocSchema[]>;
|
|
461
469
|
saveVersionDocs(
|
|
462
470
|
versionId: string,
|
|
463
|
-
apiIds: string[]
|
|
471
|
+
apiIds: string[],
|
|
464
472
|
): IGlassExtensionInvokeResponse<void>;
|
|
465
473
|
|
|
466
474
|
getVersionCases(versionId: string): IGlassExtensionInvokeResponse<Case[]>;
|
|
467
475
|
saveVersionCases(
|
|
468
476
|
versionId: string,
|
|
469
|
-
cases: Case[]
|
|
477
|
+
cases: Case[],
|
|
470
478
|
): IGlassExtensionInvokeResponse<void>;
|
|
471
479
|
execVersionCases(versionId: string): IGlassExtensionInvokeResponse<void>;
|
|
472
480
|
|
|
@@ -482,7 +490,7 @@ declare global {
|
|
|
482
490
|
apiId: string;
|
|
483
491
|
params?: { key: string; value?: string }[] | null;
|
|
484
492
|
}[];
|
|
485
|
-
}
|
|
493
|
+
},
|
|
486
494
|
): IGlassExtensionInvokeResponse<void>;
|
|
487
495
|
/** 批量更新rule的本地数据 */
|
|
488
496
|
saveExamples(
|
|
@@ -494,12 +502,12 @@ declare global {
|
|
|
494
502
|
name?: string;
|
|
495
503
|
statusCode?: number;
|
|
496
504
|
status?: boolean;
|
|
497
|
-
}[]
|
|
505
|
+
}[],
|
|
498
506
|
): IGlassExtensionInvokeResponse<void>;
|
|
499
507
|
/** 注册菜单项 */
|
|
500
508
|
registerMenu(
|
|
501
509
|
id: string,
|
|
502
|
-
options: MenuItem
|
|
510
|
+
options: MenuItem,
|
|
503
511
|
): IGlassExtensionInvokeResponse<void>;
|
|
504
512
|
/** 移除菜单 */
|
|
505
513
|
unregisterMenu(id: string): IGlassExtensionInvokeResponse<void>;
|
|
@@ -521,14 +529,14 @@ declare global {
|
|
|
521
529
|
closeProgress(): IGlassExtensionInvokeResponse<void>;
|
|
522
530
|
|
|
523
531
|
transformDocToJsonSchema(
|
|
524
|
-
doc: DocFullSchema
|
|
532
|
+
doc: DocFullSchema,
|
|
525
533
|
): IGlassExtensionInvokeResponse<JSONSchema>;
|
|
526
534
|
genDataFromDocSchema(
|
|
527
|
-
doc: DocFullSchema
|
|
535
|
+
doc: DocFullSchema,
|
|
528
536
|
): IGlassExtensionInvokeResponse<Record<string, any>>;
|
|
529
537
|
|
|
530
538
|
postMessage(
|
|
531
|
-
message: Partial<NetLog
|
|
539
|
+
message: Partial<NetLog>,
|
|
532
540
|
): IGlassExtensionInvokeResponse<void>;
|
|
533
541
|
openBrowserWindow(browserWindowOptions: {
|
|
534
542
|
width?: number;
|