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 +1 -1
- package/src/classes/Broker.ts +0 -1
- package/src/classes/BrokerClient.ts +0 -1
- package/src/classes/ListListener.ts +0 -1
- package/src/classes/Listener.ts +0 -1
- package/src/main.ts +3 -0
- package/src/types.d.ts +49 -0
- package/src/classes/Requester.ts +0 -5
- package/src/types.ts +0 -49
package/package.json
CHANGED
package/src/classes/Broker.ts
CHANGED
|
@@ -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'
|
package/src/classes/Listener.ts
CHANGED
package/src/main.ts
ADDED
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
|
+
}
|
package/src/classes/Requester.ts
DELETED
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
|
-
}
|