Skip to content

Commit

Permalink
feat(dx): move internal endpoints to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
baktun14 authored Dec 18, 2024
1 parent d45c1e4 commit 6e98471
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 8 deletions.
12 changes: 6 additions & 6 deletions apps/api/src/routes/internal/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import gpu from "./gpu";
import gpuModels from "./gpuModels";
import gpuPrices from "./gpuPrices";
import leasesDuration from "./leasesDuration";
import providerDashboard from "./providerDashboard";
import providerVersions from "./providerVersions";
import gpu from "../v1/gpu";
import gpuModels from "../v1/gpuModels";
import gpuPrices from "../v1/gpuPrices";
import leasesDuration from "../v1/leasesDuration";
import providerDashboard from "../v1/providerDashboard";
import providerVersions from "../v1/providerVersions";

export default [providerVersions, gpu, leasesDuration, gpuModels, gpuPrices, providerDashboard];
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const route = createRoute({
method: "get",
path: "/gpu",
summary: "Get a list of gpu models and their availability.",
tags: ["Gpu"],
request: {
query: z.object({
provider: z.string().optional(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const route = createRoute({
path: "/gpu-models",
summary:
"Get a list of gpu models per vendor. Based on the content from https://raw.githubusercontent.com/akash-network/provider-configs/main/devices/pcie/gpus.json.",
tags: ["Gpu"],
responses: {
200: {
description: "List of gpu models per.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const route = createRoute({
method: "get",
path: "/gpu-prices",
summary: "Get a list of gpu models with their availability and pricing.",
tags: ["Gpu"],
responses: {
200: {
description: "List of gpu models with their availability and pricing.",
Expand Down
14 changes: 13 additions & 1 deletion apps/api/src/routes/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,22 @@ import versionSandbox from "./version/sandbox";
import versionTestnet from "./version/testnet";
import auditors from "./auditors";
import dashboardData from "./dashboardData";
import gpu from "./gpu";
import gpuModels from "./gpuModels";
import gpuPrices from "./gpuPrices";
import graphData from "./graphData";
import leasesDuration from "./leasesDuration";
import marketData from "./marketData";
import networkCapacity from "./networkCapacity";
import predictedBlockDate from "./predictedBlockDate";
import predictedDateHeight from "./predictedDateHeight";
import pricing from "./pricing";
import providerActiveLeasesGraphData from "./providerActiveLeasesGraphData";
import providerAttributesSchema from "./providerAttributesSchema";
import providerDashboard from "./providerDashboard";
import providerGraphData from "./providerGraphData";
import providerRegions from "./providerRegions";
import providerVersions from "./providerVersions";
import trialProviders from "./trialProviders";

export default [
Expand Down Expand Up @@ -73,5 +79,11 @@ export default [
providerGraphData,
graphData,
providerActiveLeasesGraphData,
trialProviders
trialProviders,
leasesDuration,
providerDashboard,
providerVersions,
gpu,
gpuModels,
gpuPrices
];
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const route = createRoute({
method: "get",
path: "/leases-duration/{owner}",
summary: "Get leases durations.",
tags: ["Analytics"],
request: {
params: z.object({
owner: z.string().openapi({ example: openApiExampleAddress })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const route = createRoute({
method: "get",
path: "/provider-dashboard/{owner}",
summary: "Get dashboard data for provider console.",
tags: ["Providers"],
request: {
params: z.object({
owner: z.string().openapi({ example: openApiExampleProviderAddress })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const route = createRoute({
method: "get",
path: "/provider-versions",
summary: "Get providers grouped by version.",
tags: ["Providers"],
responses: {
200: {
description: "List of providers grouped by version.",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6e98471

Please sign in to comment.