UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

254 lines (253 loc) 11.1 kB
/** * Standardized telemetry event names for Minecraft Creator Tools. */ export declare const TelemetryEvents: { readonly APP_STARTED: "AppStarted"; readonly APP_CLOSED: "AppClosed"; readonly PROJECT_CREATED: "ProjectCreated"; readonly PROJECT_OPENED: "ProjectOpened"; readonly PROJECT_CLOSED: "ProjectClosed"; readonly PROJECT_SAVED: "ProjectSaved"; readonly PROJECT_EXPORTED: "ProjectExported"; readonly PROJECT_IMPORTED: "ProjectImported"; readonly PROJECT_DELETED: "ProjectDeleted"; readonly FILE_CREATED: "FileCreated"; readonly FILE_OPENED: "FileOpened"; readonly FILE_SAVED: "FileSaved"; readonly FILE_DELETED: "FileDeleted"; readonly FILE_RENAMED: "FileRenamed"; readonly EDITOR_OPENED: "EditorOpened"; readonly EDITOR_CLOSED: "EditorClosed"; readonly CODE_EDITED: "CodeEdited"; readonly JSON_EDITED: "JsonEdited"; readonly VALIDATION_STARTED: "ValidationStarted"; readonly VALIDATION_COMPLETED: "ValidationCompleted"; readonly VALIDATION_ERROR: "ValidationError"; readonly BUILD_STARTED: "BuildStarted"; readonly BUILD_COMPLETED: "BuildCompleted"; readonly BUILD_FAILED: "BuildFailed"; readonly DEPLOYMENT_STARTED: "DeploymentStarted"; readonly DEPLOYMENT_COMPLETED: "DeploymentCompleted"; readonly DEPLOYMENT_FAILED: "DeploymentFailed"; readonly MINECRAFT_CONNECTED: "MinecraftConnected"; readonly MINECRAFT_DISCONNECTED: "MinecraftDisconnected"; readonly MINECRAFT_COMMAND_SENT: "MinecraftCommandSent"; readonly MINECRAFT_WORLD_LOADED: "MinecraftWorldLoaded"; readonly GALLERY_OPENED: "GalleryOpened"; readonly TEMPLATE_SELECTED: "TemplateSelected"; readonly SAMPLE_DOWNLOADED: "SampleDownloaded"; readonly BUTTON_CLICKED: "ButtonClicked"; readonly MENU_ITEM_SELECTED: "MenuItemSelected"; readonly SETTING_CHANGED: "SettingChanged"; readonly SEARCH_PERFORMED: "SearchPerformed"; readonly ITEM_CLICKED: "ItemClicked"; readonly SHARE_ADDON_FILE: "ShareAddOnFile"; readonly PROJECT_SETTING_CHANGED: "ProjectSettingChanged"; readonly CREATOR_TOOL_SETTING_CHANGED: "CreatorToolSettingChanged"; readonly VIEW_CHANGED: "ViewChanged"; readonly PROJECT_MAP_CLICKED: "ProjectMapClicked"; readonly SHOW_FILTER_CLICKED: "ShowFilterClicked"; readonly HOME_CLICKED: "HomeClicked"; readonly SAVE_CLICKED: "SaveClicked"; readonly EXPORT_TO_FOLDER: "ExportToFolder"; readonly ENTITY_TYPE_EDITOR_VIEW_CHANGE: "EntityTypeEditorViewChange"; readonly ENTITY_TYPE_EDITOR_COMPONENT_CLICKED: "EntityTypeEditorComponentClicked"; readonly ITEM_TYPE_EDITOR_VIEW_CHANGE: "ItemTypeEditorViewChange"; readonly ITEM_TYPE_EDITOR_COMPONENT_CLICKED: "ItemTypeEditorComponentClicked"; readonly ADD_NEW_PROJECT_ITEM: "AddNewProjectItem"; readonly ITEM_ACTION: "ItemAction"; readonly INSPECTOR_OPENED: "InspectorOpened"; readonly INSPECTOR_SUMMARY_OPENED: "InspectorSummaryOpened"; readonly INSPECTOR_ITEMS_OPENED: "InspectorItemsOpened"; readonly INSPECTOR_VIEW_CHANGED: "InspectorViewChanged"; readonly INSPECTOR_SUITE_CHANGED: "InspectorSuiteChanged"; readonly PROJECT_SHARED: "ProjectShared"; readonly EXTENSION_ACTIVATED: "ExtensionActivated"; readonly EXTENSION_COMMAND_EXECUTED: "ExtensionCommandExecuted"; readonly CUSTOM_EDITOR_OPENED: "CustomEditorOpened"; readonly CLI_COMMAND_EXECUTED: "CliCommandExecuted"; readonly CLI_ERROR: "CliError"; readonly UNHANDLED_ERROR: "UnhandledError"; readonly API_ERROR: "ApiError"; readonly NETWORK_ERROR: "NetworkError"; readonly PERFORMANCE_METRIC: "PerformanceMetric"; readonly LOAD_TIME_RECORDED: "LoadTimeRecorded"; readonly FILE_UPLOADED: "FileUploaded"; readonly FILE_DROPPED: "FileDropped"; readonly PROJECT_LIST_VIEWED: "ProjectListViewed"; readonly BACKUP_EXPORTED: "BackupExported"; readonly FOLDER_OPENED: "FolderOpened"; readonly FLAT_WORLD_DOWNLOADED: "FlatWorldDownloaded"; readonly EDITOR_PROJECT_DOWNLOADED: "EditorProjectDownloaded"; readonly CUSTOM_WORLD_DOWNLOADED: "CustomWorldDownloaded"; readonly PROJECT_LOADED: "ProjectLoaded"; }; /** * Property keys for consistent telemetry properties */ export declare const TelemetryProperties: { readonly PROJECT_TYPE: "projectType"; readonly PROJECT_ID: "projectId"; readonly HAS_BEHAVIOR_PACK: "hasBehaviorPack"; readonly HAS_RESOURCE_PACK: "hasResourcePack"; readonly HAS_SCRIPTS: "hasScripts"; readonly VIEW_CHANGE_TYPE: "viewChangeType"; readonly VIEW_MODE: "viewMode"; readonly PREVIOUS_VIEW: "previousView"; readonly ITEM_ID: "itemId"; readonly ITEM_TYPE: "itemType"; readonly ITEM_NAME: "itemName"; readonly EXPORT_TYPE: "exportType"; readonly SHARE_METHOD: "shareMethod"; readonly SHARE_TYPE: "shareType"; readonly FILTER_TYPE: "filterType"; readonly FILTER_TEXT: "filterText"; readonly SETTING_TYPE: "settingType"; readonly SETTING_VALUE: "settingValue"; readonly OLD_VALUE: "oldValue"; readonly NEW_VALUE: "newValue"; readonly FILE_TYPE: "fileType"; readonly FILE_SIZE: "fileSize"; readonly FILE_EXTENSION: "fileExtension"; readonly ACTION_SOURCE: "actionSource"; readonly ACTION_TYPE: "actionType"; readonly SUCCESS: "success"; readonly ERROR_MESSAGE: "errorMessage"; readonly ERROR_CODE: "errorCode"; readonly IS_AUTHENTICATED: "isAuthenticated"; readonly OS_TYPE: "osType"; readonly BROWSER_TYPE: "browserType"; readonly VSCODE_VERSION: "vscodeVersion"; readonly HOST_TYPE: "hostType"; readonly MCTOOLS_VERSION: "mctoolsVersion"; readonly FEATURE_NAME: "featureName"; readonly FEATURE_ENABLED: "featureEnabled"; readonly DURATION: "duration"; readonly TIMESTAMP: "timestamp"; readonly TEMPLATE_ID: "templateId"; readonly TEMPLATE_TITLE: "templateTitle"; readonly SNIPPET_ID: "snippetId"; readonly SNIPPET_TITLE: "snippetTitle"; readonly TRACK: "track"; readonly STORAGE_TYPE: "storageType"; readonly SEARCH_QUERY: "searchQuery"; readonly SEARCH_CONTEXT: "searchContext"; readonly QUERY_LENGTH: "queryLength"; readonly LINK_TYPE: "linkType"; readonly LINK_URL: "linkUrl"; readonly MENU_ITEM: "menuItem"; readonly LOCATION: "location"; readonly SETTING: "setting"; readonly COMPONENT_NAME: "componentName"; readonly FILE_UPLOAD_METHOD: "fileUploadMethod"; readonly FILE_FORMAT: "fileFormat"; readonly UPLOAD_SOURCE: "uploadSource"; readonly FOLDER_DEPTH: "folderDepth"; readonly FOLDER_TYPE: "folderType"; readonly EXPORT_SUCCESS: "exportSuccess"; readonly EXPORT_FORMAT: "exportFormat"; readonly EDITOR_TYPE: "editorType"; readonly MODE: "mode"; readonly COMPONENT_ID: "componentId"; readonly ITEM_ACTION_TYPE: "itemActionType"; readonly TEMPLATE: "template"; readonly PROJECT_LIST_SIZE: "projectListSize"; readonly TAB_INDEX: "tabIndex"; readonly CREATION_DATE: "creationDate"; readonly LAST_OPENED_DATE: "lastOpenedDate"; readonly IS_TITLE_CUSTOMIZED: "isTitleCustomized"; readonly IS_CREATOR_CUSTOMIZED: "isCreatorCustomized"; readonly IS_SHORT_NAME_CUSTOMIZED: "isShortNameCustomized"; readonly OPEN_METHOD: "openMethod"; readonly ADDITIONAL_PACKS_ADDED: "additionalPacksAdded"; readonly BEHAVIOR_PACKS: "behaviorPacks"; readonly RESOURCE_PACKS: "resourcePacks"; readonly GAME_TYPE: "gameType"; readonly DIFFICULTY: "difficulty"; readonly WORLD_TEMPLATE_USED: "worldTemplateUsed"; readonly MAP_STYLE: "mapStyle"; readonly SEED: "seed"; readonly PROJECT_ITEM_COUNT: "projectItemCount"; readonly INTERNAL_PROCESSING_ERROR_COUNT: "internalProcessingErrorCount"; readonly ERROR_TYPES: "errorTypes"; readonly SUITE_TYPE: "suiteType"; }; /** * Measurement keys for numeric metrics */ export declare const TelemetryMeasurements: { readonly FILE_COUNT: "fileCount"; readonly ERROR_COUNT: "errorCount"; readonly WARNING_COUNT: "warningCount"; readonly LINE_COUNT: "lineCount"; readonly ACTIVE_PROJECT_COUNT: "activeProjectCount"; readonly FILE_SIZE_BYTES: "fileSizeBytes"; readonly PROJECT_SIZE_BYTES: "projectSizeBytes"; readonly LOAD_TIME_MS: "loadTimeMs"; readonly BUILD_TIME_MS: "buildTimeMs"; readonly VALIDATION_TIME_MS: "validationTimeMs"; readonly DEPLOYMENT_TIME_MS: "deploymentTimeMs"; readonly DURATION: "duration"; readonly MEMORY_USAGE_MB: "memoryUsageMb"; readonly CPU_USAGE_PERCENT: "cpuUsagePercent"; }; export declare const TelemetrySeverity: { readonly VERBOSE: 0; readonly INFORMATION: 1; readonly WARNING: 2; readonly ERROR: 3; readonly CRITICAL: 4; }; export type TelemetryEventName = (typeof TelemetryEvents)[keyof typeof TelemetryEvents]; export type TelemetryPropertyKey = (typeof TelemetryProperties)[keyof typeof TelemetryProperties]; export type TelemetryMeasurementKey = (typeof TelemetryMeasurements)[keyof typeof TelemetryMeasurements]; export type TelemetrySeverityLevel = (typeof TelemetrySeverity)[keyof typeof TelemetrySeverity]; /** * Type-safe interfaces for telemetry event properties */ export interface WorldDownloadProperties { [TelemetryProperties.ADDITIONAL_PACKS_ADDED]?: number; [TelemetryProperties.BEHAVIOR_PACKS]?: string; [TelemetryProperties.RESOURCE_PACKS]?: string; [TelemetryProperties.GAME_TYPE]?: number; [TelemetryProperties.DIFFICULTY]?: number; [TelemetryProperties.WORLD_TEMPLATE_USED]?: boolean; [TelemetryProperties.MAP_STYLE]?: string | number; [TelemetryProperties.SEED]?: string; } export interface ProjectExportProperties { [TelemetryProperties.EXPORT_FORMAT]?: string; [TelemetryProperties.EXPORT_SUCCESS]?: boolean; } export interface ProjectProperties { [TelemetryProperties.PROJECT_TYPE]?: string; [TelemetryProperties.PROJECT_ID]?: string; [TelemetryProperties.HAS_BEHAVIOR_PACK]?: boolean; [TelemetryProperties.HAS_RESOURCE_PACK]?: boolean; [TelemetryProperties.HAS_SCRIPTS]?: boolean; [TelemetryProperties.PROJECT_ITEM_COUNT]?: number; } export interface FileProperties { [TelemetryProperties.FILE_TYPE]?: string; [TelemetryProperties.FILE_SIZE]?: number; [TelemetryProperties.FILE_EXTENSION]?: string; [TelemetryProperties.FILE_FORMAT]?: string; } export interface EditorProperties { [TelemetryProperties.EDITOR_TYPE]?: string; [TelemetryProperties.MODE]?: string; [TelemetryProperties.COMPONENT_ID]?: string; [TelemetryProperties.COMPONENT_NAME]?: string; } export interface ViewProperties { [TelemetryProperties.VIEW_CHANGE_TYPE]?: string; [TelemetryProperties.VIEW_MODE]?: string; [TelemetryProperties.PREVIOUS_VIEW]?: string; } export interface ActionProperties { [TelemetryProperties.ACTION_SOURCE]?: string; [TelemetryProperties.ACTION_TYPE]?: string; [TelemetryProperties.SUCCESS]?: boolean; [TelemetryProperties.ERROR_MESSAGE]?: string; [TelemetryProperties.ERROR_CODE]?: string; }