eas-cli
Version:
EAS command line tool
80 lines (79 loc) • 4.11 kB
TypeScript
import { Actor } from '../user/User';
export type AnalyticsEvent = CommandEvent | BuildEvent | SubmissionEvent | MetadataEvent;
export declare enum CommandEvent {
ACTION = "action"
}
export declare enum SubmissionEvent {
SUBMIT_COMMAND = "submit cli submit command",
SUBMIT_COMMAND_ATTEMPT = "submit cli attempt",
SUBMIT_COMMAND_SUCCESS = "submit cli success",
SUBMIT_COMMAND_FAIL = "submit cli fail",
GATHER_CREDENTIALS_ATTEMPT = "submit cli gather credentials attempt",
GATHER_CREDENTIALS_SUCCESS = "submit cli gather credentials success",
GATHER_CREDENTIALS_FAIL = "submit cli gather credentials fail",
GATHER_ARCHIVE_ATTEMPT = "submit cli gather archive attempt",
GATHER_ARCHIVE_SUCCESS = "submit cli gather archive success",
GATHER_ARCHIVE_FAIL = "submit cli gather archive fail",
SUBMIT_REQUEST_ATTEMPT = "submit cli request attempt",
SUBMIT_REQUEST_SUCCESS = "submit cli request success",
SUBMIT_REQUEST_FAIL = "submit cli request fail",
API_KEY_DOWNLOAD_FAIL = "submit cli credentials api key download fail",
API_KEY_DOWNLOAD_RETRY = "submit cli credentials api key download fail temporary",
API_KEY_DOWNLOAD_SUCCESS = "submit cli credentials api key download succeed"
}
export declare enum BuildEvent {
BUILD_COMMAND = "build cli build command",
PROJECT_UPLOAD_ATTEMPT = "build cli project upload attempt",
PROJECT_UPLOAD_SUCCESS = "build cli project upload success",
PROJECT_UPLOAD_FAIL = "build cli project upload fail",
GATHER_CREDENTIALS_ATTEMPT = "build cli gather credentials attempt",
GATHER_CREDENTIALS_SUCCESS = "build cli gather credentials success",
GATHER_CREDENTIALS_FAIL = "build cli gather credentials fail",
CONFIGURE_PROJECT_ATTEMPT = "build cli configure project attempt",
CONFIGURE_PROJECT_SUCCESS = "build cli configure project success",
CONFIGURE_PROJECT_FAIL = "build cli configure project fail",
BUILD_REQUEST_ATTEMPT = "build cli build request attempt",
BUILD_REQUEST_SUCCESS = "build cli build request success",
BUILD_REQUEST_FAIL = "build cli build request fail",
BUILD_STATUS_COMMAND = "build cli build status",
CREDENTIALS_SYNC_COMMAND = "build cli credentials sync command",
CREDENTIALS_SYNC_UPDATE_LOCAL_ATTEMPT = "build cli credentials sync update local attempt",
CREDENTIALS_SYNC_UPDATE_LOCAL_SUCCESS = "build cli credentials sync update local success",
CREDENTIALS_SYNC_UPDATE_LOCAL_FAIL = "build cli credentials sync update local fail",
CREDENTIALS_SYNC_UPDATE_REMOTE_ATTEMPT = "build cli credentials sync update remote attempt",
CREDENTIALS_SYNC_UPDATE_REMOTE_SUCCESS = "build cli credentials sync update remote success",
CREDENTIALS_SYNC_UPDATE_REMOTE_FAIL = "build cli credentials sync update remote fail",
ANDROID_KEYSTORE_CREATE = "build cli credentials keystore create"
}
export declare enum MetadataEvent {
APPLE_METADATA_DOWNLOAD = "metadata cli download apple response",
APPLE_METADATA_UPLOAD = "metadata cli upload apple response"
}
export type AnalyticsEventProperties = Record<string, string | number | boolean>;
/**
* The interface for commands to use to log events to analytics.
*/
export interface Analytics {
logEvent(name: AnalyticsEvent, properties: AnalyticsEventProperties): void;
}
/**
* The interface for commands to use to orchestrate the analytics system. Should only be necessary to use
* this within EASCommand.
*/
export interface AnalyticsWithOrchestration extends Analytics {
setActor(actor: Actor): void;
flushAsync(): Promise<void>;
}
/**
* Sets the user's analytics enabled preference. Note that this will only take effect
* upon the next run of the CLI.
*/
export declare function setAnalyticsEnabledAsync(enabled: boolean): Promise<void>;
/**
* Returns the user's analytics enabled preference.
*/
export declare function getAnalyticsEnabledAsync(): Promise<boolean>;
/**
* Create an instance of Analytics based on the user's analytics enabled preferences.
*/
export declare function createAnalyticsAsync(): Promise<AnalyticsWithOrchestration>;