trigger.dev
Version:
A Command-Line Interface for Trigger.dev projects
488 lines (487 loc) • 19.5 kB
TypeScript
import { z } from "zod";
export declare const ProjectRefSchema: z.ZodOptional<z.ZodString>;
export declare const CreateProjectInOrgInput: z.ZodObject<{
orgParam: z.ZodString;
name: z.ZodString;
}, "strip", z.ZodTypeAny, {
name: string;
orgParam: string;
}, {
name: string;
orgParam: string;
}>;
export type CreateProjectInOrgInput = z.output<typeof CreateProjectInOrgInput>;
export declare const InitializeProjectInput: z.ZodObject<{
orgParam: z.ZodString;
projectRef: z.ZodOptional<z.ZodString>;
projectName: z.ZodString;
cwd: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
orgParam: string;
projectName: string;
projectRef?: string | undefined;
cwd?: string | undefined;
}, {
orgParam: string;
projectName: string;
projectRef?: string | undefined;
cwd?: string | undefined;
}>;
export type InitializeProjectInput = z.output<typeof InitializeProjectInput>;
export declare const CommonProjectsInput: z.ZodObject<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "dev" | "staging" | "prod";
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
environment?: "preview" | "dev" | "staging" | "prod" | undefined;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type CommonProjectsInput = z.output<typeof CommonProjectsInput>;
export declare const TriggerTaskInput: z.ZodObject<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
} & {
taskId: z.ZodString;
payload: z.ZodAny;
options: z.ZodOptional<z.ZodObject<{
queue: z.ZodOptional<z.ZodObject<{
name: z.ZodString;
}, "strip", z.ZodTypeAny, {
name: string;
}, {
name: string;
}>>;
delay: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
idempotencyKey: z.ZodOptional<z.ZodString>;
machine: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
maxAttempts: z.ZodOptional<z.ZodNumber>;
maxDuration: z.ZodOptional<z.ZodNumber>;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
ttl: z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
}, "strip", z.ZodTypeAny, {
ttl: string | number;
tags?: string[] | undefined;
idempotencyKey?: string | undefined;
maxAttempts?: number | undefined;
maxDuration?: number | undefined;
queue?: {
name: string;
} | undefined;
machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
delay?: string | Date | undefined;
}, {
tags?: string[] | undefined;
idempotencyKey?: string | undefined;
maxAttempts?: number | undefined;
maxDuration?: number | undefined;
queue?: {
name: string;
} | undefined;
machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
delay?: string | Date | undefined;
ttl?: string | number | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "dev" | "staging" | "prod";
taskId: string;
payload?: any;
options?: {
ttl: string | number;
tags?: string[] | undefined;
idempotencyKey?: string | undefined;
maxAttempts?: number | undefined;
maxDuration?: number | undefined;
queue?: {
name: string;
} | undefined;
machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
delay?: string | Date | undefined;
} | undefined;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
taskId: string;
payload?: any;
options?: {
tags?: string[] | undefined;
idempotencyKey?: string | undefined;
maxAttempts?: number | undefined;
maxDuration?: number | undefined;
queue?: {
name: string;
} | undefined;
machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
delay?: string | Date | undefined;
ttl?: string | number | undefined;
} | undefined;
environment?: "preview" | "dev" | "staging" | "prod" | undefined;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type TriggerTaskInput = z.output<typeof TriggerTaskInput>;
export declare const CommonRunsInput: z.ZodObject<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
} & {
runId: z.ZodString;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "dev" | "staging" | "prod";
runId: string;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
runId: string;
environment?: "preview" | "dev" | "staging" | "prod" | undefined;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type CommonRunsInput = z.output<typeof CommonRunsInput>;
export declare const WaitForRunInput: z.ZodObject<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
} & {
runId: z.ZodString;
} & {
timeoutInSeconds: z.ZodDefault<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "dev" | "staging" | "prod";
runId: string;
timeoutInSeconds: number;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
runId: string;
environment?: "preview" | "dev" | "staging" | "prod" | undefined;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
timeoutInSeconds?: number | undefined;
}>;
export type WaitForRunInput = z.output<typeof WaitForRunInput>;
export declare const GetRunDetailsInput: z.ZodObject<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
} & {
runId: z.ZodString;
} & {
maxTraceLines: z.ZodDefault<z.ZodNumber>;
cursor: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "dev" | "staging" | "prod";
runId: string;
maxTraceLines: number;
branch?: string | undefined;
cursor?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
runId: string;
environment?: "preview" | "dev" | "staging" | "prod" | undefined;
branch?: string | undefined;
cursor?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
maxTraceLines?: number | undefined;
}>;
export type GetRunDetailsInput = z.output<typeof GetRunDetailsInput>;
export declare const GetSpanDetailsInput: z.ZodObject<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
} & {
runId: z.ZodString;
} & {
spanId: z.ZodString;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "dev" | "staging" | "prod";
runId: string;
spanId: string;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
runId: string;
spanId: string;
environment?: "preview" | "dev" | "staging" | "prod" | undefined;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type GetSpanDetailsInput = z.output<typeof GetSpanDetailsInput>;
export declare const ListRunsInput: z.ZodObject<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
} & {
cursor: z.ZodOptional<z.ZodString>;
limit: z.ZodOptional<z.ZodNumber>;
status: z.ZodOptional<z.ZodEnum<["PENDING_VERSION", "QUEUED", "DEQUEUED", "EXECUTING", "WAITING", "COMPLETED", "CANCELED", "FAILED", "CRASHED", "SYSTEM_FAILURE", "DELAYED", "EXPIRED", "TIMED_OUT"]>>;
taskIdentifier: z.ZodOptional<z.ZodString>;
version: z.ZodOptional<z.ZodString>;
tag: z.ZodOptional<z.ZodString>;
from: z.ZodOptional<z.ZodString>;
to: z.ZodOptional<z.ZodString>;
period: z.ZodOptional<z.ZodString>;
machine: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
region: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "dev" | "staging" | "prod";
status?: "PENDING_VERSION" | "QUEUED" | "DEQUEUED" | "EXECUTING" | "WAITING" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT" | undefined;
version?: string | undefined;
region?: string | undefined;
machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
taskIdentifier?: string | undefined;
limit?: number | undefined;
branch?: string | undefined;
tag?: string | undefined;
period?: string | undefined;
from?: string | undefined;
to?: string | undefined;
cursor?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
status?: "PENDING_VERSION" | "QUEUED" | "DEQUEUED" | "EXECUTING" | "WAITING" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT" | undefined;
version?: string | undefined;
region?: string | undefined;
environment?: "preview" | "dev" | "staging" | "prod" | undefined;
machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
taskIdentifier?: string | undefined;
limit?: number | undefined;
branch?: string | undefined;
tag?: string | undefined;
period?: string | undefined;
from?: string | undefined;
to?: string | undefined;
cursor?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type ListRunsInput = z.output<typeof ListRunsInput>;
export declare const CommonDeployInput: z.ZodObject<Omit<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
}, "environment"> & {
environment: z.ZodDefault<z.ZodEnum<["staging", "prod", "preview"]>>;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "staging" | "prod";
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
environment?: "preview" | "staging" | "prod" | undefined;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type CommonDeployInput = z.output<typeof CommonDeployInput>;
export declare const DeployInput: z.ZodObject<Omit<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
}, "environment"> & {
environment: z.ZodDefault<z.ZodEnum<["staging", "prod", "preview"]>>;
} & {
skipPromotion: z.ZodOptional<z.ZodBoolean>;
skipSyncEnvVars: z.ZodOptional<z.ZodBoolean>;
skipUpdateCheck: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "staging" | "prod";
skipPromotion?: boolean | undefined;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
skipUpdateCheck?: boolean | undefined;
skipSyncEnvVars?: boolean | undefined;
}, {
environment?: "preview" | "staging" | "prod" | undefined;
skipPromotion?: boolean | undefined;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
skipUpdateCheck?: boolean | undefined;
skipSyncEnvVars?: boolean | undefined;
}>;
export type DeployInput = z.output<typeof DeployInput>;
export declare const ListDeploysInput: z.ZodObject<Omit<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
}, "environment"> & {
environment: z.ZodDefault<z.ZodEnum<["staging", "prod", "preview"]>>;
} & {
cursor: z.ZodOptional<z.ZodString>;
limit: z.ZodOptional<z.ZodNumber>;
from: z.ZodOptional<z.ZodString>;
to: z.ZodOptional<z.ZodString>;
period: z.ZodOptional<z.ZodString>;
status: z.ZodOptional<z.ZodEnum<["PENDING", "BUILDING", "DEPLOYING", "DEPLOYED", "FAILED", "CANCELED", "TIMED_OUT"]>>;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "staging" | "prod";
status?: "CANCELED" | "FAILED" | "TIMED_OUT" | "PENDING" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | undefined;
limit?: number | undefined;
branch?: string | undefined;
period?: string | undefined;
from?: string | undefined;
to?: string | undefined;
cursor?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
status?: "CANCELED" | "FAILED" | "TIMED_OUT" | "PENDING" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | undefined;
environment?: "preview" | "staging" | "prod" | undefined;
limit?: number | undefined;
branch?: string | undefined;
period?: string | undefined;
from?: string | undefined;
to?: string | undefined;
cursor?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type ListDeploysInput = z.output<typeof ListDeploysInput>;
export declare const QueryInput: z.ZodObject<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
} & {
query: z.ZodString;
scope: z.ZodDefault<z.ZodEnum<["environment", "project", "organization"]>>;
period: z.ZodOptional<z.ZodString>;
from: z.ZodOptional<z.ZodString>;
to: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "dev" | "staging" | "prod";
scope: "environment" | "organization" | "project";
query: string;
branch?: string | undefined;
period?: string | undefined;
from?: string | undefined;
to?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
query: string;
environment?: "preview" | "dev" | "staging" | "prod" | undefined;
scope?: "environment" | "organization" | "project" | undefined;
branch?: string | undefined;
period?: string | undefined;
from?: string | undefined;
to?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type QueryInput = z.output<typeof QueryInput>;
export declare const QuerySchemaInput: z.ZodObject<Pick<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
}, "environment" | "branch" | "configPath" | "projectRef"> & {
table: z.ZodString;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "dev" | "staging" | "prod";
table: string;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
table: string;
environment?: "preview" | "dev" | "staging" | "prod" | undefined;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type QuerySchemaInput = z.output<typeof QuerySchemaInput>;
export declare const ListDashboardsInput: z.ZodObject<Pick<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
}, "environment" | "branch" | "configPath" | "projectRef">, "strip", z.ZodTypeAny, {
environment: "preview" | "dev" | "staging" | "prod";
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
environment?: "preview" | "dev" | "staging" | "prod" | undefined;
branch?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type ListDashboardsInput = z.output<typeof ListDashboardsInput>;
export declare const RunDashboardQueryInput: z.ZodObject<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
environment: z.ZodDefault<z.ZodEnum<["dev", "staging", "prod", "preview"]>>;
branch: z.ZodOptional<z.ZodString>;
} & {
dashboardKey: z.ZodString;
widgetId: z.ZodString;
period: z.ZodOptional<z.ZodString>;
from: z.ZodOptional<z.ZodString>;
to: z.ZodOptional<z.ZodString>;
scope: z.ZodDefault<z.ZodEnum<["environment", "project", "organization"]>>;
}, "strip", z.ZodTypeAny, {
environment: "preview" | "dev" | "staging" | "prod";
scope: "environment" | "organization" | "project";
dashboardKey: string;
widgetId: string;
branch?: string | undefined;
period?: string | undefined;
from?: string | undefined;
to?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
dashboardKey: string;
widgetId: string;
environment?: "preview" | "dev" | "staging" | "prod" | undefined;
scope?: "environment" | "organization" | "project" | undefined;
branch?: string | undefined;
period?: string | undefined;
from?: string | undefined;
to?: string | undefined;
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type RunDashboardQueryInput = z.output<typeof RunDashboardQueryInput>;
export declare const ListPreviewBranchesInput: z.ZodObject<{
projectRef: z.ZodOptional<z.ZodString>;
configPath: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
configPath?: string | undefined;
projectRef?: string | undefined;
}, {
configPath?: string | undefined;
projectRef?: string | undefined;
}>;
export type ListPreviewBranchesInput = z.output<typeof ListPreviewBranchesInput>;