Skip to content

Commit

Permalink
Make properties with defaults optional
Browse files Browse the repository at this point in the history
  • Loading branch information
markusahlstrand committed Sep 3, 2024
1 parent 21436bc commit ebee17a
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 10 deletions.
6 changes: 6 additions & 0 deletions apps/demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @authhero/demo

## 0.0.24

### Patch Changes

- [email protected]

## 0.0.23

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@authhero/demo",
"private": true,
"version": "0.0.23",
"version": "0.0.24",
"scripts": {
"dev": "bun --watch src/bun.ts"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/adapter-interfaces/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @authhero/adapter-interfaces

## 0.15.3

### Patch Changes

- Make properties with defaults optional

## 0.15.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-interfaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "git",
"url": "https://github.com/markusahlstrand/authhero"
},
"version": "0.15.2",
"version": "0.15.3",
"files": [
"dist"
],
Expand Down
14 changes: 12 additions & 2 deletions packages/adapter-interfaces/src/types/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,39 @@ export const applicationInsertSchema = z.object({
name: z.string(),
callbacks: z
.array(z.string())
.optional()
.openapi({
description:
"Comma-separated list of URLs whitelisted to use as a callback to the client after authentication.",
})
.default([]),
allowed_origins: z
.array(z.string())
.optional()
.openapi({
description:
"Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level. Query strings and hash information are not taken into account when validating these URLs.",
})
.default([]),
web_origins: z
.array(z.string())
.optional()
.openapi({
description:
"Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode.",
})
.default([]),
allowed_logout_urls: z
.array(z.string())
.optional()
.openapi({
description:
"Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains.",
})
.default([]),
allowed_clients: z
.array(z.string())
.optional()
.openapi({
description:
"Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients",
Expand All @@ -62,20 +67,25 @@ export const applicationInsertSchema = z.object({
.object({
samlp: samlpAddon.optional(),
})
.optional()
.openapi({
description:
"Addons associated with the client. The key is the addon's package name and the value is an object with the configuration for the addon.",
})
.default({}),
email_validation: z
.enum(["enabled", "disabled", "enforced"])
.optional()
.default("enforced")
.openapi({
description:
"Defines if it possible to sign in with an unverified email and if verification emails will be sent. This is not available in auth0",
}),
client_secret: z.string().default(() => nanoid()),
disable_sign_ups: z.boolean().default(false).openapi({
client_secret: z
.string()
.optional()
.default(() => nanoid()),
disable_sign_ups: z.boolean().optional().default(false).openapi({
description:
"Prevents users from signing up using the hosted login page. This is not available in auth0",
}),
Expand Down
7 changes: 4 additions & 3 deletions packages/adapter-interfaces/src/types/Connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ export const connectionInsertSchema = z.object({
app_secret: z.string().optional(),
scope: z.string().optional(),
})
.optional(),
enabled_clients: z.array(z.string()).optional(),
authorization_endpoint: z.string().optional(),
.optional()
.default({}),
enabled_clients: z.array(z.string()).optional().default([]),
authorization_endpoint: z.string().optional().default(""),
response_type: z.custom<AuthorizationResponseType>().optional(),
response_mode: z.custom<AuthorizationResponseMode>().optional(),

Expand Down
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.2.26

### Patch Changes

- Updated dependencies
- @authhero/adapter-interfaces@0.15.3

## 0.2.25

### Patch 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.2.25",
"version": "0.2.26",
"files": [
"dist"
],
Expand Down
7 changes: 7 additions & 0 deletions packages/drizzle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @authhero/drizzle

## 0.1.42

### Patch Changes

- Updated dependencies
- @authhero/adapter-interfaces@0.15.3

## 0.1.41

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/drizzle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "git",
"url": "https://github.com/markusahlstrand/authhero"
},
"version": "0.1.41",
"version": "0.1.42",
"files": [
"dist"
],
Expand Down
7 changes: 7 additions & 0 deletions packages/kysely/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @authhero/kysely-adapter

## 0.9.3

### Patch Changes

- Updated dependencies
- @authhero/adapter-interfaces@0.15.3

## 0.9.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/kysely/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "git",
"url": "https://github.com/markusahlstrand/authhero"
},
"version": "0.9.2",
"version": "0.9.3",
"files": [
"dist"
],
Expand Down

0 comments on commit ebee17a

Please sign in to comment.