trigger.dev
Version:
A Command-Line Interface for Trigger.dev projects
49 lines (48 loc) • 1.31 kB
TypeScript
import type { GitMeta } from "@trigger.dev/core/v3";
import { CliApiClient } from "../apiClient.js";
export type LoginResultOk = {
ok: true;
profile: string;
userId: string;
email: string;
dashboardUrl: string;
auth: {
apiUrl: string;
accessToken: string;
tokenType: "personal" | "organization";
};
};
export type LoginResult = LoginResultOk | {
ok: false;
error: string;
auth?: {
apiUrl: string;
accessToken: string;
tokenType: "personal" | "organization";
};
};
export declare function isLoggedIn(profile?: string): Promise<LoginResult>;
export type GetEnvOptions = {
accessToken: string;
apiUrl: string;
projectRef: string;
env: string;
branch?: string;
profile: string;
};
export declare function getProjectClient(options: GetEnvOptions): Promise<{
id: string;
name: string;
defaultRuntime: "bun" | "node" | "node-22" | "node-24" | "node-26" | null | undefined;
client: CliApiClient;
} | undefined>;
export type UpsertBranchOptions = {
accessToken: string;
apiUrl: string;
projectRef: string;
branch: string;
gitMeta: GitMeta | undefined;
};
export declare function upsertBranch(options: UpsertBranchOptions): Promise<{
id: string;
} | undefined>;