diff --git a/docs/content/2.setup.md b/docs/content/2.setup.md index e590ff9c..a0112668 100644 --- a/docs/content/2.setup.md +++ b/docs/content/2.setup.md @@ -95,6 +95,22 @@ Configure the `populate` query param of the `/users/me` route. > Learn more on [Populating documentation](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/entity-service/populate.html#advanced-populating). +### `auth.fields` + +::div{.inline-flex .items-center .gap-3} +::badge +v1.7.?+ +:: + +::badge +Strapi v4.2.2+ +:: +:: + +Configure the `fields` query param of the `/users/me` route. + +> Learn more on [Field Selection documentation](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.html#field-selection). + ## Edge channel To use the latest updates pushed on the [`dev`](https://github.com/nuxt-modules/strapi/tree/dev) branch, you can use `@nuxtjs/strapi-edge`. diff --git a/src/module.ts b/src/module.ts index 20546c8b..5d0adb8d 100644 --- a/src/module.ts +++ b/src/module.ts @@ -4,6 +4,7 @@ import type { CookieOptions } from 'nuxt/dist/app/composables/cookie' export interface AuthOptions { populate?: string | string[] + fields?: string | string[] } export interface ModuleOptions { diff --git a/src/runtime/types/index.d.ts b/src/runtime/types/index.d.ts index 09b9af11..d4990cee 100644 --- a/src/runtime/types/index.d.ts +++ b/src/runtime/types/index.d.ts @@ -521,13 +521,13 @@ export type StrapiAuthProvider = export type StrapiUser = { id: number - username: string - email: string - provider: string - confirmed: boolean - blocked: boolean - createdAt: string - updatedAt: string + username?: string + email?: string + provider?: string + confirmed?: boolean + blocked?: boolean + createdAt?: string + updatedAt?: string } | null export interface StrapiAuthenticationResponse {