Skip to content

Commit 773b70a

Browse files
authored
Update: Added httpMethod to usage-tracker (#2832)
1 parent e774882 commit 773b70a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.changeset/gorgeous-wombats-press.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@thirdweb-dev/service-utils": patch
3+
---
4+
5+
added httpMethod to usage-tracker

packages/service-utils/src/cf-worker/usage.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,19 @@ const usageEventSchema = z.object({
7070
tokenAddress: z.string().optional(),
7171
amountWei: z.string().optional(),
7272
amountUSDCents: z.number().nonnegative().optional(),
73+
httpMethod: z
74+
.enum([
75+
"GET",
76+
"POST",
77+
"PUT",
78+
"DELETE",
79+
"PATCH",
80+
"HEAD",
81+
"CONNECT",
82+
"OPTIONS",
83+
"TRACE",
84+
])
85+
.optional(),
7386
});
7487
export type UsageEvent = z.infer<typeof usageEventSchema>;
7588

0 commit comments

Comments
 (0)