@qawolf/ci-sdk 1.3.2 → 2.1.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/README.md +22 -1
- package/dist/index.cjs +211 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +111 -35
- package/dist/index.d.ts +111 -35
- package/dist/index.js +211 -67
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
package/dist/index.d.cts
CHANGED
|
@@ -63,26 +63,10 @@ type CiGreenlightBugData = {
|
|
|
63
63
|
* The count of blocking bugs reproduced in the run.
|
|
64
64
|
*/
|
|
65
65
|
blockingBugsCount: number;
|
|
66
|
-
/**
|
|
67
|
-
* The URLs of the blocking bugs.
|
|
68
|
-
*
|
|
69
|
-
* @deprecated This field will be removed in the next major version.
|
|
70
|
-
* Prefer using `reproducedBugs` filtered by `isBlocking: true`, reading
|
|
71
|
-
* the `applicationUrl` field.
|
|
72
|
-
*/
|
|
73
|
-
blockingBugUrls: string[];
|
|
74
66
|
/**
|
|
75
67
|
* The count of non-blocking bugs reproduced in the run.
|
|
76
68
|
*/
|
|
77
69
|
nonBlockingBugsCount: number;
|
|
78
|
-
/**
|
|
79
|
-
* The URLs of the non-blocking bugs.
|
|
80
|
-
*
|
|
81
|
-
* @deprecated This field will be removed in the next major version.
|
|
82
|
-
* Prefer using `reproducedBugs` filtered by `isBlocking: false`, reading
|
|
83
|
-
* the `applicationUrl` field.
|
|
84
|
-
*/
|
|
85
|
-
nonBlockingBugUrls: string[];
|
|
86
70
|
/**
|
|
87
71
|
* Blocking bugs that were not reproduced in this run, but are still
|
|
88
72
|
* opened in the run environment. This may happen when the run only covers a
|
|
@@ -91,15 +75,20 @@ type CiGreenlightBugData = {
|
|
|
91
75
|
otherBlockingBugsInEnvironment: CiGreenlightBugDetails[];
|
|
92
76
|
/**
|
|
93
77
|
* Bugs that were reproduced in this run. This includes newly found bugs.
|
|
78
|
+
* Filter by `isBlocking` and read `applicationUrl` for blocking /
|
|
79
|
+
* non-blocking bug URLs.
|
|
94
80
|
*/
|
|
95
81
|
reproducedBugs: CiGreenlightBugDetails[];
|
|
96
82
|
};
|
|
83
|
+
|
|
97
84
|
type CiGreenlightStatusBase = {
|
|
98
85
|
relevantRunId: string;
|
|
99
86
|
relevantRunUrl: string;
|
|
100
|
-
relevantRunWithBugsUrl: string;
|
|
101
87
|
rootRunId: string;
|
|
102
88
|
rootRunUrl: string;
|
|
89
|
+
};
|
|
90
|
+
type CiGreenlightStatusExtended = {
|
|
91
|
+
relevantRunWithBugsUrl: string;
|
|
103
92
|
workflowsDisabledAfterRunCount: number;
|
|
104
93
|
workflowsInRunCount: number;
|
|
105
94
|
workflowsUnderInvestigationCount: number;
|
|
@@ -111,13 +100,26 @@ type CiGreenlightStatusBase = {
|
|
|
111
100
|
type CiGreenlightStatus = CiGreenlightStatusBase & (({
|
|
112
101
|
greenlight: boolean;
|
|
113
102
|
runStage: "completed";
|
|
114
|
-
} & CiGreenlightBugData) | ({
|
|
103
|
+
} & CiGreenlightBugData & CiGreenlightStatusExtended) | ({
|
|
115
104
|
greenlight: false;
|
|
116
105
|
runStage: "underReview";
|
|
117
|
-
} & CiGreenlightBugData) | {
|
|
106
|
+
} & CiGreenlightBugData & CiGreenlightStatusExtended) | ({
|
|
107
|
+
greenlight: false;
|
|
108
|
+
runStage: "initializing";
|
|
109
|
+
} & Partial<CiGreenlightStatusExtended>) | ({
|
|
118
110
|
greenlight: false;
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Human-readable copy explaining why the run was canceled, when the
|
|
113
|
+
* server provides it.
|
|
114
|
+
*/
|
|
115
|
+
message?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Stable, machine-readable code for why the run was canceled, when the
|
|
118
|
+
* server provides it. Treat as an open set of values.
|
|
119
|
+
*/
|
|
120
|
+
reason?: string;
|
|
121
|
+
runStage: "canceled";
|
|
122
|
+
} & Partial<CiGreenlightStatusExtended>));
|
|
121
123
|
|
|
122
124
|
type GenerateSignedUrlStatus = {
|
|
123
125
|
fileLocation?: string;
|
|
@@ -142,10 +144,6 @@ type GenerateSignedUrlResponse = {
|
|
|
142
144
|
success: boolean;
|
|
143
145
|
};
|
|
144
146
|
|
|
145
|
-
/**
|
|
146
|
-
* Refer to our official documentation for more information:
|
|
147
|
-
* https://qawolf.notion.site/dd72e46ceb7f451dae4e9ef06f64a2cc
|
|
148
|
-
*/
|
|
149
147
|
type BaseDeployConfig = {
|
|
150
148
|
branch: string | undefined;
|
|
151
149
|
commitUrl: string | undefined;
|
|
@@ -176,20 +174,67 @@ type EphemeralDeployConfig = BaseDeployConfig & {
|
|
|
176
174
|
ephemeralEnvironment: true;
|
|
177
175
|
};
|
|
178
176
|
type DeployConfig = GitHubDeployConfig | GitLabDeployConfig | EphemeralDeployConfig;
|
|
179
|
-
|
|
177
|
+
|
|
178
|
+
type WireSuiteResult = {
|
|
180
179
|
created_suite_id: string;
|
|
181
180
|
trigger_id: string;
|
|
182
|
-
}
|
|
183
|
-
type DeploySuccessSuiteCreationFailureResult = {
|
|
181
|
+
} | {
|
|
184
182
|
failure_reason: string;
|
|
185
183
|
trigger_id: string;
|
|
186
|
-
}
|
|
187
|
-
type DeploySuccessSuiteAlreadyExistsResult = {
|
|
184
|
+
} | {
|
|
188
185
|
duplicate_suite_id: string;
|
|
189
186
|
skip_reason: string;
|
|
190
187
|
trigger_id: string;
|
|
188
|
+
} | {
|
|
189
|
+
trigger_id: string;
|
|
190
|
+
};
|
|
191
|
+
type DeploySuccessWireResponse = {
|
|
192
|
+
environment: {
|
|
193
|
+
alias?: string;
|
|
194
|
+
id: string;
|
|
195
|
+
isStatic: boolean;
|
|
196
|
+
} | undefined;
|
|
197
|
+
results: WireSuiteResult[];
|
|
198
|
+
skipped_deployment?: {
|
|
199
|
+
message: string;
|
|
200
|
+
reason: string;
|
|
201
|
+
};
|
|
202
|
+
skipped_triggers?: {
|
|
203
|
+
environment_id: string;
|
|
204
|
+
message: string;
|
|
205
|
+
reason: string;
|
|
206
|
+
trigger_id: string;
|
|
207
|
+
}[];
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
type DeploySuccessSuiteCreatedResult = {
|
|
211
|
+
createdSuiteId: string;
|
|
212
|
+
triggerId: string;
|
|
213
|
+
};
|
|
214
|
+
type DeploySuccessSuiteCreationFailureResult = {
|
|
215
|
+
failureReason: string;
|
|
216
|
+
triggerId: string;
|
|
217
|
+
};
|
|
218
|
+
type DeploySuccessSuiteAlreadyExistsResult = {
|
|
219
|
+
duplicateSuiteId: string;
|
|
220
|
+
skipReason: string;
|
|
221
|
+
triggerId: string;
|
|
222
|
+
};
|
|
223
|
+
type DeploySuccessSuiteUnrecognizedResult = {
|
|
224
|
+
triggerId: string;
|
|
225
|
+
unrecognized: true;
|
|
226
|
+
};
|
|
227
|
+
type DeploySuccessSuiteResult = DeploySuccessSuiteCreatedResult | DeploySuccessSuiteCreationFailureResult | DeploySuccessSuiteAlreadyExistsResult | DeploySuccessSuiteUnrecognizedResult;
|
|
228
|
+
type DeploySuccessSkippedTrigger = {
|
|
229
|
+
environmentId: string;
|
|
230
|
+
message: string;
|
|
231
|
+
reason: string;
|
|
232
|
+
triggerId: string;
|
|
233
|
+
};
|
|
234
|
+
type DeploySuccessDeploymentSkipped = {
|
|
235
|
+
message: string;
|
|
236
|
+
reason: string;
|
|
191
237
|
};
|
|
192
|
-
type DeploySuccessSuiteResult = DeploySuccessSuiteCreatedResult | DeploySuccessSuiteCreationFailureResult | DeploySuccessSuiteAlreadyExistsResult;
|
|
193
238
|
type DeployStatus = {
|
|
194
239
|
environment: {
|
|
195
240
|
alias?: string;
|
|
@@ -197,6 +242,8 @@ type DeployStatus = {
|
|
|
197
242
|
isStatic: boolean;
|
|
198
243
|
} | undefined;
|
|
199
244
|
results: Array<DeploySuccessSuiteResult>;
|
|
245
|
+
skippedDeployment?: DeploySuccessDeploymentSkipped;
|
|
246
|
+
skippedTriggers?: DeploySuccessSkippedTrigger[];
|
|
200
247
|
};
|
|
201
248
|
type DeployStatusSuccessResponse = {
|
|
202
249
|
data: DeployStatus;
|
|
@@ -209,9 +256,8 @@ type DeployStatusErrorResponse = {
|
|
|
209
256
|
status: number | undefined;
|
|
210
257
|
};
|
|
211
258
|
type DeployStatusResponse = DeployStatusSuccessResponse | DeployStatusErrorResponse;
|
|
212
|
-
type AttemptDeployFailedReason = "no-matched-trigger" | "no-environment" | "run-could-not-be-created" | "duplicate-suite";
|
|
213
259
|
type AttemptDeployHttpAbortReason = "4XX-client-error" | "401-unauthorized" | "403-forbidden" | "5XX-server-error" | "network-error";
|
|
214
|
-
type AttemptDeployNonHttpAbortReason = "network-error";
|
|
260
|
+
type AttemptDeployNonHttpAbortReason = "network-error" | "invalid-response-body";
|
|
215
261
|
type AttemptDeployAbortReason = AttemptDeployHttpAbortReason | AttemptDeployNonHttpAbortReason;
|
|
216
262
|
type NotifyDeployStatus = {
|
|
217
263
|
/**
|
|
@@ -227,7 +273,34 @@ type NotifyDeployStatus = {
|
|
|
227
273
|
*/
|
|
228
274
|
runId: string | undefined;
|
|
229
275
|
} | {
|
|
230
|
-
|
|
276
|
+
/**
|
|
277
|
+
* One or more triggers matched the deployment but could not run (e.g. the
|
|
278
|
+
* environment was still syncing). A precondition was not met, so this is a
|
|
279
|
+
* failure rather than a skip: retrying once the environment is ready may
|
|
280
|
+
* create a run.
|
|
281
|
+
*/
|
|
282
|
+
failReason: "trigger-skipped";
|
|
283
|
+
outcome: "failed";
|
|
284
|
+
skippedTriggers: DeploySuccessSkippedTrigger[];
|
|
285
|
+
} | {
|
|
286
|
+
/**
|
|
287
|
+
* No trigger matched the deployment. This is deterministic given the
|
|
288
|
+
* current configuration (repeating the request with the same config
|
|
289
|
+
* yields the same result), so it is a skip rather than a failure, and the
|
|
290
|
+
* caller should not treat it as an error. `skippedDeployment` carries the
|
|
291
|
+
* server's reason when it provided one (undefined on older servers or the
|
|
292
|
+
* legacy arm); there is no separate SDK-level reason code, since
|
|
293
|
+
* `outcome: "skipped"` only ever means no trigger matched.
|
|
294
|
+
*/
|
|
295
|
+
outcome: "skipped";
|
|
296
|
+
skippedDeployment: DeploySuccessDeploymentSkipped | undefined;
|
|
297
|
+
} | {
|
|
298
|
+
/**
|
|
299
|
+
* `unknown-result` means the response carried a result arm this SDK
|
|
300
|
+
* version does not recognize (the backend is newer). The caller should
|
|
301
|
+
* upgrade the SDK; the outcome could not be classified.
|
|
302
|
+
*/
|
|
303
|
+
failReason: "no-environment" | "run-could-not-be-created" | "unknown-result";
|
|
231
304
|
/**
|
|
232
305
|
* A run could not be created.
|
|
233
306
|
*/
|
|
@@ -247,6 +320,9 @@ type NotifyDeployStatus = {
|
|
|
247
320
|
*/
|
|
248
321
|
outcome: "aborted";
|
|
249
322
|
};
|
|
323
|
+
type AttemptDeployFailedReason = Extract<NotifyDeployStatus, {
|
|
324
|
+
outcome: "failed";
|
|
325
|
+
}>["failReason"];
|
|
250
326
|
|
|
251
327
|
type NotifyTerminatedEphemeralEnvironmentInput = {
|
|
252
328
|
environmentId: string;
|
|
@@ -455,4 +531,4 @@ declare function makeQaWolfSdk({ apiKey, serviceBase, userAgent, }: {
|
|
|
455
531
|
pollCiGreenlightStatus: (args_0: PollCiGreenlightParams) => Promise<PollCiGreenlightStatus>;
|
|
456
532
|
};
|
|
457
533
|
|
|
458
|
-
export { type AttemptDeployAbortReason, type AttemptDeployFailedReason, type AttemptDeployHttpAbortReason, type AttemptDeployNonHttpAbortReason, type CiGreenlightStatus, type CiGreenlightStatusBase, type DeployConfig, type DeployStatus, type DeployStatusErrorResponse, type DeployStatusResponse, type DeployStatusSuccessResponse, type DeploySuccessSuiteAlreadyExistsResult, type DeploySuccessSuiteCreatedResult, type DeploySuccessSuiteCreationFailureResult, type DeploySuccessSuiteResult, type EphemeralDeployConfig, type FetchDriver, type GenerateSignedUrlAbortReason$1 as GenerateSignedUrlAbortReason, type GenerateSignedUrlConfig, type GenerateSignedUrlResponse, type GenerateSignedUrlStatus, type GitHubDeployConfig, type GitLabDeployConfig, type MakePollCiGreenlightStatusIteratorParams, type NotifyDeployStatus, type NotifyTerminatedEphemeralEnvironmentAbortReason, type NotifyTerminatedEphemeralEnvironmentFailedReason, type NotifyTerminatedEphemeralEnvironmentHttpAbortReason, type NotifyTerminatedEphemeralEnvironmentInput, type NotifyTerminatedEphemeralEnvironmentNonHttpAbortReason, type NotifyTerminatedEphemeralEnvironmentResult, type PollCiGreenlightAbortReason, type PollCiGreenlightHttpAbortReason, type PollCiGreenlightIteration, type PollCiGreenlightIteratorHttpAborted, type PollCiGreenlightIteratorNonHttpAborted, type PollCiGreenlightNonHttpAbortReason, type PollCiGreenlightParams, type PollCiGreenlightPollConfig, type PollCiGreenlightStatus, type PollCiGreenlightStatusIteration, type SdkDependencies, type TerminatedEphemeralEnvironmentSuccessResult, attemptNotifyDeploy, makeQaWolfSdk };
|
|
534
|
+
export { type AttemptDeployAbortReason, type AttemptDeployFailedReason, type AttemptDeployHttpAbortReason, type AttemptDeployNonHttpAbortReason, type CiGreenlightStatus, type CiGreenlightStatusBase, type DeployConfig, type DeployStatus, type DeployStatusErrorResponse, type DeployStatusResponse, type DeployStatusSuccessResponse, type DeploySuccessDeploymentSkipped, type DeploySuccessSkippedTrigger, type DeploySuccessSuiteAlreadyExistsResult, type DeploySuccessSuiteCreatedResult, type DeploySuccessSuiteCreationFailureResult, type DeploySuccessSuiteResult, type DeploySuccessSuiteUnrecognizedResult, type DeploySuccessWireResponse, type EphemeralDeployConfig, type FetchDriver, type GenerateSignedUrlAbortReason$1 as GenerateSignedUrlAbortReason, type GenerateSignedUrlConfig, type GenerateSignedUrlResponse, type GenerateSignedUrlStatus, type GitHubDeployConfig, type GitLabDeployConfig, type MakePollCiGreenlightStatusIteratorParams, type NotifyDeployStatus, type NotifyTerminatedEphemeralEnvironmentAbortReason, type NotifyTerminatedEphemeralEnvironmentFailedReason, type NotifyTerminatedEphemeralEnvironmentHttpAbortReason, type NotifyTerminatedEphemeralEnvironmentInput, type NotifyTerminatedEphemeralEnvironmentNonHttpAbortReason, type NotifyTerminatedEphemeralEnvironmentResult, type PollCiGreenlightAbortReason, type PollCiGreenlightHttpAbortReason, type PollCiGreenlightIteration, type PollCiGreenlightIteratorHttpAborted, type PollCiGreenlightIteratorNonHttpAborted, type PollCiGreenlightNonHttpAbortReason, type PollCiGreenlightParams, type PollCiGreenlightPollConfig, type PollCiGreenlightStatus, type PollCiGreenlightStatusIteration, type SdkDependencies, type TerminatedEphemeralEnvironmentSuccessResult, attemptNotifyDeploy, makeQaWolfSdk };
|
package/dist/index.d.ts
CHANGED
|
@@ -63,26 +63,10 @@ type CiGreenlightBugData = {
|
|
|
63
63
|
* The count of blocking bugs reproduced in the run.
|
|
64
64
|
*/
|
|
65
65
|
blockingBugsCount: number;
|
|
66
|
-
/**
|
|
67
|
-
* The URLs of the blocking bugs.
|
|
68
|
-
*
|
|
69
|
-
* @deprecated This field will be removed in the next major version.
|
|
70
|
-
* Prefer using `reproducedBugs` filtered by `isBlocking: true`, reading
|
|
71
|
-
* the `applicationUrl` field.
|
|
72
|
-
*/
|
|
73
|
-
blockingBugUrls: string[];
|
|
74
66
|
/**
|
|
75
67
|
* The count of non-blocking bugs reproduced in the run.
|
|
76
68
|
*/
|
|
77
69
|
nonBlockingBugsCount: number;
|
|
78
|
-
/**
|
|
79
|
-
* The URLs of the non-blocking bugs.
|
|
80
|
-
*
|
|
81
|
-
* @deprecated This field will be removed in the next major version.
|
|
82
|
-
* Prefer using `reproducedBugs` filtered by `isBlocking: false`, reading
|
|
83
|
-
* the `applicationUrl` field.
|
|
84
|
-
*/
|
|
85
|
-
nonBlockingBugUrls: string[];
|
|
86
70
|
/**
|
|
87
71
|
* Blocking bugs that were not reproduced in this run, but are still
|
|
88
72
|
* opened in the run environment. This may happen when the run only covers a
|
|
@@ -91,15 +75,20 @@ type CiGreenlightBugData = {
|
|
|
91
75
|
otherBlockingBugsInEnvironment: CiGreenlightBugDetails[];
|
|
92
76
|
/**
|
|
93
77
|
* Bugs that were reproduced in this run. This includes newly found bugs.
|
|
78
|
+
* Filter by `isBlocking` and read `applicationUrl` for blocking /
|
|
79
|
+
* non-blocking bug URLs.
|
|
94
80
|
*/
|
|
95
81
|
reproducedBugs: CiGreenlightBugDetails[];
|
|
96
82
|
};
|
|
83
|
+
|
|
97
84
|
type CiGreenlightStatusBase = {
|
|
98
85
|
relevantRunId: string;
|
|
99
86
|
relevantRunUrl: string;
|
|
100
|
-
relevantRunWithBugsUrl: string;
|
|
101
87
|
rootRunId: string;
|
|
102
88
|
rootRunUrl: string;
|
|
89
|
+
};
|
|
90
|
+
type CiGreenlightStatusExtended = {
|
|
91
|
+
relevantRunWithBugsUrl: string;
|
|
103
92
|
workflowsDisabledAfterRunCount: number;
|
|
104
93
|
workflowsInRunCount: number;
|
|
105
94
|
workflowsUnderInvestigationCount: number;
|
|
@@ -111,13 +100,26 @@ type CiGreenlightStatusBase = {
|
|
|
111
100
|
type CiGreenlightStatus = CiGreenlightStatusBase & (({
|
|
112
101
|
greenlight: boolean;
|
|
113
102
|
runStage: "completed";
|
|
114
|
-
} & CiGreenlightBugData) | ({
|
|
103
|
+
} & CiGreenlightBugData & CiGreenlightStatusExtended) | ({
|
|
115
104
|
greenlight: false;
|
|
116
105
|
runStage: "underReview";
|
|
117
|
-
} & CiGreenlightBugData) | {
|
|
106
|
+
} & CiGreenlightBugData & CiGreenlightStatusExtended) | ({
|
|
107
|
+
greenlight: false;
|
|
108
|
+
runStage: "initializing";
|
|
109
|
+
} & Partial<CiGreenlightStatusExtended>) | ({
|
|
118
110
|
greenlight: false;
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Human-readable copy explaining why the run was canceled, when the
|
|
113
|
+
* server provides it.
|
|
114
|
+
*/
|
|
115
|
+
message?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Stable, machine-readable code for why the run was canceled, when the
|
|
118
|
+
* server provides it. Treat as an open set of values.
|
|
119
|
+
*/
|
|
120
|
+
reason?: string;
|
|
121
|
+
runStage: "canceled";
|
|
122
|
+
} & Partial<CiGreenlightStatusExtended>));
|
|
121
123
|
|
|
122
124
|
type GenerateSignedUrlStatus = {
|
|
123
125
|
fileLocation?: string;
|
|
@@ -142,10 +144,6 @@ type GenerateSignedUrlResponse = {
|
|
|
142
144
|
success: boolean;
|
|
143
145
|
};
|
|
144
146
|
|
|
145
|
-
/**
|
|
146
|
-
* Refer to our official documentation for more information:
|
|
147
|
-
* https://qawolf.notion.site/dd72e46ceb7f451dae4e9ef06f64a2cc
|
|
148
|
-
*/
|
|
149
147
|
type BaseDeployConfig = {
|
|
150
148
|
branch: string | undefined;
|
|
151
149
|
commitUrl: string | undefined;
|
|
@@ -176,20 +174,67 @@ type EphemeralDeployConfig = BaseDeployConfig & {
|
|
|
176
174
|
ephemeralEnvironment: true;
|
|
177
175
|
};
|
|
178
176
|
type DeployConfig = GitHubDeployConfig | GitLabDeployConfig | EphemeralDeployConfig;
|
|
179
|
-
|
|
177
|
+
|
|
178
|
+
type WireSuiteResult = {
|
|
180
179
|
created_suite_id: string;
|
|
181
180
|
trigger_id: string;
|
|
182
|
-
}
|
|
183
|
-
type DeploySuccessSuiteCreationFailureResult = {
|
|
181
|
+
} | {
|
|
184
182
|
failure_reason: string;
|
|
185
183
|
trigger_id: string;
|
|
186
|
-
}
|
|
187
|
-
type DeploySuccessSuiteAlreadyExistsResult = {
|
|
184
|
+
} | {
|
|
188
185
|
duplicate_suite_id: string;
|
|
189
186
|
skip_reason: string;
|
|
190
187
|
trigger_id: string;
|
|
188
|
+
} | {
|
|
189
|
+
trigger_id: string;
|
|
190
|
+
};
|
|
191
|
+
type DeploySuccessWireResponse = {
|
|
192
|
+
environment: {
|
|
193
|
+
alias?: string;
|
|
194
|
+
id: string;
|
|
195
|
+
isStatic: boolean;
|
|
196
|
+
} | undefined;
|
|
197
|
+
results: WireSuiteResult[];
|
|
198
|
+
skipped_deployment?: {
|
|
199
|
+
message: string;
|
|
200
|
+
reason: string;
|
|
201
|
+
};
|
|
202
|
+
skipped_triggers?: {
|
|
203
|
+
environment_id: string;
|
|
204
|
+
message: string;
|
|
205
|
+
reason: string;
|
|
206
|
+
trigger_id: string;
|
|
207
|
+
}[];
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
type DeploySuccessSuiteCreatedResult = {
|
|
211
|
+
createdSuiteId: string;
|
|
212
|
+
triggerId: string;
|
|
213
|
+
};
|
|
214
|
+
type DeploySuccessSuiteCreationFailureResult = {
|
|
215
|
+
failureReason: string;
|
|
216
|
+
triggerId: string;
|
|
217
|
+
};
|
|
218
|
+
type DeploySuccessSuiteAlreadyExistsResult = {
|
|
219
|
+
duplicateSuiteId: string;
|
|
220
|
+
skipReason: string;
|
|
221
|
+
triggerId: string;
|
|
222
|
+
};
|
|
223
|
+
type DeploySuccessSuiteUnrecognizedResult = {
|
|
224
|
+
triggerId: string;
|
|
225
|
+
unrecognized: true;
|
|
226
|
+
};
|
|
227
|
+
type DeploySuccessSuiteResult = DeploySuccessSuiteCreatedResult | DeploySuccessSuiteCreationFailureResult | DeploySuccessSuiteAlreadyExistsResult | DeploySuccessSuiteUnrecognizedResult;
|
|
228
|
+
type DeploySuccessSkippedTrigger = {
|
|
229
|
+
environmentId: string;
|
|
230
|
+
message: string;
|
|
231
|
+
reason: string;
|
|
232
|
+
triggerId: string;
|
|
233
|
+
};
|
|
234
|
+
type DeploySuccessDeploymentSkipped = {
|
|
235
|
+
message: string;
|
|
236
|
+
reason: string;
|
|
191
237
|
};
|
|
192
|
-
type DeploySuccessSuiteResult = DeploySuccessSuiteCreatedResult | DeploySuccessSuiteCreationFailureResult | DeploySuccessSuiteAlreadyExistsResult;
|
|
193
238
|
type DeployStatus = {
|
|
194
239
|
environment: {
|
|
195
240
|
alias?: string;
|
|
@@ -197,6 +242,8 @@ type DeployStatus = {
|
|
|
197
242
|
isStatic: boolean;
|
|
198
243
|
} | undefined;
|
|
199
244
|
results: Array<DeploySuccessSuiteResult>;
|
|
245
|
+
skippedDeployment?: DeploySuccessDeploymentSkipped;
|
|
246
|
+
skippedTriggers?: DeploySuccessSkippedTrigger[];
|
|
200
247
|
};
|
|
201
248
|
type DeployStatusSuccessResponse = {
|
|
202
249
|
data: DeployStatus;
|
|
@@ -209,9 +256,8 @@ type DeployStatusErrorResponse = {
|
|
|
209
256
|
status: number | undefined;
|
|
210
257
|
};
|
|
211
258
|
type DeployStatusResponse = DeployStatusSuccessResponse | DeployStatusErrorResponse;
|
|
212
|
-
type AttemptDeployFailedReason = "no-matched-trigger" | "no-environment" | "run-could-not-be-created" | "duplicate-suite";
|
|
213
259
|
type AttemptDeployHttpAbortReason = "4XX-client-error" | "401-unauthorized" | "403-forbidden" | "5XX-server-error" | "network-error";
|
|
214
|
-
type AttemptDeployNonHttpAbortReason = "network-error";
|
|
260
|
+
type AttemptDeployNonHttpAbortReason = "network-error" | "invalid-response-body";
|
|
215
261
|
type AttemptDeployAbortReason = AttemptDeployHttpAbortReason | AttemptDeployNonHttpAbortReason;
|
|
216
262
|
type NotifyDeployStatus = {
|
|
217
263
|
/**
|
|
@@ -227,7 +273,34 @@ type NotifyDeployStatus = {
|
|
|
227
273
|
*/
|
|
228
274
|
runId: string | undefined;
|
|
229
275
|
} | {
|
|
230
|
-
|
|
276
|
+
/**
|
|
277
|
+
* One or more triggers matched the deployment but could not run (e.g. the
|
|
278
|
+
* environment was still syncing). A precondition was not met, so this is a
|
|
279
|
+
* failure rather than a skip: retrying once the environment is ready may
|
|
280
|
+
* create a run.
|
|
281
|
+
*/
|
|
282
|
+
failReason: "trigger-skipped";
|
|
283
|
+
outcome: "failed";
|
|
284
|
+
skippedTriggers: DeploySuccessSkippedTrigger[];
|
|
285
|
+
} | {
|
|
286
|
+
/**
|
|
287
|
+
* No trigger matched the deployment. This is deterministic given the
|
|
288
|
+
* current configuration (repeating the request with the same config
|
|
289
|
+
* yields the same result), so it is a skip rather than a failure, and the
|
|
290
|
+
* caller should not treat it as an error. `skippedDeployment` carries the
|
|
291
|
+
* server's reason when it provided one (undefined on older servers or the
|
|
292
|
+
* legacy arm); there is no separate SDK-level reason code, since
|
|
293
|
+
* `outcome: "skipped"` only ever means no trigger matched.
|
|
294
|
+
*/
|
|
295
|
+
outcome: "skipped";
|
|
296
|
+
skippedDeployment: DeploySuccessDeploymentSkipped | undefined;
|
|
297
|
+
} | {
|
|
298
|
+
/**
|
|
299
|
+
* `unknown-result` means the response carried a result arm this SDK
|
|
300
|
+
* version does not recognize (the backend is newer). The caller should
|
|
301
|
+
* upgrade the SDK; the outcome could not be classified.
|
|
302
|
+
*/
|
|
303
|
+
failReason: "no-environment" | "run-could-not-be-created" | "unknown-result";
|
|
231
304
|
/**
|
|
232
305
|
* A run could not be created.
|
|
233
306
|
*/
|
|
@@ -247,6 +320,9 @@ type NotifyDeployStatus = {
|
|
|
247
320
|
*/
|
|
248
321
|
outcome: "aborted";
|
|
249
322
|
};
|
|
323
|
+
type AttemptDeployFailedReason = Extract<NotifyDeployStatus, {
|
|
324
|
+
outcome: "failed";
|
|
325
|
+
}>["failReason"];
|
|
250
326
|
|
|
251
327
|
type NotifyTerminatedEphemeralEnvironmentInput = {
|
|
252
328
|
environmentId: string;
|
|
@@ -455,4 +531,4 @@ declare function makeQaWolfSdk({ apiKey, serviceBase, userAgent, }: {
|
|
|
455
531
|
pollCiGreenlightStatus: (args_0: PollCiGreenlightParams) => Promise<PollCiGreenlightStatus>;
|
|
456
532
|
};
|
|
457
533
|
|
|
458
|
-
export { type AttemptDeployAbortReason, type AttemptDeployFailedReason, type AttemptDeployHttpAbortReason, type AttemptDeployNonHttpAbortReason, type CiGreenlightStatus, type CiGreenlightStatusBase, type DeployConfig, type DeployStatus, type DeployStatusErrorResponse, type DeployStatusResponse, type DeployStatusSuccessResponse, type DeploySuccessSuiteAlreadyExistsResult, type DeploySuccessSuiteCreatedResult, type DeploySuccessSuiteCreationFailureResult, type DeploySuccessSuiteResult, type EphemeralDeployConfig, type FetchDriver, type GenerateSignedUrlAbortReason$1 as GenerateSignedUrlAbortReason, type GenerateSignedUrlConfig, type GenerateSignedUrlResponse, type GenerateSignedUrlStatus, type GitHubDeployConfig, type GitLabDeployConfig, type MakePollCiGreenlightStatusIteratorParams, type NotifyDeployStatus, type NotifyTerminatedEphemeralEnvironmentAbortReason, type NotifyTerminatedEphemeralEnvironmentFailedReason, type NotifyTerminatedEphemeralEnvironmentHttpAbortReason, type NotifyTerminatedEphemeralEnvironmentInput, type NotifyTerminatedEphemeralEnvironmentNonHttpAbortReason, type NotifyTerminatedEphemeralEnvironmentResult, type PollCiGreenlightAbortReason, type PollCiGreenlightHttpAbortReason, type PollCiGreenlightIteration, type PollCiGreenlightIteratorHttpAborted, type PollCiGreenlightIteratorNonHttpAborted, type PollCiGreenlightNonHttpAbortReason, type PollCiGreenlightParams, type PollCiGreenlightPollConfig, type PollCiGreenlightStatus, type PollCiGreenlightStatusIteration, type SdkDependencies, type TerminatedEphemeralEnvironmentSuccessResult, attemptNotifyDeploy, makeQaWolfSdk };
|
|
534
|
+
export { type AttemptDeployAbortReason, type AttemptDeployFailedReason, type AttemptDeployHttpAbortReason, type AttemptDeployNonHttpAbortReason, type CiGreenlightStatus, type CiGreenlightStatusBase, type DeployConfig, type DeployStatus, type DeployStatusErrorResponse, type DeployStatusResponse, type DeployStatusSuccessResponse, type DeploySuccessDeploymentSkipped, type DeploySuccessSkippedTrigger, type DeploySuccessSuiteAlreadyExistsResult, type DeploySuccessSuiteCreatedResult, type DeploySuccessSuiteCreationFailureResult, type DeploySuccessSuiteResult, type DeploySuccessSuiteUnrecognizedResult, type DeploySuccessWireResponse, type EphemeralDeployConfig, type FetchDriver, type GenerateSignedUrlAbortReason$1 as GenerateSignedUrlAbortReason, type GenerateSignedUrlConfig, type GenerateSignedUrlResponse, type GenerateSignedUrlStatus, type GitHubDeployConfig, type GitLabDeployConfig, type MakePollCiGreenlightStatusIteratorParams, type NotifyDeployStatus, type NotifyTerminatedEphemeralEnvironmentAbortReason, type NotifyTerminatedEphemeralEnvironmentFailedReason, type NotifyTerminatedEphemeralEnvironmentHttpAbortReason, type NotifyTerminatedEphemeralEnvironmentInput, type NotifyTerminatedEphemeralEnvironmentNonHttpAbortReason, type NotifyTerminatedEphemeralEnvironmentResult, type PollCiGreenlightAbortReason, type PollCiGreenlightHttpAbortReason, type PollCiGreenlightIteration, type PollCiGreenlightIteratorHttpAborted, type PollCiGreenlightIteratorNonHttpAborted, type PollCiGreenlightNonHttpAbortReason, type PollCiGreenlightParams, type PollCiGreenlightPollConfig, type PollCiGreenlightStatus, type PollCiGreenlightStatusIteration, type SdkDependencies, type TerminatedEphemeralEnvironmentSuccessResult, attemptNotifyDeploy, makeQaWolfSdk };
|