Skip to content

Commit

Permalink
fix kysely return type for hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
markusahlstrand committed Nov 11, 2024
1 parent bb18986 commit 4b4a361
Show file tree
Hide file tree
Showing 19 changed files with 519 additions and 112 deletions.
5 changes: 0 additions & 5 deletions .changeset/perfect-wolves-fix.md

This file was deleted.

7 changes: 7 additions & 0 deletions packages/authhero/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# authhero

## 0.5.0

### Minor Changes

- Store hook booleans as integers
- bb18986: Add prompts endpoint

## 0.4.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/authhero/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "authhero",
"version": "0.4.0",
"version": "0.5.0",
"files": [
"dist"
],
Expand Down
4 changes: 2 additions & 2 deletions packages/authhero/src/management-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { usersByEmailRoutes } from "./routes/management-api/users-by-email";
import { clientRoutes } from "./routes/management-api/clients";
import { tenantRoutes } from "./routes/management-api/tenants";
import { logRoutes } from "./routes/management-api/logs";
// import { hooksRoutes } from "./routes/management-api/hooks";
import { hooksRoutes } from "./routes/management-api/hooks";
import { connectionRoutes } from "./routes/management-api/connections";
import { promptsRoutes } from "./routes/management-api/prompts";
import { registerComponent } from "./middlewares/register-component";
Expand Down Expand Up @@ -39,7 +39,7 @@ export default function create(params: CreateAuthParams) {
.route("/api/v2/clients", clientRoutes)
.route("/api/v2/tenants", tenantRoutes)
.route("/api/v2/logs", logRoutes)
// .route("/api/v2/hooks", hooksRoutes)
.route("/api/v2/hooks", hooksRoutes)
.route("/api/v2/connections", connectionRoutes)
.route("/api/v2/prompts", promptsRoutes);

Expand Down
20 changes: 10 additions & 10 deletions packages/authhero/src/routes/management-api/branding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export const brandingRoutes = new OpenAPIHono<{ Bindings: Bindings }>()
}),
},
// middleware: [authenticationMiddleware({ scopes: ["auth:read"] })],
// security: [
// {
// Bearer: ["auth:read"],
// },
// ],
security: [
{
Bearer: ["auth:read"],
},
],
responses: {
200: {
content: {
Expand Down Expand Up @@ -67,11 +67,11 @@ export const brandingRoutes = new OpenAPIHono<{ Bindings: Bindings }>()
},
},
// middleware: [authenticationMiddleware({ scopes: ["auth:write"] })],
// security: [
// {
// Bearer: ["auth:write"],
// },
// ],
security: [
{
Bearer: ["auth:write"],
},
],
responses: {
200: {
description: "Branding settings",
Expand Down
50 changes: 25 additions & 25 deletions packages/authhero/src/routes/management-api/connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ export const connectionRoutes = new OpenAPIHono<{ Bindings: Bindings }>()
}),
},
// middleware: [authenticationMiddleware({ scopes: ["auth:read"] })],
// security: [
// {
// Bearer: ["auth:read"],
// },
// ],
security: [
{
Bearer: ["auth:read"],
},
],
responses: {
200: {
content: {
Expand Down Expand Up @@ -92,11 +92,11 @@ export const connectionRoutes = new OpenAPIHono<{ Bindings: Bindings }>()
}),
},
// middleware: [authenticationMiddleware({ scopes: ["auth:read"] })],
// security: [
// {
// Bearer: ["auth:read"],
// },
// ],
security: [
{
Bearer: ["auth:read"],
},
],
responses: {
200: {
content: {
Expand Down Expand Up @@ -138,11 +138,11 @@ export const connectionRoutes = new OpenAPIHono<{ Bindings: Bindings }>()
}),
},
// middleware: [authenticationMiddleware({ scopes: ["auth:write"] })],
// security: [
// {
// Bearer: ["auth:write"],
// },
// ],
security: [
{
Bearer: ["auth:write"],
},
],
responses: {
200: {
description: "Status",
Expand Down Expand Up @@ -187,11 +187,11 @@ export const connectionRoutes = new OpenAPIHono<{ Bindings: Bindings }>()
}),
},
// middleware: [authenticationMiddleware({ scopes: ["auth:write"] })],
// security: [
// {
// Bearer: ["auth:write"],
// },
// ],
security: [
{
Bearer: ["auth:write"],
},
],
responses: {
200: {
content: {
Expand Down Expand Up @@ -247,11 +247,11 @@ export const connectionRoutes = new OpenAPIHono<{ Bindings: Bindings }>()
}),
},
// middleware: [authenticationMiddleware({ scopes: ["auth:write"] })],
// security: [
// {
// Bearer: ["auth:write"],
// },
// ],
security: [
{
Bearer: ["auth:write"],
},
],
responses: {
201: {
content: {
Expand Down
Loading

0 comments on commit 4b4a361

Please sign in to comment.