woonplan-packages-redishelper 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "woonplan-packages-redishelper",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "",
5
5
  "author": "Jasper Denk <jasper@e-trias.nl>",
6
6
  "repository": "https://github.com/e-line-websolutions/woonplan-micro-energyio",
@@ -3,7 +3,6 @@ import IORedis, { Redis } from "ioredis"
3
3
  import Rollbar from "rollbar"
4
4
  import { isMap } from "util/types"
5
5
  import { capitalizeFirstLetter, stringifyMap } from "../services/utils"
6
- import { RollbarConfig, RedisConfig, Struct, DecypheredParameters, StreamResponse, DecypheredResponse, DecypheredMessage } from "../types"
7
6
  import Listener from "./Listener"
8
7
  import ListListener from "./ListListener"
9
8
  import { v4 as uuidv4 } from 'uuid'
@@ -1,5 +1,4 @@
1
1
  import { Redis } from "ioredis"
2
- import { DecypheredMessage, DecypheredResponse, StreamResponse } from "../types"
3
2
  import Broker from "./Broker"
4
3
 
5
4
  export default abstract class BrokerClient{
@@ -1,5 +1,4 @@
1
1
  import { Redis } from "ioredis"
2
- import { DecypheredMessage } from "../types"
3
2
  import Broker from "./Broker"
4
3
  import BrokerClient from "./BrokerClient"
5
4
  import ListRunner from "./ListRunner"
@@ -1,5 +1,4 @@
1
1
  import { Redis } from "ioredis"
2
- import { DecypheredMessage } from "../types"
3
2
  import Broker from "./Broker"
4
3
  import BrokerClient from "./BrokerClient"
5
4
 
package/src/main.ts ADDED
@@ -0,0 +1,3 @@
1
+ import Broker from "./classes/Broker"
2
+
3
+ export { Broker }
package/src/types.d.ts ADDED
@@ -0,0 +1,49 @@
1
+
2
+ interface JsonStringifiedMap{
3
+ dataType : 'Map',
4
+ value : any[]
5
+ }
6
+
7
+ interface RedisMessage{
8
+ [index: string]: any;
9
+ }
10
+ interface Struct{
11
+ [index: string]: any;
12
+ }
13
+
14
+ interface RedisConfig{
15
+ REDISURL: string | number | undefined;
16
+ }
17
+
18
+ interface RedisStreamEntry{
19
+ id : string
20
+ message:RedisMessage
21
+ }
22
+
23
+ type StreamMessage = [
24
+ string, StreamMessageParameters
25
+ ]
26
+
27
+ type StreamMessageParameters = string[]
28
+ type StreamResponse = [
29
+ string, StreamMessage[]
30
+ ]
31
+
32
+ interface DecypheredParameters{
33
+ [index:string] : string
34
+ }
35
+
36
+ interface DecypheredMessage{
37
+ id : string
38
+ parameters : DecypheredParameters
39
+ }
40
+
41
+ interface DecypheredResponse{
42
+ stream : string,
43
+ messages : DecypheredMessage[]
44
+ }
45
+
46
+ interface RollbarConfig{
47
+ accessToken : string
48
+ environment : string
49
+ }
@@ -1,5 +0,0 @@
1
- import Broker from "./Broker";
2
-
3
- export default class Requester extends Broker{
4
-
5
- }
package/src/types.ts DELETED
@@ -1,49 +0,0 @@
1
-
2
- export interface JsonStringifiedMap{
3
- dataType : 'Map',
4
- value : any[]
5
- }
6
-
7
- export interface RedisMessage{
8
- [index: string]: any;
9
- }
10
- export interface Struct{
11
- [index: string]: any;
12
- }
13
-
14
- export interface RedisConfig{
15
- REDISURL: string | number | undefined;
16
- }
17
-
18
- export interface RedisStreamEntry{
19
- id : string
20
- message:RedisMessage
21
- }
22
-
23
- export type StreamMessage = [
24
- string, StreamMessageParameters
25
- ]
26
-
27
- export type StreamMessageParameters = string[]
28
- export type StreamResponse = [
29
- string, StreamMessage[]
30
- ]
31
-
32
- export interface DecypheredParameters{
33
- [index:string] : string
34
- }
35
-
36
- export interface DecypheredMessage{
37
- id : string
38
- parameters : DecypheredParameters
39
- }
40
-
41
- export interface DecypheredResponse{
42
- stream : string,
43
- messages : DecypheredMessage[]
44
- }
45
-
46
- export interface RollbarConfig{
47
- accessToken : string
48
- environment : string
49
- }