@ohbug/extension-uuid 2.0.2 → 2.0.3
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/dist/index.d.ts +10 -10
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ interface OhbugUser {
|
|
|
26
26
|
[key: string]: any
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
type
|
|
29
|
+
type OhbugMetadata = Record<string, any>
|
|
30
30
|
|
|
31
31
|
type OhbugReleaseStage = 'development' | 'production' | string
|
|
32
32
|
type OhbugCategory =
|
|
@@ -55,7 +55,7 @@ interface OhbugEvent<D> {
|
|
|
55
55
|
device: OhbugDevice
|
|
56
56
|
user?: OhbugUser
|
|
57
57
|
actions?: OhbugAction[]
|
|
58
|
-
|
|
58
|
+
metadata?: OhbugMetadata
|
|
59
59
|
}
|
|
60
60
|
interface OhbugEventWithMethods<D> extends OhbugEvent<D> {
|
|
61
61
|
addAction: (
|
|
@@ -66,9 +66,9 @@ interface OhbugEventWithMethods<D> extends OhbugEvent<D> {
|
|
|
66
66
|
) => void
|
|
67
67
|
getUser: () => OhbugUser | undefined
|
|
68
68
|
setUser: (user: OhbugUser) => OhbugUser | undefined
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
addMetadata: (section: string, data: any) => any
|
|
70
|
+
getMetadata: (section: string) => any
|
|
71
|
+
deleteMetadata: (section: string) => any
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
interface OhbugCreateEvent<D> {
|
|
@@ -116,7 +116,7 @@ interface OhbugConfig {
|
|
|
116
116
|
) => void
|
|
117
117
|
// data
|
|
118
118
|
user?: OhbugUser
|
|
119
|
-
|
|
119
|
+
metadata?: OhbugMetadata
|
|
120
120
|
// utils
|
|
121
121
|
logger?: OhbugLoggerConfig
|
|
122
122
|
}
|
|
@@ -136,7 +136,7 @@ interface OhbugClient {
|
|
|
136
136
|
|
|
137
137
|
readonly __actions: OhbugAction[]
|
|
138
138
|
__user: OhbugUser
|
|
139
|
-
readonly
|
|
139
|
+
readonly __metadata: OhbugMetadata
|
|
140
140
|
|
|
141
141
|
use: (extension: OhbugExtension) => OhbugClient
|
|
142
142
|
createEvent: <D = any>(
|
|
@@ -156,9 +156,9 @@ interface OhbugClient {
|
|
|
156
156
|
) => void
|
|
157
157
|
getUser: () => OhbugUser | undefined
|
|
158
158
|
setUser: (user: OhbugUser) => OhbugUser | undefined
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
addMetadata: (section: string, data: any) => any
|
|
160
|
+
getMetadata: (section: string) => any
|
|
161
|
+
deleteMetadata: (section: string) => any
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
declare const extension: OhbugExtension;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohbug/extension-uuid",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Ohbug extension to add uuid",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "chenyueban <jasonchan0527@gmail.com>",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
],
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@ohbug/core": "2.0.
|
|
31
|
-
"@ohbug/utils": "2.0.
|
|
30
|
+
"@ohbug/core": "2.0.3",
|
|
31
|
+
"@ohbug/utils": "2.0.3",
|
|
32
32
|
"uuid": "^8.3.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|