@argos-ci/api-client
Version:
1,330 lines (1,329 loc) • 108 kB
text/typescript
declare namespace schema_d_exports {
export { $defs, components, operations, paths, webhooks };
}
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
interface paths {
"/accounts/{accountSlug}/analytics": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get account analytics
* @description Retrieve build and screenshot metrics for an account. The personal access token must be scoped to the account.
*/
get: operations["getAccountAnalytics"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/builds": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Create a build
* @description Create a build and receive signed upload targets for its screenshots and Playwright traces. The response lists, for every file Argos doesn't already have, a secure `postUrl` with `fields` (or a legacy `putUrl`) to upload it to. Supports single and parallel builds.
*/
post: operations["createBuild"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/deployments": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Create a deployment
* @description Create a deployment and receive signed upload URLs for the files Argos doesn't already store. Files already present (matched by content hash) are reused and omitted from `uploadFiles`. The environment is inferred from the branch when omitted.
*/
post: operations["createDeployment"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/deployments/{deploymentId}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get a deployment
* @description Retrieve a single deployment by its ID.
*/
get: operations["getDeployment"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/deployments/{deploymentId}/finalize": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Finalize a deployment
* @description Mark a deployment as ready once all of its files have been uploaded. Argos assigns the deployment's aliases and starts serving it.
*/
post: operations["finalizeDeployment"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/deployments/resolve/{domain}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Resolve a deployment domain
* @description Resolve a deployment domain or URL to the deployment it currently serves. This endpoint is public and does not require authentication.
*/
get: operations["resolveDeploymentDomain"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/builds/finalize": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Finalize parallel builds
* @description Mark every parallel shard sharing the given `parallelNonce` as complete. Once finalized, Argos compares the aggregated screenshots and starts processing the build.
*/
post: operations["finalizeBuilds"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/baseline": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Find an eligible baseline from a list of commits
* @description Find the build eligible to be used as a baseline among a list of commits. Useful when no Git provider is connected: the CLI can send the candidate ancestor commits and let Argos pick the closest one that has an eligible (complete, valid, approved and not rejected) baseline build.
*/
post: operations["findBaseline"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/auth/cli/token": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Exchange a CLI authorization code for a token
* @description Called by the CLI to exchange a PKCE authorization code for an API token.
*/
post: operations["exchangeCliToken"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/auth/github-actions/oidc/exchange": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Exchange a GitHub Actions OIDC token for an Argos token
* @description Called by GitHub Actions to exchange an OIDC token for a short-lived Argos project token.
*/
post: operations["exchangeGitHubActionsOidcToken"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/auth/github-actions/tokenless/exchange": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Exchange a tokenless GitHub Actions token for an Argos token
* @description Called by GitHub Actions to exchange a tokenless bearer token for a short-lived Argos project token. The provided commit and branch must match the GitHub workflow run.
*/
post: operations["exchangeGitHubActionsTokenlessToken"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/me": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get the current user
* @description Retrieve the user associated with the personal access token used to authenticate the request.
*/
get: operations["getMe"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/project": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get the current project
* @description Retrieve the project associated with the project token used to authenticate the request.
*/
get: operations["getAuthProject"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/builds/{buildId}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
/**
* Update a build
* @description Add screenshots to an existing build and update its metadata. Used to push the screenshots of a parallel shard, identified by `parallelIndex` and `parallelTotal`.
*/
put: operations["updateBuild"];
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Create a project
* @description Create a new project in an account you administer. The authenticated personal access token must be scoped to the target account, and the acting user must be an administrator of it.
*/
post: operations["createProject"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get a project
* @description Retrieve a project by its owner (account slug) and project name.
*/
get: operations["getProject"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/builds": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List a project's builds
* @description List the builds of a project, most recent first. Results are paginated. Use `distinctName` to return only the latest build per name and commit.
*/
get: operations["getProjectBuilds"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/builds/{buildNumber}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get a build
* @description Retrieve a single build by its number within a project, including its status and metadata.
*/
get: operations["getBuild"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/builds/{buildNumber}/diffs": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List a build's screenshot diffs
* @description List the screenshot diffs of a build, with pagination. Each diff compares a baseline screenshot to the one captured by the build. Each diff also carries its test's flakiness metrics and, when it is a change, its ignore state and occurrence count — so you can tell whether a change is worth reviewing or is just a flaky one. Use `needsReview` to return only the diffs that require review.
*/
get: operations["listBuildDiffs"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/changes/{changeId}/ignore": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Ignore a test change
* @description Ignore a test change so its diffs no longer require review and are automatically approved on future builds. Use it to silence a change that has been identified as flaky.
*/
post: operations["ignoreChange"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/changes/{changeId}/unignore": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Unignore a test change
* @description Stop ignoring a test change so its diffs require review again on future builds.
*/
post: operations["unignoreChange"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/builds/{buildNumber}/reviews": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List the reviews submitted on a build
* @description List the reviews submitted on a build, with pagination.
*/
get: operations["listReviews"];
put?: never;
/**
* Create a review on a build
* @description Submit a review on a build to approve or reject the changes it captured.
*/
post: operations["createReview"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/builds/{buildNumber}/reviews/{reviewId}/dismiss": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Dismiss a submitted review on a build
* @description Dismiss a previously submitted review on a build, clearing its effect on the build's review status.
*/
post: operations["dismissReview"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/builds/{buildNumber}/comments": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List the comments on a build
* @description List the comments on a build, with pagination.
*/
get: operations["listComments"];
put?: never;
/**
* Post a comment (or reply) on a build
* @description Post a comment on a build. Start a new thread, reply to an existing one with `threadId`, optionally anchor the comment to a screenshot diff, or attach it to your pending review with `addToReview`.
*/
post: operations["createComment"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/builds/{buildNumber}/comments/{commentId}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get a single comment on a build
* @description Retrieve a single comment on a build by its ID.
*/
get: operations["getComment"];
put?: never;
post?: never;
/**
* Delete a comment on a build
* @description Delete a comment on a build. Only the comment's author can delete it.
*/
delete: operations["deleteComment"];
options?: never;
head?: never;
/**
* Update a comment on a build
* @description Update the body of a comment on a build. Only the comment's author can edit it.
*/
patch: operations["updateComment"];
trace?: never;
};
"/projects/{owner}/{project}/builds/{buildNumber}/comments/{commentId}/reactions": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Add an emoji reaction to a comment
* @description Add an emoji reaction to a comment on behalf of the authenticated user.
*/
post: operations["addCommentReaction"];
/**
* Remove an emoji reaction from a comment
* @description Remove an emoji reaction previously added by the authenticated user from a comment.
*/
delete: operations["removeCommentReaction"];
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/builds/{buildNumber}/comments/{commentId}/resolve": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Mark a comment thread as resolved
* @description Mark a comment thread as resolved.
*/
post: operations["resolveCommentThread"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/builds/{buildNumber}/comments/{commentId}/unresolve": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Reopen a resolved comment thread
* @description Reopen a previously resolved comment thread.
*/
post: operations["unresolveCommentThread"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/projects/{owner}/{project}/builds/{buildNumber}/comments/{commentId}/subscription": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Subscribe to a comment thread's notifications
* @description Subscribe the authenticated user to a comment thread to receive notifications about new replies.
*/
post: operations["subscribeCommentThread"];
/**
* Unsubscribe from a comment thread's notifications
* @description Unsubscribe the authenticated user from a comment thread's notifications.
*/
delete: operations["unsubscribeCommentThread"];
options?: never;
head?: never;
patch?: never;
trace?: never;
};
}
type webhooks = Record<string, never>;
interface components {
schemas: {
/** @description SHA1 hash */Sha1Hash: string;
GitBranch: string; /** @description SHA256 hash */
Sha256Hash: string; /** @description Screenshot file to upload */
ScreenshotUploadRequest: {
key: components["schemas"]["Sha256Hash"]; /** @description Content type of the snapshot file */
contentType: string;
};
/**
* @description A unique identifier for the build
* @example 12345
*/
BuildId: string; /** @description Screenshot input */
ScreenshotInput: {
key: string;
name: string;
/**
* @description Name(s) to compare this screenshot against, instead of its own name. An array is tried in order: the first name that exists in the baseline wins, which lets a new screenshot fall back to an existing one.
* @example home.png
* @example [
* "home-variant-b.png",
* "home.png"
* ]
*/
baseName?: (string | string[]) | null;
parentName?: string | null;
metadata?: {
/**
* @description Ignored. Can be set to get completions, validations and documentation in some editors.
* @example https://api.argos-ci.com/v2/screenshot-metadata.json
*/
$schema?: string; /** @description The URL of the page that was screenshotted */
url?: string | null; /** @description An URL to an accessible preview of the screenshot */
previewUrl?: string | null;
viewport?: {
/** @description The width of the viewport */width: number; /** @description The height of the viewport */
height: number;
} | null; /** @description The color scheme when the screenshot was taken */
colorScheme?: ("light" | "dark") | null; /** @description The media type when the screenshot was taken */
mediaType?: ("screen" | "print") | null;
test?: {
/** @description The unique identifier of the test */id?: string | null; /** @description The title of the test */
title: string; /** @description The path of titles leading to the test */
titlePath: string[]; /** @description The number of retries for the test */
retries?: number | null; /** @description The current retry count */
retry?: number | null; /** @description The repeat count for the test */
repeat?: number | null; /** @description The location of the test in the source code */
location?: {
/** @description The located file */file: string; /** @description The line number in the file */
line: number; /** @description The column number in the file */
column: number;
}; /** @description Annotations associated to the test */
annotations?: {
/** @description The type of annotation */type: string; /** @description The description of the annotation */
description?: string; /** @description The location of the annotation in the source code */
location?: {
/** @description The located file */file: string; /** @description The line number in the file */
line: number; /** @description The column number in the file */
column: number;
};
}[]; /** @description Tags associated to the test */
tags?: string[];
} | null;
browser?: {
/** @description The name of the browser */name: string; /** @description The version of the browser */
version: string;
} | null; /** @description The automation library that generated the screenshot */
automationLibrary: {
/** @description The name of the automation library */name: string; /** @description The version of the automation library */
version: string;
}; /** @description The Argos SDK that generated the screenshot */
sdk: {
/** @description The name of the Argos SDK */name: string; /** @description The version of the Argos SDK */
version: string;
}; /** @description Storybook story metadata */
story?: {
/** @description Unique ID of the story */id: string; /** @description Tags attached to the story */
tags?: string[]; /** @description Story mode */
mode?: string; /** @description True if the story has a play function */
play?: boolean;
} | null; /** @description Tags associated to the screenshot */
tags?: string[];
} | null;
pwTraceKey?: string | null;
threshold?: number | null; /** @description Content type of the snapshot file */
contentType?: string;
}; /** @description Build metadata */
BuildMetadata: {
/** @description Test suite report */testReport?: {
/**
* @description Status of the test suite
* @enum {string}
*/
status: "passed" | "failed" | "timedout" | "interrupted";
stats?: {
/** @description Date when the test suite started */startTime?: string; /** @description Duration of the test suite in milliseconds */
duration?: number;
};
};
};
/**
* @description The build number
* @example 42
*/
BuildNumber: string;
AccountAnalytics: {
screenshots: {
series: {
total: number; /** @description Counts keyed by project ID. Use the sibling `projects` array to resolve each project name. */
projects: {
[key: string]: number;
}; /** @description Unix timestamp in milliseconds at the start of the period. */
ts: number;
}[];
all: {
total: number; /** @description Counts keyed by project ID. Use the sibling `projects` array to resolve each project name. */
projects: {
[key: string]: number;
};
};
projects: {
id: string;
name: string;
}[];
};
builds: {
series: {
total: number; /** @description Counts keyed by project ID. Use the sibling `projects` array to resolve each project name. */
projects: {
[key: string]: number;
};
changesDetected: number;
noChanges: number;
accepted: number;
rejected: number; /** @description Unix timestamp in milliseconds at the start of the period. */
ts: number;
}[];
all: {
total: number; /** @description Counts keyed by project ID. Use the sibling `projects` array to resolve each project name. */
projects: {
[key: string]: number;
};
changesDetected: number;
noChanges: number;
accepted: number;
rejected: number;
};
projects: {
id: string;
name: string;
}[];
};
}; /** @description Error response */
Error: {
error: string;
details?: {
message: string;
}[];
}; /** @description Build */
Build: {
id: components["schemas"]["BuildId"];
number: components["schemas"]["BuildNumberOutput"]; /** @description The head reference of the build */
head: components["schemas"]["BuildGitReference"]; /** @description The base reference of the build */
base: components["schemas"]["BuildGitReference"] | null; /** @description The status of the build */
status: ("accepted" | "rejected") | ("no-changes" | "changes-detected") | ("expired" | "pending" | "progress" | "error" | "aborted"); /** @description The conclusion of the build */
conclusion: ("no-changes" | "changes-detected") | null; /** @description Stats of the diffs present in the build */
stats: {
/** @description Added snapshots */added: number; /** @description Removed snapshots */
removed: number; /** @description Unchanged snapshots */
unchanged: number; /** @description Changed snapshots */
changed: number; /** @description Ignored snapshots */
ignored: number; /** @description Failure screenshots */
failure: number; /** @description Retry failure screenshots */
retryFailure: number; /** @description Total number of snapshots */
total: number;
} | null;
metadata: {
/** @description Test suite report */testReport?: {
/**
* @description Status of the test suite
* @enum {string}
*/
status: "passed" | "failed" | "timedout" | "interrupted";
stats?: {
/** @description Date when the test suite started */startTime?: string; /** @description Duration of the test suite in milliseconds */
duration?: number;
};
};
} | null;
/**
* Format: uri
* @description The URL of the build
*/
url: string; /** @description The notification payload for the build */
notification: {
description: string;
context: string;
github: {
/** @enum {string} */state: "pending" | "success" | "error" | "failure";
};
gitlab: {
/** @enum {string} */state: "pending" | "running" | "success" | "failed" | "canceled";
}; /** Format: uri */
url: string;
} | null;
}; /** @description Git reference */
BuildGitReference: {
/** @description The commit SHA */sha: components["schemas"]["Sha1Hash"]; /** @description The branch name */
branch: string;
}; /** @description A user. */
User: {
id: string;
slug: string;
name: string | null;
}; /** @description Project */
Project: {
id: string;
account: components["schemas"]["Account"];
name: string;
defaultBaseBranch: string;
hasRemoteContentAccess: boolean;
}; /** @description Account */
Account: {
id: string;
slug: string;
}; /** @description Page information */
PageInfo: {
/** @description Total number of items */total: number; /** @description Current page number */
page: number; /** @description Number of items per page */
perPage: number;
}; /** @description Snapshot diff */
SnapshotDiff: {
/** @description Unique identifier of the snapshot diff */id: string; /** @description Name of the snapshot diff */
name: string;
/**
* @description Status of the snapshot diff
* @enum {string}
*/
status: "pending" | "removed" | "failure" | "added" | "changed" | "unchanged" | "retryFailure" | "ignored"; /** @description Similarity score between snapshots */
score: number | null; /** @description Grouping key for the snapshot diff */
group: string | null; /** @description Parent name of the snapshot (usually the story id) */
parentName: string | null; /** @description URL of the diff image */
url: string | null;
base: {
/** @description Unique identifier of the snapshot */id: string; /** @description Name of the snapshot */
name: string;
metadata: {
/**
* @description Ignored. Can be set to get completions, validations and documentation in some editors.
* @example https://api.argos-ci.com/v2/screenshot-metadata.json
*/
$schema?: string; /** @description The URL of the page that was screenshotted */
url?: string | null; /** @description An URL to an accessible preview of the screenshot */
previewUrl?: string | null;
viewport?: {
/** @description The width of the viewport */width: number; /** @description The height of the viewport */
height: number;
} | null; /** @description The color scheme when the screenshot was taken */
colorScheme?: ("light" | "dark") | null; /** @description The media type when the screenshot was taken */
mediaType?: ("screen" | "print") | null;
test?: {
/** @description The unique identifier of the test */id?: string | null; /** @description The title of the test */
title: string; /** @description The path of titles leading to the test */
titlePath: string[]; /** @description The number of retries for the test */
retries?: number | null; /** @description The current retry count */
retry?: number | null; /** @description The repeat count for the test */
repeat?: number | null; /** @description The location of the test in the source code */
location?: {
/** @description The located file */file: string; /** @description The line number in the file */
line: number; /** @description The column number in the file */
column: number;
}; /** @description Annotations associated to the test */
annotations?: {
/** @description The type of annotation */type: string; /** @description The description of the annotation */
description?: string; /** @description The location of the annotation in the source code */
location?: {
/** @description The located file */file: string; /** @description The line number in the file */
line: number; /** @description The column number in the file */
column: number;
};
}[]; /** @description Tags associated to the test */
tags?: string[];
} | null;
browser?: {
/** @description The name of the browser */name: string; /** @description The version of the browser */
version: string;
} | null; /** @description The automation library that generated the screenshot */
automationLibrary: {
/** @description The name of the automation library */name: string; /** @description The version of the automation library */
version: string;
}; /** @description The Argos SDK that generated the screenshot */
sdk: {
/** @description The name of the Argos SDK */name: string; /** @description The version of the Argos SDK */
version: string;
}; /** @description Storybook story metadata */
story?: {
/** @description Unique ID of the story */id: string; /** @description Tags attached to the story */
tags?: string[]; /** @description Story mode */
mode?: string; /** @description True if the story has a play function */
play?: boolean;
} | null; /** @description Tags associated to the screenshot */
tags?: string[];
} | null; /** @description Width of the screenshot in pixels */
width: number | null; /** @description Height of the screenshot in pixels */
height: number | null;
/**
* Format: uri
* @description Public URL of the snapshot
*/
url: string; /** @description Content type of the snapshot file */
contentType: string;
} | null;
head: {
/** @description Unique identifier of the snapshot */id: string; /** @description Name of the snapshot */
name: string;
metadata: {
/**
* @description Ignored. Can be set to get completions, validations and documentation in some editors.
* @example https://api.argos-ci.com/v2/screenshot-metadata.json
*/
$schema?: string; /** @description The URL of the page that was screenshotted */
url?: string | null; /** @description An URL to an accessible preview of the screenshot */
previewUrl?: string | null;
viewport?: {
/** @description The width of the viewport */width: number; /** @description The height of the viewport */
height: number;
} | null; /** @description The color scheme when the screenshot was taken */
colorScheme?: ("light" | "dark") | null; /** @description The media type when the screenshot was taken */
mediaType?: ("screen" | "print") | null;
test?: {
/** @description The unique identifier of the test */id?: string | null; /** @description The title of the test */
title: string; /** @description The path of titles leading to the test */
titlePath: string[]; /** @description The number of retries for the test */
retries?: number | null; /** @description The current retry count */
retry?: number | null; /** @description The repeat count for the test */
repeat?: number | null; /** @description The location of the test in the source code */
location?: {
/** @description The located file */file: string; /** @description The line number in the file */
line: number; /** @description The column number in the file */
column: number;
}; /** @description Annotations associated to the test */
annotations?: {
/** @description The type of annotation */type: string; /** @description The description of the annotation */
description?: string; /** @description The location of the annotation in the source code */
location?: {
/** @description The located file */file: string; /** @description The line number in the file */
line: number; /** @description The column number in the file */
column: number;
};
}[]; /** @description Tags associated to the test */
tags?: string[];
} | null;
browser?: {
/** @description The name of the browser */name: string; /** @description The version of the browser */
version: string;
} | null; /** @description The automation library that generated the screenshot */
automationLibrary: {
/** @description The name of the automation library */name: string; /** @description The version of the automation library */
version: string;
}; /** @description The Argos SDK that generated the screenshot */
sdk: {
/** @description The name of the Argos SDK */name: string; /** @description The version of the Argos SDK */
version: string;
}; /** @description Storybook story metadata */
story?: {
/** @description Unique ID of the story */id: string; /** @description Tags attached to the story */
tags?: string[]; /** @description Story mode */
mode?: string; /** @description True if the story has a play function */
play?: boolean;
} | null; /** @description Tags associated to the screenshot */
tags?: string[];
} | null; /** @description Width of the screenshot in pixels */
width: number | null; /** @description Height of the screenshot in pixels */
height: number | null;
/**
* Format: uri
* @description Public URL of the snapshot
*/
url: string; /** @description Content type of the snapshot file */
contentType: string;
} | null;
test: components["schemas"]["Test"] | null;
change: components["schemas"]["Change"] | null;
}; /** @description Test associated to a diff, with flakiness metrics to help decide whether a change is worth reviewing. */
Test: {
/** @description Unique identifier of the test */id: string; /** @description Name of the test */
name: string; /** @description Name of the build the test belongs to */
buildName: string;
metrics: components["schemas"]["TestMetrics"];
}; /** @description Flakiness metrics of a test over the requested period. */
TestMetrics: {
/** @description Number of builds in which this test ran over the metrics period. */total: number; /** @description Number of times the test changed (produced a diff) over the metrics period. */
changes: number; /** @description Number of changes that were seen only once over the metrics period. A high ratio of unique changes is a strong flakiness signal. */
uniqueChanges: number; /** @description Ratio of builds without a change, between 0 and 1. `1` means the test never changed. */
stability: number; /** @description How consistent the changes are, between 0 and 1. `1` means changes repeat the same way; a low value means changes are erratic. */
consistency: number; /** @description Overall flakiness score between 0 and 1, derived from stability and consistency. `0` means stable, `1` means highly flaky. */
flakiness: number;
}; /** @description A test change: a specific visual difference (fingerprint) of a test that can be ignored to silence flaky changes. */
Change: {
/** @description Unique identifier of the change (a test + fingerprint pair). Use it with the ignore/unignore endpoints. */id: string; /** @description Whether this change is currently ignored. Ignored changes no longer require review and are automatically approved. */
ignored: boolean; /** @description Number of times this change has been seen over the metrics period. A high count for a recurring change is a strong flakiness signal. */
occurrences: number;
}; /** @description Build review */
BuildReview: {
id: string;
buildId: string;
/**
* @description State of a build review: approved, rejected, commented (neutral) or pending (an unsubmitted draft).
* @enum {string}
*/
state: "approved" | "rejected" | "commented" | "pending"; /** @description The user who submitted the review. */
user: components["schemas"]["User"] | null; /** @description Date the review was dismissed, null if not dismissed. */
dismissedAt: string | null; /** @description The user who dismissed the review, if any. */
dismissedBy: components["schemas"]["User"] | null; /** @description Date the review was created. */
date: string;
}; /** @description A comment posted on a build. */
Comment: {
id: string;
buildId: string; /** @description Root comment ID when this comment is a reply. */
threadId: string | null; /** @description Rich-text JSON content of the comment. */
body: unknown; /** @description Plain-text rendering of the comment content. */
text: string;
author: components["schemas"]["User"] | null; /** @description Screenshot diff this comment is anchored to, if any. */
screenshotDiffId: string | null; /** @description Where the comment points on its screenshot diff. Null means the whole diff. */
anchor: ({
/** @constant */type: "point";
x: number;
y: number;
} | {
/** @constant */type: "lines";
from: number;
to: number;
}) | null; /** @description Whether the comment belongs to a pending (unsubmitted) review and is only visible to its author. */
pending: boolean; /** @description Date the thread was resolved, null if not resolved. Only set on a root comment. */
resolvedAt: string | null; /** @description Date the comment was last edited, null if never edited. */
editedAt: string | null; /** @description Date the comment was posted. */
createdAt: string;
reactions: {
/** @description The emoji used for the reaction. */emoji: string; /** @description Number of users who reacted with this emoji. */
count: number; /** @description The users who reacted with this emoji. */
users: components["schemas"]["User"][];
}[];
};
/**
* @description The build number
* @example 42
*/
BuildNumberOutput: unknown;
};
responses: never;
parameters: never;
requestBodies: never;
headers: never;
pathItems: never;
}
type $defs = Record<string, never>;
interface operations {
getAccountAnalytics: {
parameters: {
query: {
/** @description Start of the analytics period, as an ISO 8601 datetime. */from: string; /** @description End of the analytics period, as an ISO 8601 datetime. Defaults to the current time. */
to?: string; /** @description Time period used to group each series data point. */
groupBy: "day" | "week" | "month"; /** @description Optional project name filter. Pass one value or repeat the parameter for multiple projects. */
projectNames?: string | string[];
};
header?: never;
path: {
/** @description Slug of the account to retrieve analytics for. */accountSlug: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Account analytics */200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["AccountAnalytics"];
};
}; /** @description Invalid parameters */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
}; /** @description Server error */
500: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
createBuild: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: {
content: {
"application/json": {
/** @description The commit the build is running on */commit: components["schemas"]["Sha1Hash"]; /** @description The branch the build is running on */
branch: components["schemas"]["GitBranch"]; /** @description Keys of Playwright trace files */
pwTraceKeys?: components["schemas"]["Sha256Hash"][]; /** @description The name of the build (for multi-build setups) */
name?: string | null; /** @description Whether to run the build in parallel */
parallel?: boolean | null; /** @description A unique nonce for the parallel build */
parallelNonce?: string | null; /** @description The pull request number */
prNumber?: number | null; /** @description The head commit of the pull request */
prHeadCommit?: components["schemas"]["Sha1Hash"] | null; /** @description The commit to use as a reference for the build */
referenceCommit?: components["schemas"]["Sha1Hash"] | null; /** @description The branch to use as a reference for the build */
referenceBranch?: string | null; /** @description The parent commits of the build */
parentCommits?: components["schemas"]["Sha1Hash"][] | null; /** @description The mode in which the build is running */
mode?: ("ci" | "monitoring") | null; /** @description The CI provider being used */
ciProvider?: string | null; /** @description The version of the Argos SDK being used */
argosSdk?: string | null; /** @description The ID of the current run */
runId?: string | null; /** @description The attempt number of the current run */
runAttempt?: number | null; /** @description Whether the build was skipped, not comparing anything and always succeeding */
skipped?: boolean | null; /** @description Whether the build has been created in a merge queue */
mergeQueue?: boolean | null; /** @description Pull request numbers aggregated by the merge queue build. Requires `mergeQueue` to be `true`. */
mergeQueuePrNumbers?: number[] | null;
/**
* @description Indicates whether this build contains only a subset of screenshots.
* This is useful when a build is created from an incomplete test suite where some tests are skipped.
*/
subset?: boolean | null;
} & ({
/**
* @deprecated
* @description Keys of screenshot files
*/
screenshotKeys: components["schemas"]["Sha256Hash"][];
screenshots?: unknown;
} | {
/** @description Screenshot files to upload */screenshots: components["schemas"]["ScreenshotUploadRequest"][];
screenshotKeys?: unknown;
});
};
};
responses: {
/** @description Result of build creation */201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
build: components["schemas"]["Build"];
screenshots: ({
key: string;
/**
* Format: uri
* @deprecated
* @description Deprecated. Use postUrl and fields instead.
*/
putUrl: string;
} | {
key: string; /** Format: uri */
postUrl: string;
fields: {
[key: string]: string;
};
})[];
pwTraces: ({
key: string;
/**
* Format: uri
* @deprecated
* @description Deprecated. Use postUrl and fields instead.
*/
putUrl: string;
} | {
key: string; /** Format: uri */
postUrl: string;
fields: {
[key: string]: string;
};
})[];
};
};
}; /** @description Invalid parameters */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
}; /** @description Conflict */
409: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
}; /** @description Server error */
500: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
createDeployment: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: {
content: {
"application/json": {
/** @description The commit SHA */commit: components["schemas"]["Sha1Hash"]; /** @description The branch name */
branch: components["schemas"]["GitBranch"]; /** @description The pull request number */
prNumber?: number | null;
/**
* @description The deployment environment. When omitted, it is inferred from `branch`: branches matching the configured production-branch glob are treated as `production`; all others default to `preview`.
* @enum {string}
*/
environment?: "preview" | "production"; /** @description List of files to deploy */
files: {
path: string;
hash: components["schemas"]["Sha256Hash"];
size: number;
contentType: string;
}[];
};
};
};
responses: {
/** @description Deployment created */201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
deploymentId: string;
uploadFiles: {
path: string;
hash: string; /** Format: uri */
uploadUrl: string;
}[];
};
};
}; /** @description Invalid parameters */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
}; /** @description Server error */
500: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Error"];
};
};
};
};
getDeployment: {
parameters: {
query?: never;
header?: never;
path: {
/** @description The deployment ID */deploymentId: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Deployment details */200: {
headers: {
[name: string]: unknown;
};
content: {