Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/service-utils/src/core/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ type TeamCapabilities = {
enabled: boolean;
rateLimit: number;
};
gateway: {
enabled: boolean;
rateLimit: number;
};
};

type TeamPlan =
Expand Down Expand Up @@ -207,6 +211,10 @@ export type ProjectService =
payoutAddress: string | null;
developerFeeBPS?: number | null;
}
| {
name: "gateway";
actions: never[];
}
| {
name: "storage";
actions: ("read" | "write")[];
Expand Down
7 changes: 7 additions & 0 deletions packages/service-utils/src/core/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ export const SERVICE_DEFINITIONS = {
name: "storage",
title: "Storage",
},
gateway: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the dashboard reads this btw, would make sure it does what you want (particularly enabled by default) also api server needs to have this if this is gonna be a proper projectService

we can store dev settings in there in the future

// all actions allowed
actions: [],
description: "api.thirdweb.com",
name: "gateway",
title: "Gateway",
},
} as const;

export const SERVICE_NAMES = Object.keys(
Expand Down
1 change: 1 addition & 0 deletions packages/service-utils/src/core/usageV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const USAGE_V2_SOURCES = [
"wallet",
"pay",
"webhook",
"gateway",
] as const;
export type UsageV2Source = (typeof USAGE_V2_SOURCES)[number];

Expand Down
4 changes: 4 additions & 0 deletions packages/service-utils/src/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ export const validTeamResponse: TeamResponse = {
enabled: true,
rateLimit: 1000,
},
gateway: {
enabled: true,
rateLimit: 1000,
},
platform: {
auditLogs: true,
ecosystemWallets: true,
Expand Down
Loading