File tree 2 files changed +11
-1
lines changed
packages/service-utils/src/core 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @thirdweb-dev/service-utils " : patch
3
+ ---
4
+
5
+ chore: Support Engine Core and Webhook usage events
Original file line number Diff line number Diff line change 1
1
export const USAGE_V2_SOURCES = [
2
2
"bundler" ,
3
- "engine" ,
3
+ "engine" , // Engine Core -- treat as a client-side event
4
+ "engine-cloud" , // Engine Cloud
4
5
"insight" ,
5
6
"nebula" ,
6
7
"rpc" ,
7
8
"sdk" ,
8
9
"storage" ,
9
10
"wallet" ,
10
11
"pay" ,
12
+ "webhook" ,
11
13
] as const ;
12
14
export type UsageV2Source = ( typeof USAGE_V2_SOURCES ) [ number ] ;
15
+
13
16
export function getTopicName ( source : UsageV2Source ) {
14
17
switch ( source ) {
15
18
// Some sources are sent from clients and are written to an "untrusted" table.
16
19
case "sdk" :
17
20
case "engine" :
18
21
return `usage_v2.untrusted_raw_${ source } ` ;
22
+ case "engine-cloud" :
23
+ return "usage_v2.raw_engine" ;
19
24
default :
20
25
return `usage_v2.raw_${ source } ` ;
21
26
}
You can’t perform that action at this time.
0 commit comments