@qawolf/api-contracts 0.142.0 → 0.144.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/find.d.ts +10 -1
- package/dist/v1/deployment/find.d.ts.map +1 -1
- package/dist/v1/deployment/find.js.map +1 -1
- package/dist/v1/deployment/index.d.ts +8 -0
- package/dist/v1/deployment/index.d.ts.map +1 -1
- package/dist/v1/deployment/resource.d.ts +10 -1
- package/dist/v1/deployment/resource.d.ts.map +1 -1
- package/dist/v1/deployment/resource.js +19 -0
- package/dist/v1/deployment/resource.js.map +1 -1
- package/dist/v1/index.d.ts +462 -8
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/runner/catalog.d.ts +4 -4
- package/dist/v1/runner/evaluateSnippet.d.ts +1 -1
- package/dist/v1/runner/evaluateSnippet.d.ts.map +1 -1
- package/dist/v1/runner/highlightSelector.d.ts +1 -1
- package/dist/v1/runner/highlightSelector.d.ts.map +1 -1
- package/dist/v1/runner/performActions.d.ts +1 -1
- package/dist/v1/runner/performActions.d.ts.map +1 -1
- package/dist/v1/runner/runFlow.d.ts +1 -1
- package/dist/v1/runner/runFlow.d.ts.map +1 -1
- package/dist/v1/trigger/index.d.ts +225 -1
- package/dist/v1/trigger/index.d.ts.map +1 -1
- package/dist/v1/trigger/index.js +6 -0
- package/dist/v1/trigger/index.js.map +1 -1
- package/dist/v1/trigger/listFirings.d.ts +45 -0
- package/dist/v1/trigger/listFirings.d.ts.map +1 -0
- package/dist/v1/trigger/listFirings.js +65 -0
- package/dist/v1/trigger/listFirings.js.map +1 -0
- package/dist/v1/trigger/runNow.d.ts +191 -0
- package/dist/v1/trigger/runNow.d.ts.map +1 -0
- package/dist/v1/trigger/runNow.js +38 -0
- package/dist/v1/trigger/runNow.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { makePaginationInputFields, nextCursorSchema } from "../pagination.js";
|
|
3
|
+
const makeFiringSchema = (ids) => z.object({
|
|
4
|
+
deploymentId: ids.deployment
|
|
5
|
+
.optional()
|
|
6
|
+
.describe("The deployment it fired on, for a deployment or by hand."),
|
|
7
|
+
environmentId: ids.environment
|
|
8
|
+
.optional()
|
|
9
|
+
.describe("The environment it fired in. Absent for a pull request or QA Wolf event firing."),
|
|
10
|
+
firedAt: z.iso.datetime(),
|
|
11
|
+
id: z.string().describe("The firing's id."),
|
|
12
|
+
occasion: z
|
|
13
|
+
.string()
|
|
14
|
+
.describe("What fired it: deployment, schedule, or manual for trigger.runNow and the app's Run now. Later versions add kinds."),
|
|
15
|
+
outcome: z
|
|
16
|
+
.string()
|
|
17
|
+
.describe("fired: the trigger started its action. skipped: it chose not to, and reason says why. failed: it could not start it."),
|
|
18
|
+
reason: z
|
|
19
|
+
.string()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Why a skipped or failed firing started nothing, as a stable code such as trigger-paused, session-limit-reached or no-enabled-workflows. Later versions add codes."),
|
|
22
|
+
runId: ids.run.optional().describe("The run the firing started."),
|
|
23
|
+
sessionId: ids.chatSession
|
|
24
|
+
.optional()
|
|
25
|
+
.describe("The QA Wolf session a startAgent firing started."),
|
|
26
|
+
sessionStatus: z
|
|
27
|
+
.string()
|
|
28
|
+
.optional()
|
|
29
|
+
.describe("How that session stands now, as agent.send reports it: working, waiting-for-you, completed, failed or cancelled."),
|
|
30
|
+
startedBy: z
|
|
31
|
+
.string()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("Who fired it by hand. Absent for any other firing."),
|
|
34
|
+
});
|
|
35
|
+
export const makeListTriggerFiringsContract = (ids) => {
|
|
36
|
+
const input = z.object({
|
|
37
|
+
triggerId: ids.trigger,
|
|
38
|
+
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 }),
|
|
39
|
+
});
|
|
40
|
+
const output = z.object({
|
|
41
|
+
firings: z
|
|
42
|
+
.array(makeFiringSchema(ids))
|
|
43
|
+
.describe("The trigger's firings, newest first."),
|
|
44
|
+
nextCursor: nextCursorSchema,
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
annotationJustifications: {
|
|
48
|
+
destructiveHint: "Does not modify the trigger, its runs or its sessions.",
|
|
49
|
+
openWorldHint: "Reads private QA Wolf trigger history without changing external systems.",
|
|
50
|
+
readOnlyHint: "Lists when one authorized trigger fired and what each firing started.",
|
|
51
|
+
},
|
|
52
|
+
annotations: {
|
|
53
|
+
destructiveHint: false,
|
|
54
|
+
openWorldHint: false,
|
|
55
|
+
readOnlyHint: true,
|
|
56
|
+
},
|
|
57
|
+
description: "List when a trigger fired and what each firing started: a run, a QA Wolf " +
|
|
58
|
+
"session, or nothing and why.",
|
|
59
|
+
input,
|
|
60
|
+
kind: "read",
|
|
61
|
+
name: "trigger.listFirings",
|
|
62
|
+
output,
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=listFirings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listFirings.js","sourceRoot":"","sources":["../../../src/v1/trigger/listFirings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE/E,MAAM,gBAAgB,GAAG,CAKvB,GAKD,EAAE,EAAE,CACH,CAAC,CAAC,MAAM,CAAC;IACP,YAAY,EAAE,GAAG,CAAC,UAAU;SACzB,QAAQ,EAAE;SACV,QAAQ,CAAC,0DAA0D,CAAC;IACvE,aAAa,EAAE,GAAG,CAAC,WAAW;SAC3B,QAAQ,EAAE;SACV,QAAQ,CACP,iFAAiF,CAClF;IACH,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IACzB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IAC3C,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,CACP,oHAAoH,CACrH;IACH,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,CACP,sHAAsH,CACvH;IACH,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,mKAAmK,CACpK;IACH,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACjE,SAAS,EAAE,GAAG,CAAC,WAAW;SACvB,QAAQ,EAAE;SACV,QAAQ,CAAC,kDAAkD,CAAC;IAC/D,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,kHAAkH,CACnH;IACH,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,oDAAoD,CAAC;CAClE,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAM5C,GAMD,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE,GAAG,CAAC,OAAO;QACtB,GAAG,yBAAyB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;KAClE,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;aAC5B,QAAQ,CAAC,sCAAsC,CAAC;QACnD,UAAU,EAAE,gBAAgB;KAC7B,CAAC,CAAC;IAEH,OAAO;QACL,wBAAwB,EAAE;YACxB,eAAe,EAAE,wDAAwD;YACzE,aAAa,EACX,0EAA0E;YAC5E,YAAY,EACV,uEAAuE;SAC1E;QACD,WAAW,EAAE;YACX,eAAe,EAAE,KAAK;YACtB,aAAa,EAAE,KAAK;YACpB,YAAY,EAAE,IAAI;SACnB;QACD,WAAW,EACT,2EAA2E;YAC3E,8BAA8B;QAChC,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,qBAAqB;QAC3B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const makeRunTriggerNowContract: <DeploymentId extends PublicIdSchema, EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, TriggerId extends PublicIdSchema>(ids: {
|
|
4
|
+
deployment: DeploymentId;
|
|
5
|
+
environment: EnvironmentId;
|
|
6
|
+
flow: FlowId;
|
|
7
|
+
trigger: TriggerId;
|
|
8
|
+
}) => {
|
|
9
|
+
readonly annotationJustifications: {
|
|
10
|
+
readonly destructiveHint: "Starts the trigger's action, which can run tests that change or delete application data.";
|
|
11
|
+
readonly openWorldHint: "The firing can start test runs or a QA Wolf session against external applications.";
|
|
12
|
+
readonly readOnlyHint: "Fires the trigger once, starting its runs or its QA Wolf session.";
|
|
13
|
+
};
|
|
14
|
+
readonly annotations: {
|
|
15
|
+
readonly destructiveHint: true;
|
|
16
|
+
readonly openWorldHint: true;
|
|
17
|
+
readonly readOnlyHint: false;
|
|
18
|
+
};
|
|
19
|
+
readonly description: string;
|
|
20
|
+
readonly input: z.ZodObject<{
|
|
21
|
+
deploymentId: z.ZodOptional<DeploymentId>;
|
|
22
|
+
requestId: z.ZodString;
|
|
23
|
+
triggerId: TriggerId;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
readonly kind: "write";
|
|
26
|
+
readonly name: "trigger.runNow";
|
|
27
|
+
readonly output: z.ZodObject<{
|
|
28
|
+
trigger: z.ZodObject<{
|
|
29
|
+
url: z.ZodURL;
|
|
30
|
+
configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
31
|
+
dayOfMonth: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
every: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
34
|
+
action: z.ZodObject<{
|
|
35
|
+
flowIds: z.ZodDefault<z.ZodArray<FlowId>>;
|
|
36
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
37
|
+
investigateFailures: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
39
|
+
createSuite: "createSuite";
|
|
40
|
+
generativeSuite: "generativeSuite";
|
|
41
|
+
}>>;
|
|
42
|
+
runConcurrencyLimit: z.ZodOptional<z.ZodString>;
|
|
43
|
+
suggestCoverage: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
tagNames: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
cadence: z.ZodEnum<{
|
|
47
|
+
daily: "daily";
|
|
48
|
+
hourly: "hourly";
|
|
49
|
+
monthly: "monthly";
|
|
50
|
+
weekly: "weekly";
|
|
51
|
+
}>;
|
|
52
|
+
dayOfWeek: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
friday: "friday";
|
|
54
|
+
monday: "monday";
|
|
55
|
+
saturday: "saturday";
|
|
56
|
+
sunday: "sunday";
|
|
57
|
+
thursday: "thursday";
|
|
58
|
+
tuesday: "tuesday";
|
|
59
|
+
wednesday: "wednesday";
|
|
60
|
+
}>>;
|
|
61
|
+
daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
62
|
+
friday: "friday";
|
|
63
|
+
monday: "monday";
|
|
64
|
+
saturday: "saturday";
|
|
65
|
+
sunday: "sunday";
|
|
66
|
+
thursday: "thursday";
|
|
67
|
+
tuesday: "tuesday";
|
|
68
|
+
wednesday: "wednesday";
|
|
69
|
+
}>>>;
|
|
70
|
+
environmentId: EnvironmentId;
|
|
71
|
+
minuteOfHour: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
timeOfDay: z.ZodOptional<z.ZodString>;
|
|
73
|
+
timezoneId: z.ZodOptional<z.ZodString>;
|
|
74
|
+
window: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
76
|
+
startTime: z.ZodString;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
kind: z.ZodLiteral<"schedule">;
|
|
79
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
80
|
+
action: z.ZodObject<{
|
|
81
|
+
flowIds: z.ZodDefault<z.ZodArray<FlowId>>;
|
|
82
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
83
|
+
investigateFailures: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
85
|
+
createSuite: "createSuite";
|
|
86
|
+
generativeSuite: "generativeSuite";
|
|
87
|
+
}>>;
|
|
88
|
+
runConcurrencyLimit: z.ZodOptional<z.ZodString>;
|
|
89
|
+
suggestCoverage: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
+
tagNames: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
branchPattern: z.ZodOptional<z.ZodString>;
|
|
93
|
+
deployTargetPattern: z.ZodOptional<z.ZodString>;
|
|
94
|
+
environmentIds: z.ZodDefault<z.ZodArray<EnvironmentId>>;
|
|
95
|
+
environmentPattern: z.ZodOptional<z.ZodString>;
|
|
96
|
+
repositoryPattern: z.ZodOptional<z.ZodString>;
|
|
97
|
+
servicePattern: z.ZodOptional<z.ZodString>;
|
|
98
|
+
kind: z.ZodLiteral<"deployment">;
|
|
99
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
100
|
+
actionCount: z.ZodNumber;
|
|
101
|
+
kind: z.ZodLiteral<"advanced">;
|
|
102
|
+
whenCount: z.ZodNumber;
|
|
103
|
+
}, z.core.$strip>], "kind">;
|
|
104
|
+
createdAt: z.ZodISODateTime;
|
|
105
|
+
definition: z.ZodCatch<z.ZodOptional<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
106
|
+
dayOfMonth: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
every: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
109
|
+
action: z.ZodObject<{
|
|
110
|
+
flowIds: z.ZodDefault<z.ZodArray<FlowId>>;
|
|
111
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
112
|
+
investigateFailures: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
114
|
+
createSuite: "createSuite";
|
|
115
|
+
generativeSuite: "generativeSuite";
|
|
116
|
+
startAgent: "startAgent";
|
|
117
|
+
}>>;
|
|
118
|
+
runConcurrencyLimit: z.ZodOptional<z.ZodString>;
|
|
119
|
+
suggestCoverage: z.ZodOptional<z.ZodBoolean>;
|
|
120
|
+
tagNames: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
cadence: z.ZodEnum<{
|
|
123
|
+
daily: "daily";
|
|
124
|
+
hourly: "hourly";
|
|
125
|
+
monthly: "monthly";
|
|
126
|
+
weekly: "weekly";
|
|
127
|
+
}>;
|
|
128
|
+
dayOfWeek: z.ZodOptional<z.ZodEnum<{
|
|
129
|
+
friday: "friday";
|
|
130
|
+
monday: "monday";
|
|
131
|
+
saturday: "saturday";
|
|
132
|
+
sunday: "sunday";
|
|
133
|
+
thursday: "thursday";
|
|
134
|
+
tuesday: "tuesday";
|
|
135
|
+
wednesday: "wednesday";
|
|
136
|
+
}>>;
|
|
137
|
+
daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
138
|
+
friday: "friday";
|
|
139
|
+
monday: "monday";
|
|
140
|
+
saturday: "saturday";
|
|
141
|
+
sunday: "sunday";
|
|
142
|
+
thursday: "thursday";
|
|
143
|
+
tuesday: "tuesday";
|
|
144
|
+
wednesday: "wednesday";
|
|
145
|
+
}>>>;
|
|
146
|
+
environmentId: EnvironmentId;
|
|
147
|
+
minuteOfHour: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
timeOfDay: z.ZodOptional<z.ZodString>;
|
|
149
|
+
timezoneId: z.ZodOptional<z.ZodString>;
|
|
150
|
+
window: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
152
|
+
startTime: z.ZodString;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
kind: z.ZodLiteral<"schedule">;
|
|
155
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
156
|
+
action: z.ZodObject<{
|
|
157
|
+
flowIds: z.ZodDefault<z.ZodArray<FlowId>>;
|
|
158
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
159
|
+
investigateFailures: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
161
|
+
createSuite: "createSuite";
|
|
162
|
+
generativeSuite: "generativeSuite";
|
|
163
|
+
startAgent: "startAgent";
|
|
164
|
+
}>>;
|
|
165
|
+
runConcurrencyLimit: z.ZodOptional<z.ZodString>;
|
|
166
|
+
suggestCoverage: z.ZodOptional<z.ZodBoolean>;
|
|
167
|
+
tagNames: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
branchPattern: z.ZodOptional<z.ZodString>;
|
|
170
|
+
deployTargetPattern: z.ZodOptional<z.ZodString>;
|
|
171
|
+
environmentIds: z.ZodDefault<z.ZodArray<EnvironmentId>>;
|
|
172
|
+
environmentPattern: z.ZodOptional<z.ZodString>;
|
|
173
|
+
repositoryPattern: z.ZodOptional<z.ZodString>;
|
|
174
|
+
servicePattern: z.ZodOptional<z.ZodString>;
|
|
175
|
+
kind: z.ZodLiteral<"deployment">;
|
|
176
|
+
}, z.core.$strip>], "kind">>>;
|
|
177
|
+
description: z.ZodOptional<z.ZodString>;
|
|
178
|
+
id: TriggerId;
|
|
179
|
+
isPaused: z.ZodBoolean;
|
|
180
|
+
name: z.ZodString;
|
|
181
|
+
nextScheduledAt: z.ZodOptional<z.ZodISODateTime>;
|
|
182
|
+
pausedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
183
|
+
pausedReason: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
184
|
+
"no-owner": "no-owner";
|
|
185
|
+
"owner-left-team": "owner-left-team";
|
|
186
|
+
}>>>;
|
|
187
|
+
updatedAt: z.ZodISODateTime;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=runNow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runNow.d.ts","sourceRoot":"","sources":["../../../src/v1/trigger/runNow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,yBAAyB,GACpC,YAAY,SAAS,cAAc,EACnC,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,SAAS,SAAS,cAAc,OAC3B;IACL,UAAU,EAAE,YAAY,CAAC;IACzB,WAAW,EAAE,aAAa,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,SAAS,CAAC;CACpB;;iBAqBK,eAAe,EACb,0FAA0F;iBAC5F,aAAa,EACX,oFAAoF;iBACtF,YAAY,EACV,mEAAmE;;;iBAGrE,eAAe;iBACf,aAAa;iBACb,YAAY;;;;;;;;mBAQR,OAAO;mBACP,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQzB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { makeTriggerResourceSchema } from "./resource.js";
|
|
3
|
+
export const makeRunTriggerNowContract = (ids) => {
|
|
4
|
+
const input = z.object({
|
|
5
|
+
deploymentId: ids.deployment
|
|
6
|
+
.optional()
|
|
7
|
+
.describe("The recent deployment a deployment trigger fires on, which must match the trigger. The trigger's first when decides its kind: a deployment trigger requires this, and a schedule trigger refuses it, firing on its own environment as if its slot came now."),
|
|
8
|
+
requestId: z
|
|
9
|
+
.string()
|
|
10
|
+
.trim()
|
|
11
|
+
.min(1)
|
|
12
|
+
.max(100)
|
|
13
|
+
.describe("Any string that is new for each firing. Repeating a request with the same requestId fires the trigger once."),
|
|
14
|
+
triggerId: ids.trigger,
|
|
15
|
+
});
|
|
16
|
+
const output = z.object({ trigger: makeTriggerResourceSchema(ids) });
|
|
17
|
+
return {
|
|
18
|
+
annotationJustifications: {
|
|
19
|
+
destructiveHint: "Starts the trigger's action, which can run tests that change or delete application data.",
|
|
20
|
+
openWorldHint: "The firing can start test runs or a QA Wolf session against external applications.",
|
|
21
|
+
readOnlyHint: "Fires the trigger once, starting its runs or its QA Wolf session.",
|
|
22
|
+
},
|
|
23
|
+
annotations: {
|
|
24
|
+
destructiveHint: true,
|
|
25
|
+
openWorldHint: true,
|
|
26
|
+
readOnlyHint: false,
|
|
27
|
+
},
|
|
28
|
+
description: "Fire a trigger once by hand. It works on a " +
|
|
29
|
+
"paused trigger too, and does the same as any other firing, except that a run it " +
|
|
30
|
+
"starts is not linked to the deployment or its pull request. Follow the firing with " +
|
|
31
|
+
"trigger.listFirings.",
|
|
32
|
+
input,
|
|
33
|
+
kind: "write",
|
|
34
|
+
name: "trigger.runNow",
|
|
35
|
+
output,
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=runNow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runNow.js","sourceRoot":"","sources":["../../../src/v1/trigger/runNow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAKvC,GAKD,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,YAAY,EAAE,GAAG,CAAC,UAAU;aACzB,QAAQ,EAAE;aACV,QAAQ,CACP,6PAA6P,CAC9P;QACH,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,IAAI,EAAE;aACN,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,QAAQ,CACP,6GAA6G,CAC9G;QACH,SAAS,EAAE,GAAG,CAAC,OAAO;KACvB,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,yBAAyB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAErE,OAAO;QACL,wBAAwB,EAAE;YACxB,eAAe,EACb,0FAA0F;YAC5F,aAAa,EACX,oFAAoF;YACtF,YAAY,EACV,mEAAmE;SACtE;QACD,WAAW,EAAE;YACX,eAAe,EAAE,IAAI;YACrB,aAAa,EAAE,IAAI;YACnB,YAAY,EAAE,KAAK;SACpB;QACD,WAAW,EACT,6CAA6C;YAC7C,kFAAkF;YAClF,qFAAqF;YACrF,sBAAsB;QACxB,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,gBAAgB;QACtB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|