Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Oct 10, 2024
1 parent 2438d45 commit 2d6e46f
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 41 deletions.
1 change: 0 additions & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"start:realtime-evaluators": "tsx src/realtime-evaluators.ts",
"dev:realtime-evaluators": "tsx --env-file=.env --watch src/realtime-evaluators.ts",
"migrate:db": "tsx src/migrate.ts",
"openapi": "tsx src/openapi.ts",
"build": "tsup src/index.ts --format esm",
"dev": "tsx --env-file=.env --watch src/index.ts",
"test": "tsx src/index.ts"
Expand Down
26 changes: 13 additions & 13 deletions packages/backend/src/api/v1/datasets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const datasets = new Router({

/**
* @openapi
* /api/v1/datasets:
* /v1/datasets:
* get:
* summary: List datasets
* tags: [Datasets]
Expand All @@ -60,7 +60,7 @@ datasets.get("/", checkAccess("datasets", "list"), async (ctx: Context) => {

/**
* @openapi
* /api/v1/datasets/{identifier}:
* /v1/datasets/{identifier}:
* get:
* summary: Get dataset by ID or slug
* tags: [Datasets]
Expand Down Expand Up @@ -105,7 +105,7 @@ datasets.get("/:identifier", async (ctx: Context) => {

/**
* @openapi
* /api/v1/datasets:
* /v1/datasets:
* post:
* summary: Create a new dataset
* tags: [Datasets]
Expand Down Expand Up @@ -170,7 +170,7 @@ datasets.post("/", checkAccess("datasets", "create"), async (ctx: Context) => {

/**
* @openapi
* /api/v1/datasets/{id}:
* /v1/datasets/{id}:
* patch:
* summary: Update a dataset
* tags: [Datasets]
Expand Down Expand Up @@ -227,7 +227,7 @@ datasets.patch(

/**
* @openapi
* /api/v1/datasets/{id}:
* /v1/datasets/{id}:
* delete:
* summary: Delete a dataset
* tags: [Datasets]
Expand Down Expand Up @@ -258,7 +258,7 @@ datasets.delete(

/**
* @openapi
* /api/v1/datasets/prompts:
* /v1/datasets/prompts:
* post:
* summary: Create a new prompt
* tags: [Datasets, Prompts]
Expand Down Expand Up @@ -324,7 +324,7 @@ datasets.post(

/**
* @openapi
* /api/v1/datasets/prompts/{id}:
* /v1/datasets/prompts/{id}:
* get:
* summary: Get prompt by ID
* tags: [Datasets, Prompts]
Expand Down Expand Up @@ -387,7 +387,7 @@ datasets.get(

/**
* @openapi
* /api/v1/datasets/prompts/{id}:
* /v1/datasets/prompts/{id}:
* delete:
* summary: Delete a prompt
* tags: [Datasets, Prompts]
Expand Down Expand Up @@ -434,7 +434,7 @@ datasets.delete(

/**
* @openapi
* /api/v1/datasets/prompts/{id}:
* /v1/datasets/prompts/{id}:
* patch:
* summary: Update a prompt
* tags: [Datasets, Prompts]
Expand Down Expand Up @@ -496,7 +496,7 @@ datasets.patch(

/**
* @openapi
* /api/v1/datasets/variations/{id}:
* /v1/datasets/variations/{id}:
* get:
* summary: Get prompt variation by ID
* tags: [Datasets, Prompts, Variations]
Expand Down Expand Up @@ -545,7 +545,7 @@ datasets.get(

/**
* @openapi
* /api/v1/datasets/variations/{id}:
* /v1/datasets/variations/{id}:
* delete:
* summary: Delete a prompt variation
* tags: [Datasets, Prompts, Variations]
Expand Down Expand Up @@ -592,7 +592,7 @@ datasets.delete(

/**
* @openapi
* /api/v1/datasets/variations/{variationId}:
* /v1/datasets/variations/{variationId}:
* patch:
* summary: Update a prompt variation
* tags: [Datasets, Prompts, Variations]
Expand Down Expand Up @@ -667,7 +667,7 @@ datasets.patch(

/**
* @openapi
* /api/v1/datasets/variations:
* /v1/datasets/variations:
* post:
* summary: Create a new prompt variation
* tags: [Datasets, Prompts, Variations]
Expand Down
6 changes: 3 additions & 3 deletions packages/backend/src/api/v1/external-users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const users = new Router({

/**
* @openapi
* /api/v1/external-users:
* /v1/external-users:
* get:
* summary: List project users
* description: |
Expand Down Expand Up @@ -218,7 +218,7 @@ users.get("/runs/usage", checkAccess("users", "read"), async (ctx) => {

/**
* @openapi
* /api/v1/external-users/{id}:
* /v1/external-users/{id}:
* get:
* summary: Get a specific user
* tags: [Users]
Expand Down Expand Up @@ -255,7 +255,7 @@ users.get("/:id", checkAccess("users", "read"), async (ctx: Context) => {

/**
* @openapi
* /api/v1/external-users/{id}:
* /v1/external-users/{id}:
* delete:
* summary: Delete a specific user
* tags: [Users]
Expand Down
8 changes: 4 additions & 4 deletions packages/backend/src/api/v1/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ModelSchema = z.object({

/**
* @openapi
* /api/v1/models:
* /v1/models:
* get:
* summary: List models
* tags: [Models]
Expand All @@ -45,7 +45,7 @@ models.get("/", checkAccess("logs", "list"), async (ctx: Context) => {

/**
* @openapi
* /api/v1/models:
* /v1/models:
* post:
* summary: Create a new model
* tags: [Models]
Expand Down Expand Up @@ -82,7 +82,7 @@ models.post("/", async (ctx: Context) => {

/**
* @openapi
* /api/v1/models/{id}:
* /v1/models/{id}:
* patch:
* summary: Update a model
* tags: [Models]
Expand Down Expand Up @@ -124,7 +124,7 @@ models.patch("/:id", async (ctx: Context) => {

/**
* @openapi
* /api/v1/models/{id}:
* /v1/models/{id}:
* delete:
* summary: Delete a model
* tags: [Models]
Expand Down
12 changes: 6 additions & 6 deletions packages/backend/src/api/v1/runs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ runs.use("/ingest", ingest.routes());

/**
* @openapi
* /api/v1/runs:
* /v1/runs:
* get:
* summary: Get runs
* tags: [Runs]
Expand Down Expand Up @@ -642,7 +642,7 @@ runs.get("/count", async (ctx: Context) => {

/**
* @openapi
* /api/v1/runs/usage:
* /v1/runs/usage:
* get:
* tags: [Runs]
* summary: Get run usage statistics
Expand Down Expand Up @@ -764,7 +764,7 @@ runs.get("/:id/public", async (ctx) => {

/**
* @openapi
* /api/v1/runs/{id}:
* /v1/runs/{id}:
* get:
* summary: Get a specific run
* description: Retrieve detailed information about a specific run by its ID.
Expand Down Expand Up @@ -845,7 +845,7 @@ runs.get("/:id", async (ctx) => {

/**
* @openapi
* /api/v1/runs/{id}:
* /v1/runs/{id}:
* patch:
* summary: Update a run
* description: This endpoint allows updating the public visibility status and tags of a run. The `isPublic` field can be set to true or false to change the run's visibility. The `tags` field can be updated with an array of strings or set to null to remove all tags.
Expand Down Expand Up @@ -909,7 +909,7 @@ runs.patch("/:id", checkAccess("logs", "update"), async (ctx: Context) => {

/**
* @openapi
* /api/v1/runs/{id}/feedback:
* /v1/runs/{id}/feedback:
* patch:
* summary: Update run feedback
* tags: [Runs]
Expand Down Expand Up @@ -1026,7 +1026,7 @@ runs.get("/:id/feedback", async (ctx) => {

/**
* @openapi
* /api/v1/runs/{id}:
* /v1/runs/{id}:
* delete:
* summary: Delete a run
* description: Delete a specific run by its ID. This action is irreversible.
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/api/v1/runs/ingest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ export async function processEventsIngestion(

/**
* @openapi
* /api/v1/runs/ingest:
* /v1/runs/ingest:
* post:
* summary: Ingest run events
* description: |
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/api/v1/template-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function unCamelExtras(version: any) {
}
/**
* @openapi
* /api/v1/template-versions/latest:
* /v1/template-versions/latest:
* get:
* summary: Get the latest version of a template
* description: |
Expand Down Expand Up @@ -120,7 +120,7 @@ versions.get("/:id", async (ctx: Context) => {

/**
* @openapi
* /api/v1/template-versions/{id}:
* /v1/template-versions/{id}:
* patch:
* summary: Update a template version
* tags: [Templates]
Expand Down
12 changes: 6 additions & 6 deletions packages/backend/src/api/v1/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const templates = new Router({

/**
* @openapi
* /api/v1/templates:
* /v1/templates:
* get:
* summary: List all templates
* description: |
Expand Down Expand Up @@ -87,7 +87,7 @@ templates.get("/latest", async (ctx: Context) => {

/**
* @openapi
* /api/v1/templates:
* /v1/templates:
* post:
* summary: Create a new template
* description: |
Expand Down Expand Up @@ -193,7 +193,7 @@ templates.post("/", checkAccess("prompts", "create"), async (ctx: Context) => {

/**
* @openapi
* /api/v1/templates/{id}:
* /v1/templates/{id}:
* get:
* summary: Get a specific template
* description: |
Expand Down Expand Up @@ -260,7 +260,7 @@ templates.get("/:id", async (ctx: Context) => {

/**
* @openapi
* /api/v1/templates/{id}:
* /v1/templates/{id}:
* delete:
* summary: Delete a template
* tags: [Templates]
Expand All @@ -285,7 +285,7 @@ templates.delete(

/**
* @openapi
* /api/v1/templates/{id}:
* /v1/templates/{id}:
* patch:
* summary: Update a template
* description: |
Expand Down Expand Up @@ -386,7 +386,7 @@ templates.patch(

/**
* @openapi
* /api/v1/templates/{id}/versions:
* /v1/templates/{id}/versions:
* post:
* summary: Create a new version for a template
* description: |
Expand Down
10 changes: 5 additions & 5 deletions packages/backend/src/api/v1/views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ViewSchema = z.object({

/**
* @openapi
* /api/v1/views:
* /v1/views:
* get:
* summary: List all views
* description: Retrieves a list of all views for the current project, ordered by most recently updated.
Expand Down Expand Up @@ -55,7 +55,7 @@ views.get("/", checkAccess("logs", "list"), async (ctx: Context) => {

/**
* @openapi
* /api/v1/views/{id}:
* /v1/views/{id}:
* get:
* summary: Get a specific view
* description: Retrieves details of a specific view by its ID.
Expand Down Expand Up @@ -98,7 +98,7 @@ views.get("/:id", checkAccess("logs", "read"), async (ctx: Context) => {

/**
* @openapi
* /api/v1/views:
* /v1/views:
* post:
* summary: Create a new view
* description: Creates a new dashboard view with the provided details.
Expand Down Expand Up @@ -155,7 +155,7 @@ views.post("/", async (ctx: Context) => {

/**
* @openapi
* /api/v1/views/{id}:
* /v1/views/{id}:
* patch:
* summary: Update a view
* description: Updates an existing view with the provided details.
Expand Down Expand Up @@ -213,7 +213,7 @@ views.patch("/:id", async (ctx: Context) => {

/**
* @openapi
* /api/v1/views/{id}:
* /v1/views/{id}:
* delete:
* summary: Delete a view
* description: Deletes a specific view by its ID.
Expand Down

0 comments on commit 2d6e46f

Please sign in to comment.