convex
Version:
Client for the Convex Cloud
103 lines • 3.32 kB
TypeScript
import { Context } from "../../bundler/context.js";
export type DeploymentName = string;
export type DeploymentType = "dev" | "prod";
export type Project = {
id: string;
name: string;
slug: string;
isDemo: boolean;
};
type AdminKey = string;
export declare function createProjectProvisioningDevOrProd(ctx: Context, { teamSlug: selectedTeamSlug, projectName, }: {
teamSlug: string;
projectName: string;
}, firstDeploymentType: DeploymentType): Promise<{
projectSlug: string;
teamSlug: string;
deploymentName: string;
url: string;
adminKey: AdminKey;
projectsRemaining: number;
}>;
export declare function fetchDeploymentCredentialsProvisioningDevOrProd(ctx: Context, { teamSlug, projectSlug }: {
teamSlug: string;
projectSlug: string;
}, deploymentType: DeploymentType): Promise<{
deploymentName: string | undefined;
url: string;
adminKey: AdminKey;
}>;
export declare function fetchDeploymentCredentialsForName(ctx: Context, deploymentName: DeploymentName, deploymentType: DeploymentType): Promise<{
deploymentName: string;
adminKey: string;
url: string;
deploymentType: DeploymentType;
} | {
error: unknown;
}>;
export type DeploymentSelection = {
kind: "deployKey";
} | {
kind: "previewName";
previewName: string;
} | {
kind: "deploymentName";
deploymentName: string;
} | {
kind: "ownProd";
} | {
kind: "ownDev";
} | {
kind: "urlWithAdminKey";
url: string;
adminKey: string;
} | {
kind: "urlWithLogin";
url: string;
};
export declare function storeAdminKeyEnvVar(adminKeyOption?: string | null): void;
export type DeploymentSelectionOptions = {
prod?: boolean | undefined;
previewName?: string | undefined;
deploymentName?: string | undefined;
url?: string | undefined;
adminKey?: string | undefined;
};
export declare function deploymentSelectionFromOptions(options: DeploymentSelectionOptions): DeploymentSelection;
export declare function fetchDeploymentCredentialsWithinCurrentProject(ctx: Context, deploymentSelection: DeploymentSelection): Promise<{
url: string;
adminKey: AdminKey;
deploymentName?: string;
deploymentType?: string | undefined;
}>;
type ProjectSelection = {
kind: "deploymentName";
deploymentName: string;
} | {
kind: "teamAndProjectSlugs";
teamSlug: string;
projectSlug: string;
};
export declare function projectSelection(ctx: Context, configuredDeployment: string | null, configuredAdminKey: string | undefined): Promise<ProjectSelection>;
export declare function fetchDeploymentCredentialsProvisionProd(ctx: Context, deploymentSelection: DeploymentSelection): Promise<{
url: string;
adminKey: AdminKey;
deploymentName?: string;
deploymentType?: string;
}>;
export declare function fetchTeamAndProject(ctx: Context, deploymentName: string): Promise<{
team: string;
project: string;
teamId: number;
projectId: number;
}>;
export declare function fetchDeploymentCredentialsProvisioningDevOrProdMaybeThrows(ctx: Context, { teamSlug, projectSlug }: {
teamSlug: string;
projectSlug: string;
}, deploymentType: DeploymentType): Promise<{
deploymentName: string | undefined;
url: string;
adminKey: AdminKey;
}>;
export {};
//# sourceMappingURL=api.d.ts.map