From f82f885dad9a0eaecd64f365adbd1f49517b4fd9 Mon Sep 17 00:00:00 2001 From: jnsdls Date: Tue, 15 Jul 2025 00:12:41 +0000 Subject: [PATCH] Update nebula rateLimit type to include perSecond and perMinute (#7614) # Update Nebula Rate Limit Type This PR updates the Nebula rate limit type to provide more granular control by replacing the single `rateLimit` number with an object containing `perSecond` and `perMinute` properties. The change affects: - The `TeamCapabilities` type in the service-utils package - Corresponding mock data and stubs in the dashboard app - Added a changeset to document this patch update --- .changeset/loud-clocks-begin.md | 5 +++++ apps/dashboard/src/@/storybook/stubs.ts | 5 ++++- packages/service-utils/src/core/api.ts | 5 ++++- packages/service-utils/src/mocks.ts | 5 ++++- 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 .changeset/loud-clocks-begin.md diff --git a/.changeset/loud-clocks-begin.md b/.changeset/loud-clocks-begin.md new file mode 100644 index 00000000000..7ddb5ab3e88 --- /dev/null +++ b/.changeset/loud-clocks-begin.md @@ -0,0 +1,5 @@ +--- +"@thirdweb-dev/service-utils": patch +--- + +update nebula ratelimit type diff --git a/apps/dashboard/src/@/storybook/stubs.ts b/apps/dashboard/src/@/storybook/stubs.ts index 1308233de4e..12d92d4f0b4 100644 --- a/apps/dashboard/src/@/storybook/stubs.ts +++ b/apps/dashboard/src/@/storybook/stubs.ts @@ -57,7 +57,10 @@ export function teamStub(id: string, billingPlan: Team["billingPlan"]): Team { }, nebula: { enabled: true, - rateLimit: 1000, + rateLimit: { + perSecond: 1000, + perMinute: 1000, + }, }, pay: { enabled: true, diff --git a/packages/service-utils/src/core/api.ts b/packages/service-utils/src/core/api.ts index 672a1fe6f84..9a971dbdb7a 100644 --- a/packages/service-utils/src/core/api.ts +++ b/packages/service-utils/src/core/api.ts @@ -84,7 +84,10 @@ type TeamCapabilities = { }; nebula: { enabled: boolean; - rateLimit: number; + rateLimit: { + perSecond: number; + perMinute: number; + }; }; bundler: { enabled: boolean; diff --git a/packages/service-utils/src/mocks.ts b/packages/service-utils/src/mocks.ts index 071e6bdfe8e..334343482d3 100644 --- a/packages/service-utils/src/mocks.ts +++ b/packages/service-utils/src/mocks.ts @@ -75,7 +75,10 @@ export const validTeamResponse: TeamResponse = { }, nebula: { enabled: true, - rateLimit: 1000, + rateLimit: { + perSecond: 1000, + perMinute: 1000, + }, }, pay: { enabled: true,