Skip to content

Commit b406a86

Browse files
committed
[TOOL-3447] Dashboard: Remove /v1/keys usage
1 parent d4a49b2 commit b406a86

File tree

33 files changed

+1030
-1360
lines changed

33 files changed

+1030
-1360
lines changed

apps/dashboard/src/@/api/projects.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
import "server-only";
22
import { API_SERVER_URL } from "@/constants/env";
3+
import type { ProjectResponse } from "@thirdweb-dev/service-utils";
34
import { getAuthToken } from "../../app/api/lib/getAuthToken";
45

5-
export type Project = {
6-
id: string;
7-
name: string;
8-
createdAt: Date;
9-
updatedAt: Date;
10-
deletedAt: Date | null;
11-
bannedAt: Date | null;
12-
domains: string[];
13-
bundleIds: string[];
14-
redirectUrls: string[];
15-
lastAccessedAt: Date | null;
16-
slug: string;
17-
teamId: string;
18-
publishableKey: string;
19-
// image: string; // TODO
20-
};
6+
export type Project = ProjectResponse;
217

228
export async function getProjects(teamSlug: string) {
239
const token = await getAuthToken();

apps/dashboard/src/@/api/team.ts

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,9 @@
11
import "server-only";
22
import { API_SERVER_URL } from "@/constants/env";
3+
import type { TeamResponse } from "@thirdweb-dev/service-utils";
34
import { getAuthToken } from "../../app/api/lib/getAuthToken";
45

5-
type EnabledTeamScope =
6-
| "pay"
7-
| "storage"
8-
| "rpc"
9-
| "bundler"
10-
| "insight"
11-
| "embeddedWallets"
12-
| "relayer"
13-
| "chainsaw"
14-
| "nebula";
15-
16-
export type Team = {
17-
id: string;
18-
name: string;
19-
slug: string;
20-
createdAt: string;
21-
updatedAt: string;
22-
deletedAt?: string;
23-
bannedAt?: string;
24-
image?: string;
25-
billingPlan: "pro" | "growth" | "free" | "starter";
26-
billingStatus: "validPayment" | (string & {}) | null;
27-
supportPlan: "pro" | "growth" | "free" | "starter";
28-
billingEmail: string | null;
29-
growthTrialEligible: false;
30-
enabledScopes: EnabledTeamScope[];
31-
};
32-
6+
export type Team = TeamResponse;
337
export async function getTeamBySlug(slug: string) {
348
const token = await getAuthToken();
359

apps/dashboard/src/@3rdweb-sdk/react/cache-keys.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@ export const accountKeys = {
4242
[...accountKeys.wallet(walletAddress), "billing-session"] as const,
4343
};
4444

45-
export const apiKeys = {
46-
all: ["api"] as const,
47-
wallet: (walletAddress: string) => [...apiKeys.all, walletAddress] as const,
48-
keys: (walletAddress: string) =>
49-
[...apiKeys.wallet(walletAddress), "keys"] as const,
50-
key: (id: string, walletAddress: string) =>
51-
[...apiKeys.keys(walletAddress), id] as const,
52-
};
53-
5445
export const authorizedWallets = {
5546
all: ["authorizedWallets"] as const,
5647
wallet: (walletAddress: string) =>

0 commit comments

Comments
 (0)