@bugbug-io/api-schema 13.39.1
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/README.md +39 -0
- package/dist/generated/v2.d.ts +7989 -0
- package/dist/generated/v2.d.ts.map +1 -0
- package/dist/generated/v2.js +6 -0
- package/dist/generated/v2.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/_paginated.d.ts +16 -0
- package/dist/schemas/_paginated.d.ts.map +1 -0
- package/dist/schemas/_paginated.js +12 -0
- package/dist/schemas/_paginated.js.map +1 -0
- package/dist/schemas/common.d.ts +7 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +12 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/enums.d.ts +34 -0
- package/dist/schemas/enums.d.ts.map +1 -0
- package/dist/schemas/enums.js +160 -0
- package/dist/schemas/enums.js.map +1 -0
- package/dist/schemas/index.d.ts +10 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +10 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/profiles.d.ts +48 -0
- package/dist/schemas/profiles.d.ts.map +1 -0
- package/dist/schemas/profiles.js +12 -0
- package/dist/schemas/profiles.js.map +1 -0
- package/dist/schemas/projects.d.ts +64 -0
- package/dist/schemas/projects.d.ts.map +1 -0
- package/dist/schemas/projects.js +14 -0
- package/dist/schemas/projects.js.map +1 -0
- package/dist/schemas/runs.d.ts +524 -0
- package/dist/schemas/runs.d.ts.map +1 -0
- package/dist/schemas/runs.js +101 -0
- package/dist/schemas/runs.js.map +1 -0
- package/dist/schemas/selectors.d.ts +308 -0
- package/dist/schemas/selectors.d.ts.map +1 -0
- package/dist/schemas/selectors.js +43 -0
- package/dist/schemas/selectors.js.map +1 -0
- package/dist/schemas/steps.d.ts +22022 -0
- package/dist/schemas/steps.d.ts.map +1 -0
- package/dist/schemas/steps.js +384 -0
- package/dist/schemas/steps.js.map +1 -0
- package/dist/schemas/suites.d.ts +133 -0
- package/dist/schemas/suites.d.ts.map +1 -0
- package/dist/schemas/suites.js +30 -0
- package/dist/schemas/suites.js.map +1 -0
- package/dist/schemas/tests.d.ts +62 -0
- package/dist/schemas/tests.d.ts.map +1 -0
- package/dist/schemas/tests.js +22 -0
- package/dist/schemas/tests.js.map +1 -0
- package/dist/step-error-codes.d.ts +11 -0
- package/dist/step-error-codes.d.ts.map +1 -0
- package/dist/step-error-codes.js +81 -0
- package/dist/step-error-codes.js.map +1 -0
- package/dist/types.d.ts +124 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/schemas/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAqB,MAAM,SAAS,CAAC;AAG1D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;gCASZ,CAAC;AAEjB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;gCAQpB,CAAC;AAEjB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA8BV,CAAC;AAEjB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;gCAUf,CAAC;AAEjB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAOrB,CAAC;AAEjB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAqBX,CAAC;AAEjB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;gCAUhB,CAAC;AAEjB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAOtB,CAAC;AAEjB,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { DateTimeSchema, UuidSchema } from './common';
|
|
3
|
+
import { StatusSchema, TriggeredBySchema } from './enums';
|
|
4
|
+
import { StepErrorCodeSchema } from './steps';
|
|
5
|
+
export const RunResultSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
id: UuidSchema.describe('Run UUID.'),
|
|
8
|
+
status: StatusSchema.describe('Current status of the run.'),
|
|
9
|
+
webappUrl: z.string().describe('BugBug web app URL for the run details page.'),
|
|
10
|
+
modified: DateTimeSchema.optional().describe('Last modification timestamp reported by the API.'),
|
|
11
|
+
})
|
|
12
|
+
.passthrough();
|
|
13
|
+
export const StepRunScreenshotSchema = z
|
|
14
|
+
.object({
|
|
15
|
+
id: UuidSchema.describe('Step run UUID.'),
|
|
16
|
+
stepId: UuidSchema.nullable().describe('Original step UUID associated with the screenshot, if available.'),
|
|
17
|
+
screenshotUrl: z.string().describe('Screenshot URL for the step run.'),
|
|
18
|
+
})
|
|
19
|
+
.passthrough();
|
|
20
|
+
export const TestRunSchema = z
|
|
21
|
+
.object({
|
|
22
|
+
id: UuidSchema.describe('Test run UUID.'),
|
|
23
|
+
name: z.string().min(1).describe('Test run name.'),
|
|
24
|
+
queued: DateTimeSchema.nullable().describe('Queue timestamp, if the run waited before execution.'),
|
|
25
|
+
status: StatusSchema.describe('Current status of the test run.'),
|
|
26
|
+
sequence: z.number().nullable().describe('Sequence number assigned by BugBug, if available.'),
|
|
27
|
+
webappUrl: z.string().describe('BugBug web app URL for the test run.'),
|
|
28
|
+
errorCode: StepErrorCodeSchema.nullable().describe('Structured BugBug error code for the test run, if any.'),
|
|
29
|
+
duration: z.string().nullable().describe('Execution duration reported by the API.'),
|
|
30
|
+
started: DateTimeSchema.nullable().describe('Run start timestamp, if available.'),
|
|
31
|
+
ended: DateTimeSchema.nullable().describe('Run end timestamp, if available.'),
|
|
32
|
+
stepsRuns: z
|
|
33
|
+
.string()
|
|
34
|
+
.describe('API reference or serialized value containing the step runs payload.'),
|
|
35
|
+
runProfileId: UuidSchema.nullable().describe('Run profile UUID used for this execution, if available.'),
|
|
36
|
+
testId: UuidSchema.nullable().describe('Original test UUID associated with this run, if available.'),
|
|
37
|
+
suiteRunId: UuidSchema.nullable().describe('Parent suite run UUID when the test run belongs to a suite run.'),
|
|
38
|
+
triggeredBy: TriggeredBySchema,
|
|
39
|
+
})
|
|
40
|
+
.passthrough();
|
|
41
|
+
export const TestRunStateSchema = z
|
|
42
|
+
.object({
|
|
43
|
+
id: UuidSchema.describe('Test run UUID.'),
|
|
44
|
+
modified: DateTimeSchema.describe('Last modification timestamp reported by the API.'),
|
|
45
|
+
status: StatusSchema.optional().describe('Current status of the test run.'),
|
|
46
|
+
webappUrl: z.string().describe('BugBug web app URL for the test run.'),
|
|
47
|
+
duration: z.string().nullable().optional().describe('Execution duration reported by the API.'),
|
|
48
|
+
started: DateTimeSchema.nullable().optional().describe('Run start timestamp, if available.'),
|
|
49
|
+
ended: DateTimeSchema.nullable().optional().describe('Run end timestamp, if available.'),
|
|
50
|
+
})
|
|
51
|
+
.passthrough();
|
|
52
|
+
export const TestRunScreenshotsSchema = z
|
|
53
|
+
.object({
|
|
54
|
+
id: UuidSchema.describe('Test run UUID.'),
|
|
55
|
+
stepsRuns: z
|
|
56
|
+
.array(StepRunScreenshotSchema)
|
|
57
|
+
.describe('Screenshots captured for step runs within the test run.'),
|
|
58
|
+
})
|
|
59
|
+
.passthrough();
|
|
60
|
+
export const SuiteRunSchema = z
|
|
61
|
+
.object({
|
|
62
|
+
id: UuidSchema.describe('Suite run UUID.'),
|
|
63
|
+
name: z.string().min(1).describe('Suite run name.'),
|
|
64
|
+
queued: DateTimeSchema.nullable().describe('Queue timestamp, if the suite run waited before execution.'),
|
|
65
|
+
status: StatusSchema.describe('Current status of the suite run.'),
|
|
66
|
+
sequence: z.number().nullable().describe('Sequence number assigned by BugBug, if available.'),
|
|
67
|
+
webappUrl: z.string().describe('BugBug web app URL for the suite run.'),
|
|
68
|
+
errorCode: StepErrorCodeSchema.nullable().describe('Structured BugBug error code for the suite run, if any.'),
|
|
69
|
+
duration: z.string().nullable().describe('Execution duration reported by the API.'),
|
|
70
|
+
started: DateTimeSchema.nullable().describe('Run start timestamp, if available.'),
|
|
71
|
+
ended: DateTimeSchema.nullable().describe('Run end timestamp, if available.'),
|
|
72
|
+
profileId: UuidSchema.describe('Run profile UUID used for the suite run.'),
|
|
73
|
+
profileName: z.string().describe('Run profile name used for the suite run.'),
|
|
74
|
+
testRuns: z.array(TestRunSchema).describe('Test runs included in the suite run.'),
|
|
75
|
+
triggeredBy: TriggeredBySchema,
|
|
76
|
+
})
|
|
77
|
+
.passthrough();
|
|
78
|
+
export const SuiteRunStateSchema = z
|
|
79
|
+
.object({
|
|
80
|
+
id: UuidSchema.describe('Suite run UUID.'),
|
|
81
|
+
modified: DateTimeSchema.describe('Last modification timestamp reported by the API.'),
|
|
82
|
+
status: StatusSchema.describe('Current status of the suite run.'),
|
|
83
|
+
webappUrl: z.string().describe('BugBug web app URL for the suite run.'),
|
|
84
|
+
duration: z.string().nullable().optional().describe('Execution duration reported by the API.'),
|
|
85
|
+
started: DateTimeSchema.nullable().optional().describe('Run start timestamp, if available.'),
|
|
86
|
+
ended: DateTimeSchema.nullable().optional().describe('Run end timestamp, if available.'),
|
|
87
|
+
})
|
|
88
|
+
.passthrough();
|
|
89
|
+
export const SuiteRunScreenshotsSchema = z
|
|
90
|
+
.object({
|
|
91
|
+
id: UuidSchema.describe('Suite run UUID.'),
|
|
92
|
+
testsRuns: z
|
|
93
|
+
.array(TestRunScreenshotsSchema)
|
|
94
|
+
.describe('Screenshot collections grouped by test run within the suite run.'),
|
|
95
|
+
})
|
|
96
|
+
.passthrough();
|
|
97
|
+
export const RunVariableSchema = z.object({
|
|
98
|
+
key: z.string().describe('Variable name.'),
|
|
99
|
+
value: z.string().nullable().optional().describe('Variable value.'),
|
|
100
|
+
});
|
|
101
|
+
//# sourceMappingURL=runs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../src/schemas/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC;IACpC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IAC3D,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IAC9E,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,QAAQ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as.
|
|
3
|
+
*
|
|
4
|
+
* Used by step schemas (`selectorsPresets`) and exposed to MCP as JSON Schema resources
|
|
5
|
+
* so that LLMs can author selectors directly.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
export declare const SelectorSchema: z.ZodObject<{
|
|
9
|
+
id: z.ZodOptional<z.ZodString>;
|
|
10
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
11
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
12
|
+
isActive: z.ZodBoolean;
|
|
13
|
+
step: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
15
|
+
id: z.ZodOptional<z.ZodString>;
|
|
16
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
17
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
18
|
+
isActive: z.ZodBoolean;
|
|
19
|
+
step: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
21
|
+
id: z.ZodOptional<z.ZodString>;
|
|
22
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
23
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
24
|
+
isActive: z.ZodBoolean;
|
|
25
|
+
step: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
27
|
+
export declare const SelectorsGroupSchema: z.ZodObject<{
|
|
28
|
+
id: z.ZodOptional<z.ZodString>;
|
|
29
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
30
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
31
|
+
id: z.ZodOptional<z.ZodString>;
|
|
32
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
33
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
34
|
+
isActive: z.ZodBoolean;
|
|
35
|
+
step: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
37
|
+
id: z.ZodOptional<z.ZodString>;
|
|
38
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
39
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
40
|
+
isActive: z.ZodBoolean;
|
|
41
|
+
step: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
43
|
+
id: z.ZodOptional<z.ZodString>;
|
|
44
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
45
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
46
|
+
isActive: z.ZodBoolean;
|
|
47
|
+
step: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
49
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
50
|
+
id: z.ZodOptional<z.ZodString>;
|
|
51
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
52
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
53
|
+
id: z.ZodOptional<z.ZodString>;
|
|
54
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
55
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
56
|
+
isActive: z.ZodBoolean;
|
|
57
|
+
step: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
59
|
+
id: z.ZodOptional<z.ZodString>;
|
|
60
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
61
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
62
|
+
isActive: z.ZodBoolean;
|
|
63
|
+
step: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
65
|
+
id: z.ZodOptional<z.ZodString>;
|
|
66
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
67
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
68
|
+
isActive: z.ZodBoolean;
|
|
69
|
+
step: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
71
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
72
|
+
id: z.ZodOptional<z.ZodString>;
|
|
73
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
74
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
75
|
+
id: z.ZodOptional<z.ZodString>;
|
|
76
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
77
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
78
|
+
isActive: z.ZodBoolean;
|
|
79
|
+
step: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
81
|
+
id: z.ZodOptional<z.ZodString>;
|
|
82
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
83
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
84
|
+
isActive: z.ZodBoolean;
|
|
85
|
+
step: z.ZodOptional<z.ZodString>;
|
|
86
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
87
|
+
id: z.ZodOptional<z.ZodString>;
|
|
88
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
89
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
90
|
+
isActive: z.ZodBoolean;
|
|
91
|
+
step: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
93
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
94
|
+
export declare const SelectorsPresetSchema: z.ZodObject<{
|
|
95
|
+
id: z.ZodOptional<z.ZodString>;
|
|
96
|
+
isCustom: z.ZodBoolean;
|
|
97
|
+
isActive: z.ZodBoolean;
|
|
98
|
+
selectorsGroups: z.ZodArray<z.ZodObject<{
|
|
99
|
+
id: z.ZodOptional<z.ZodString>;
|
|
100
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
101
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
102
|
+
id: z.ZodOptional<z.ZodString>;
|
|
103
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
104
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
105
|
+
isActive: z.ZodBoolean;
|
|
106
|
+
step: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
108
|
+
id: z.ZodOptional<z.ZodString>;
|
|
109
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
110
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
111
|
+
isActive: z.ZodBoolean;
|
|
112
|
+
step: z.ZodOptional<z.ZodString>;
|
|
113
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
114
|
+
id: z.ZodOptional<z.ZodString>;
|
|
115
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
116
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
117
|
+
isActive: z.ZodBoolean;
|
|
118
|
+
step: z.ZodOptional<z.ZodString>;
|
|
119
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
120
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
121
|
+
id: z.ZodOptional<z.ZodString>;
|
|
122
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
123
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
124
|
+
id: z.ZodOptional<z.ZodString>;
|
|
125
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
126
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
127
|
+
isActive: z.ZodBoolean;
|
|
128
|
+
step: z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
130
|
+
id: z.ZodOptional<z.ZodString>;
|
|
131
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
132
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
133
|
+
isActive: z.ZodBoolean;
|
|
134
|
+
step: z.ZodOptional<z.ZodString>;
|
|
135
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
136
|
+
id: z.ZodOptional<z.ZodString>;
|
|
137
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
138
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
139
|
+
isActive: z.ZodBoolean;
|
|
140
|
+
step: z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
142
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
143
|
+
id: z.ZodOptional<z.ZodString>;
|
|
144
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
145
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
146
|
+
id: z.ZodOptional<z.ZodString>;
|
|
147
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
148
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
149
|
+
isActive: z.ZodBoolean;
|
|
150
|
+
step: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
152
|
+
id: z.ZodOptional<z.ZodString>;
|
|
153
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
154
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
155
|
+
isActive: z.ZodBoolean;
|
|
156
|
+
step: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
158
|
+
id: z.ZodOptional<z.ZodString>;
|
|
159
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
160
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
161
|
+
isActive: z.ZodBoolean;
|
|
162
|
+
step: z.ZodOptional<z.ZodString>;
|
|
163
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
164
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
165
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
166
|
+
id: z.ZodOptional<z.ZodString>;
|
|
167
|
+
isCustom: z.ZodBoolean;
|
|
168
|
+
isActive: z.ZodBoolean;
|
|
169
|
+
selectorsGroups: z.ZodArray<z.ZodObject<{
|
|
170
|
+
id: z.ZodOptional<z.ZodString>;
|
|
171
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
172
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
173
|
+
id: z.ZodOptional<z.ZodString>;
|
|
174
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
175
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
176
|
+
isActive: z.ZodBoolean;
|
|
177
|
+
step: z.ZodOptional<z.ZodString>;
|
|
178
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
179
|
+
id: z.ZodOptional<z.ZodString>;
|
|
180
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
181
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
182
|
+
isActive: z.ZodBoolean;
|
|
183
|
+
step: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
185
|
+
id: z.ZodOptional<z.ZodString>;
|
|
186
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
187
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
188
|
+
isActive: z.ZodBoolean;
|
|
189
|
+
step: z.ZodOptional<z.ZodString>;
|
|
190
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
191
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
192
|
+
id: z.ZodOptional<z.ZodString>;
|
|
193
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
194
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
195
|
+
id: z.ZodOptional<z.ZodString>;
|
|
196
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
197
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
198
|
+
isActive: z.ZodBoolean;
|
|
199
|
+
step: z.ZodOptional<z.ZodString>;
|
|
200
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
201
|
+
id: z.ZodOptional<z.ZodString>;
|
|
202
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
203
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
204
|
+
isActive: z.ZodBoolean;
|
|
205
|
+
step: z.ZodOptional<z.ZodString>;
|
|
206
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
207
|
+
id: z.ZodOptional<z.ZodString>;
|
|
208
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
209
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
210
|
+
isActive: z.ZodBoolean;
|
|
211
|
+
step: z.ZodOptional<z.ZodString>;
|
|
212
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
213
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
214
|
+
id: z.ZodOptional<z.ZodString>;
|
|
215
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
216
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
217
|
+
id: z.ZodOptional<z.ZodString>;
|
|
218
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
219
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
220
|
+
isActive: z.ZodBoolean;
|
|
221
|
+
step: z.ZodOptional<z.ZodString>;
|
|
222
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
223
|
+
id: z.ZodOptional<z.ZodString>;
|
|
224
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
225
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
226
|
+
isActive: z.ZodBoolean;
|
|
227
|
+
step: z.ZodOptional<z.ZodString>;
|
|
228
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
229
|
+
id: z.ZodOptional<z.ZodString>;
|
|
230
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
231
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
232
|
+
isActive: z.ZodBoolean;
|
|
233
|
+
step: z.ZodOptional<z.ZodString>;
|
|
234
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
235
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
236
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
237
|
+
id: z.ZodOptional<z.ZodString>;
|
|
238
|
+
isCustom: z.ZodBoolean;
|
|
239
|
+
isActive: z.ZodBoolean;
|
|
240
|
+
selectorsGroups: z.ZodArray<z.ZodObject<{
|
|
241
|
+
id: z.ZodOptional<z.ZodString>;
|
|
242
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
243
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
244
|
+
id: z.ZodOptional<z.ZodString>;
|
|
245
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
246
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
247
|
+
isActive: z.ZodBoolean;
|
|
248
|
+
step: z.ZodOptional<z.ZodString>;
|
|
249
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
250
|
+
id: z.ZodOptional<z.ZodString>;
|
|
251
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
252
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
253
|
+
isActive: z.ZodBoolean;
|
|
254
|
+
step: z.ZodOptional<z.ZodString>;
|
|
255
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
256
|
+
id: z.ZodOptional<z.ZodString>;
|
|
257
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
258
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
259
|
+
isActive: z.ZodBoolean;
|
|
260
|
+
step: z.ZodOptional<z.ZodString>;
|
|
261
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
262
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
263
|
+
id: z.ZodOptional<z.ZodString>;
|
|
264
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
265
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
266
|
+
id: z.ZodOptional<z.ZodString>;
|
|
267
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
268
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
269
|
+
isActive: z.ZodBoolean;
|
|
270
|
+
step: z.ZodOptional<z.ZodString>;
|
|
271
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
272
|
+
id: z.ZodOptional<z.ZodString>;
|
|
273
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
274
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
275
|
+
isActive: z.ZodBoolean;
|
|
276
|
+
step: z.ZodOptional<z.ZodString>;
|
|
277
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
278
|
+
id: z.ZodOptional<z.ZodString>;
|
|
279
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
280
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
281
|
+
isActive: z.ZodBoolean;
|
|
282
|
+
step: z.ZodOptional<z.ZodString>;
|
|
283
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
284
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
285
|
+
id: z.ZodOptional<z.ZodString>;
|
|
286
|
+
relation: z.ZodEnum<["descendant", "ancestor", "sibling"]>;
|
|
287
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
288
|
+
id: z.ZodOptional<z.ZodString>;
|
|
289
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
290
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
291
|
+
isActive: z.ZodBoolean;
|
|
292
|
+
step: z.ZodOptional<z.ZodString>;
|
|
293
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
294
|
+
id: z.ZodOptional<z.ZodString>;
|
|
295
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
296
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
297
|
+
isActive: z.ZodBoolean;
|
|
298
|
+
step: z.ZodOptional<z.ZodString>;
|
|
299
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
300
|
+
id: z.ZodOptional<z.ZodString>;
|
|
301
|
+
selector: z.ZodNullable<z.ZodString>;
|
|
302
|
+
type: z.ZodNullable<z.ZodEnum<["XPath", "customCSS", "customXPath", ""]>>;
|
|
303
|
+
isActive: z.ZodBoolean;
|
|
304
|
+
step: z.ZodOptional<z.ZodString>;
|
|
305
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
306
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
307
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
308
|
+
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/schemas/selectors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;gCAWX,CAAC;AAEjB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAWjB,CAAC;AAEjB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAYlB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selector / selectors-group / selectors-preset schemas.
|
|
3
|
+
*
|
|
4
|
+
* Used by step schemas (`selectorsPresets`) and exposed to MCP as JSON Schema resources
|
|
5
|
+
* so that LLMs can author selectors directly.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { UuidSchema } from './common';
|
|
9
|
+
import { SelectorTypeSchema, SelectorsRelationSchema } from './enums';
|
|
10
|
+
export const SelectorSchema = z
|
|
11
|
+
.object({
|
|
12
|
+
id: UuidSchema.optional().describe('Selector UUID when persisted by the API.'),
|
|
13
|
+
selector: z
|
|
14
|
+
.string()
|
|
15
|
+
.nullable()
|
|
16
|
+
.describe('Raw xpath or css selector expression used to find an element.'),
|
|
17
|
+
type: SelectorTypeSchema.describe('Selector engine or strategy name used by BugBug.'),
|
|
18
|
+
isActive: z.boolean().describe('Whether this selector is enabled.'),
|
|
19
|
+
step: UuidSchema.optional().describe('Owning step UUID when returned by the API.'),
|
|
20
|
+
})
|
|
21
|
+
.passthrough();
|
|
22
|
+
export const SelectorsGroupSchema = z
|
|
23
|
+
.object({
|
|
24
|
+
id: UuidSchema.optional().describe('Selectors group UUID when persisted by the API.'),
|
|
25
|
+
relation: SelectorsRelationSchema.describe('How selectors groups inside the preset are combined.'),
|
|
26
|
+
selectors: z
|
|
27
|
+
.array(SelectorSchema)
|
|
28
|
+
.min(1, 'Selectors group must contain at least one selector.')
|
|
29
|
+
.describe('Selectors included in this group. Must contain at least one selector.'),
|
|
30
|
+
})
|
|
31
|
+
.passthrough();
|
|
32
|
+
export const SelectorsPresetSchema = z
|
|
33
|
+
.object({
|
|
34
|
+
id: UuidSchema.optional().describe('Selectors preset UUID when persisted by the API.'),
|
|
35
|
+
isCustom: z.boolean().describe('Whether the preset was manually customized.'),
|
|
36
|
+
isActive: z.boolean().describe('Whether the preset is enabled for the step.'),
|
|
37
|
+
selectorsGroups: z
|
|
38
|
+
.array(SelectorsGroupSchema)
|
|
39
|
+
.min(1, 'Selectors preset must contain at least one selectors group.')
|
|
40
|
+
.describe('Selector groups used to locate the target element. Must contain at least one group when provided.'),
|
|
41
|
+
})
|
|
42
|
+
.passthrough();
|
|
43
|
+
//# sourceMappingURL=selectors.js.map
|
|
@@ -0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