Socket
Socket
Sign inDemoInstall

@process-engine/logging_api_contracts

Package Overview
Dependencies
1
Maintainers
10
Versions
104
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1-8b57ef55-b13 to 0.0.1-93d60616-b17

dist/commonjs/ilogging_api_service.js

8

dist/commonjs/log_level.js

@@ -5,8 +5,8 @@ "use strict";

(function (LogLevel) {
LogLevel[LogLevel["debug"] = 1] = "debug";
LogLevel[LogLevel["info"] = 2] = "info";
LogLevel[LogLevel["warn"] = 4] = "warn";
LogLevel[LogLevel["error"] = 8] = "error";
LogLevel["debug"] = "debug";
LogLevel["info"] = "info";
LogLevel["warn"] = "warn";
LogLevel["error"] = "error";
})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
//# sourceMappingURL=log_level.js.map

@@ -6,9 +6,9 @@ "use strict";

correlationId: ':correlation_id',
flowNodeInstanceId: ':flow_node_instance_id',
flowNodeId: ':flow_node_id',
};
const paths = {
getLogsForCorrelation: `/correlation/${params.correlationId}`,
getLogsForProcessInstance: `/correlation/${params.correlationId}/process_model/${params.processModelId}`,
writeLogForProcessInstance: `/correlation/${params.correlationId}/process_model/${params.processModelId}`,
writeLogForFlowNodeInstance: `/correlation/${params.correlationId}/process_model/${params.processModelId}/flow_node_instance/${params.flowNodeInstanceId}`,
getLogsForProcessModel: `/correlation/${params.correlationId}/process_model/${params.processModelId}`,
writeLogForProcessModel: `/correlation/${params.correlationId}/process_model/${params.processModelId}`,
writeLogForFlowNode: `/correlation/${params.correlationId}/process_model/${params.processModelId}/flow_node/${params.flowNodeId}`,
};

@@ -15,0 +15,0 @@ exports.restSettings = {

@@ -5,45 +5,43 @@ import { LogEntry } from './log_entry';

* Contains functions for writing and retrieving content from logfiles.
* Each logfile relates to a specific process model and correlation.
* Each logfile relates to a specific Process Model and Correlation.
*/
export interface ILoggingRepository {
/**
* Retrieves the logs for a specific correlation.
* Retrieves the logs for a specific Correlation.
* @async
* @param correlationId The id of the correlation for which to retrieve the logs.
* @param logLevel Optional: If set, only logs with a matching log level are returned.
* @param correlationId The ID of the Correlation for which to retrieve the logs.
* If not set, all logs will be returned.
* @returns A list of log entries.
*/
getLogsForCorrelation(correlationId: string, logLevel?: LogLevel): Promise<Array<LogEntry>>;
getLogsForCorrelation(correlationId: string): Promise<Array<LogEntry>>;
/**
* Retrieves the logs for a specific process model of a given correlation.
* Retrieves the logs for a specific Process Model of a given Correlation.
* @async
* @param correlationId The id of the correlation for which to retrieve the logs.
* @param processModelId The id of process model for which to retrieve the logs.
* @param logLevel Optional: If set, only logs with a matching log level are returned.
* @param correlationId The ID of the Correlation for which to retrieve the logs.
* @param processModelId The ID of Process Model for which to retrieve the logs.
* If not set, all logs will be returned.
* @returns A list of log entries.
*/
getLogsForProcessInstance(correlationId: string, processModelId: string, logLevel?: LogLevel): Promise<Array<LogEntry>>;
getLogsForProcessModel(correlationId: string, processModelId: string): Promise<Array<LogEntry>>;
/**
* Writes a log entry for a specific process model of a correlation.
* Writes a log entry for a specific Process Model of a Correlation.
* @async
* @param correlationId The id of the correlation to which the process model belongs.
* @param processModelId The id of process model for which to create a log entry.
* @param logLevel The loglevel to use (debug, info, warning, error).
* @param correlationId The ID of the Correlation to which the Process Model belongs.
* @param processModelId The ID of Process Model for which to create a log entry.
* @param logLevel The loglevel to use.
* @param message The message to write into the log entry.
* @param timestamp Optional: The timestamp to use for the log entry. Defaults to "now".
*/
writeLogForProcessInstance(correlationId: string, processModelId: string, logLevel: LogLevel, message: string, timestamp?: Date): Promise<void>;
writeLogForProcessModel(correlationId: string, processModelId: string, logLevel: LogLevel, message: string, timestamp?: Date): Promise<void>;
/**
* Writes a log entry for a specific flow node instance of a process model within a correlation.
* Writes a log entry for a specific Flow Node of a Process Model within a Correlation.
* @async
* @param correlationId The id of the correlation to which the process model belongs.
* @param processModelId The id of process model to which the flow node instance belongs.
* @param flowNodeInstanceId The id of flow node instance for which to create a log entry.
* @param logLevel The loglevel to use (debug, info, warning, error).
* @param message The message to write into the log entry.
* @param timestamp Optional: The timestamp to use for the log entry. Defaults to "now".
* @param correlationId The ID of the Correlation to which the Process Model belongs.
* @param processModelId The ID of Process Model to which the Flow Node belongs.
* @param flowNodeId The ID of Flow Node for which to create a log entry.
* @param logLevel The loglevel to use.
* @param message The message to write into the log entry.
* @param timestamp Optional: The timestamp to use for the log entry. Defaults to "now".
*/
writeLogForFlowNodeInstance(correlationId: string, processModelId: string, flowNodeInstanceId: string, logLevel: LogLevel, message: string, timestamp?: Date): Promise<void>;
writeLogForFlowNode(correlationId: string, processModelId: string, flowNodeId: string, logLevel: LogLevel, message: string, timestamp?: Date): Promise<void>;
}

@@ -0,3 +1,3 @@

export * from './ilogging_api_service';
export * from './ilogging_repository';
export * from './ilogging_service';
export * from './log_entry';

@@ -4,0 +4,0 @@ export * from './log_level';

import { LogLevel } from './log_level';
/**
* Describes a single log entry.
* Contains information about the correlation, process model and flow node instance to which the entry belongs,
* aswell as a timestamp, log level and the concrete message that was logged.
*
* The properties here are ordered in the same manner as they are in the actual log file.
*/
export declare class LogEntry {
/**
* The id of the process model to which the log entry pertains.
*/
timeStamp: Date;
correlationId: string;
processModelId: string;
/**
* The id of the correlation to which the log entry pertains.
*/
correlationId: string;
/**
* The id of the flow node instance to which the log entry pertains.
*/
flowNodeInstanceId?: string;
/**
* The log level.
*/
flowNodeId?: string;
logLevel: LogLevel;
/**
* The log message.
*/
message: string;
/**
* The date and time at which the log entry was recorded..
*/
timeStamp: Date;
}
/**
* Contains a list of possible log levels.
* Contains the definition of log levels.
*/
export declare enum LogLevel {
debug = 1,
info = 2,
warn = 4,
error = 8
debug = "debug",
info = "info",
warn = "warn",
error = "error"
}
/**
* Contains the endpoints and various rest parameters used by the logging api.
* Contains the endpoints and various rest parameters used by the logging API.
*/
export declare const restSettings: {
/**
* A collection of all url parameters employed by the logging api.
* A collection of all URL parameters employed by the logging API.
*/

@@ -11,13 +11,13 @@ params: {

correlationId: string;
flowNodeInstanceId: string;
flowNodeId: string;
};
/**
* A collection of all urls employed by the logging api.
* A collection of all URLs employed by the logging API.
*/
paths: {
getLogsForCorrelation: string;
getLogsForProcessInstance: string;
writeLogForProcessInstance: string;
writeLogForFlowNodeInstance: string;
getLogsForProcessModel: string;
writeLogForProcessModel: string;
writeLogForFlowNode: string;
};
};
import { LogLevel } from './log_level';
/**
* Describes the payload that gets send with a HTTP request for writing a log entry.
*/
export declare class WriteLogRequestPayload {

@@ -3,0 +6,0 @@ logLevel: LogLevel;

{
"name": "@process-engine/logging_api_contracts",
"version": "0.0.1-8b57ef55-b13",
"version": "0.0.1-93d60616-b17",
"description": "the api-package for process-engine logging",

@@ -5,0 +5,0 @@ "main": "dist/commonjs/index.js",

@@ -6,3 +6,3 @@ import {LogEntry} from './log_entry';

* Contains functions for writing and retrieving content from logfiles.
* Each logfile relates to a specific process model and correlation.
* Each logfile relates to a specific Process Model and Correlation.
*/

@@ -12,49 +12,51 @@ export interface ILoggingRepository {

/**
* Retrieves the logs for a specific correlation.
* Retrieves the logs for a specific Correlation.
* @async
* @param correlationId The id of the correlation for which to retrieve the logs.
* @param logLevel Optional: If set, only logs with a matching log level are returned.
* @param correlationId The ID of the Correlation for which to retrieve the logs.
* If not set, all logs will be returned.
* @returns A list of log entries.
*/
getLogsForCorrelation(correlationId: string, logLevel?: LogLevel): Promise<Array<LogEntry>>;
getLogsForCorrelation(correlationId: string): Promise<Array<LogEntry>>;
/**
* Retrieves the logs for a specific process model of a given correlation.
* Retrieves the logs for a specific Process Model of a given Correlation.
* @async
* @param correlationId The id of the correlation for which to retrieve the logs.
* @param processModelId The id of process model for which to retrieve the logs.
* @param logLevel Optional: If set, only logs with a matching log level are returned.
* @param correlationId The ID of the Correlation for which to retrieve the logs.
* @param processModelId The ID of Process Model for which to retrieve the logs.
* If not set, all logs will be returned.
* @returns A list of log entries.
*/
getLogsForProcessInstance(correlationId: string, processModelId: string, logLevel?: LogLevel): Promise<Array<LogEntry>>;
getLogsForProcessModel(correlationId: string, processModelId: string): Promise<Array<LogEntry>>;
/**
* Writes a log entry for a specific process model of a correlation.
* Writes a log entry for a specific Process Model of a Correlation.
* @async
* @param correlationId The id of the correlation to which the process model belongs.
* @param processModelId The id of process model for which to create a log entry.
* @param logLevel The loglevel to use (debug, info, warning, error).
* @param correlationId The ID of the Correlation to which the Process Model belongs.
* @param processModelId The ID of Process Model for which to create a log entry.
* @param logLevel The loglevel to use.
* @param message The message to write into the log entry.
* @param timestamp Optional: The timestamp to use for the log entry. Defaults to "now".
*/
writeLogForProcessInstance(correlationId: string, processModelId: string, logLevel: LogLevel, message: string, timestamp?: Date): Promise<void>;
writeLogForProcessModel(correlationId: string,
processModelId: string,
logLevel: LogLevel,
message: string,
timestamp?: Date): Promise<void>;
/**
* Writes a log entry for a specific flow node instance of a process model within a correlation.
* Writes a log entry for a specific Flow Node of a Process Model within a Correlation.
* @async
* @param correlationId The id of the correlation to which the process model belongs.
* @param processModelId The id of process model to which the flow node instance belongs.
* @param flowNodeInstanceId The id of flow node instance for which to create a log entry.
* @param logLevel The loglevel to use (debug, info, warning, error).
* @param message The message to write into the log entry.
* @param timestamp Optional: The timestamp to use for the log entry. Defaults to "now".
* @param correlationId The ID of the Correlation to which the Process Model belongs.
* @param processModelId The ID of Process Model to which the Flow Node belongs.
* @param flowNodeId The ID of Flow Node for which to create a log entry.
* @param logLevel The loglevel to use.
* @param message The message to write into the log entry.
* @param timestamp Optional: The timestamp to use for the log entry. Defaults to "now".
*/
writeLogForFlowNodeInstance(correlationId: string,
processModelId: string,
flowNodeInstanceId: string,
logLevel: LogLevel,
message: string,
timestamp?: Date): Promise<void>;
writeLogForFlowNode(correlationId: string,
processModelId: string,
flowNodeId: string,
logLevel: LogLevel,
message: string,
timestamp?: Date): Promise<void>;
}

@@ -0,3 +1,3 @@

export * from './ilogging_api_service';
export * from './ilogging_repository';
export * from './ilogging_service';
export * from './log_entry';

@@ -4,0 +4,0 @@ export * from './log_level';

@@ -5,33 +5,15 @@ import {LogLevel} from './log_level';

* Describes a single log entry.
* Contains information about the correlation, process model and flow node instance to which the entry belongs,
* aswell as a timestamp, log level and the concrete message that was logged.
*
* The properties here are ordered in the same manner as they are in the actual log file.
*/
export class LogEntry {
/**
* The id of the process model to which the log entry pertains.
*/
public timeStamp: Date;
public correlationId: string;
public processModelId: string;
/**
* The id of the correlation to which the log entry pertains.
*/
public correlationId: string;
/**
* The id of the flow node instance to which the log entry pertains.
*/
public flowNodeInstanceId?: string;
/**
* The log level.
*/
public flowNodeId?: string;
public logLevel: LogLevel;
/**
* The log message.
*/
public message: string;
/**
* The date and time at which the log entry was recorded..
*/
public timeStamp: Date;
}
/**
* Contains a list of possible log levels.
* Contains the definition of log levels.
*/
export enum LogLevel {
debug = 1,
info = 2,
warn = 4,
error = 8,
debug = 'debug',
info = 'info',
warn = 'warn',
error = 'error',
}

@@ -5,3 +5,3 @@ // tslint:disable:typedef

correlationId: ':correlation_id',
flowNodeInstanceId: ':flow_node_instance_id',
flowNodeId: ':flow_node_id',
};

@@ -11,20 +11,19 @@

getLogsForCorrelation: `/correlation/${params.correlationId}`,
getLogsForProcessInstance: `/correlation/${params.correlationId}/process_model/${params.processModelId}`,
writeLogForProcessInstance: `/correlation/${params.correlationId}/process_model/${params.processModelId}`,
writeLogForFlowNodeInstance:
`/correlation/${params.correlationId}/process_model/${params.processModelId}/flow_node_instance/${params.flowNodeInstanceId}`,
getLogsForProcessModel: `/correlation/${params.correlationId}/process_model/${params.processModelId}`,
writeLogForProcessModel: `/correlation/${params.correlationId}/process_model/${params.processModelId}`,
writeLogForFlowNode: `/correlation/${params.correlationId}/process_model/${params.processModelId}/flow_node/${params.flowNodeId}`,
};
/**
* Contains the endpoints and various rest parameters used by the logging api.
* Contains the endpoints and various rest parameters used by the logging API.
*/
export const restSettings = {
/**
* A collection of all url parameters employed by the logging api.
* A collection of all URL parameters employed by the logging API.
*/
params: params,
/**
* A collection of all urls employed by the logging api.
* A collection of all URLs employed by the logging API.
*/
paths: paths,
};
import {LogLevel} from './log_level';
/**
* Describes the payload that gets send with a HTTP request for writing a log entry.
*/
export class WriteLogRequestPayload {

@@ -4,0 +7,0 @@ public logLevel: LogLevel;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc