@qawolf/api-contracts 0.130.0 → 0.133.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/activity/wait.d.ts +2 -2
- package/dist/v1/agent/get.d.ts +1 -1
- package/dist/v1/agent/send.d.ts +1 -1
- package/dist/v1/agent/status.d.ts +1 -1
- package/dist/v1/attempt/get.d.ts +14 -14
- package/dist/v1/deployment/verdict.d.ts +7 -7
- package/dist/v1/deployment/verdictParts.d.ts +2 -2
- package/dist/v1/environment/find.d.ts +2 -0
- package/dist/v1/environment/find.d.ts.map +1 -1
- package/dist/v1/environment/find.js +14 -1
- package/dist/v1/environment/find.js.map +1 -1
- package/dist/v1/environment/promote.d.ts +45 -0
- package/dist/v1/environment/promote.d.ts.map +1 -1
- package/dist/v1/flow/getHistory.d.ts +1 -1
- package/dist/v1/ids.d.ts +2 -0
- package/dist/v1/ids.d.ts.map +1 -1
- package/dist/v1/ids.js +4 -0
- package/dist/v1/ids.js.map +1 -1
- package/dist/v1/index.d.ts +1236 -247
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +3 -0
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/investigation/get.d.ts +1 -1
- package/dist/v1/investigation/index.d.ts +1 -1
- package/dist/v1/issue/comment.d.ts +3 -0
- package/dist/v1/issue/comment.d.ts.map +1 -1
- package/dist/v1/issue/commentResource.d.ts +3 -0
- package/dist/v1/issue/commentResource.d.ts.map +1 -1
- package/dist/v1/issue/commentResource.js +8 -1
- package/dist/v1/issue/commentResource.js.map +1 -1
- package/dist/v1/issue/contracts.d.ts +6 -74
- package/dist/v1/issue/contracts.d.ts.map +1 -1
- package/dist/v1/issue/contracts.js +0 -2
- package/dist/v1/issue/contracts.js.map +1 -1
- package/dist/v1/issue/listComments.d.ts +3 -0
- package/dist/v1/issue/listComments.d.ts.map +1 -1
- package/dist/v1/narratedRecording/get.d.ts +1 -1
- package/dist/v1/promotion/decision.d.ts +51 -0
- package/dist/v1/promotion/decision.d.ts.map +1 -0
- package/dist/v1/promotion/decision.js +32 -0
- package/dist/v1/promotion/decision.js.map +1 -0
- package/dist/v1/promotion/find.d.ts +45 -0
- package/dist/v1/promotion/find.d.ts.map +1 -1
- package/dist/v1/promotion/get.d.ts +45 -0
- package/dist/v1/promotion/get.d.ts.map +1 -1
- package/dist/v1/promotion/index.d.ts +271 -1
- package/dist/v1/promotion/index.d.ts.map +1 -1
- package/dist/v1/promotion/index.js +3 -0
- package/dist/v1/promotion/index.js.map +1 -1
- package/dist/v1/promotion/needsPerson.d.ts +25 -0
- package/dist/v1/promotion/needsPerson.d.ts.map +1 -0
- package/dist/v1/promotion/needsPerson.js +20 -0
- package/dist/v1/promotion/needsPerson.js.map +1 -0
- package/dist/v1/promotion/reportDecision.d.ts +142 -0
- package/dist/v1/promotion/reportDecision.d.ts.map +1 -0
- package/dist/v1/promotion/reportDecision.js +72 -0
- package/dist/v1/promotion/reportDecision.js.map +1 -0
- package/dist/v1/promotion/resolve.d.ts +46 -1
- package/dist/v1/promotion/resolve.d.ts.map +1 -1
- package/dist/v1/promotion/resolve.js +1 -1
- package/dist/v1/promotion/resolve.js.map +1 -1
- package/dist/v1/promotion/resource.d.ts +45 -0
- package/dist/v1/promotion/resource.d.ts.map +1 -1
- package/dist/v1/promotion/resource.js +9 -0
- package/dist/v1/promotion/resource.js.map +1 -1
- package/dist/v1/promotion/validationRun.d.ts +2 -0
- package/dist/v1/promotion/validationRun.d.ts.map +1 -1
- package/dist/v1/promotion/validationRun.js +2 -2
- package/dist/v1/promotion/validationRun.js.map +1 -1
- package/dist/v1/run/alertNotifications.d.ts +28 -0
- package/dist/v1/run/alertNotifications.d.ts.map +1 -0
- package/dist/v1/run/alertNotifications.js +33 -0
- package/dist/v1/run/alertNotifications.js.map +1 -0
- package/dist/v1/run/find.d.ts +1 -1
- package/dist/v1/run/get.d.ts +16 -3
- package/dist/v1/run/get.d.ts.map +1 -1
- package/dist/v1/run/get.js +3 -1
- package/dist/v1/run/get.js.map +1 -1
- package/dist/v1/run/index.d.ts +1 -0
- package/dist/v1/run/index.d.ts.map +1 -1
- package/dist/v1/run/index.js +1 -1
- package/dist/v1/run/index.js.map +1 -1
- package/dist/v1/run/summary.d.ts +1 -1
- package/dist/v1/runEventsWebhook/index.d.ts +10 -10
- package/dist/v1/runner/journal.d.ts +1 -1
- package/dist/v1/runner/journal.d.ts.map +1 -1
- package/dist/v1/runner/journal.js +1 -0
- package/dist/v1/runner/journal.js.map +1 -1
- package/dist/v1/suggestion/decide.d.ts +90 -0
- package/dist/v1/suggestion/decide.d.ts.map +1 -0
- package/dist/v1/suggestion/decide.js +35 -0
- package/dist/v1/suggestion/decide.js.map +1 -0
- package/dist/v1/suggestion/find.d.ts +87 -0
- package/dist/v1/suggestion/find.d.ts.map +1 -0
- package/dist/v1/suggestion/find.js +40 -0
- package/dist/v1/suggestion/find.js.map +1 -0
- package/dist/v1/suggestion/get.d.ts +78 -0
- package/dist/v1/suggestion/get.d.ts.map +1 -0
- package/dist/v1/suggestion/get.js +27 -0
- package/dist/v1/suggestion/get.js.map +1 -0
- package/dist/v1/suggestion/index.d.ts +240 -0
- package/dist/v1/suggestion/index.d.ts.map +1 -0
- package/dist/v1/suggestion/index.js +9 -0
- package/dist/v1/suggestion/index.js.map +1 -0
- package/dist/v1/suggestion/resource.d.ts +70 -0
- package/dist/v1/suggestion/resource.d.ts.map +1 -0
- package/dist/v1/suggestion/resource.js +63 -0
- package/dist/v1/suggestion/resource.js.map +1 -0
- package/package.json +1 -1
- package/dist/v1/issue/decideSuggestion.d.ts +0 -82
- package/dist/v1/issue/decideSuggestion.d.ts.map +0 -1
- package/dist/v1/issue/decideSuggestion.js +0 -40
- package/dist/v1/issue/decideSuggestion.js.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { makeDecideSuggestionContract } from "./decide.js";
|
|
2
|
+
import { makeFindSuggestionsContract } from "./find.js";
|
|
3
|
+
import { makeGetSuggestionContract } from "./get.js";
|
|
4
|
+
export const makeSuggestionContracts = (ids) => ({
|
|
5
|
+
decide: makeDecideSuggestionContract(ids),
|
|
6
|
+
find: makeFindSuggestionsContract(ids),
|
|
7
|
+
get: makeGetSuggestionContract(ids),
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1/suggestion/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAErD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAKrC,GAMD,EAAE,EAAE,CAAC,CAAC;IACL,MAAM,EAAE,4BAA4B,CAAC,GAAG,CAAC;IACzC,IAAI,EAAE,2BAA2B,CAAC,GAAG,CAAC;IACtC,GAAG,EAAE,yBAAyB,CAAC,GAAG,CAAC;CACpC,CAAC,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const suggestionDecisionSchema: z.ZodEnum<{
|
|
4
|
+
add: "add";
|
|
5
|
+
report: "report";
|
|
6
|
+
skip: "skip";
|
|
7
|
+
undo: "undo";
|
|
8
|
+
activate: "activate";
|
|
9
|
+
}>;
|
|
10
|
+
export declare const suggestionSkipReasonSchema: z.ZodEnum<{
|
|
11
|
+
"not-worth-testing": "not-worth-testing";
|
|
12
|
+
"already-covered": "already-covered";
|
|
13
|
+
"feature-removed": "feature-removed";
|
|
14
|
+
}>;
|
|
15
|
+
export declare const makeSuggestionResourceSchema: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, IssueId extends PublicIdSchema>(ids: {
|
|
16
|
+
environment: EnvironmentId;
|
|
17
|
+
flow: FlowId;
|
|
18
|
+
issue: IssueId;
|
|
19
|
+
suggestion: PublicIdSchema;
|
|
20
|
+
}) => z.ZodObject<{
|
|
21
|
+
decidedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
22
|
+
decisions: z.ZodArray<z.ZodEnum<{
|
|
23
|
+
add: "add";
|
|
24
|
+
report: "report";
|
|
25
|
+
skip: "skip";
|
|
26
|
+
undo: "undo";
|
|
27
|
+
activate: "activate";
|
|
28
|
+
}>>;
|
|
29
|
+
environmentId: EnvironmentId;
|
|
30
|
+
environmentName: z.ZodString;
|
|
31
|
+
flow: z.ZodObject<{
|
|
32
|
+
flowId: z.ZodOptional<FlowId>;
|
|
33
|
+
path: z.ZodString;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
holdReason: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
"path-taken": "path-taken";
|
|
37
|
+
"not-proven-on-merged-commit": "not-proven-on-merged-commit";
|
|
38
|
+
"merge-conflicted": "merge-conflicted";
|
|
39
|
+
"undo-cleanup-failed": "undo-cleanup-failed";
|
|
40
|
+
}>>;
|
|
41
|
+
issue: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
issueId: IssueId;
|
|
43
|
+
type: z.ZodEnum<{
|
|
44
|
+
bug: "bug";
|
|
45
|
+
coverageRequest: "coverageRequest";
|
|
46
|
+
}>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
kind: z.ZodEnum<{
|
|
49
|
+
"new-flow": "new-flow";
|
|
50
|
+
"potential-bug": "potential-bug";
|
|
51
|
+
}>;
|
|
52
|
+
location: z.ZodString;
|
|
53
|
+
reason: z.ZodString;
|
|
54
|
+
skipReason: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
"not-worth-testing": "not-worth-testing";
|
|
56
|
+
"already-covered": "already-covered";
|
|
57
|
+
"feature-removed": "feature-removed";
|
|
58
|
+
}>>;
|
|
59
|
+
state: z.ZodEnum<{
|
|
60
|
+
skipped: "skipped";
|
|
61
|
+
accepted: "accepted";
|
|
62
|
+
waiting: "waiting";
|
|
63
|
+
expired: "expired";
|
|
64
|
+
}>;
|
|
65
|
+
suggestedAt: z.ZodISODateTime;
|
|
66
|
+
suggestionId: PublicIdSchema;
|
|
67
|
+
title: z.ZodString;
|
|
68
|
+
url: z.ZodURL;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
//# sourceMappingURL=resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/v1/suggestion/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAShD,eAAO,MAAM,wBAAwB;;;;;;EAIlC,CAAC;AAEJ,eAAO,MAAM,0BAA0B;;;;EAEO,CAAC;AAE/C,eAAO,MAAM,4BAA4B,GACvC,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,OAAO,SAAS,cAAc,EAC9B,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,cAAc,CAAC;CAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyEE,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { resource } from "../resource.js";
|
|
3
|
+
const suggestionStateSchema = z
|
|
4
|
+
.enum(["waiting", "accepted", "skipped", "expired"])
|
|
5
|
+
.describe("waiting (QA Wolf proposed it and nobody has decided yet), accepted (someone added the flow or reported the bug; it stays accepted while the flow joins, is held, or is being undone), skipped (someone declined it), expired (nobody decided it in time).");
|
|
6
|
+
export const suggestionDecisionSchema = z
|
|
7
|
+
.enum(["add", "report", "skip", "undo", "activate"])
|
|
8
|
+
.describe("add: turn on the suggested flow. report: file the potential bug. skip: decline the suggestion. undo: take back an add, report or skip. activate: retry a held suggestion.");
|
|
9
|
+
export const suggestionSkipReasonSchema = z
|
|
10
|
+
.enum(["not-worth-testing", "already-covered", "feature-removed"])
|
|
11
|
+
.describe("Why the suggestion was skipped.");
|
|
12
|
+
export const makeSuggestionResourceSchema = (ids) => resource({
|
|
13
|
+
decidedAt: z.iso
|
|
14
|
+
.datetime()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe("When someone last decided the suggestion. Absent while it is waiting."),
|
|
17
|
+
decisions: z
|
|
18
|
+
.array(suggestionDecisionSchema)
|
|
19
|
+
.describe("The decisions suggestion.decide takes for this suggestion now. Empty when it takes none."),
|
|
20
|
+
environmentId: ids.environment.describe("The environment QA Wolf explored when it made the suggestion."),
|
|
21
|
+
environmentName: z.string(),
|
|
22
|
+
flow: z
|
|
23
|
+
.object({
|
|
24
|
+
flowId: ids.flow
|
|
25
|
+
.optional()
|
|
26
|
+
.describe("The flow, once it joined the environment."),
|
|
27
|
+
path: z
|
|
28
|
+
.string()
|
|
29
|
+
.describe("Where the proposed flow lives in the environment's flow code."),
|
|
30
|
+
})
|
|
31
|
+
.describe("The flow QA Wolf proposes. For a potential bug, the flow that stopped at the bug."),
|
|
32
|
+
holdReason: z
|
|
33
|
+
.enum([
|
|
34
|
+
"path-taken",
|
|
35
|
+
"not-proven-on-merged-commit",
|
|
36
|
+
"merge-conflicted",
|
|
37
|
+
"undo-cleanup-failed",
|
|
38
|
+
])
|
|
39
|
+
.optional()
|
|
40
|
+
.describe("Why QA Wolf held an accepted suggestion. activate retries it once the cause is gone."),
|
|
41
|
+
issue: z
|
|
42
|
+
.object({
|
|
43
|
+
issueId: ids.issue,
|
|
44
|
+
type: z.enum(["bug", "coverageRequest"]),
|
|
45
|
+
})
|
|
46
|
+
.optional()
|
|
47
|
+
.describe("The bug report or coverage request behind the suggestion, which the issue tools read. Absent when there is none."),
|
|
48
|
+
kind: z
|
|
49
|
+
.enum(["new-flow", "potential-bug"])
|
|
50
|
+
.describe("new-flow: QA Wolf wrote a flow for coverage that is missing. potential-bug: the flow it wrote stopped at what looks like a bug."),
|
|
51
|
+
location: z.string().describe("Where in the app the suggestion applies."),
|
|
52
|
+
reason: z.string().describe("Why QA Wolf suggests it."),
|
|
53
|
+
skipReason: suggestionSkipReasonSchema
|
|
54
|
+
.optional()
|
|
55
|
+
.describe("Why the suggestion was skipped. Present when skipped."),
|
|
56
|
+
state: suggestionStateSchema,
|
|
57
|
+
suggestedAt: z.iso.datetime().describe("When QA Wolf suggested it."),
|
|
58
|
+
suggestionId: ids.suggestion.describe("The suggestion's id, which suggestion.get and suggestion.decide take."),
|
|
59
|
+
title: z.string(),
|
|
60
|
+
}, {
|
|
61
|
+
urlFieldDescription: "Absolute URL of the suggestion on the workspace's Suggested page.",
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.js","sourceRoot":"","sources":["../../../src/v1/suggestion/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,qBAAqB,GAAG,CAAC;KAC5B,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;KACnD,QAAQ,CACP,2PAA2P,CAC5P,CAAC;AAEJ,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;KACnD,QAAQ,CACP,2KAA2K,CAC5K,CAAC;AAEJ,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACxC,IAAI,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,C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IACzE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IACvD,UAAU,EAAE,0BAA0B;SACnC,QAAQ,EAAE;SACV,QAAQ,CAAC,uDAAuD,CAAC;IACpE,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IACpE,YAAY,EAAE,GAAG,CAAC,UAAU,CAAC,QAAQ,CACnC,uEAAuE,CACxE;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,EACD;IACE,mBAAmB,EACjB,mEAAmE;CACtE,CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
-
export declare const makeDecideSuggestionContract: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema, IssueId extends PublicIdSchema>(ids: {
|
|
4
|
-
environment: EnvironmentId;
|
|
5
|
-
flow: FlowId;
|
|
6
|
-
issue: IssueId;
|
|
7
|
-
run: RunId;
|
|
8
|
-
}) => {
|
|
9
|
-
readonly annotationJustifications: {
|
|
10
|
-
readonly destructiveHint: "Every decision can be undone until the flow joins, and nothing is deleted.";
|
|
11
|
-
readonly openWorldHint: "An added suggestion writes its flow to the environment's flow code repository.";
|
|
12
|
-
readonly readOnlyHint: "Records a decision on a suggestion and changes the issue's status.";
|
|
13
|
-
};
|
|
14
|
-
readonly annotations: {
|
|
15
|
-
readonly destructiveHint: false;
|
|
16
|
-
readonly openWorldHint: true;
|
|
17
|
-
readonly readOnlyHint: false;
|
|
18
|
-
};
|
|
19
|
-
readonly description: string;
|
|
20
|
-
readonly input: z.ZodObject<{
|
|
21
|
-
decision: z.ZodEnum<{
|
|
22
|
-
add: "add";
|
|
23
|
-
report: "report";
|
|
24
|
-
skip: "skip";
|
|
25
|
-
undo: "undo";
|
|
26
|
-
activate: "activate";
|
|
27
|
-
}>;
|
|
28
|
-
issueId: IssueId;
|
|
29
|
-
skipReason: z.ZodOptional<z.ZodEnum<{
|
|
30
|
-
"not-worth-testing": "not-worth-testing";
|
|
31
|
-
"already-covered": "already-covered";
|
|
32
|
-
"feature-removed": "feature-removed";
|
|
33
|
-
}>>;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
readonly kind: "write";
|
|
36
|
-
readonly name: "issue.decideSuggestion";
|
|
37
|
-
readonly output: z.ZodObject<{
|
|
38
|
-
issue: z.ZodObject<{
|
|
39
|
-
coveredFlowIds: z.ZodArray<FlowId>;
|
|
40
|
-
createdAt: z.ZodCoercedDate<unknown>;
|
|
41
|
-
description: z.ZodString;
|
|
42
|
-
files: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
43
|
-
fileId: z.ZodString;
|
|
44
|
-
name: z.ZodString;
|
|
45
|
-
sizeBytes: z.ZodNumber;
|
|
46
|
-
}, z.core.$strip>>>;
|
|
47
|
-
issueId: IssueId;
|
|
48
|
-
name: z.ZodString;
|
|
49
|
-
number: z.ZodNumber;
|
|
50
|
-
priority: z.ZodEnum<{
|
|
51
|
-
unprioritized: "unprioritized";
|
|
52
|
-
low: "low";
|
|
53
|
-
medium: "medium";
|
|
54
|
-
high: "high";
|
|
55
|
-
urgent: "urgent";
|
|
56
|
-
}>;
|
|
57
|
-
reproductions: z.ZodArray<z.ZodObject<{
|
|
58
|
-
environmentId: EnvironmentId;
|
|
59
|
-
firstReproducedInRunId: RunId;
|
|
60
|
-
flowId: FlowId;
|
|
61
|
-
isActive: z.ZodBoolean;
|
|
62
|
-
lastReproducedInRunId: RunId;
|
|
63
|
-
}, z.core.$strip>>;
|
|
64
|
-
status: z.ZodEnum<{
|
|
65
|
-
pending: "pending";
|
|
66
|
-
canceled: "canceled";
|
|
67
|
-
backlog: "backlog";
|
|
68
|
-
inProgress: "inProgress";
|
|
69
|
-
paused: "paused";
|
|
70
|
-
resolved: "resolved";
|
|
71
|
-
archived: "archived";
|
|
72
|
-
}>;
|
|
73
|
-
type: z.ZodEnum<{
|
|
74
|
-
bug: "bug";
|
|
75
|
-
maintenance: "maintenance";
|
|
76
|
-
coverageRequest: "coverageRequest";
|
|
77
|
-
}>;
|
|
78
|
-
url: z.ZodURL;
|
|
79
|
-
}, z.core.$strip>;
|
|
80
|
-
}, z.core.$strip>;
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=decideSuggestion.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decideSuggestion.d.ts","sourceRoot":"","sources":["../../../src/v1/issue/decideSuggestion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,4BAA4B,GACvC,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAC5B,OAAO,SAAS,cAAc,EAC9B,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,KAAK,CAAC;CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDA,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { makeIssueResourceSchema } from "./index.js";
|
|
3
|
-
export const makeDecideSuggestionContract = (ids) => {
|
|
4
|
-
const input = z
|
|
5
|
-
.object({
|
|
6
|
-
decision: z
|
|
7
|
-
.enum(["add", "report", "skip", "undo", "activate"])
|
|
8
|
-
.describe("add: turn on the suggested flow. report: file the potential bug. skip: decline the suggestion. undo: take back an add, report or skip before the flow joins. activate: retry a suggestion that QA Wolf held."),
|
|
9
|
-
issueId: ids.issue.describe("The coverage request or bug report that QA Wolf opened for a suggestion."),
|
|
10
|
-
skipReason: z
|
|
11
|
-
.enum(["not-worth-testing", "already-covered", "feature-removed"])
|
|
12
|
-
.optional()
|
|
13
|
-
.describe("Why the suggestion is skipped. Required for skip."),
|
|
14
|
-
})
|
|
15
|
-
.refine(({ decision, skipReason }) => decision !== "skip" || skipReason !== undefined, { message: "skipReason is required when the decision is skip." });
|
|
16
|
-
const output = z.object({
|
|
17
|
-
issue: makeIssueResourceSchema(ids),
|
|
18
|
-
});
|
|
19
|
-
return {
|
|
20
|
-
annotationJustifications: {
|
|
21
|
-
destructiveHint: "Every decision can be undone until the flow joins, and nothing is deleted.",
|
|
22
|
-
openWorldHint: "An added suggestion writes its flow to the environment's flow code repository.",
|
|
23
|
-
readOnlyHint: "Records a decision on a suggestion and changes the issue's status.",
|
|
24
|
-
},
|
|
25
|
-
annotations: {
|
|
26
|
-
destructiveHint: false,
|
|
27
|
-
openWorldHint: true,
|
|
28
|
-
readOnlyHint: false,
|
|
29
|
-
},
|
|
30
|
-
description: "Decide a coverage request or bug report that QA Wolf suggested after exploring an environment. " +
|
|
31
|
-
"Add turns on the suggested flow in the environment. Report files a potential bug. " +
|
|
32
|
-
"Skip declines the suggestion. Undo takes back a decision before the flow joins. " +
|
|
33
|
-
"The issue's status follows the decision, so change the status only through this tool while the suggestion is undecided.",
|
|
34
|
-
input,
|
|
35
|
-
kind: "write",
|
|
36
|
-
name: "issue.decideSuggestion",
|
|
37
|
-
output,
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=decideSuggestion.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decideSuggestion.js","sourceRoot":"","sources":["../../../src/v1/issue/decideSuggestion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,uBAAuB,EAAE,MAAM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