@tinywork/glass 1.0.46 → 1.0.48
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 +37 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -287,6 +287,22 @@ declare global {
|
|
|
287
287
|
updatedAt?: string;
|
|
288
288
|
};
|
|
289
289
|
|
|
290
|
+
type BatchItemSchema = {
|
|
291
|
+
id: string;
|
|
292
|
+
name?: string;
|
|
293
|
+
sort?: number;
|
|
294
|
+
tags?: string[];
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
type BatchSchema = BatchItemSchema & {
|
|
298
|
+
mocks?: Array<{
|
|
299
|
+
mockId: string;
|
|
300
|
+
}>;
|
|
301
|
+
actions?: Array<{
|
|
302
|
+
actionId?: string;
|
|
303
|
+
}>;
|
|
304
|
+
};
|
|
305
|
+
|
|
290
306
|
type NetLog = {
|
|
291
307
|
uid: string;
|
|
292
308
|
url: string;
|
|
@@ -361,6 +377,11 @@ declare global {
|
|
|
361
377
|
deactivate?: IGlassExtensionEvent<void>;
|
|
362
378
|
uninstall?: IGlassExtensionEvent<void>;
|
|
363
379
|
|
|
380
|
+
onDocSearch?: IGlassExtensionEvent<{
|
|
381
|
+
pathname: string;
|
|
382
|
+
apiIds: string[];
|
|
383
|
+
}>;
|
|
384
|
+
|
|
364
385
|
onDocChange?: IGlassExtensionEvent<{
|
|
365
386
|
doc: DocFullSchema | null;
|
|
366
387
|
originDoc: DocFullSchema | null;
|
|
@@ -500,6 +521,22 @@ declare global {
|
|
|
500
521
|
apiId: string,
|
|
501
522
|
): IGlassExtensionInvokeResponse<RuleSchema>;
|
|
502
523
|
saveRule(rule: RuleSchema): IGlassExtensionInvokeResponse<void>;
|
|
524
|
+
changeRuleMode(
|
|
525
|
+
params: {
|
|
526
|
+
ruleId: string;
|
|
527
|
+
mode: MockMode;
|
|
528
|
+
mockId?: string;
|
|
529
|
+
actionIds?: string[];
|
|
530
|
+
}[],
|
|
531
|
+
): IGlassExtensionInvokeResponse<void>;
|
|
532
|
+
queryBatchs(): IGlassExtensionInvokeResponse<BatchSchema[]>;
|
|
533
|
+
saveBatch(batch: BatchSchema): IGlassExtensionInvokeResponse<void>;
|
|
534
|
+
changeBatchStatus(
|
|
535
|
+
params: {
|
|
536
|
+
id: string;
|
|
537
|
+
status: boolean;
|
|
538
|
+
}[],
|
|
539
|
+
): IGlassExtensionInvokeResponse<void>;
|
|
503
540
|
getCurrentVersion(): IGlassExtensionInvokeResponse<Version>;
|
|
504
541
|
getVersionDocs(
|
|
505
542
|
versionId: string,
|