UNPKG

trigger.dev

Version:

A Command-Line Interface for Trigger.dev projects

48 lines (47 loc) 1.21 kB
import { CliApiClient } from "../apiClient.js"; import { GitMeta } from "@trigger.dev/core/v3"; 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; 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>;