@capgo/cli
Version:
A CLI to upload to capgo servers
81 lines (80 loc) • 2.88 kB
TypeScript
import type { CapgoClient } from '../utils';
import type { AppVersionRow } from '../types/api';
import type { NativePackage } from '../schemas/common';
interface CheckVersionOptions {
silent?: boolean;
autoUnlink?: boolean;
channelName?: string;
requireMatch?: boolean;
apikey?: string;
apiHost?: string;
}
interface CapgoHttpOptions {
apikey: string;
silent?: boolean;
apiHost?: string;
}
export declare function checkVersionNotUsedInChannel(client: CapgoClient, appid: string, versionData: AppVersionRow, options?: CheckVersionOptions): Promise<void>;
export declare function createChannel(options: CapgoHttpOptions, update: {
app_id: string;
channel: string;
version?: string | null;
public?: boolean;
allow_device_self_set?: boolean;
[key: string]: unknown;
}): Promise<{
data: any;
error: Error | null;
}>;
export declare function delChannel(options: CapgoHttpOptions, name: string, appId: string, deleteBundle?: boolean): Promise<{
data: any;
error: Error | null;
}>;
export declare function findChannel(client: CapgoClient, appId: string, name: string): Promise<{
data: import("./cli-data").CliChannelRow | null;
error: null;
} | {
data: null;
error: Error;
}>;
export interface ChannelLinkedVersion {
id: number;
name: string;
}
export declare function findVersionsLinkedToChannel(client: CapgoClient, appId: string, name: string): Promise<{
stable: ChannelLinkedVersion | null;
rollout: ChannelLinkedVersion | null;
}>;
export declare function isVersionLinkedToOtherChannel(client: CapgoClient, appId: string, versionId: number, excludeChannelName: string): Promise<boolean>;
export type { Channel } from '../schemas/channel';
type Channel = import('../schemas/channel').Channel;
export declare function formatChannels(data: Channel[], columns?: number): string;
export declare function displayChannels(data: Channel[], silent?: boolean): void;
export interface ChannelCompatibilityContext {
disable_auto_update: string;
version: {
id: number;
name: string;
min_update_version: string | null;
native_packages: NativePackage[];
} | null;
}
export declare function fetchChannelCompatibilityContext(options: CapgoHttpOptions, appId: string, channel: string): Promise<ChannelCompatibilityContext | null>;
export declare function getActiveChannels(options: CapgoHttpOptions, appid: string): Promise<{
id: number;
name: string;
public: boolean;
ios: boolean;
android: boolean;
disable_auto_update: string;
disable_auto_update_under_native: boolean;
allow_device_self_set: boolean;
allow_emulator: boolean;
allow_device: boolean;
allow_dev: boolean;
allow_prod: boolean;
version?: {
[x: string]: unknown;
name?: string | undefined;
} | undefined;
}[]>;