import { MacroScriptParam, MacroTypeDefinition, StringAnyMap, ZetaApiError } from '../CommonTypes'; export interface MacroCompletion { /**Execution statistics, when debug is enabled*/ stats?: MacroCompletionStats; /**Encountered errors. Error reporting behavior can be changed with the hardFail parameter.*/ errors?: ZetaApiError[]; /**Macro name*/ name?: string; /**Generated result, if applicable*/ result?: any; /**User field for traceability of requests. The value was generated by the client requester.*/ requestId?: string; /**Generated debug output, if applicable*/ log?: string[]; } export interface MacroCompletionStats { /**Elapsed server time for the execution of the macro*/ elapsedMillis?: number; /**Total number of RAM bytes*/ ram?: number; /**Total number of called verbs*/ nbCalls?: number; /**Total number of VM cycles*/ cycles?: number; } export interface MacroDebugBreakpoint { /**Line number inside the source file*/ line?: number; /**Source file information*/ location?: string; } export interface MacroDebugBreakpointSet { /**Breakpoint information*/ breakpoint: MacroDebugBreakpoint; /**Debug token, previously generated by a call to the admin verb 'livedebugToken'*/ token?: string; /**Whether the breakpoint is enabled or not*/ enabled?: boolean; } export interface MacroDebugEvent { } export interface MacroDebugInfoRequest { /**Debug token, previously generated by a call to the admin verb 'livedebugToken'*/ token?: string; /**optional path to apply on the result of the evaluation of exp*/ path?: string; /**expression to evaluate*/ exp?: string; /**request ID*/ requestId?: string; /**Frame index, as sent by the server by 'resume'*/ frame?: number; } export interface MacroDebugSession { /**Macro named parameters*/ parameters?: StringAnyMap; /**Debug token, previously generated by a call to the admin verb 'livedebugToken'*/ token?: string; /**List of breakpoints for the session*/ breakpoints?: MacroDebugBreakpoint[]; /**Context ID. Clients and developers must not pass this explicitly. This value is generated by the server and can be passed back by the worker SDKs.*/ contextId?: string; /**True if an error should trigger a response on an error channel, or false (the default) if the error should be simply reported in an error field*/ hardFail?: boolean; /**Macro name*/ name: string; /**User field for traceability of requests. Synchronous SDK APIs use this field for you.*/ requestId?: string; /**Deprecated. Use the 'livedebug' API.*/ debug?: number; } export interface MacroDebugStep { /**Debug token, previously generated by a call to the admin verb 'livedebugToken'*/ token?: string; /**Step type*/ type?: MacroDebugStepType; } export declare enum MacroDebugStepType { /**Step over the next instruction*/ STEP_OVER = "STEP_OVER", /**Resume execution*/ RESUME = "RESUME", /**Terminate execution*/ TERMINATE = "TERMINATE", /**Step into the next macrvo call*/ STEP_INTO = "STEP_INTO" } export interface MacroDebugToken { /**Token suitable for use by debug verbs*/ token?: string; } export interface MacroDebugVariableChange { /**Debug token, previously generated by a call to the admin verb 'livedebugToken'*/ token?: string; /**Variable name*/ name: string; /**Frame index, as sent by the server by 'resume'*/ frame?: number; /**Variable value*/ data?: any; } export interface MacroExecBaseUrl { /**EMPTY DESC*/ url?: string; } export interface MacroFunction { /**Informative text, for the macro creator. You SHOULD always fill this field, as reported errors will include this description.*/ description?: string; /**Function parameters*/ parameters?: MacroFunctionParam[]; /**Function name*/ name: string; /**Function result*/ result: any; /**source file*/ source?: string; /**Sub steps, sequentially executed*/ steps: MacroStep[]; /**Line number in source file*/ line?: number; } export interface MacroFunctionParam { /**Parameter name*/ name?: string; } export interface MacroFunctionRequest { /**Function name*/ name: string; /**Function parameter values*/ params: any[]; } export interface MacroFunctionResult { /**Function evaluation result*/ result?: any; } export interface MacroInfo { /**Informative text, for the macro creator. You SHOULD always fill this field, as reported errors will include this description.*/ description?: string; /**Target for the response (the syntax is the same as in messaging.send). Overrides 'broadcast' when set.*/ target?: any; /**Optional return channel. Defaults to completed*/ channel?: string; /**Macro name*/ name: string; /**Optional macro result*/ result?: StringAnyMap; /**Setting this field effectively overrides the __userKey pseudo-constant for the duration of the macro. All non-sudoed internal calls will behave as if sudoed with the given user key. When this field is set, there is not point in calling this macro with sudo*/ userKey?: string; /**source file (for debug)*/ source?: string; /**Sub steps, sequentially executed*/ steps: MacroStep[]; /**Optional output field specifications*/ returned?: MacroScriptParam[]; /**Optional parameter specifications*/ params?: MacroScriptParam[]; /**Whether to broadcast to all the user's sessions, or just to the asking session. Defaults to false (request-response paradigm).*/ broadcast?: boolean; /**Line number in source file*/ line?: number; } export interface MacroInfos { /**List of macros*/ macros?: MacroInfo[]; /**Whether to wipe out all existing macros before taking the given ones into account*/ purge?: boolean; /**List of functions*/ functions?: MacroFunction[]; /**Deployment ID of the macro service*/ deploymentId?: string; /**Global data*/ globals?: StringAnyMap; /**List of user types*/ types?: MacroTypeDefinition[]; } export interface MacroPlay { /**Macro named parameters*/ parameters?: StringAnyMap; /**Context ID. Clients and developers must not pass this explicitly. This value is generated by the server and can be passed back by the worker SDKs.*/ contextId?: string; /**True if an error should trigger a response on an error channel, or false (the default) if the error should be simply reported in an error field*/ hardFail?: boolean; /**Macro name*/ name: string; /**User field for traceability of requests. Synchronous SDK APIs use this field for you.*/ requestId?: string; /**Deprecated. Use the 'livedebug' API.*/ debug?: number; } export interface MacroServiceDebugConfig { /**Whether this macro service is currently in debug mode*/ debug?: boolean; } export interface MacroServiceStatus { /**Number of macros currently running*/ currentNb?: number; /**Whether this macro service is currently in debug mode*/ debug?: boolean; /**Total number of macros currently running, including nested calls*/ totalNb?: number; } export interface MacroStep { /**Informative text, for the macro creator. You SHOULD always fill this field, as reported errors will include this description.*/ description?: string; /**Line number in source file*/ line?: number; } export interface MacroTrace { /**Trace context (differentiates client calls)*/ ctx?: number; /**Trace type (differentiates client calls)*/ type?: TraceType; /**Trace number (monotonous increase)*/ n?: number; /**Trace data*/ data?: any; /**Line number in the source code.*/ line?: number; /**Zetapush key of the user generating the trace*/ owner?: string; /**Trace level*/ level?: TraceLevel; /**Location of the source code.*/ location?: string; } export interface MacroUploadReport { /**List of successfully uploaded macro names*/ macros?: string[]; /**List of successfully uploaded function names*/ functions?: string[]; } export interface SuMacroPlay { /**Macro named parameters*/ parameters?: StringAnyMap; /**Key of the impersonated user*/ suKey: string; /**Context ID. Clients and developers must not pass this explicitly. This value is generated by the server and can be passed back by the worker SDKs.*/ contextId?: string; /**True if an error should trigger a response on an error channel, or false (the default) if the error should be simply reported in an error field*/ hardFail?: boolean; /**Macro name*/ name: string; /**User field for traceability of requests. Synchronous SDK APIs use this field for you.*/ requestId?: string; /**Temporary macros. This feature does not support concurrent calls.*/ tempMacros?: MacroInfo[]; /**Deprecated. Use the 'livedebug' API.*/ debug?: number; } export declare enum TraceLevel { /**Debug (server-generated traces are DEBUG)*/ DEBUG = "DEBUG", /**Currently unused*/ ERROR = "ERROR", /**From the 'trace' keyword*/ TRACE = "TRACE", /**Currently unused*/ WARN = "WARN", /**Currently unused*/ INFO = "INFO" } export declare enum TraceType { /**A macro is starting*/ MS = "MS", /**A macro has ended*/ ME = "ME", /**User comment*/ CMT = "CMT", /**Developer-generated*/ USR = "USR" }