automation_model 1.0.843-dev → 1.0.845-dev

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/lib/route.d.ts CHANGED
@@ -12,13 +12,72 @@ export interface RouteItem {
12
12
  mandatory: boolean;
13
13
  timeout: number;
14
14
  }
15
- export interface Action {
16
- type: string;
15
+ interface StubAction {
16
+ type: "stub_request";
17
+ config: {
18
+ path?: string;
19
+ statusCode?: number;
20
+ contentType?: string;
21
+ body?: string;
22
+ };
23
+ }
24
+ interface JSONModifyAction {
25
+ type: "json_modify";
26
+ config: {
27
+ path: string;
28
+ modifyValue: any;
29
+ };
30
+ }
31
+ interface JSONWholeModifyAction {
32
+ type: "json_whole_modify";
17
33
  config: any;
18
34
  }
35
+ interface TextModifyAction {
36
+ type: "change_text";
37
+ config: string;
38
+ }
39
+ interface JSONVerifyAction {
40
+ type: "assert_json";
41
+ config: {
42
+ path: string;
43
+ expectedValue: any;
44
+ };
45
+ }
46
+ interface JSONWholeVerifyAction {
47
+ type: "assert_whole_json";
48
+ config: {
49
+ contains: string;
50
+ } | {
51
+ equals: string;
52
+ };
53
+ }
54
+ interface TextVerifyAction {
55
+ type: "assert_text";
56
+ config: {
57
+ contains: string;
58
+ } | {
59
+ equals: string;
60
+ };
61
+ }
62
+ interface StatusCodeModifyAction {
63
+ type: "status_code_change";
64
+ config: number;
65
+ }
66
+ interface StatusCodeVerifyAction {
67
+ type: "status_code_verification";
68
+ config: number;
69
+ }
70
+ interface AbortAction {
71
+ type: "abort_request";
72
+ config: {
73
+ errorCode: string;
74
+ };
75
+ }
76
+ export type Action = AbortAction | StatusCodeVerifyAction | StatusCodeModifyAction | TextVerifyAction | TextModifyAction | JSONModifyAction | JSONWholeModifyAction | JSONVerifyAction | JSONWholeVerifyAction | StubAction;
19
77
  export declare function pathFilter(savedPath: string, actualPath: string): boolean;
20
78
  export declare function queryParamsFilter(savedQueryParams: Record<string, string> | null, actualQueryParams: URLSearchParams): boolean;
21
79
  export declare function methodFilter(savedMethod: string | null, actualMethod: string): boolean;
22
80
  export declare function registerBeforeStepRoutes(context: any, stepName: string, world: any): Promise<void>;
23
81
  export declare function registerAfterStepRoutes(context: any, world: any): Promise<any>;
24
82
  export declare function _stepNameToTemplate(stepName: string): string;
83
+ export {};