Skip to content

Commit e25a96c

Browse files
committed
feat: adds gateway usage source
1 parent 4cbf671 commit e25a96c

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

packages/service-utils/src/core/api.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ type TeamCapabilities = {
112112
enabled: boolean;
113113
rateLimit: number;
114114
};
115+
gateway: {
116+
enabled: boolean;
117+
rateLimit: number;
118+
};
115119
};
116120

117121
type TeamPlan =

packages/service-utils/src/core/services.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ export const SERVICE_DEFINITIONS = {
8383
name: "storage",
8484
title: "Storage",
8585
},
86+
gateway: {
87+
// all actions allowed
88+
actions: [],
89+
description: "api.thirdweb.com",
90+
name: "gateway",
91+
title: "Gateway",
92+
},
8693
} as const;
8794

8895
export const SERVICE_NAMES = Object.keys(

packages/service-utils/src/core/usageV2.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const USAGE_V2_SOURCES = [
1010
"wallet",
1111
"pay",
1212
"webhook",
13+
"gateway",
1314
] as const;
1415
export type UsageV2Source = (typeof USAGE_V2_SOURCES)[number];
1516

packages/service-utils/src/mocks.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ export const validTeamResponse: TeamResponse = {
8484
enabled: true,
8585
rateLimit: 1000,
8686
},
87+
gateway: {
88+
enabled: true,
89+
rateLimit: 1000,
90+
},
8791
platform: {
8892
auditLogs: true,
8993
ecosystemWallets: true,

0 commit comments

Comments
 (0)