initial
This commit is contained in:
Vendored
+85
@@ -0,0 +1,85 @@
|
||||
// Ambient declarations for the Rhino (ES5) script execution environment.
|
||||
// These globals are injected by Vitruvio — they are NOT available in Node.js.
|
||||
// The Jest stubs in vitruvio-test-utils/setup.js mirror these for unit tests.
|
||||
|
||||
// Java interop (Rhino built-ins)
|
||||
declare var java: any;
|
||||
declare var Packages: any;
|
||||
|
||||
// Script output variable — set this at the end of a script to return a value
|
||||
declare var result: string;
|
||||
|
||||
// Print to the script console
|
||||
declare function println(s: any): void;
|
||||
|
||||
declare var vLogger: {
|
||||
info(msg: string): void;
|
||||
warn(msg: string): void;
|
||||
error(msg: string): void;
|
||||
debug(msg: string): void;
|
||||
};
|
||||
|
||||
declare var libService: {
|
||||
loadScript(name: string): any;
|
||||
};
|
||||
|
||||
declare var vProcessInstanceService: {
|
||||
criarInstancia(user: string, processKey: string): any;
|
||||
adicionarAnexo(processInstanceId: string, descricao: string, arquivo: any, file: any): void;
|
||||
salvarFormularioCompletandoTarefa(taskId: string, data: any): void;
|
||||
salvarFormulario(taskId: string, data: any): void;
|
||||
completarTarefa(taskId: string): void;
|
||||
cancelarProcesso(instanceId: number): void;
|
||||
cancelarProcessoDefinitivamente(instanceId: number): void;
|
||||
deletarProcesso(instanceId: number): void;
|
||||
reativarProcesso(instanceId: number): void;
|
||||
getInstanceByBPMNProcessInstanceId(bpmnId: string): any;
|
||||
getInstanceById(id: number): any;
|
||||
getInstanceStatusByBPMNProcessInstanceId(bpmnId: string): any;
|
||||
updateInstanceDescription(instanceId: number, description: string): void;
|
||||
updateInstanceDueDate(instanceId: number, date: any): void;
|
||||
updateInstancePriority(instanceId: number, priority: number): void;
|
||||
atualizarStatus(instanceId: number, status: string): void;
|
||||
definirMarcador(instanceId: number, marker: string): void;
|
||||
definirEmpresa(instanceId: number, companyId: number): void;
|
||||
setTaskAssignee(taskId: string, userId: number): void;
|
||||
claimTask(taskId: string, userId: number): void;
|
||||
};
|
||||
|
||||
declare var vFileService: {
|
||||
createTemporaryFile(): any;
|
||||
createTemporaryDirectory(): any;
|
||||
writeTemporaryFile(content: any): any;
|
||||
persistFile(file: any, metadata: any): any;
|
||||
updateFile(fileId: number, file: any): any;
|
||||
getFile(fileId: number): any;
|
||||
getMetadataById(fileId: number): any;
|
||||
createStream(fileId: number): any;
|
||||
deleteFile(fileId: number): void;
|
||||
openSession(): any;
|
||||
commit(session: any): void;
|
||||
rollback(session: any): void;
|
||||
};
|
||||
|
||||
declare var vEmailService: {
|
||||
send(to: string, subject: string, body: string): void;
|
||||
sendError(subject: string, body: string): void;
|
||||
sendToUser(userId: number, subject: string, body: string): void;
|
||||
};
|
||||
|
||||
declare var vConfigService: {
|
||||
getSystemConfigAsString(key: string): string | null;
|
||||
getSystemConfigAsLong(key: string): number | null;
|
||||
getSystemConfigAsDouble(key: string): number | null;
|
||||
getSystemConfigAsBoolean(key: string): boolean | null;
|
||||
setSystemConfig(key: string, value: any): void;
|
||||
getUserConfig(userId: number, key: string): string | null;
|
||||
setUserConfig(userId: number, key: string, value: any): void;
|
||||
getInstanceConfig(instanceId: number, key: string): string | null;
|
||||
setInstanceConfig(instanceId: number, key: string, value: any): void;
|
||||
};
|
||||
|
||||
declare var vPanelService: {
|
||||
getPanel(key: string): any;
|
||||
getPanelData(key: string, params: any): any;
|
||||
};
|
||||
Reference in New Issue
Block a user