Socket
Socket
Sign inDemoInstall

@process-engine/logging_api_contracts

Package Overview
Dependencies
Maintainers
10
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@process-engine/logging_api_contracts - npm Package Compare versions

Comparing version 0.0.1-0708c5b5-b15 to 0.0.1-1455296f-b2

dist/commonjs/ilogging_api_service.js

1

dist/commonjs/index.js

@@ -9,4 +9,3 @@ "use strict";

__export(require("./rest_settings"));
__export(require("./write_log_request_payload"));
//# sourceMappingURL=index.js.map

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

correlationId: ':correlation_id',
flowNodeId: ':flow_node_id',
};
const paths = {
getLogsForCorrelation: `/correlation/${params.correlationId}`,
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}`,
getLogForCorrelation: `/correlation/${params.correlationId}`,
getLogForProcessModel: `/correlation/${params.correlationId}/process_model/${params.processModelId}`,
};

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

@@ -5,3 +5,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 ProcessModel and Correlation.
*/

@@ -12,37 +12,50 @@ export interface ILoggingRepository {

* @async
* @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.
* @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): Promise<Array<LogEntry>>;
readLogForCorrelation(correlationId: string): Promise<Array<LogEntry>>;
/**
* Retrieves the logs for a specific Process Model of a given Correlation.
* Retrieves the logs for a specific ProcessModel 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 correlationId The ID of the Correlation for which to retrieve
* the logs.
* @param processModelId The ID of ProcessModel for which to retrieve
* the logs.
* If not set, all logs will be returned.
* @returns A list of log entries.
*/
getLogsForProcessModel(correlationId: string, processModelId: string): Promise<Array<LogEntry>>;
readLogForProcessModel(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 ProcessModel 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 correlationId The ID of the Correlation to which the
* ProcessModel belongs.
* @param processModelId The ID of ProcessModel 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".
* @param timestamp Optional: The timestamp to use for the log entry.
* Defaults to "now".
*/
writeLogForProcessModel(correlationId: string, processModelId: string, logLevel: LogLevel, message: string, timestamp?: Date): Promise<void>;
/**
* Writes a log entry for a specific Flow Node of a Process Model within a Correlation.
* Writes a log entry for a specific FlowNode of a ProcessModel 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 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".
* @param correlationId The ID of the Correlation to which the
* ProcessModel belongs.
* @param processModelId The ID of ProcessModel to which the FlowNode
* belongs.
* @param flowNodeInstanceId The instance ID of FlowNode for which to create
* a log entry.
* @param flowNodeId The ID of FlowNode 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".
*/
writeLogForFlowNode(correlationId: string, processModelId: string, flowNodeId: string, logLevel: LogLevel, message: string, timestamp?: Date): Promise<void>;
writeLogForFlowNode(correlationId: string, processModelId: string, flowNodeInstanceId: string, flowNodeId: string, logLevel: LogLevel, message: string, timestamp?: Date): Promise<void>;
}

@@ -0,6 +1,5 @@

export * from './ilogging_api_service';
export * from './ilogging_repository';
export * from './ilogging_service';
export * from './log_entry';
export * from './log_level';
export * from './rest_settings';
export * from './write_log_request_payload';
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.
* Contains information about the Correlation, ProcessModel and
* FlowNodeInstance to which the entry belongs,
* aswell as a timestamp, LogLvel 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 {
timeStamp: Date;
correlationId: string;
processModelId: string;
correlationId: string;
flowNodeInstanceId?: string;
flowNodeId?: string;
logLevel: LogLevel;
message: string;
timeStamp: Date;
}

@@ -11,3 +11,2 @@ /**

correlationId: string;
flowNodeId: string;
};

@@ -18,7 +17,5 @@ /**

paths: {
getLogsForCorrelation: string;
getLogsForProcessModel: string;
writeLogForProcessModel: string;
writeLogForFlowNode: string;
getLogForCorrelation: string;
getLogForProcessModel: string;
};
};
{
"name": "@process-engine/logging_api_contracts",
"version": "0.0.1-0708c5b5-b15",
"version": "0.0.1-1455296f-b2",
"description": "the api-package for process-engine logging",

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

@@ -1,7 +0,34 @@

## What did you change?
:tada: **Thanks for submitting this Pull Request**
> Describe the changes introduced by this PR.
>
> Fixes # (issue, if applicable)
Please provide a list including your changes.
To help us to create a meaningful Changelog, we agreed
to use an emoji-based commit-style. Use the [Emojis](#emojis)
we provided below.
Fill out the following, provide reference to issues
and this PR- we will use this as merge commit message-body
and the title of this PR as commit-headline:
---
**Changes:**
1. Change 1
2. Change 2
3. (...)
**Issues:**
Closes #Issue
Closes #Issue
Closes (...)
PR: #PullRequest
---
See the [examples](#example) for inspiration.
## How can others test the changes?

@@ -15,7 +42,79 @@

- [ ] You can merge this PR **right now** (if not, please prefix the title with "WIP: ")
- [ ] I've tested **all** changes included in this PR.
- [ ] I've also reviewed this PR myself before submitting (e.g. for scrambled letters, typos, etc.)
- [ ] I've merged the `develop` branch into my branch before finishing this PR.
- [ ] I've **not added any other changes** than the ones described above.
- [ ] I've mentioned all **PRs, which relate to this one**
- [x] You can merge this PR **right now** (if not, please prefix the title with "WIP: ")
- [x] I've tested **all** changes included in this PR.
- [x] I've also reviewed this PR myself before submitting (e.g. for scrambled letters, typos, etc.).
- [x] I've rebased the `develop` branch with my branch before finishing this PR.
- [x] I've **summarized all changes** in a list above.
- [x] I've mentioned all **PRs, which relate to this one**.
- [x] I've prefixed my Pull Request title is according to [gitmoji guide](https://gitmoji.carloscuesta.me/).
## Example
<details>
<summary>
:warning: Before merging please click here to expand and follow the guide.
</summary>
<br>
Please use `:twisted_rightwards_arrows:` at the beginning of your merge commit title.
Example 1:
<pre>
<code>
:twisted_rightwards_arrows: :bug: Fix Wrong Text Decoration at ...
</code>
</pre>
To get your commit message, just copy the first part of this pull request.
Example 2:
<pre>
<code>
**Changes:**
- Fixes Wrong Text Decoration at ...
- Fixes some typos
- ...
**Issues:**
Closes #NumberOfFixedIssue
PR: #NumberOfThisPR
</code>
</pre>
</details>
## Emojis
<details>
<summary>
Expand for a list of most used Emojis.
</summary>
<br>
Please prefix your commit messages with an Emoji.
Ref: https://gitmoji.carloscuesta.me/
| Description | Glyphe | Emoji |
|--------------------------|----------------------|--------|
| Bugfix | `:bug:` | 🐛 |
| Configuration releated | `:wrench:` | 🔧 |
| Cosmetic | `:lipstick:` | 💄 |
| Dependencies Downgrade | `:arrow_down:` | ⬇️ |
| Dependencies Upgrade | `:arrow_up:` | ⬆️ |
| Formatting | `:art:` | 🎨 |
| Improving Performance | `:zap:` | ⚡️ |
| Initial commit | `:tada:` | 🎉 |
| Linter | `:rotating_light:` | 🚨 |
| Miscellaneous | `:package:` | 📦 |
| New Feature | `:sparkles:` | ✨ |
| Refactoring Code | `:recycle:` | ♻️ |
| Releasing / Version tags | `:bookmark:` | 🔖 |
| Removing Stuff | `:fire:` | 🔥 |
| Tests | `:white_check_mark:` | ✅ |
| Work In Progress (WIP) | `:construction:` | 🚧 |
</details>

@@ -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 ProcessModel and Correlation.
*/

@@ -14,26 +14,32 @@ export interface ILoggingRepository {

* @async
* @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.
* @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): Promise<Array<LogEntry>>;
readLogForCorrelation(correlationId: string): Promise<Array<LogEntry>>;
/**
* Retrieves the logs for a specific Process Model of a given Correlation.
* Retrieves the logs for a specific ProcessModel 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 correlationId The ID of the Correlation for which to retrieve
* the logs.
* @param processModelId The ID of ProcessModel for which to retrieve
* the logs.
* If not set, all logs will be returned.
* @returns A list of log entries.
*/
getLogsForProcessModel(correlationId: string, processModelId: string): Promise<Array<LogEntry>>;
readLogForProcessModel(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 ProcessModel 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 correlationId The ID of the Correlation to which the
* ProcessModel belongs.
* @param processModelId The ID of ProcessModel 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".
* @param timestamp Optional: The timestamp to use for the log entry.
* Defaults to "now".
*/

@@ -47,13 +53,21 @@ writeLogForProcessModel(correlationId: string,

/**
* Writes a log entry for a specific Flow Node of a Process Model within a Correlation.
* Writes a log entry for a specific FlowNode of a ProcessModel 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 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".
* @param correlationId The ID of the Correlation to which the
* ProcessModel belongs.
* @param processModelId The ID of ProcessModel to which the FlowNode
* belongs.
* @param flowNodeInstanceId The instance ID of FlowNode for which to create
* a log entry.
* @param flowNodeId The ID of FlowNode 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".
*/
writeLogForFlowNode(correlationId: string,
processModelId: string,
flowNodeInstanceId: string,
flowNodeId: string,

@@ -60,0 +74,0 @@ logLevel: LogLevel,

@@ -0,6 +1,5 @@

export * from './ilogging_api_service';
export * from './ilogging_repository';
export * from './ilogging_service';
export * from './log_entry';
export * from './log_level';
export * from './rest_settings';
export * from './write_log_request_payload';

@@ -5,12 +5,17 @@ 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.
* Contains information about the Correlation, ProcessModel and
* FlowNodeInstance to which the entry belongs,
* aswell as a timestamp, LogLvel 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 {
public timeStamp: Date;
public correlationId: string;
public processModelId: string;
public correlationId: string;
public flowNodeInstanceId?: string;
public flowNodeId?: string;
public logLevel: LogLevel;
public message: string;
public timeStamp: Date;
}

@@ -5,10 +5,7 @@ // tslint:disable:typedef

correlationId: ':correlation_id',
flowNodeId: ':flow_node_id',
};
const paths = {
getLogsForCorrelation: `/correlation/${params.correlationId}`,
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}`,
getLogForCorrelation: `/correlation/${params.correlationId}`,
getLogForProcessModel: `/correlation/${params.correlationId}/process_model/${params.processModelId}`,
};

@@ -15,0 +12,0 @@

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc