UNPKG

@kvaser/canking-api

Version:

CanKing API to communicate with the CanKing service using Node.js.

219 lines (218 loc) 8.65 kB
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import Long from "long"; import { ApiPreferences } from "./common_params"; /** Possible file types when browsing files. */ export declare enum FileType { PROJECT_FILE = 0, LOG_FILE = 1, CAN_DATABASES = 2, LIN_DATABASES = 3, UNRECOGNIZED = -1 } export declare function fileTypeFromJSON(object: any): FileType; export declare function fileTypeToJSON(object: FileType): string; /** Possible log levels. */ export declare enum LogLevel { /** * LOG_LEVEL_TRACE - Logs that contain the most detailed messages. These messages may contain sensitive application data. * These messages are disabled by default and should never be enabled in a production environment. */ LOG_LEVEL_TRACE = 0, /** * LOG_LEVEL_DEBUG - Logs that are used for interactive investigation during development. These logs should primarily * contain information useful for debugging and have no long-term value. */ LOG_LEVEL_DEBUG = 1, /** LOG_LEVEL_INFORMATION - Logs that track the general flow of the application. These logs should have long-term value. */ LOG_LEVEL_INFORMATION = 2, /** * LOG_LEVEL_WARNING - Logs that highlight an abnormal or unexpected event in the application flow, but do not otherwise * cause the application execution to stop. */ LOG_LEVEL_WARNING = 3, /** * LOG_LEVEL_ERROR - Logs that highlight when the current flow of execution is stopped due to a failure. These should * indicate a failure in the current activity, not an application-wide failure. */ LOG_LEVEL_ERROR = 4, /** * LOG_LEVEL_CRITICAL - Logs that describe an unrecoverable application or system crash, or a catastrophic failure that * requires immediate attention. */ LOG_LEVEL_CRITICAL = 5, /** LOG_LEVEL_NONE - Not used for writing log messages. Specifies that a logging category should not write any messages. */ LOG_LEVEL_NONE = 6, UNRECOGNIZED = -1 } export declare function logLevelFromJSON(object: any): LogLevel; export declare function logLevelToJSON(object: LogLevel): string; /** Possible application events. */ export declare enum AppEvent { APP_EVENT_UNSPECIFIED = 0, /** APP_EVENT_LICENSE_INFO_CHANGED - Raised when the license information has changed. */ APP_EVENT_LICENSE_INFO_CHANGED = 1, UNRECOGNIZED = -1 } export declare function appEventFromJSON(object: any): AppEvent; export declare function appEventToJSON(object: AppEvent): string; /** A request message for setting log level. */ export interface SetLogLevelRequest { /** API preferences. */ preferences: ApiPreferences | undefined; /** The new log level. */ logLevel: LogLevel; } /** A response message for receiving the current log level. */ export interface GetLogLevelResponse { /** The current log level. */ logLevel: LogLevel; } /** A log message. */ export interface LogMessage { /** Time of the message. */ time: Long; /** The log level. */ logLevel: LogLevel; /** The event identifier. */ eventId: number; /** The category name. */ categoryName: string; /** The message. */ message: string; } /** A collection of log messages. */ export interface LogMessages { /** The log message items. */ items: LogMessage[]; } /** License information. */ export interface LicenseInformation { /** The license key. */ licenseKey: string; /** The product identifier. */ productId: string; /** The product name. */ productName: string; /** The product version. */ productVersion: string; /** The instance identifier. */ instanceId: string; /** The instance name. */ instanceName: string; /** Expiration date as unix time is in seconds. */ expirationDate: Long; /** A flag indicating if the license is valid. */ isValid: boolean; } /** A collection of licenses. */ export interface Licenses { /** The license information items. */ items: LicenseInformation[]; } /** Event arguments. */ export interface AppEventArgs { /** The application event type. */ eventType: AppEvent; /** A collection of registered licenses. */ licenses?: Licenses | undefined; } /** Request message for installing a service extension. */ export interface InstallServiceExtensionRequest { /** API preferences. */ preferences: ApiPreferences | undefined; /** Full path to the extension WebAssembly file (.wasm file). */ filePath: string; /** An optional flag that can be used if an extension should be replace/updated with a new WebAssembly file. */ replaceExisting?: boolean | undefined; } /** Request message for uninstalling a service extension. */ export interface UninstallServiceExtensionRequest { /** API preferences. */ preferences: ApiPreferences | undefined; /** Name of the extension. */ name: string; } /** * Request message for getting information about a service extension, either from a * WebAssembly file or from an installed extension. */ export interface GetServiceExtensionInfoRequest { /** API preferences. */ preferences: ApiPreferences | undefined; /** * Full path to the extension WebAssembly file (.wasm file), or the extension name if it is * already installed. */ filePathOrName: string; } /** Response message for getting service extension information. */ export interface GetServiceExtensionInfoResponse { /** Extension name. */ name: string; /** Extension display name. */ displayName: string; /** Extension description. */ description: string; /** Extension version. */ version: string; /** Extension author. */ author: string; /** Extension default configuration. */ defaultConfig: string; } /** Response message for getting licenses. */ export interface GetLicensesResponse { /** A collection of registered licenses. */ licenses: LicenseInformation[]; } /** Request message for activating a license. */ export interface ActivateLicenseRequest { /** API preferences. */ preferences: ApiPreferences | undefined; /** The license key. */ licenseKey: string; /** Optional product_id, used if activating anything but the base CanKing product. */ productId: string; } /** Message for getting about information. */ export interface AboutInformation { /** The API version used by the service. */ apiVersion: string; /** The service version running */ serviceVersion: string; /** The Canlib version used */ canlibVersion: string; } export declare const SetLogLevelRequest: MessageFns<SetLogLevelRequest>; export declare const GetLogLevelResponse: MessageFns<GetLogLevelResponse>; export declare const LogMessage: MessageFns<LogMessage>; export declare const LogMessages: MessageFns<LogMessages>; export declare const LicenseInformation: MessageFns<LicenseInformation>; export declare const Licenses: MessageFns<Licenses>; export declare const AppEventArgs: MessageFns<AppEventArgs>; export declare const InstallServiceExtensionRequest: MessageFns<InstallServiceExtensionRequest>; export declare const UninstallServiceExtensionRequest: MessageFns<UninstallServiceExtensionRequest>; export declare const GetServiceExtensionInfoRequest: MessageFns<GetServiceExtensionInfoRequest>; export declare const GetServiceExtensionInfoResponse: MessageFns<GetServiceExtensionInfoResponse>; export declare const GetLicensesResponse: MessageFns<GetLicensesResponse>; export declare const ActivateLicenseRequest: MessageFns<ActivateLicenseRequest>; export declare const AboutInformation: MessageFns<AboutInformation>; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]>; } : Partial<T>; type KeysOfUnion<T> = T extends T ? keyof T : never; type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never; }; interface MessageFns<T> { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create<I extends Exact<DeepPartial<T>, I>>(base?: I): T; fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T; } export {};