@qawolf/api-contracts 0.69.0 → 0.71.0
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/dist/v1/deployment/verdict.d.ts +161 -0
- package/dist/v1/deployment/verdict.d.ts.map +1 -0
- package/dist/v1/deployment/verdict.js +71 -0
- package/dist/v1/deployment/verdict.js.map +1 -0
- package/dist/v1/deployment/verdictParts.d.ts +72 -0
- package/dist/v1/deployment/verdictParts.d.ts.map +1 -0
- package/dist/v1/deployment/verdictParts.js +56 -0
- package/dist/v1/deployment/verdictParts.js.map +1 -0
- package/dist/v1/environment/create.d.ts +1 -1
- package/dist/v1/environment/find.d.ts +1 -1
- package/dist/v1/environment/index.d.ts +1 -1
- package/dist/v1/environment/resource.d.ts +1 -1
- package/dist/v1/environment/update.d.ts +1 -1
- package/dist/v1/index.d.ts +50 -418
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +0 -2
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/investigation/index.d.ts +0 -144
- package/dist/v1/investigation/index.d.ts.map +1 -1
- package/dist/v1/investigation/index.js +0 -2
- package/dist/v1/investigation/index.js.map +1 -1
- package/dist/v1/issue/addFlows.d.ts +1 -1
- package/dist/v1/issue/create.d.ts +1 -1
- package/dist/v1/issue/index.d.ts +5 -5
- package/dist/v1/issue/removeFlows.d.ts +1 -1
- package/dist/v1/issue/update.d.ts +2 -2
- package/dist/v1/legacyTrigger/find.d.ts +4 -0
- package/dist/v1/legacyTrigger/find.d.ts.map +1 -1
- package/dist/v1/legacyTrigger/index.d.ts +4 -0
- package/dist/v1/legacyTrigger/index.d.ts.map +1 -1
- package/dist/v1/legacyTrigger/resource.d.ts +4 -0
- package/dist/v1/legacyTrigger/resource.d.ts.map +1 -1
- package/dist/v1/legacyTrigger/resource.js +6 -0
- package/dist/v1/legacyTrigger/resource.js.map +1 -1
- package/dist/v1/mcpToolDescription.d.ts.map +1 -1
- package/dist/v1/mcpToolDescription.js +0 -1
- package/dist/v1/mcpToolDescription.js.map +1 -1
- package/dist/v1/run/diagnose.d.ts +1 -1
- package/dist/v1/run/find.d.ts +2 -2
- package/dist/v1/run/get.d.ts +6 -6
- package/dist/v1/run/summary.d.ts +2 -2
- package/dist/v1/sharedSchemas.d.ts +2 -0
- package/dist/v1/sharedSchemas.d.ts.map +1 -1
- package/dist/v1/sharedSchemas.js +2 -0
- package/dist/v1/sharedSchemas.js.map +1 -1
- package/dist/v1/trigger/configuration.js +1 -1
- package/dist/v1/trigger/configuration.js.map +1 -1
- package/dist/v1/trigger/configurationRules.d.ts.map +1 -1
- package/dist/v1/trigger/configurationRules.js +4 -18
- package/dist/v1/trigger/configurationRules.js.map +1 -1
- package/package.json +1 -1
- package/dist/v1/investigation/findingInputFields.d.ts +0 -14
- package/dist/v1/investigation/findingInputFields.d.ts.map +0 -1
- package/dist/v1/investigation/findingInputFields.js +0 -46
- package/dist/v1/investigation/findingInputFields.js.map +0 -1
- package/dist/v1/investigation/recordFinding.d.ts +0 -153
- package/dist/v1/investigation/recordFinding.d.ts.map +0 -1
- package/dist/v1/investigation/recordFinding.js +0 -112
- package/dist/v1/investigation/recordFinding.js.map +0 -1
- package/dist/v1/run/triage.d.ts +0 -51
- package/dist/v1/run/triage.d.ts.map +0 -1
- package/dist/v1/run/triage.js +0 -55
- package/dist/v1/run/triage.js.map +0 -1
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* QA Wolf's answer to "did this deployment's tests pass?", as a client waiting
|
|
4
|
+
* on a deployment reports it. Not a contract: it is the shape every client
|
|
5
|
+
* building that wait agrees on, so the SDK's type and the CLI's JSON output
|
|
6
|
+
* cannot drift apart.
|
|
7
|
+
*
|
|
8
|
+
* `passed` and `not-tested` are separate answers on purpose. A deployment
|
|
9
|
+
* nothing matched was not tested, which is not the same fact as tests passing,
|
|
10
|
+
* and the caller decides what that is worth. `run-canceled` means QA Wolf
|
|
11
|
+
* cannot tell you, not that the deployment is fine.
|
|
12
|
+
*/
|
|
13
|
+
export declare const deploymentVerdictSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
14
|
+
deploymentId: z.ZodString;
|
|
15
|
+
outcome: z.ZodLiteral<"passed">;
|
|
16
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
17
|
+
blockingBugCount: z.ZodNumber;
|
|
18
|
+
runId: z.ZodString;
|
|
19
|
+
runUrl: z.ZodURL;
|
|
20
|
+
status: z.ZodEnum<{
|
|
21
|
+
failed: "failed";
|
|
22
|
+
queued: "queued";
|
|
23
|
+
running: "running";
|
|
24
|
+
passed: "passed";
|
|
25
|
+
canceled: "canceled";
|
|
26
|
+
}>;
|
|
27
|
+
triggerName: z.ZodString;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
30
|
+
blockingBugCount: z.ZodNumber;
|
|
31
|
+
deploymentId: z.ZodString;
|
|
32
|
+
outcome: z.ZodLiteral<"failed">;
|
|
33
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
34
|
+
blockingBugCount: z.ZodNumber;
|
|
35
|
+
runId: z.ZodString;
|
|
36
|
+
runUrl: z.ZodURL;
|
|
37
|
+
status: z.ZodEnum<{
|
|
38
|
+
failed: "failed";
|
|
39
|
+
queued: "queued";
|
|
40
|
+
running: "running";
|
|
41
|
+
passed: "passed";
|
|
42
|
+
canceled: "canceled";
|
|
43
|
+
}>;
|
|
44
|
+
triggerName: z.ZodString;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
47
|
+
deploymentId: z.ZodString;
|
|
48
|
+
outcome: z.ZodLiteral<"not-tested">;
|
|
49
|
+
reason: z.ZodEnum<{
|
|
50
|
+
"no-trigger-matched": "no-trigger-matched";
|
|
51
|
+
"no-run-created": "no-run-created";
|
|
52
|
+
}>;
|
|
53
|
+
triggers: z.ZodArray<z.ZodObject<{
|
|
54
|
+
message: z.ZodString;
|
|
55
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
56
|
+
"billing-prevented": "billing-prevented";
|
|
57
|
+
"branch-still-syncing": "branch-still-syncing";
|
|
58
|
+
"deployment-no-longer-live": "deployment-no-longer-live";
|
|
59
|
+
"duplicate-run": "duplicate-run";
|
|
60
|
+
"environment-not-linked-to-branch": "environment-not-linked-to-branch";
|
|
61
|
+
"environment-not-ready": "environment-not-ready";
|
|
62
|
+
"environment-terminated": "environment-terminated";
|
|
63
|
+
"internal-error": "internal-error";
|
|
64
|
+
"low-risk-change": "low-risk-change";
|
|
65
|
+
"no-flows-to-run": "no-flows-to-run";
|
|
66
|
+
"no-matching-trigger": "no-matching-trigger";
|
|
67
|
+
"no-pull-request": "no-pull-request";
|
|
68
|
+
"no-relevant-flows": "no-relevant-flows";
|
|
69
|
+
"rate-limited": "rate-limited";
|
|
70
|
+
"run-not-created": "run-not-created";
|
|
71
|
+
skipped: "skipped";
|
|
72
|
+
"test-configuration-error": "test-configuration-error";
|
|
73
|
+
"trigger-not-found": "trigger-not-found";
|
|
74
|
+
"workspace-inactive": "workspace-inactive";
|
|
75
|
+
"workspace-not-ready": "workspace-not-ready";
|
|
76
|
+
}>>;
|
|
77
|
+
triggerName: z.ZodString;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
80
|
+
deploymentId: z.ZodString;
|
|
81
|
+
outcome: z.ZodLiteral<"run-canceled">;
|
|
82
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
83
|
+
blockingBugCount: z.ZodNumber;
|
|
84
|
+
runId: z.ZodString;
|
|
85
|
+
runUrl: z.ZodURL;
|
|
86
|
+
status: z.ZodEnum<{
|
|
87
|
+
failed: "failed";
|
|
88
|
+
queued: "queued";
|
|
89
|
+
running: "running";
|
|
90
|
+
passed: "passed";
|
|
91
|
+
canceled: "canceled";
|
|
92
|
+
}>;
|
|
93
|
+
triggerName: z.ZodString;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
deploymentId: z.ZodString;
|
|
97
|
+
elapsedMs: z.ZodNumber;
|
|
98
|
+
lastStage: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
99
|
+
stage: z.ZodLiteral<"waiting-for-evaluation">;
|
|
100
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
|
+
matchedTriggerCount: z.ZodNumber;
|
|
102
|
+
stage: z.ZodLiteral<"waiting-for-run">;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
105
|
+
blockingBugCount: z.ZodNumber;
|
|
106
|
+
runId: z.ZodString;
|
|
107
|
+
runUrl: z.ZodURL;
|
|
108
|
+
status: z.ZodEnum<{
|
|
109
|
+
failed: "failed";
|
|
110
|
+
queued: "queued";
|
|
111
|
+
running: "running";
|
|
112
|
+
passed: "passed";
|
|
113
|
+
canceled: "canceled";
|
|
114
|
+
}>;
|
|
115
|
+
triggerName: z.ZodString;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
stage: z.ZodLiteral<"waiting-for-verdict">;
|
|
118
|
+
}, z.core.$strip>], "stage">;
|
|
119
|
+
outcome: z.ZodLiteral<"timed-out">;
|
|
120
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
121
|
+
blockingBugCount: z.ZodNumber;
|
|
122
|
+
runId: z.ZodString;
|
|
123
|
+
runUrl: z.ZodURL;
|
|
124
|
+
status: z.ZodEnum<{
|
|
125
|
+
failed: "failed";
|
|
126
|
+
queued: "queued";
|
|
127
|
+
running: "running";
|
|
128
|
+
passed: "passed";
|
|
129
|
+
canceled: "canceled";
|
|
130
|
+
}>;
|
|
131
|
+
triggerName: z.ZodString;
|
|
132
|
+
}, z.core.$strip>>;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
deploymentId: z.ZodString;
|
|
135
|
+
outcome: z.ZodLiteral<"canceled-by-caller">;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
deploymentId: z.ZodString;
|
|
138
|
+
message: z.ZodOptional<z.ZodString>;
|
|
139
|
+
outcome: z.ZodLiteral<"unauthorized">;
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
+
deploymentId: z.ZodString;
|
|
142
|
+
message: z.ZodOptional<z.ZodString>;
|
|
143
|
+
outcome: z.ZodLiteral<"not-found">;
|
|
144
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
145
|
+
deploymentId: z.ZodString;
|
|
146
|
+
httpStatus: z.ZodNumber;
|
|
147
|
+
outcome: z.ZodLiteral<"server-error">;
|
|
148
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
149
|
+
deploymentId: z.ZodString;
|
|
150
|
+
httpStatus: z.ZodNumber;
|
|
151
|
+
message: z.ZodOptional<z.ZodString>;
|
|
152
|
+
outcome: z.ZodLiteral<"unexpected-status">;
|
|
153
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
154
|
+
deploymentId: z.ZodString;
|
|
155
|
+
outcome: z.ZodLiteral<"network-error">;
|
|
156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
+
deploymentId: z.ZodString;
|
|
158
|
+
outcome: z.ZodLiteral<"invalid-response-body">;
|
|
159
|
+
}, z.core.$strip>], "outcome">;
|
|
160
|
+
export type DeploymentVerdict = z.infer<typeof deploymentVerdictSchema>;
|
|
161
|
+
//# sourceMappingURL=verdict.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdict.d.ts","sourceRoot":"","sources":["../../../src/v1/deployment/verdict.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAkDa,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { notTestedReasonSchema, triggerNoteSchema, verdictRunSchema, verdictStageSchema, } from "./verdictParts.js";
|
|
3
|
+
const deploymentId = z
|
|
4
|
+
.string()
|
|
5
|
+
.describe("The deployment this verdict answers about.");
|
|
6
|
+
const runs = z
|
|
7
|
+
.array(verdictRunSchema)
|
|
8
|
+
.describe("Every run QA Wolf started for the deployment.");
|
|
9
|
+
const message = z
|
|
10
|
+
.string()
|
|
11
|
+
.optional()
|
|
12
|
+
.describe("The server's explanation, when it sent one.");
|
|
13
|
+
/**
|
|
14
|
+
* QA Wolf's answer to "did this deployment's tests pass?", as a client waiting
|
|
15
|
+
* on a deployment reports it. Not a contract: it is the shape every client
|
|
16
|
+
* building that wait agrees on, so the SDK's type and the CLI's JSON output
|
|
17
|
+
* cannot drift apart.
|
|
18
|
+
*
|
|
19
|
+
* `passed` and `not-tested` are separate answers on purpose. A deployment
|
|
20
|
+
* nothing matched was not tested, which is not the same fact as tests passing,
|
|
21
|
+
* and the caller decides what that is worth. `run-canceled` means QA Wolf
|
|
22
|
+
* cannot tell you, not that the deployment is fine.
|
|
23
|
+
*/
|
|
24
|
+
export const deploymentVerdictSchema = z
|
|
25
|
+
.discriminatedUnion("outcome", [
|
|
26
|
+
z.object({ deploymentId, outcome: z.literal("passed"), runs }),
|
|
27
|
+
z.object({
|
|
28
|
+
blockingBugCount: z
|
|
29
|
+
.number()
|
|
30
|
+
.int()
|
|
31
|
+
.nonnegative()
|
|
32
|
+
.describe("Blocking bugs across every run. It explains the failure; run status decides it."),
|
|
33
|
+
deploymentId,
|
|
34
|
+
outcome: z.literal("failed"),
|
|
35
|
+
runs,
|
|
36
|
+
}),
|
|
37
|
+
z.object({
|
|
38
|
+
deploymentId,
|
|
39
|
+
outcome: z.literal("not-tested"),
|
|
40
|
+
reason: notTestedReasonSchema,
|
|
41
|
+
triggers: z
|
|
42
|
+
.array(triggerNoteSchema)
|
|
43
|
+
.describe("What each trigger did with the deployment."),
|
|
44
|
+
}),
|
|
45
|
+
z.object({ deploymentId, outcome: z.literal("run-canceled"), runs }),
|
|
46
|
+
z.object({
|
|
47
|
+
deploymentId,
|
|
48
|
+
elapsedMs: z.number().int().nonnegative(),
|
|
49
|
+
lastStage: verdictStageSchema,
|
|
50
|
+
outcome: z.literal("timed-out"),
|
|
51
|
+
runs: runs.describe("The runs the wait knew about when the budget ran out. Empty when it never got that far."),
|
|
52
|
+
}),
|
|
53
|
+
z.object({ deploymentId, outcome: z.literal("canceled-by-caller") }),
|
|
54
|
+
z.object({ deploymentId, message, outcome: z.literal("unauthorized") }),
|
|
55
|
+
z.object({ deploymentId, message, outcome: z.literal("not-found") }),
|
|
56
|
+
z.object({
|
|
57
|
+
deploymentId,
|
|
58
|
+
httpStatus: z.number().int(),
|
|
59
|
+
outcome: z.literal("server-error"),
|
|
60
|
+
}),
|
|
61
|
+
z.object({
|
|
62
|
+
deploymentId,
|
|
63
|
+
httpStatus: z.number().int(),
|
|
64
|
+
message,
|
|
65
|
+
outcome: z.literal("unexpected-status"),
|
|
66
|
+
}),
|
|
67
|
+
z.object({ deploymentId, outcome: z.literal("network-error") }),
|
|
68
|
+
z.object({ deploymentId, outcome: z.literal("invalid-response-body") }),
|
|
69
|
+
])
|
|
70
|
+
.describe("QA Wolf's verdict on a deployment.");
|
|
71
|
+
//# sourceMappingURL=verdict.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdict.js","sourceRoot":"","sources":["../../../src/v1/deployment/verdict.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** One run QA Wolf started while testing the deployment. */
|
|
3
|
+
export declare const verdictRunSchema: z.ZodObject<{
|
|
4
|
+
blockingBugCount: z.ZodNumber;
|
|
5
|
+
runId: z.ZodString;
|
|
6
|
+
runUrl: z.ZodURL;
|
|
7
|
+
status: z.ZodEnum<{
|
|
8
|
+
failed: "failed";
|
|
9
|
+
queued: "queued";
|
|
10
|
+
running: "running";
|
|
11
|
+
passed: "passed";
|
|
12
|
+
canceled: "canceled";
|
|
13
|
+
}>;
|
|
14
|
+
triggerName: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/** What one trigger did with the deployment, when no run came of it. */
|
|
17
|
+
export declare const triggerNoteSchema: z.ZodObject<{
|
|
18
|
+
message: z.ZodString;
|
|
19
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
"billing-prevented": "billing-prevented";
|
|
21
|
+
"branch-still-syncing": "branch-still-syncing";
|
|
22
|
+
"deployment-no-longer-live": "deployment-no-longer-live";
|
|
23
|
+
"duplicate-run": "duplicate-run";
|
|
24
|
+
"environment-not-linked-to-branch": "environment-not-linked-to-branch";
|
|
25
|
+
"environment-not-ready": "environment-not-ready";
|
|
26
|
+
"environment-terminated": "environment-terminated";
|
|
27
|
+
"internal-error": "internal-error";
|
|
28
|
+
"low-risk-change": "low-risk-change";
|
|
29
|
+
"no-flows-to-run": "no-flows-to-run";
|
|
30
|
+
"no-matching-trigger": "no-matching-trigger";
|
|
31
|
+
"no-pull-request": "no-pull-request";
|
|
32
|
+
"no-relevant-flows": "no-relevant-flows";
|
|
33
|
+
"rate-limited": "rate-limited";
|
|
34
|
+
"run-not-created": "run-not-created";
|
|
35
|
+
skipped: "skipped";
|
|
36
|
+
"test-configuration-error": "test-configuration-error";
|
|
37
|
+
"trigger-not-found": "trigger-not-found";
|
|
38
|
+
"workspace-inactive": "workspace-inactive";
|
|
39
|
+
"workspace-not-ready": "workspace-not-ready";
|
|
40
|
+
}>>;
|
|
41
|
+
triggerName: z.ZodString;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export declare const verdictStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
44
|
+
stage: z.ZodLiteral<"waiting-for-evaluation">;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
matchedTriggerCount: z.ZodNumber;
|
|
47
|
+
stage: z.ZodLiteral<"waiting-for-run">;
|
|
48
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
49
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
50
|
+
blockingBugCount: z.ZodNumber;
|
|
51
|
+
runId: z.ZodString;
|
|
52
|
+
runUrl: z.ZodURL;
|
|
53
|
+
status: z.ZodEnum<{
|
|
54
|
+
failed: "failed";
|
|
55
|
+
queued: "queued";
|
|
56
|
+
running: "running";
|
|
57
|
+
passed: "passed";
|
|
58
|
+
canceled: "canceled";
|
|
59
|
+
}>;
|
|
60
|
+
triggerName: z.ZodString;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
stage: z.ZodLiteral<"waiting-for-verdict">;
|
|
63
|
+
}, z.core.$strip>], "stage">;
|
|
64
|
+
export declare const notTestedReasonSchema: z.ZodEnum<{
|
|
65
|
+
"no-trigger-matched": "no-trigger-matched";
|
|
66
|
+
"no-run-created": "no-run-created";
|
|
67
|
+
}>;
|
|
68
|
+
export type NotTestedReason = z.infer<typeof notTestedReasonSchema>;
|
|
69
|
+
export type TriggerNote = z.infer<typeof triggerNoteSchema>;
|
|
70
|
+
export type VerdictRun = z.infer<typeof verdictRunSchema>;
|
|
71
|
+
export type VerdictStage = z.infer<typeof verdictStageSchema>;
|
|
72
|
+
//# sourceMappingURL=verdictParts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdictParts.d.ts","sourceRoot":"","sources":["../../../src/v1/deployment/verdictParts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;iBAoB3B,CAAC;AAEH,wEAAwE;AACxE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;iBAY5B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;4BAkBsB,CAAC;AAEtD,eAAO,MAAM,qBAAqB;;;EAQ/B,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { publicRunStatusValues } from "../run/summary.js";
|
|
3
|
+
import { didNotRunReasonSchema } from "./didNotRunReason.js";
|
|
4
|
+
/** One run QA Wolf started while testing the deployment. */
|
|
5
|
+
export const verdictRunSchema = z.object({
|
|
6
|
+
blockingBugCount: z
|
|
7
|
+
.number()
|
|
8
|
+
.int()
|
|
9
|
+
.nonnegative()
|
|
10
|
+
.describe("How many of the run's bugs are still open and serious enough to block the build."),
|
|
11
|
+
runId: z
|
|
12
|
+
.string()
|
|
13
|
+
.describe("The run's canonical id, which can differ from the id the trigger evaluation named."),
|
|
14
|
+
runUrl: z.url().describe("Absolute URL of the run page."),
|
|
15
|
+
status: z
|
|
16
|
+
.enum(publicRunStatusValues)
|
|
17
|
+
.describe("The run's status when the wait ended. Terminal on every outcome except timed-out, where it is whatever the last poll saw."),
|
|
18
|
+
triggerName: z.string().describe("The trigger that created the run."),
|
|
19
|
+
});
|
|
20
|
+
/** What one trigger did with the deployment, when no run came of it. */
|
|
21
|
+
export const triggerNoteSchema = z.object({
|
|
22
|
+
message: z
|
|
23
|
+
.string()
|
|
24
|
+
.describe("Why this trigger produced no run, in plain language for the build log. Reworded at any time, so branch on reason instead."),
|
|
25
|
+
reason: didNotRunReasonSchema
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("Absent when the trigger simply did not match the deployment, or was never considered."),
|
|
28
|
+
triggerName: z.string(),
|
|
29
|
+
});
|
|
30
|
+
export const verdictStageSchema = z
|
|
31
|
+
.discriminatedUnion("stage", [
|
|
32
|
+
z
|
|
33
|
+
.object({ stage: z.literal("waiting-for-evaluation") })
|
|
34
|
+
.describe("QA Wolf has not yet evaluated the deployment's triggers."),
|
|
35
|
+
z
|
|
36
|
+
.object({
|
|
37
|
+
matchedTriggerCount: z.number().int().nonnegative(),
|
|
38
|
+
stage: z.literal("waiting-for-run"),
|
|
39
|
+
})
|
|
40
|
+
.describe("Triggers matched and at least one is still creating a run."),
|
|
41
|
+
z
|
|
42
|
+
.object({
|
|
43
|
+
runs: z.array(verdictRunSchema),
|
|
44
|
+
stage: z.literal("waiting-for-verdict"),
|
|
45
|
+
})
|
|
46
|
+
.describe("Every run is known and at least one is still executing."),
|
|
47
|
+
])
|
|
48
|
+
.describe("What the wait is currently waiting on.");
|
|
49
|
+
export const notTestedReasonSchema = z
|
|
50
|
+
.enum(["no-trigger-matched", "no-run-created"])
|
|
51
|
+
.describe([
|
|
52
|
+
"Why the deployment was never tested.",
|
|
53
|
+
"no-trigger-matched: every trigger was evaluated and none wanted this deployment.",
|
|
54
|
+
"no-run-created: a trigger matched and something stopped it from creating a run. The stable code is on triggers[].reason.",
|
|
55
|
+
].join("\n"));
|
|
56
|
+
//# sourceMappingURL=verdictParts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdictParts.js","sourceRoot":"","sources":["../../../src/v1/deployment/ver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B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACnD,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;KACpC,CAAC;SACD,QAAQ,CAAC,4DAA4D,CAAC;IACzE,CAAC;SACE,MAAM,CAAC;QACN,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;QAC/B,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC;KACxC,CAAC;SACD,QAAQ,CAAC,yDAAyD,CAAC;CACvE,CAAC;KACD,QAAQ,CAAC,wCAAwC,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,IAAI,CAAC,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;KAC9C,QAAQ,CACP;IACE,sCAAsC;IACtC,kFAAkF;IAClF,0HAA0H;CAC3H,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC"}
|
|
@@ -32,10 +32,10 @@ export declare const makeCreateEnvironmentContract: <EnvironmentId extends Publi
|
|
|
32
32
|
name: z.ZodString;
|
|
33
33
|
runConcurrencyLimit: z.ZodString;
|
|
34
34
|
status: z.ZodEnum<{
|
|
35
|
+
running: "running";
|
|
35
36
|
blocked: "blocked";
|
|
36
37
|
"needs-investigation": "needs-investigation";
|
|
37
38
|
ready: "ready";
|
|
38
|
-
running: "running";
|
|
39
39
|
}>;
|
|
40
40
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
41
41
|
variablesUrl: z.ZodOptional<z.ZodURL>;
|
|
@@ -43,10 +43,10 @@ export declare const makeFindEnvironmentsContract: <EnvironmentId extends Public
|
|
|
43
43
|
name: z.ZodString;
|
|
44
44
|
runConcurrencyLimit: z.ZodString;
|
|
45
45
|
status: z.ZodEnum<{
|
|
46
|
+
running: "running";
|
|
46
47
|
blocked: "blocked";
|
|
47
48
|
"needs-investigation": "needs-investigation";
|
|
48
49
|
ready: "ready";
|
|
49
|
-
running: "running";
|
|
50
50
|
}>;
|
|
51
51
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
52
52
|
variablesUrl: z.ZodOptional<z.ZodURL>;
|
|
@@ -32,10 +32,10 @@ export declare const makeGetEnvironmentContract: <EnvironmentId extends PublicId
|
|
|
32
32
|
name: z.ZodString;
|
|
33
33
|
runConcurrencyLimit: z.ZodString;
|
|
34
34
|
status: z.ZodEnum<{
|
|
35
|
+
running: "running";
|
|
35
36
|
blocked: "blocked";
|
|
36
37
|
"needs-investigation": "needs-investigation";
|
|
37
38
|
ready: "ready";
|
|
38
|
-
running: "running";
|
|
39
39
|
}>;
|
|
40
40
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
41
41
|
variablesUrl: z.ZodOptional<z.ZodURL>;
|
|
@@ -21,10 +21,10 @@ export declare const makeEnvironmentResourceSchema: <EnvironmentId extends Publi
|
|
|
21
21
|
name: z.ZodString;
|
|
22
22
|
runConcurrencyLimit: z.ZodString;
|
|
23
23
|
status: z.ZodEnum<{
|
|
24
|
+
running: "running";
|
|
24
25
|
blocked: "blocked";
|
|
25
26
|
"needs-investigation": "needs-investigation";
|
|
26
27
|
ready: "ready";
|
|
27
|
-
running: "running";
|
|
28
28
|
}>;
|
|
29
29
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
30
30
|
variablesUrl: z.ZodOptional<z.ZodURL>;
|
|
@@ -34,10 +34,10 @@ export declare const makeUpdateEnvironmentContract: <EnvironmentId extends Publi
|
|
|
34
34
|
name: z.ZodString;
|
|
35
35
|
runConcurrencyLimit: z.ZodString;
|
|
36
36
|
status: z.ZodEnum<{
|
|
37
|
+
running: "running";
|
|
37
38
|
blocked: "blocked";
|
|
38
39
|
"needs-investigation": "needs-investigation";
|
|
39
40
|
ready: "ready";
|
|
40
|
-
running: "running";
|
|
41
41
|
}>;
|
|
42
42
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
43
43
|
variablesUrl: z.ZodOptional<z.ZodURL>;
|