From 6e2b9d86504a48e0d5ac2d5a75243d91b0de7242 Mon Sep 17 00:00:00 2001 From: Brian Perry Date: Tue, 19 Nov 2024 11:03:44 -0600 Subject: [PATCH 1/4] Generate API documentation via TypeDoc Fixes #796 --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/chapter-three/next-drupal/issues/796?shareId=XXXX-XXXX-XXXX-XXXX). --- packages/next-drupal/src/next-drupal-base.ts | 100 +++++++++++++- packages/next-drupal/src/next-drupal-pages.ts | 91 ++++++++++++ packages/next-drupal/src/next-drupal.ts | 130 +++++++++++++++++- www/package.json | 7 +- www/typedoc.json | 5 + 5 files changed, 326 insertions(+), 7 deletions(-) create mode 100644 www/typedoc.json diff --git a/packages/next-drupal/src/next-drupal-base.ts b/packages/next-drupal/src/next-drupal-base.ts index 2feb82c5..5d9db158 100644 --- a/packages/next-drupal/src/next-drupal-base.ts +++ b/packages/next-drupal/src/next-drupal-base.ts @@ -30,6 +30,9 @@ const DEFAULT_HEADERS = { Accept: "application/json", } +/** + * The base class for NextDrupal clients. + */ export class NextDrupalBase { accessToken?: NextDrupalBaseOptions["accessToken"] @@ -173,6 +176,13 @@ export class NextDrupalBase { return this._token } + /** + * Fetches a resource from the given input URL or path. + * + * @param {RequestInfo} input The input URL or path. + * @param {FetchOptions} init The fetch options. + * @returns {Promise} The fetch response. + */ async fetch( input: RequestInfo, { withAuth, ...init }: FetchOptions = {} @@ -215,6 +225,12 @@ export class NextDrupalBase { return await fetch(input, init) } + /** + * Gets the authorization header value based on the provided auth configuration. + * + * @param {NextDrupalAuth} auth The auth configuration. + * @returns {Promise} The authorization header value. + */ async getAuthorizationHeader(auth: NextDrupalAuth) { let header: string @@ -250,6 +266,13 @@ export class NextDrupalBase { return header } + /** + * Builds a URL with the given path and search parameters. + * + * @param {string} path The URL path. + * @param {EndpointSearchParams} searchParams The search parameters. + * @returns {URL} The constructed URL. + */ buildUrl(path: string, searchParams?: EndpointSearchParams): URL { const url = new URL(path, this.baseUrl) @@ -269,7 +292,15 @@ export class NextDrupalBase { return url } - // async so subclasses can query for endpoint discovery. + /** + * Builds an endpoint URL with the given options. + * + * @param {Object} options The options for building the endpoint. + * @param {string} options.locale The locale. + * @param {string} options.path The path. + * @param {EndpointSearchParams} options.searchParams The search parameters. + * @returns {Promise} The constructed endpoint URL. + */ async buildEndpoint({ locale = "", path = "", @@ -291,6 +322,16 @@ export class NextDrupalBase { ).toString() } + /** + * Constructs a path from the given segment and options. + * + * @param {string | string[]} segment The path segment. + * @param {Object} options The options for constructing the path. + * @param {Locale} options.locale The locale. + * @param {Locale} options.defaultLocale The default locale. + * @param {PathPrefix} options.pathPrefix The path prefix. + * @returns {string} The constructed path. + */ constructPathFromSegment( segment: string | string[], options: { @@ -338,6 +379,15 @@ export class NextDrupalBase { }) } + /** + * Adds a locale prefix to the given path. + * + * @param {string} path The path. + * @param {Object} options The options for adding the locale prefix. + * @param {Locale} options.locale The locale. + * @param {Locale} options.defaultLocale The default locale. + * @returns {string} The path with the locale prefix. + */ addLocalePrefix( path: string, options: { locale?: Locale; defaultLocale?: Locale } = {} @@ -356,6 +406,12 @@ export class NextDrupalBase { return `${localePrefix}${path}` } + /** + * Gets an access token using the provided client ID and secret. + * + * @param {NextDrupalAuthClientIdSecret} clientIdSecret The client ID and secret. + * @returns {Promise} The access token. + */ async getAccessToken( clientIdSecret?: NextDrupalAuthClientIdSecret ): Promise { @@ -435,6 +491,12 @@ export class NextDrupalBase { return result } + /** + * Validates the draft URL using the provided search parameters. + * + * @param {URLSearchParams} searchParams The search parameters. + * @returns {Promise} The validation response. + */ async validateDraftUrl(searchParams: URLSearchParams): Promise { const path = searchParams.get("path") @@ -468,10 +530,22 @@ export class NextDrupalBase { return response } + /** + * Logs a debug message if debug mode is enabled. + * + * @param {string} message The debug message. + */ debug(message) { this.isDebugEnabled && this.logger.debug(message) } + /** + * Throws an error if the response contains JSON:API errors. + * + * @param {Response} response The fetch response. + * @param {string} messagePrefix The error message prefix. + * @throws {JsonApiErrors} The JSON:API errors. + */ async throwIfJsonErrors(response: Response, messagePrefix = "") { if (!response?.ok) { const errors = await this.getErrorsFromResponse(response) @@ -479,6 +553,12 @@ export class NextDrupalBase { } } + /** + * Extracts errors from the fetch response. + * + * @param {Response} response The fetch response. + * @returns {Promise} The extracted errors. + */ async getErrorsFromResponse(response: Response) { const type = response.headers.get("content-type") let error: JsonApiResponse | { message: string } @@ -506,6 +586,12 @@ export class NextDrupalBase { } } +/** + * Checks if the provided auth configuration is basic auth. + * + * @param {NextDrupalAuth} auth The auth configuration. + * @returns {boolean} True if the auth configuration is basic auth, false otherwise. + */ export function isBasicAuth( auth: NextDrupalAuth ): auth is NextDrupalAuthUsernamePassword { @@ -515,6 +601,12 @@ export function isBasicAuth( ) } +/** + * Checks if the provided auth configuration is access token auth. + * + * @param {NextDrupalAuth} auth The auth configuration. + * @returns {boolean} True if the auth configuration is access token auth, false otherwise. + */ export function isAccessTokenAuth( auth: NextDrupalAuth ): auth is NextDrupalAuthAccessToken { @@ -524,6 +616,12 @@ export function isAccessTokenAuth( ) } +/** + * Checks if the provided auth configuration is client ID and secret auth. + * + * @param {NextDrupalAuth} auth The auth configuration. + * @returns {boolean} True if the auth configuration is client ID and secret auth, false otherwise. + */ export function isClientIdSecretAuth( auth: NextDrupalAuth ): auth is NextDrupalAuthClientIdSecret { diff --git a/packages/next-drupal/src/next-drupal-pages.ts b/packages/next-drupal/src/next-drupal-pages.ts index fd0af89a..e37d4916 100644 --- a/packages/next-drupal/src/next-drupal-pages.ts +++ b/packages/next-drupal/src/next-drupal-pages.ts @@ -27,6 +27,10 @@ import type { NextApiResponse, } from "next" +/** + * The NextDrupalPages class extends the NextDrupal class and provides methods + * for interacting with a Drupal backend in the context of Next.js pages. + */ export class NextDrupalPages extends NextDrupal { private serializer: DrupalClientOptions["serializer"] @@ -59,6 +63,13 @@ export class NextDrupalPages extends NextDrupal { ) => this.serializer.deserialize(body, options) } + /** + * Gets the entry point for a given resource type. + * + * @param {string} resourceType The resource type. + * @param {Locale} locale The locale. + * @returns {Promise} The entry point URL. + */ async getEntryForResourceType( resourceType: string, locale?: Locale @@ -74,6 +85,14 @@ export class NextDrupalPages extends NextDrupal { return new DrupalMenuTree(links, parent) } + /** + * Gets a resource from the context. + * + * @param {string | DrupalTranslatedPath} input The input path or translated path. + * @param {GetStaticPropsContext} context The static props context. + * @param {Object} options Options for the request. + * @returns {Promise} The fetched resource. + */ async getResourceFromContext( input: string | DrupalTranslatedPath, context: GetStaticPropsContext, @@ -157,6 +176,14 @@ export class NextDrupalPages extends NextDrupal { return resource } + /** + * Gets a collection of resources from the context. + * + * @param {string} type The type of the resources. + * @param {GetStaticPropsContext} context The static props context. + * @param {Object} options Options for the request. + * @returns {Promise} The fetched collection of resources. + */ async getResourceCollectionFromContext( type: string, context: GetStaticPropsContext, @@ -177,6 +204,14 @@ export class NextDrupalPages extends NextDrupal { }) } + /** + * Gets a search index from the context. + * + * @param {string} name The name of the search index. + * @param {GetStaticPropsContext} context The static props context. + * @param {Object} options Options for the request. + * @returns {Promise} The fetched search index. + */ async getSearchIndexFromContext( name: string, context: GetStaticPropsContext, @@ -189,6 +224,13 @@ export class NextDrupalPages extends NextDrupal { }) } + /** + * Translates a path from the context. + * + * @param {GetStaticPropsContext} context The static props context. + * @param {Object} options Options for the request. + * @returns {Promise} The translated path. + */ async translatePathFromContext( context: GetStaticPropsContext, options?: { @@ -208,6 +250,13 @@ export class NextDrupalPages extends NextDrupal { }) } + /** + * Gets the path from the context. + * + * @param {GetStaticPropsContext} context The static props context. + * @param {Object} options Options for the request. + * @returns {string} The constructed path. + */ getPathFromContext( context: GetStaticPropsContext, options?: { @@ -223,6 +272,14 @@ export class NextDrupalPages extends NextDrupal { getPathsFromContext = this.getStaticPathsFromContext + /** + * Gets static paths from the context. + * + * @param {string | string[]} types The types of the resources. + * @param {GetStaticPathsContext} context The static paths context. + * @param {Object} options Options for the request. + * @returns {Promise["paths"]>} The fetched static paths. + */ async getStaticPathsFromContext( types: string | string[], context: GetStaticPathsContext, @@ -291,6 +348,13 @@ export class NextDrupalPages extends NextDrupal { return paths.flat() } + /** + * Builds static paths from resources. + * + * @param {Object[]} resources The resources. + * @param {Object} options Options for the request. + * @returns {Object[]} The built static paths. + */ buildStaticPathsFromResources( resources: { path: DrupalPathAlias @@ -313,6 +377,13 @@ export class NextDrupalPages extends NextDrupal { : [] } + /** + * Builds static paths parameters from paths. + * + * @param {string[]} paths The paths. + * @param {Object} options Options for the request. + * @returns {Object[]} The built static paths parameters. + */ buildStaticPathsParamsFromPaths( paths: string[], options?: { pathPrefix?: PathPrefix; locale?: Locale } @@ -342,6 +413,13 @@ export class NextDrupalPages extends NextDrupal { }) } + /** + * Handles preview mode. + * + * @param {NextApiRequest} request The API request. + * @param {NextApiResponse} response The API response. + * @param {Object} options Options for the request. + */ async preview( request: NextApiRequest, response: NextApiResponse, @@ -411,6 +489,12 @@ export class NextDrupalPages extends NextDrupal { } } + /** + * Disables preview mode. + * + * @param {NextApiRequest} request The API request. + * @param {NextApiResponse} response The API response. + */ async previewDisable(request: NextApiRequest, response: NextApiResponse) { // Disable both preview and draft modes. response.clearPreviewData() @@ -427,6 +511,13 @@ export class NextDrupalPages extends NextDrupal { response.end() } + /** + * Gets the authentication configuration from the context and options. + * + * @param {GetStaticPropsContext} context The static props context. + * @param {JsonApiWithAuthOption} options Options for the request. + * @returns {NextDrupalAuth} The authentication configuration. + */ getAuthFromContextAndOptions( context: GetStaticPropsContext, options: JsonApiWithAuthOption diff --git a/packages/next-drupal/src/next-drupal.ts b/packages/next-drupal/src/next-drupal.ts index 1c837c7c..2041ebb5 100644 --- a/packages/next-drupal/src/next-drupal.ts +++ b/packages/next-drupal/src/next-drupal.ts @@ -44,6 +44,10 @@ export function useJsonaDeserialize() { } } +/** + * The NextDrupal class extends the NextDrupalBase class and provides methods + * for interacting with a Drupal backend. + */ export class NextDrupal extends NextDrupalBase { cache?: NextDrupalOptions["cache"] @@ -86,6 +90,14 @@ export class NextDrupal extends NextDrupalBase { } } + /** + * Creates a new resource of the specified type. + * + * @param {string} type The type of the resource. + * @param {JsonApiCreateResourceBody} body The body of the resource. + * @param {JsonApiOptions} options Options for the request. + * @returns {Promise} The created resource. + */ async createResource( type: string, body: JsonApiCreateResourceBody, @@ -126,6 +138,14 @@ export class NextDrupal extends NextDrupalBase { : /* c8 ignore next */ json } + /** + * Creates a new file resource for the specified media type. + * + * @param {string} type The type of the media. + * @param {JsonApiCreateFileResourceBody} body The body of the file resource. + * @param {JsonApiOptions} options Options for the request. + * @returns {Promise} The created file resource. + */ async createFileResource( type: string, body: JsonApiCreateFileResourceBody, @@ -170,6 +190,15 @@ export class NextDrupal extends NextDrupalBase { return options.deserialize ? this.deserialize(json) : json } + /** + * Updates an existing resource of the specified type. + * + * @param {string} type The type of the resource. + * @param {string} uuid The UUID of the resource. + * @param {JsonApiUpdateResourceBody} body The body of the resource. + * @param {JsonApiOptions} options Options for the request. + * @returns {Promise} The updated resource. + */ async updateResource( type: string, uuid: string, @@ -213,6 +242,14 @@ export class NextDrupal extends NextDrupalBase { : /* c8 ignore next */ json } + /** + * Deletes an existing resource of the specified type. + * + * @param {string} type The type of the resource. + * @param {string} uuid The UUID of the resource. + * @param {JsonApiOptions} options Options for the request. + * @returns {Promise} True if the resource was deleted, false otherwise. + */ async deleteResource( type: string, uuid: string, @@ -246,6 +283,14 @@ export class NextDrupal extends NextDrupalBase { return response.status === 204 } + /** + * Fetches a resource of the specified type by its UUID. + * + * @param {string} type The type of the resource. + * @param {string} uuid The UUID of the resource. + * @param {JsonApiOptions & JsonApiWithCacheOptions & JsonApiWithNextFetchOptions} options Options for the request. + * @returns {Promise} The fetched resource. + */ async getResource( type: string, uuid: string, @@ -301,6 +346,13 @@ export class NextDrupal extends NextDrupalBase { return options.deserialize ? this.deserialize(json) : json } + /** + * Fetches a resource of the specified type by its path. + * + * @param {string} path The path of the resource. + * @param {JsonApiOptions & JsonApiWithNextFetchOptions} options Options for the request. + * @returns {Promise} The fetched resource. + */ async getResourceByPath( path: string, options?: { @@ -410,6 +462,13 @@ export class NextDrupal extends NextDrupalBase { return options.deserialize ? this.deserialize(data) : data } + /** + * Fetches a collection of resources of the specified type. + * + * @param {string} type The type of the resources. + * @param {JsonApiOptions & JsonApiWithNextFetchOptions} options Options for the request. + * @returns {Promise} The fetched collection of resources. + */ async getResourceCollection( type: string, options?: { @@ -447,6 +506,13 @@ export class NextDrupal extends NextDrupalBase { return options.deserialize ? this.deserialize(json) : json } + /** + * Fetches path segments for a collection of resources of the specified types. + * + * @param {string | string[]} types The types of the resources. + * @param {JsonApiOptions & JsonApiWithAuthOption & JsonApiWithNextFetchOptions} options Options for the request. + * @returns {Promise<{ path: string, type: string, locale: Locale, segments: string[] }[]>} The fetched path segments. + */ async getResourceCollectionPathSegments( types: string | string[], options?: { @@ -555,6 +621,13 @@ export class NextDrupal extends NextDrupalBase { return paths.flat(2) } + /** + * Translates a path to a DrupalTranslatedPath object. + * + * @param {string} path The path to translate. + * @param {JsonApiWithAuthOption & JsonApiWithNextFetchOptions} options Options for the request. + * @returns {Promise} The translated path. + */ async translatePath( path: string, options?: JsonApiWithAuthOption & JsonApiWithNextFetchOptions @@ -586,6 +659,13 @@ export class NextDrupal extends NextDrupalBase { return await response.json() } + /** + * Fetches the JSON:API index. + * + * @param {Locale} locale The locale for the request. + * @param {JsonApiWithNextFetchOptions} options Options for the request. + * @returns {Promise} The JSON:API index. + */ async getIndex( locale?: Locale, options?: JsonApiWithNextFetchOptions @@ -610,6 +690,12 @@ export class NextDrupal extends NextDrupalBase { return await response.json() } + /** + * Builds an endpoint URL for the specified parameters. + * + * @param {Parameters[0] & { resourceType?: string }} params The parameters for the endpoint. + * @returns {Promise} The built endpoint URL. + */ async buildEndpoint({ locale = "", resourceType = "", @@ -647,6 +733,13 @@ export class NextDrupal extends NextDrupalBase { ).toString() } + /** + * Fetches the endpoint URL for the specified resource type. + * + * @param {string} type The type of the resource. + * @param {Locale} locale The locale for the request. + * @returns {Promise} The fetched endpoint URL. + */ async fetchResourceEndpoint(type: string, locale?: Locale): Promise { const index = await this.getIndex(locale) @@ -670,6 +763,13 @@ export class NextDrupal extends NextDrupalBase { return url } + /** + * Fetches a menu by its name. + * + * @param {string} menuName The name of the menu. + * @param {JsonApiOptions & JsonApiWithCacheOptions & JsonApiWithNextFetchOptions} options Options for the request. + * @returns {Promise<{ items: T[], tree: T[] }>} The fetched menu. + */ async getMenu( menuName: string, options?: JsonApiOptions & @@ -735,6 +835,13 @@ export class NextDrupal extends NextDrupalBase { return menu } + /** + * Fetches a view by its name. + * + * @param {string} name The name of the view. + * @param {JsonApiOptions & JsonApiWithNextFetchOptions} options Options for the request. + * @returns {Promise>} The fetched view. + */ async getView( name: string, options?: JsonApiOptions & JsonApiWithNextFetchOptions @@ -776,6 +883,13 @@ export class NextDrupal extends NextDrupalBase { } } + /** + * Fetches a search index by its name. + * + * @param {string} name The name of the search index. + * @param {JsonApiOptions & JsonApiWithNextFetchOptions} options Options for the request. + * @returns {Promise} The fetched search index. + */ async getSearchIndex( name: string, options?: JsonApiOptions & JsonApiWithNextFetchOptions @@ -810,16 +924,24 @@ export class NextDrupal extends NextDrupalBase { return options.deserialize ? this.deserialize(json) : json } + /** + * Deserializes the response body. + * + * @param {any} body The response body. + * @param {any} options Options for deserialization. + * @returns {any} The deserialized response body. + */ deserialize(body, options?) { if (!body) return null return this.deserializer(body, options) } - // Error handling. - // If throwJsonApiErrors is enabled, we show errors in the Next.js overlay. - // Otherwise, we log the errors even if debugging is turned off. - // In production, errors are always logged never thrown. + /** + * Logs or throws an error based on the throwJsonApiErrors flag. + * + * @param {Error} error The error to log or throw. + */ logOrThrowError(error: Error) { if (!this.throwJsonApiErrors) { this.logger.error(error) diff --git a/www/package.json b/www/package.json index 6834ba16..1d0c3cb5 100644 --- a/www/package.json +++ b/www/package.json @@ -8,7 +8,8 @@ "scripts": { "dev": "next dev -p 4444", "build": "next build", - "preview": "next build && next start -p 4444" + "preview": "next build && next start -p 4444", + "generate:docs": "typedoc --out content/api ../packages/next-drupal/src" }, "dependencies": { "@docsearch/react": "^3.6.0", @@ -23,7 +24,9 @@ "prism-react-renderer": "^1.3.5", "react": "^18.2.0", "react-dom": "^18.2.0", - "sharp": "^0.30.7" + "sharp": "^0.30.7", + "typedoc": "^0.23.9", + "typedoc-plugin-markdown": "^3.11.0" }, "devDependencies": { "@mapbox/rehype-prism": "^0.8.0", diff --git a/www/typedoc.json b/www/typedoc.json new file mode 100644 index 00000000..a0533d78 --- /dev/null +++ b/www/typedoc.json @@ -0,0 +1,5 @@ +{ + "entryPoints": ["../packages/next-drupal/src"], + "out": "content/api", + "plugin": ["typedoc-plugin-markdown"] +} From e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf Mon Sep 17 00:00:00 2001 From: Brian Perry Date: Tue, 19 Nov 2024 12:46:53 -0600 Subject: [PATCH 2/4] build: lock yarn updates --- yarn.lock | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index c11557a7..c62f6b47 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3341,6 +3341,11 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== +ansi-sequence-parser@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz#e0aa1cdcbc8f8bb0b5bca625aac41f5f056973cf" + integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -8210,6 +8215,11 @@ jsonc-parser@^3.0.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== +jsonc-parser@^3.2.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" + integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -8757,6 +8767,11 @@ lru-cache@^7.5.1, lru-cache@^7.7.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== +lunr@^2.3.9: + version "2.3.9" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + lz-string@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" @@ -8861,6 +8876,11 @@ markdown-escapes@^1.0.0: resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.4.tgz#c95415ef451499d7602b91095f3c8e8975f78535" integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg== +marked@^4.2.12: + version "4.3.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" + integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== + mdast-squeeze-paragraphs@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-4.0.0.tgz#7c4c114679c3bee27ef10b58e2e015be79f1ef97" @@ -9070,6 +9090,13 @@ minimatch@^5.0.1: dependencies: brace-expansion "^2.0.1" +minimatch@^7.1.3: + version "7.4.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.6.tgz#845d6f254d8f4a5e4fd6baf44d5f10c8448365fb" + integrity sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw== + dependencies: + brace-expansion "^2.0.1" + minimatch@^8.0.2: version "8.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-8.0.4.tgz#847c1b25c014d4e9a7f68aaf63dedd668a626229" @@ -11426,6 +11453,16 @@ shiki@^0.11.1: vscode-oniguruma "^1.6.1" vscode-textmate "^6.0.0" +shiki@^0.14.1: + version "0.14.7" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.7.tgz#c3c9e1853e9737845f1d2ef81b31bcfb07056d4e" + integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg== + dependencies: + ansi-sequence-parser "^1.1.0" + jsonc-parser "^3.2.0" + vscode-oniguruma "^1.7.0" + vscode-textmate "^8.0.0" + side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" @@ -11778,7 +11815,16 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -11882,7 +11928,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -11910,6 +11956,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -12572,6 +12625,23 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== +typedoc-plugin-markdown@^3.11.0: + version "3.17.1" + resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.17.1.tgz#c33f42363c185adf842f4699166015f7fe0ed02b" + integrity sha512-QzdU3fj0Kzw2XSdoL15ExLASt2WPqD7FbLeaqwT70+XjKyTshBnUlQA5nNREO1C2P8Uen0CDjsBLMsCQ+zd0lw== + dependencies: + handlebars "^4.7.7" + +typedoc@^0.23.9: + version "0.23.28" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.23.28.tgz#3ce9c36ef1c273fa849d2dea18651855100d3ccd" + integrity sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w== + dependencies: + lunr "^2.3.9" + marked "^4.2.12" + minimatch "^7.1.3" + shiki "^0.14.1" + "typescript@>=3 < 6", typescript@^5.4.5: version "5.4.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" @@ -12976,7 +13046,7 @@ void-elements@3.1.0: resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09" integrity sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w== -vscode-oniguruma@^1.6.1: +vscode-oniguruma@^1.6.1, vscode-oniguruma@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== @@ -12986,6 +13056,11 @@ vscode-textmate@^6.0.0: resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-6.0.0.tgz#a3777197235036814ac9a92451492f2748589210" integrity sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ== +vscode-textmate@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== + wait-on@7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-7.2.0.tgz#d76b20ed3fc1e2bebc051fae5c1ff93be7892928" @@ -13157,7 +13232,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -13184,6 +13259,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From b814feb907442ea504825c35810c973aeb865442 Mon Sep 17 00:00:00 2001 From: Brian Perry Date: Mon, 13 Jan 2025 10:52:38 -0600 Subject: [PATCH 3/4] feat: fixes to typedoc markdown build --- .../next-drupal/src/types/next-drupal-base.ts | 2 +- www/content/api/README.md | 66 + www/content/api/classes/JsonApiErrors.md | 185 ++ www/content/api/classes/NextDrupal.md | 1230 ++++++++++++ www/content/api/classes/NextDrupalBase.md | 573 ++++++ www/content/api/classes/NextDrupalPages.md | 1778 +++++++++++++++++ www/content/api/functions/DrupalPreview.md | 35 + www/content/api/functions/PreviewHandler.md | 29 + www/content/api/functions/buildUrl.md | 25 + www/content/api/functions/deserialize.md | 25 + www/content/api/functions/getAccessToken.md | 15 + www/content/api/functions/getJsonApiIndex.md | 27 + .../getJsonApiPathForResourceType.md | 25 + www/content/api/functions/getMenu.md | 29 + .../api/functions/getPathsFromContext.md | 35 + www/content/api/functions/getResource.md | 33 + .../api/functions/getResourceByPath.md | 29 + .../api/functions/getResourceCollection.md | 29 + .../getResourceCollectionFromContext.md | 39 + .../api/functions/getResourceFromContext.md | 51 + .../api/functions/getResourcePreviewUrl.md | 25 + .../functions/getResourceTypeFromContext.md | 31 + www/content/api/functions/getSearchIndex.md | 29 + .../functions/getSearchIndexFromContext.md | 33 + www/content/api/functions/getView.md | 29 + .../api/functions/isAccessTokenAuth.md | 27 + www/content/api/functions/isBasicAuth.md | 27 + .../api/functions/isClientIdSecretAuth.md | 27 + .../api/functions/syncDrupalPreviewRoutes.md | 21 + www/content/api/functions/translatePath.md | 27 + .../api/functions/translatePathFromContext.md | 31 + .../api/functions/useJsonaDeserialize.md | 29 + www/content/api/globals.md | 107 + www/content/api/interfaces/AccessToken.md | 41 + www/content/api/interfaces/DataCache.md | 71 + www/content/api/interfaces/DrupalBlock.md | 73 + www/content/api/interfaces/DrupalFile.md | 137 ++ www/content/api/interfaces/DrupalFileMeta.md | 41 + www/content/api/interfaces/DrupalMedia.md | 105 + www/content/api/interfaces/DrupalMenuItem.md | 137 ++ www/content/api/interfaces/DrupalNode.md | 133 ++ www/content/api/interfaces/DrupalParagraph.md | 81 + .../api/interfaces/DrupalSearchApiFacet.md | 65 + .../DrupalSearchApiJsonApiResponse.md | 109 + .../api/interfaces/DrupalTaxonomyTerm.md | 125 ++ .../api/interfaces/DrupalTranslatedPath.md | 125 ++ www/content/api/interfaces/DrupalUser.md | 117 ++ www/content/api/interfaces/DrupalView.md | 53 + www/content/api/interfaces/FetchOptions.md | 227 +++ .../JsonApiCreateFileResourceBody.md | 41 + .../interfaces/JsonApiCreateResourceBody.md | 29 + www/content/api/interfaces/JsonApiError.md | 57 + www/content/api/interfaces/JsonApiLinks.md | 13 + www/content/api/interfaces/JsonApiResource.md | 57 + .../JsonApiResourceBodyRelationship.md | 25 + .../api/interfaces/JsonApiResourceWithPath.md | 79 + www/content/api/interfaces/JsonApiResponse.md | 85 + .../interfaces/JsonApiUpdateResourceBody.md | 33 + www/content/api/interfaces/Logger.md | 81 + .../NextDrupalAuthClientIdSecret.md | 41 + .../NextDrupalAuthUsernamePassword.md | 25 + www/content/api/interfaces/Serializer.md | 17 + .../api/type-aliases/AccessTokenScope.md | 11 + www/content/api/type-aliases/BaseUrl.md | 11 + .../api/type-aliases/DrupalClientAuth.md | 11 + .../DrupalClientAuthAccessToken.md | 11 + .../DrupalClientAuthClientIdSecret.md | 11 + .../DrupalClientAuthUsernamePassword.md | 11 + .../api/type-aliases/DrupalClientOptions.md | 35 + .../api/type-aliases/DrupalMenuItemId.md | 11 + .../api/type-aliases/DrupalMenuLinkContent.md | 11 + .../api/type-aliases/DrupalPathAlias.md | 25 + .../api/type-aliases/EndpointSearchParams.md | 11 + www/content/api/type-aliases/Fetcher.md | 11 + .../api/type-aliases/JsonApiOptions.md | 21 + www/content/api/type-aliases/JsonApiParams.md | 11 + .../api/type-aliases/JsonApiWithAuthOption.md | 17 + .../type-aliases/JsonApiWithCacheOptions.md | 21 + .../type-aliases/JsonApiWithLocaleOptions.md | 11 + .../JsonApiWithNextFetchOptions.md | 17 + .../api/type-aliases/JsonDeserializer.md | 25 + www/content/api/type-aliases/Locale.md | 11 + .../api/type-aliases/NextDrupalAuth.md | 11 + .../type-aliases/NextDrupalAuthAccessToken.md | 11 + .../api/type-aliases/NextDrupalBaseOptions.md | 109 + .../api/type-aliases/NextDrupalOptions.md | 57 + www/content/api/type-aliases/PathPrefix.md | 11 + .../api/variables/DRAFT_DATA_COOKIE_NAME.md | 11 + .../api/variables/DRAFT_MODE_COOKIE_NAME.md | 11 + www/content/api/variables/DrupalClient.md | 11 + www/package.json | 6 +- www/tsconfig.docs.json | 11 + www/typedoc.json | 6 +- yarn.lock | 152 +- 94 files changed, 7579 insertions(+), 58 deletions(-) create mode 100644 www/content/api/README.md create mode 100644 www/content/api/classes/JsonApiErrors.md create mode 100644 www/content/api/classes/NextDrupal.md create mode 100644 www/content/api/classes/NextDrupalBase.md create mode 100644 www/content/api/classes/NextDrupalPages.md create mode 100644 www/content/api/functions/DrupalPreview.md create mode 100644 www/content/api/functions/PreviewHandler.md create mode 100644 www/content/api/functions/buildUrl.md create mode 100644 www/content/api/functions/deserialize.md create mode 100644 www/content/api/functions/getAccessToken.md create mode 100644 www/content/api/functions/getJsonApiIndex.md create mode 100644 www/content/api/functions/getJsonApiPathForResourceType.md create mode 100644 www/content/api/functions/getMenu.md create mode 100644 www/content/api/functions/getPathsFromContext.md create mode 100644 www/content/api/functions/getResource.md create mode 100644 www/content/api/functions/getResourceByPath.md create mode 100644 www/content/api/functions/getResourceCollection.md create mode 100644 www/content/api/functions/getResourceCollectionFromContext.md create mode 100644 www/content/api/functions/getResourceFromContext.md create mode 100644 www/content/api/functions/getResourcePreviewUrl.md create mode 100644 www/content/api/functions/getResourceTypeFromContext.md create mode 100644 www/content/api/functions/getSearchIndex.md create mode 100644 www/content/api/functions/getSearchIndexFromContext.md create mode 100644 www/content/api/functions/getView.md create mode 100644 www/content/api/functions/isAccessTokenAuth.md create mode 100644 www/content/api/functions/isBasicAuth.md create mode 100644 www/content/api/functions/isClientIdSecretAuth.md create mode 100644 www/content/api/functions/syncDrupalPreviewRoutes.md create mode 100644 www/content/api/functions/translatePath.md create mode 100644 www/content/api/functions/translatePathFromContext.md create mode 100644 www/content/api/functions/useJsonaDeserialize.md create mode 100644 www/content/api/globals.md create mode 100644 www/content/api/interfaces/AccessToken.md create mode 100644 www/content/api/interfaces/DataCache.md create mode 100644 www/content/api/interfaces/DrupalBlock.md create mode 100644 www/content/api/interfaces/DrupalFile.md create mode 100644 www/content/api/interfaces/DrupalFileMeta.md create mode 100644 www/content/api/interfaces/DrupalMedia.md create mode 100644 www/content/api/interfaces/DrupalMenuItem.md create mode 100644 www/content/api/interfaces/DrupalNode.md create mode 100644 www/content/api/interfaces/DrupalParagraph.md create mode 100644 www/content/api/interfaces/DrupalSearchApiFacet.md create mode 100644 www/content/api/interfaces/DrupalSearchApiJsonApiResponse.md create mode 100644 www/content/api/interfaces/DrupalTaxonomyTerm.md create mode 100644 www/content/api/interfaces/DrupalTranslatedPath.md create mode 100644 www/content/api/interfaces/DrupalUser.md create mode 100644 www/content/api/interfaces/DrupalView.md create mode 100644 www/content/api/interfaces/FetchOptions.md create mode 100644 www/content/api/interfaces/JsonApiCreateFileResourceBody.md create mode 100644 www/content/api/interfaces/JsonApiCreateResourceBody.md create mode 100644 www/content/api/interfaces/JsonApiError.md create mode 100644 www/content/api/interfaces/JsonApiLinks.md create mode 100644 www/content/api/interfaces/JsonApiResource.md create mode 100644 www/content/api/interfaces/JsonApiResourceBodyRelationship.md create mode 100644 www/content/api/interfaces/JsonApiResourceWithPath.md create mode 100644 www/content/api/interfaces/JsonApiResponse.md create mode 100644 www/content/api/interfaces/JsonApiUpdateResourceBody.md create mode 100644 www/content/api/interfaces/Logger.md create mode 100644 www/content/api/interfaces/NextDrupalAuthClientIdSecret.md create mode 100644 www/content/api/interfaces/NextDrupalAuthUsernamePassword.md create mode 100644 www/content/api/interfaces/Serializer.md create mode 100644 www/content/api/type-aliases/AccessTokenScope.md create mode 100644 www/content/api/type-aliases/BaseUrl.md create mode 100644 www/content/api/type-aliases/DrupalClientAuth.md create mode 100644 www/content/api/type-aliases/DrupalClientAuthAccessToken.md create mode 100644 www/content/api/type-aliases/DrupalClientAuthClientIdSecret.md create mode 100644 www/content/api/type-aliases/DrupalClientAuthUsernamePassword.md create mode 100644 www/content/api/type-aliases/DrupalClientOptions.md create mode 100644 www/content/api/type-aliases/DrupalMenuItemId.md create mode 100644 www/content/api/type-aliases/DrupalMenuLinkContent.md create mode 100644 www/content/api/type-aliases/DrupalPathAlias.md create mode 100644 www/content/api/type-aliases/EndpointSearchParams.md create mode 100644 www/content/api/type-aliases/Fetcher.md create mode 100644 www/content/api/type-aliases/JsonApiOptions.md create mode 100644 www/content/api/type-aliases/JsonApiParams.md create mode 100644 www/content/api/type-aliases/JsonApiWithAuthOption.md create mode 100644 www/content/api/type-aliases/JsonApiWithCacheOptions.md create mode 100644 www/content/api/type-aliases/JsonApiWithLocaleOptions.md create mode 100644 www/content/api/type-aliases/JsonApiWithNextFetchOptions.md create mode 100644 www/content/api/type-aliases/JsonDeserializer.md create mode 100644 www/content/api/type-aliases/Locale.md create mode 100644 www/content/api/type-aliases/NextDrupalAuth.md create mode 100644 www/content/api/type-aliases/NextDrupalAuthAccessToken.md create mode 100644 www/content/api/type-aliases/NextDrupalBaseOptions.md create mode 100644 www/content/api/type-aliases/NextDrupalOptions.md create mode 100644 www/content/api/type-aliases/PathPrefix.md create mode 100644 www/content/api/variables/DRAFT_DATA_COOKIE_NAME.md create mode 100644 www/content/api/variables/DRAFT_MODE_COOKIE_NAME.md create mode 100644 www/content/api/variables/DrupalClient.md create mode 100644 www/tsconfig.docs.json diff --git a/packages/next-drupal/src/types/next-drupal-base.ts b/packages/next-drupal/src/types/next-drupal-base.ts index 53ed464e..873005de 100644 --- a/packages/next-drupal/src/types/next-drupal-base.ts +++ b/packages/next-drupal/src/types/next-drupal-base.ts @@ -61,7 +61,7 @@ export type NextDrupalBaseOptions = { /** * Set custom headers for the fetcher. * - * * **Default value**: { "Content-Type": "application/vnd.api+json", Accept: "application/vnd.api+json" } + * * **Default value**: `{ "Content-Type": "application/vnd.api+json", Accept: "application/vnd.api+json" }` * * **Required**: *No* * * [Documentation](https://next-drupal.org/docs/client/configuration#headers) diff --git a/www/content/api/README.md b/www/content/api/README.md new file mode 100644 index 00000000..3d2faf74 --- /dev/null +++ b/www/content/api/README.md @@ -0,0 +1,66 @@ +**next-drupal** + +--- + +
+ Next.js for drupal +

Next.js for Drupal

+

Next-generation front-end for your Drupal site.

+
+ +## Demo + +https://demo.next-drupal.org + +## Documentation + +https://next-drupal.org + +## Deploy to Vercel + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fchapter-three%2Fnext-drupal-basic-starter&env=NEXT_PUBLIC_DRUPAL_BASE_URL,NEXT_IMAGE_DOMAIN&envDescription=Learn%20more%20about%20environment%20variables&envLink=https%3A%2F%2Fnext-drupal.org%2Fdocs%2Fenvironment-variables&project-name=next-drupal&demo-title=Next.js%20for%20Drupal&demo-description=A%20next-generation%20front-end%20for%20your%20Drupal%20site.&demo-url=https%3A%2F%2Fdemo.next-drupal.org&demo-image=https%3A%2F%2Fnext-drupal.org%2Fimages%2Fdemo-screenshot.jpg) + +## Example + +A page with all "Article" nodes. + +```jsx +import { DrupalClient } from "next-drupal" + +const drupal = new DrupalClient("https://cms.next-drupal.org") + +export default function BlogPage({ articles }) { + return ( +
+ {articles?.length + ? nodes.map((node) => ( +
+

{node.title}

+
+ )) + : null} +
+ ) +} + +export async function getStaticProps(context) { + const articles = await drupal.getResourceCollectionFromContext( + "node--article", + context + ) + + return { + props: { + articles, + }, + } +} +``` + +## Supporting organizations + +Development sponsored by [Chapter Three](https://chapterthree.com) + +## Contributing + +If you're interested in contributing to Next.js for Drupal, please read the [contributing guidelines](https://github.com/chapter-three/next-drupal/blob/main/CONTRIBUTING.md) before submitting a pull request. diff --git a/www/content/api/classes/JsonApiErrors.md b/www/content/api/classes/JsonApiErrors.md new file mode 100644 index 00000000..d25d2bd4 --- /dev/null +++ b/www/content/api/classes/JsonApiErrors.md @@ -0,0 +1,185 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiErrors + +# Class: JsonApiErrors + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:16](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L16) + +## Extends + +- `Error` + +## Constructors + +### new JsonApiErrors() + +> **new JsonApiErrors**(`errors`, `statusCode`, `messagePrefix`): [`JsonApiErrors`](JsonApiErrors.md) + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:20](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L20) + +#### Parameters + +##### errors + +`string` | [`JsonApiError`](../interfaces/JsonApiError.md)[] + +##### statusCode + +`number` + +##### messagePrefix + +`string` = `""` + +#### Returns + +[`JsonApiErrors`](JsonApiErrors.md) + +#### Overrides + +`Error.constructor` + +## Properties + +### errors + +> **errors**: `string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[] + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:17](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L17) + +--- + +### message + +> **message**: `string` + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077 + +#### Inherited from + +`Error.message` + +--- + +### name + +> **name**: `string` + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076 + +#### Inherited from + +`Error.name` + +--- + +### stack? + +> `optional` **stack**: `string` + +Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078 + +#### Inherited from + +`Error.stack` + +--- + +### statusCode + +> **statusCode**: `number` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:18](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L18) + +--- + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Defined in: node_modules/@types/node/globals.d.ts:28 + +Optional override for formatting stack traces + +#### Parameters + +##### err + +`Error` + +##### stackTraces + +`CallSite`[] + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +`Error.prepareStackTrace` + +--- + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +Defined in: node_modules/@types/node/globals.d.ts:30 + +#### Inherited from + +`Error.stackTraceLimit` + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` + +Defined in: node_modules/@types/node/globals.d.ts:21 + +Create .stack property on a target object + +#### Parameters + +##### targetObject + +`object` + +##### constructorOpt? + +`Function` + +#### Returns + +`void` + +#### Inherited from + +`Error.captureStackTrace` + +--- + +### formatMessage() + +> `static` **formatMessage**(`errors`): `string` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:34](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L34) + +#### Parameters + +##### errors + +`string` | [`JsonApiError`](../interfaces/JsonApiError.md)[] + +#### Returns + +`string` diff --git a/www/content/api/classes/NextDrupal.md b/www/content/api/classes/NextDrupal.md new file mode 100644 index 00000000..12441f3d --- /dev/null +++ b/www/content/api/classes/NextDrupal.md @@ -0,0 +1,1230 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / NextDrupal + +# Class: NextDrupal + +Defined in: [packages/next-drupal/src/next-drupal.ts:51](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L51) + +The NextDrupal class extends the NextDrupalBase class and provides methods +for interacting with a Drupal backend. + +## Extends + +- [`NextDrupalBase`](NextDrupalBase.md) + +## Extended by + +- [`NextDrupalPages`](NextDrupalPages.md) + +## Constructors + +### new NextDrupal() + +> **new NextDrupal**(`baseUrl`, `options`): [`NextDrupal`](NextDrupal.md) + +Defined in: [packages/next-drupal/src/next-drupal.ts:68](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L68) + +Instantiates a new NextDrupal. + +const client = new NextDrupal(baseUrl) + +#### Parameters + +##### baseUrl + +`string` + +The baseUrl of your Drupal site. Do not add the /jsonapi suffix. + +##### options + +[`NextDrupalOptions`](../type-aliases/NextDrupalOptions.md) = `{}` + +Options for NextDrupal. + +#### Returns + +[`NextDrupal`](NextDrupal.md) + +#### Overrides + +[`NextDrupalBase`](NextDrupalBase.md).[`constructor`](NextDrupalBase.md#constructors) + +## Properties + +### accessToken? + +> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L37) + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`accessToken`](NextDrupalBase.md#accesstoken) + +--- + +### baseUrl + +> **baseUrl**: `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:39](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L39) + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`baseUrl`](NextDrupalBase.md#baseurl-1) + +--- + +### cache? + +> `optional` **cache**: [`DataCache`](../interfaces/DataCache.md) + +Defined in: [packages/next-drupal/src/next-drupal.ts:52](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L52) + +--- + +### deserializer + +> **deserializer**: [`JsonDeserializer`](../type-aliases/JsonDeserializer.md) + +Defined in: [packages/next-drupal/src/next-drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L54) + +--- + +### fetcher()? + +> `optional` **fetcher**: (`input`, `init`?) => `Promise`\<`Response`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L41) + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) + +#### Parameters + +##### input + +`RequestInfo` | `URL` + +##### init? + +`RequestInit` + +#### Returns + +`Promise`\<`Response`\> + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`fetcher`](NextDrupalBase.md#fetcher) + +--- + +### frontPage + +> **frontPage**: `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L43) + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`frontPage`](NextDrupalBase.md#frontpage) + +--- + +### isDebugEnabled + +> **isDebugEnabled**: `boolean` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:45](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L45) + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`isDebugEnabled`](NextDrupalBase.md#isdebugenabled) + +--- + +### logger + +> **logger**: [`Logger`](../interfaces/Logger.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L47) + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`logger`](NextDrupalBase.md#logger) + +--- + +### throwJsonApiErrors + +> **throwJsonApiErrors**: `boolean` + +Defined in: [packages/next-drupal/src/next-drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L56) + +--- + +### useDefaultEndpoints + +> **useDefaultEndpoints**: `boolean` + +Defined in: [packages/next-drupal/src/next-drupal.ts:58](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L58) + +--- + +### withAuth + +> **withAuth**: `boolean` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L49) + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`withAuth`](NextDrupalBase.md#withauth) + +## Accessors + +### apiPrefix + +#### Get Signature + +> **get** **apiPrefix**(): `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L109) + +##### Returns + +`string` + +#### Set Signature + +> **set** **apiPrefix**(`apiPrefix`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L102) + +##### Parameters + +###### apiPrefix + +`string` + +##### Returns + +`void` + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`apiPrefix`](NextDrupalBase.md#apiprefix) + +--- + +### auth + +#### Get Signature + +> **get** **auth**(): [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:158](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L158) + +##### Returns + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +#### Set Signature + +> **set** **auth**(`auth`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L113) + +##### Parameters + +###### auth + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +##### Returns + +`void` + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`auth`](NextDrupalBase.md#auth) + +--- + +### headers + +#### Get Signature + +> **get** **headers**(): `HeadersInit` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L166) + +##### Returns + +`HeadersInit` + +#### Set Signature + +> **set** **headers**(`headers`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L162) + +##### Parameters + +###### headers + +`HeadersInit` + +##### Returns + +`void` + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`headers`](NextDrupalBase.md#headers) + +--- + +### token + +#### Get Signature + +> **get** **token**(): [`AccessToken`](../interfaces/AccessToken.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:175](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L175) + +##### Returns + +[`AccessToken`](../interfaces/AccessToken.md) + +#### Set Signature + +> **set** **token**(`token`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L170) + +##### Parameters + +###### token + +[`AccessToken`](../interfaces/AccessToken.md) + +##### Returns + +`void` + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`token`](NextDrupalBase.md#token) + +## Methods + +### addLocalePrefix() + +> **addLocalePrefix**(`path`, `options`): `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:391](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L391) + +Adds a locale prefix to the given path. + +#### Parameters + +##### path + +`string` + +The path. + +##### options + +The options for adding the locale prefix. + +###### defaultLocale + +`string` + +The default locale. + +###### locale + +`string` + +The locale. + +#### Returns + +`string` + +The path with the locale prefix. + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`addLocalePrefix`](NextDrupalBase.md#addlocaleprefix) + +--- + +### buildEndpoint() + +> **buildEndpoint**(`params`): `Promise`\<`string`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:699](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L699) + +Builds an endpoint URL for the specified parameters. + +#### Parameters + +##### params + +`object` & `object` = `{}` + +The parameters for the endpoint. + +#### Returns + +`Promise`\<`string`\> + +The built endpoint URL. + +#### Overrides + +[`NextDrupalBase`](NextDrupalBase.md).[`buildEndpoint`](NextDrupalBase.md#buildendpoint) + +--- + +### buildUrl() + +> **buildUrl**(`path`, `searchParams`?): `URL` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:276](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L276) + +Builds a URL with the given path and search parameters. + +#### Parameters + +##### path + +`string` + +The URL path. + +##### searchParams? + +[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.md) + +The search parameters. + +#### Returns + +`URL` + +The constructed URL. + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`buildUrl`](NextDrupalBase.md#buildurl) + +--- + +### constructPathFromSegment() + +> **constructPathFromSegment**(`segment`, `options`): `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:335](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L335) + +Constructs a path from the given segment and options. + +#### Parameters + +##### segment + +The path segment. + +`string` | `string`[] + +##### options + +The options for constructing the path. + +###### defaultLocale + +`string` + +The default locale. + +###### locale + +`string` + +The locale. + +###### pathPrefix + +`string` + +The path prefix. + +#### Returns + +`string` + +The constructed path. + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`constructPathFromSegment`](NextDrupalBase.md#constructpathfromsegment) + +--- + +### createFileResource() + +> **createFileResource**\<`T`\>(`type`, `body`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:149](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L149) + +Creates a new file resource for the specified media type. + +#### Type Parameters + +• **T** = [`DrupalFile`](../interfaces/DrupalFile.md) + +#### Parameters + +##### type + +`string` + +The type of the media. + +##### body + +[`JsonApiCreateFileResourceBody`](../interfaces/JsonApiCreateFileResourceBody.md) + +The body of the file resource. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The created file resource. + +--- + +### createResource() + +> **createResource**\<`T`\>(`type`, `body`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:101](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L101) + +Creates a new resource of the specified type. + +#### Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +#### Parameters + +##### type + +`string` + +The type of the resource. + +##### body + +[`JsonApiCreateResourceBody`](../interfaces/JsonApiCreateResourceBody.md) + +The body of the resource. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The created resource. + +--- + +### debug() + +> **debug**(`message`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:538](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L538) + +Logs a debug message if debug mode is enabled. + +#### Parameters + +##### message + +`any` + +The debug message. + +#### Returns + +`void` + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`debug`](NextDrupalBase.md#debug) + +--- + +### deleteResource() + +> **deleteResource**(`type`, `uuid`, `options`?): `Promise`\<`boolean`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:253](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L253) + +Deletes an existing resource of the specified type. + +#### Parameters + +##### type + +`string` + +The type of the resource. + +##### uuid + +`string` + +The UUID of the resource. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`boolean`\> + +True if the resource was deleted, false otherwise. + +--- + +### deserialize() + +> **deserialize**(`body`, `options`?): `TJsonaModel` \| `TJsonaModel`[] + +Defined in: [packages/next-drupal/src/next-drupal.ts:934](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L934) + +Deserializes the response body. + +#### Parameters + +##### body + +`any` + +The response body. + +##### options? + +`any` + +Options for deserialization. + +#### Returns + +`TJsonaModel` \| `TJsonaModel`[] + +The deserialized response body. + +--- + +### fetch() + +> **fetch**(`input`, `init`): `Promise`\<`Response`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:186](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L186) + +Fetches a resource from the given input URL or path. + +#### Parameters + +##### input + +`RequestInfo` + +The input URL or path. + +##### init + +[`FetchOptions`](../interfaces/FetchOptions.md) = `{}` + +The fetch options. + +#### Returns + +`Promise`\<`Response`\> + +The fetch response. + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`fetch`](NextDrupalBase.md#fetch) + +--- + +### fetchResourceEndpoint() + +> **fetchResourceEndpoint**(`type`, `locale`?): `Promise`\<`URL`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:743](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L743) + +Fetches the endpoint URL for the specified resource type. + +#### Parameters + +##### type + +`string` + +The type of the resource. + +##### locale? + +`string` + +The locale for the request. + +#### Returns + +`Promise`\<`URL`\> + +The fetched endpoint URL. + +--- + +### getAccessToken() + +> **getAccessToken**(`clientIdSecret`?): `Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:415](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L415) + +Gets an access token using the provided client ID and secret. + +#### Parameters + +##### clientIdSecret? + +[`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.md) + +The client ID and secret. + +#### Returns + +`Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> + +The access token. + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`getAccessToken`](NextDrupalBase.md#getaccesstoken) + +--- + +### getAuthorizationHeader() + +> **getAuthorizationHeader**(`auth`): `Promise`\<`string`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:234](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L234) + +Gets the authorization header value based on the provided auth configuration. + +#### Parameters + +##### auth + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +The auth configuration. + +#### Returns + +`Promise`\<`string`\> + +The authorization header value. + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`getAuthorizationHeader`](NextDrupalBase.md#getauthorizationheader) + +--- + +### getErrorsFromResponse() + +> **getErrorsFromResponse**(`response`): `Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:562](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L562) + +Extracts errors from the fetch response. + +#### Parameters + +##### response + +`Response` + +The fetch response. + +#### Returns + +`Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> + +The extracted errors. + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`getErrorsFromResponse`](NextDrupalBase.md#geterrorsfromresponse) + +--- + +### getIndex() + +> **getIndex**(`locale`?, `options`?): `Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.md)\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:669](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L669) + +Fetches the JSON:API index. + +#### Parameters + +##### locale? + +`string` + +The locale for the request. + +##### options? + +[`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.md)\> + +The JSON:API index. + +--- + +### getMenu() + +> **getMenu**\<`T`\>(`menuName`, `options`?): `Promise`\<\{ `items`: `T`[]; `tree`: `T`[]; \}\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:773](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L773) + +Fetches a menu by its name. + +#### Type Parameters + +• **T** = [`DrupalMenuItem`](../interfaces/DrupalMenuItem.md) + +#### Parameters + +##### menuName + +`string` + +The name of the menu. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<\{ `items`: `T`[]; `tree`: `T`[]; \}\> + +The fetched menu. + +--- + +### getResource() + +> **getResource**\<`T`\>(`type`, `uuid`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:294](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L294) + +Fetches a resource of the specified type by its UUID. + +#### Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +#### Parameters + +##### type + +`string` + +The type of the resource. + +##### uuid + +`string` + +The UUID of the resource. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The fetched resource. + +--- + +### getResourceByPath() + +> **getResourceByPath**\<`T`\>(`path`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:356](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L356) + +Fetches a resource of the specified type by its path. + +#### Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +#### Parameters + +##### path + +`string` + +The path of the resource. + +##### options? + +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The fetched resource. + +--- + +### getResourceCollection() + +> **getResourceCollection**\<`T`\>(`type`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:472](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L472) + +Fetches a collection of resources of the specified type. + +#### Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] + +#### Parameters + +##### type + +`string` + +The type of the resources. + +##### options? + +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The fetched collection of resources. + +--- + +### getResourceCollectionPathSegments() + +> **getResourceCollectionPathSegments**(`types`, `options`?): `Promise`\<`object`[]\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:516](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L516) + +Fetches path segments for a collection of resources of the specified types. + +#### Parameters + +##### types + +The types of the resources. + +`string` | `string`[] + +##### options? + +`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) & JsonApiWithNextFetchOptions & (\{ locales: string\[\]; defaultLocale: string; \} \| \{ locales?: undefined; defaultLocale?: never; \}) + +Options for the request. + +#### Returns + +`Promise`\<`object`[]\> + +The fetched path segments. + +--- + +### getSearchIndex() + +> **getSearchIndex**\<`T`\>(`name`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:893](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L893) + +Fetches a search index by its name. + +#### Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] + +#### Parameters + +##### name + +`string` + +The name of the search index. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The fetched search index. + +--- + +### getView() + +> **getView**\<`T`\>(`name`, `options`?): `Promise`\<[`DrupalView`](../interfaces/DrupalView.md)\<`T`\>\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:845](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L845) + +Fetches a view by its name. + +#### Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md) + +#### Parameters + +##### name + +`string` + +The name of the view. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<[`DrupalView`](../interfaces/DrupalView.md)\<`T`\>\> + +The fetched view. + +--- + +### logOrThrowError() + +> **logOrThrowError**(`error`): `void` + +Defined in: [packages/next-drupal/src/next-drupal.ts:945](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L945) + +Logs or throws an error based on the throwJsonApiErrors flag. + +#### Parameters + +##### error + +`Error` + +The error to log or throw. + +#### Returns + +`void` + +--- + +### throwIfJsonErrors() + +> **throwIfJsonErrors**(`response`, `messagePrefix`): `Promise`\<`void`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:549](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L549) + +Throws an error if the response contains JSON:API errors. + +#### Parameters + +##### response + +`Response` + +The fetch response. + +##### messagePrefix + +`string` = `""` + +The error message prefix. + +#### Returns + +`Promise`\<`void`\> + +#### Throws + +The JSON:API errors. + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`throwIfJsonErrors`](NextDrupalBase.md#throwifjsonerrors) + +--- + +### translatePath() + +> **translatePath**(`path`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:631](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L631) + +Translates a path to a DrupalTranslatedPath object. + +#### Parameters + +##### path + +`string` + +The path to translate. + +##### options? + +[`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> + +The translated path. + +--- + +### updateResource() + +> **updateResource**\<`T`\>(`type`, `uuid`, `body`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:202](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L202) + +Updates an existing resource of the specified type. + +#### Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +#### Parameters + +##### type + +`string` + +The type of the resource. + +##### uuid + +`string` + +The UUID of the resource. + +##### body + +[`JsonApiUpdateResourceBody`](../interfaces/JsonApiUpdateResourceBody.md) + +The body of the resource. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The updated resource. + +--- + +### validateDraftUrl() + +> **validateDraftUrl**(`searchParams`): `Promise`\<`Response`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:500](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L500) + +Validates the draft URL using the provided search parameters. + +#### Parameters + +##### searchParams + +`URLSearchParams` + +The search parameters. + +#### Returns + +`Promise`\<`Response`\> + +The validation response. + +#### Inherited from + +[`NextDrupalBase`](NextDrupalBase.md).[`validateDraftUrl`](NextDrupalBase.md#validatedrafturl) diff --git a/www/content/api/classes/NextDrupalBase.md b/www/content/api/classes/NextDrupalBase.md new file mode 100644 index 00000000..7d9c2fb1 --- /dev/null +++ b/www/content/api/classes/NextDrupalBase.md @@ -0,0 +1,573 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / NextDrupalBase + +# Class: NextDrupalBase + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:36](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L36) + +The base class for NextDrupal clients. + +## Extended by + +- [`NextDrupal`](NextDrupal.md) + +## Constructors + +### new NextDrupalBase() + +> **new NextDrupalBase**(`baseUrl`, `options`): [`NextDrupalBase`](NextDrupalBase.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:71](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L71) + +Instantiates a new NextDrupalBase. + +const client = new NextDrupalBase(baseUrl) + +#### Parameters + +##### baseUrl + +`string` + +The baseUrl of your Drupal site. Do not add the /jsonapi suffix. + +##### options + +[`NextDrupalBaseOptions`](../type-aliases/NextDrupalBaseOptions.md) = `{}` + +Options for NextDrupalBase. + +#### Returns + +[`NextDrupalBase`](NextDrupalBase.md) + +## Properties + +### accessToken? + +> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L37) + +--- + +### baseUrl + +> **baseUrl**: `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:39](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L39) + +--- + +### fetcher()? + +> `optional` **fetcher**: (`input`, `init`?) => `Promise`\<`Response`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L41) + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) + +#### Parameters + +##### input + +`RequestInfo` | `URL` + +##### init? + +`RequestInit` + +#### Returns + +`Promise`\<`Response`\> + +--- + +### frontPage + +> **frontPage**: `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L43) + +--- + +### isDebugEnabled + +> **isDebugEnabled**: `boolean` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:45](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L45) + +--- + +### logger + +> **logger**: [`Logger`](../interfaces/Logger.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L47) + +--- + +### withAuth + +> **withAuth**: `boolean` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L49) + +## Accessors + +### apiPrefix + +#### Get Signature + +> **get** **apiPrefix**(): `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L109) + +##### Returns + +`string` + +#### Set Signature + +> **set** **apiPrefix**(`apiPrefix`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L102) + +##### Parameters + +###### apiPrefix + +`string` + +##### Returns + +`void` + +--- + +### auth + +#### Get Signature + +> **get** **auth**(): [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:158](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L158) + +##### Returns + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +#### Set Signature + +> **set** **auth**(`auth`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L113) + +##### Parameters + +###### auth + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +##### Returns + +`void` + +--- + +### headers + +#### Get Signature + +> **get** **headers**(): `HeadersInit` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L166) + +##### Returns + +`HeadersInit` + +#### Set Signature + +> **set** **headers**(`headers`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L162) + +##### Parameters + +###### headers + +`HeadersInit` + +##### Returns + +`void` + +--- + +### token + +#### Get Signature + +> **get** **token**(): [`AccessToken`](../interfaces/AccessToken.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:175](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L175) + +##### Returns + +[`AccessToken`](../interfaces/AccessToken.md) + +#### Set Signature + +> **set** **token**(`token`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L170) + +##### Parameters + +###### token + +[`AccessToken`](../interfaces/AccessToken.md) + +##### Returns + +`void` + +## Methods + +### addLocalePrefix() + +> **addLocalePrefix**(`path`, `options`): `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:391](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L391) + +Adds a locale prefix to the given path. + +#### Parameters + +##### path + +`string` + +The path. + +##### options + +The options for adding the locale prefix. + +###### defaultLocale + +`string` + +The default locale. + +###### locale + +`string` + +The locale. + +#### Returns + +`string` + +The path with the locale prefix. + +--- + +### buildEndpoint() + +> **buildEndpoint**(`options`): `Promise`\<`string`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:304](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L304) + +Builds an endpoint URL with the given options. + +#### Parameters + +##### options + +The options for building the endpoint. + +###### locale + +`string` = `""` + +The locale. + +###### path + +`string` = `""` + +The path. + +###### searchParams + +[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.md) + +The search parameters. + +#### Returns + +`Promise`\<`string`\> + +The constructed endpoint URL. + +--- + +### buildUrl() + +> **buildUrl**(`path`, `searchParams`?): `URL` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:276](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L276) + +Builds a URL with the given path and search parameters. + +#### Parameters + +##### path + +`string` + +The URL path. + +##### searchParams? + +[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.md) + +The search parameters. + +#### Returns + +`URL` + +The constructed URL. + +--- + +### constructPathFromSegment() + +> **constructPathFromSegment**(`segment`, `options`): `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:335](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L335) + +Constructs a path from the given segment and options. + +#### Parameters + +##### segment + +The path segment. + +`string` | `string`[] + +##### options + +The options for constructing the path. + +###### defaultLocale + +`string` + +The default locale. + +###### locale + +`string` + +The locale. + +###### pathPrefix + +`string` + +The path prefix. + +#### Returns + +`string` + +The constructed path. + +--- + +### debug() + +> **debug**(`message`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:538](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L538) + +Logs a debug message if debug mode is enabled. + +#### Parameters + +##### message + +`any` + +The debug message. + +#### Returns + +`void` + +--- + +### fetch() + +> **fetch**(`input`, `init`): `Promise`\<`Response`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:186](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L186) + +Fetches a resource from the given input URL or path. + +#### Parameters + +##### input + +`RequestInfo` + +The input URL or path. + +##### init + +[`FetchOptions`](../interfaces/FetchOptions.md) = `{}` + +The fetch options. + +#### Returns + +`Promise`\<`Response`\> + +The fetch response. + +--- + +### getAccessToken() + +> **getAccessToken**(`clientIdSecret`?): `Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:415](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L415) + +Gets an access token using the provided client ID and secret. + +#### Parameters + +##### clientIdSecret? + +[`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.md) + +The client ID and secret. + +#### Returns + +`Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> + +The access token. + +--- + +### getAuthorizationHeader() + +> **getAuthorizationHeader**(`auth`): `Promise`\<`string`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:234](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L234) + +Gets the authorization header value based on the provided auth configuration. + +#### Parameters + +##### auth + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +The auth configuration. + +#### Returns + +`Promise`\<`string`\> + +The authorization header value. + +--- + +### getErrorsFromResponse() + +> **getErrorsFromResponse**(`response`): `Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:562](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L562) + +Extracts errors from the fetch response. + +#### Parameters + +##### response + +`Response` + +The fetch response. + +#### Returns + +`Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> + +The extracted errors. + +--- + +### throwIfJsonErrors() + +> **throwIfJsonErrors**(`response`, `messagePrefix`): `Promise`\<`void`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:549](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L549) + +Throws an error if the response contains JSON:API errors. + +#### Parameters + +##### response + +`Response` + +The fetch response. + +##### messagePrefix + +`string` = `""` + +The error message prefix. + +#### Returns + +`Promise`\<`void`\> + +#### Throws + +The JSON:API errors. + +--- + +### validateDraftUrl() + +> **validateDraftUrl**(`searchParams`): `Promise`\<`Response`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:500](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L500) + +Validates the draft URL using the provided search parameters. + +#### Parameters + +##### searchParams + +`URLSearchParams` + +The search parameters. + +#### Returns + +`Promise`\<`Response`\> + +The validation response. diff --git a/www/content/api/classes/NextDrupalPages.md b/www/content/api/classes/NextDrupalPages.md new file mode 100644 index 00000000..745a6e1d --- /dev/null +++ b/www/content/api/classes/NextDrupalPages.md @@ -0,0 +1,1778 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / NextDrupalPages + +# Class: NextDrupalPages + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:34](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L34) + +The NextDrupalPages class extends the NextDrupal class and provides methods +for interacting with a Drupal backend in the context of Next.js pages. + +## Extends + +- [`NextDrupal`](NextDrupal.md) + +## Constructors + +### new NextDrupalPages() + +> **new NextDrupalPages**(`baseUrl`, `options`): [`NextDrupalPages`](NextDrupalPages.md) + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:45](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L45) + +Instantiates a new NextDrupalPages. + +const client = new NextDrupalPages(baseUrl) + +#### Parameters + +##### baseUrl + +`string` + +The baseUrl of your Drupal site. Do not add the /jsonapi suffix. + +##### options + +[`DrupalClientOptions`](../type-aliases/DrupalClientOptions.md) = `{}` + +Options for the client. See Experiment_DrupalClientOptions. + +#### Returns + +[`NextDrupalPages`](NextDrupalPages.md) + +#### Overrides + +[`NextDrupal`](NextDrupal.md).[`constructor`](NextDrupal.md#constructors) + +## Properties + +### accessToken? + +> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L37) + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`accessToken`](NextDrupal.md#accesstoken) + +--- + +### baseUrl + +> **baseUrl**: `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:39](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L39) + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`baseUrl`](NextDrupal.md#baseurl-1) + +--- + +### cache? + +> `optional` **cache**: [`DataCache`](../interfaces/DataCache.md) + +Defined in: [packages/next-drupal/src/next-drupal.ts:52](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L52) + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`cache`](NextDrupal.md#cache) + +--- + +### deserializer + +> **deserializer**: [`JsonDeserializer`](../type-aliases/JsonDeserializer.md) + +Defined in: [packages/next-drupal/src/next-drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L54) + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`deserializer`](NextDrupal.md#deserializer) + +--- + +### fetcher()? + +> `optional` **fetcher**: (`input`, `init`?) => `Promise`\<`Response`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L41) + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) + +#### Parameters + +##### input + +`RequestInfo` | `URL` + +##### init? + +`RequestInit` + +#### Returns + +`Promise`\<`Response`\> + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`fetcher`](NextDrupal.md#fetcher) + +--- + +### frontPage + +> **frontPage**: `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L43) + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`frontPage`](NextDrupal.md#frontpage) + +--- + +### getPathsFromContext() + +> **getPathsFromContext**: (`types`, `context`, `options`?) => `Promise`\<(`string` \| \{ `locale`: `string`; `params`: \{ `slug`: `string`[]; \}; \})[]\> + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:273](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L273) + +Gets static paths from the context. + +#### Parameters + +##### types + +The types of the resources. + +`string` | `string`[] + +##### context + +`GetStaticPathsContext` + +The static paths context. + +##### options? + +`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) + +Options for the request. + +#### Returns + +`Promise`\<(`string` \| \{ `locale`: `string`; `params`: \{ `slug`: `string`[]; \}; \})[]\> + +The fetched static paths. + +--- + +### isDebugEnabled + +> **isDebugEnabled**: `boolean` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:45](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L45) + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`isDebugEnabled`](NextDrupal.md#isdebugenabled) + +--- + +### logger + +> **logger**: [`Logger`](../interfaces/Logger.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L47) + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`logger`](NextDrupal.md#logger) + +--- + +### throwJsonApiErrors + +> **throwJsonApiErrors**: `boolean` + +Defined in: [packages/next-drupal/src/next-drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L56) + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`throwJsonApiErrors`](NextDrupal.md#throwjsonapierrors) + +--- + +### useDefaultEndpoints + +> **useDefaultEndpoints**: `boolean` + +Defined in: [packages/next-drupal/src/next-drupal.ts:58](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L58) + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`useDefaultEndpoints`](NextDrupal.md#usedefaultendpoints) + +--- + +### withAuth + +> **withAuth**: `boolean` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L49) + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`withAuth`](NextDrupal.md#withauth) + +## Accessors + +### apiPrefix + +#### Get Signature + +> **get** **apiPrefix**(): `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L109) + +##### Returns + +`string` + +#### Set Signature + +> **set** **apiPrefix**(`apiPrefix`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L102) + +##### Parameters + +###### apiPrefix + +`string` + +##### Returns + +`void` + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`apiPrefix`](NextDrupal.md#apiprefix) + +--- + +### auth + +#### Get Signature + +> **get** **auth**(): [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:158](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L158) + +##### Returns + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +#### Set Signature + +> **set** **auth**(`auth`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L113) + +##### Parameters + +###### auth + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +##### Returns + +`void` + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`auth`](NextDrupal.md#auth) + +--- + +### headers + +#### Get Signature + +> **get** **headers**(): `HeadersInit` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L166) + +##### Returns + +`HeadersInit` + +#### Set Signature + +> **set** **headers**(`headers`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L162) + +##### Parameters + +###### headers + +`HeadersInit` + +##### Returns + +`void` + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`headers`](NextDrupal.md#headers) + +--- + +### token + +#### Get Signature + +> **get** **token**(): [`AccessToken`](../interfaces/AccessToken.md) + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:175](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L175) + +##### Returns + +[`AccessToken`](../interfaces/AccessToken.md) + +#### Set Signature + +> **set** **token**(`token`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L170) + +##### Parameters + +###### token + +[`AccessToken`](../interfaces/AccessToken.md) + +##### Returns + +`void` + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`token`](NextDrupal.md#token) + +## Methods + +### addLocalePrefix() + +> **addLocalePrefix**(`path`, `options`): `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:391](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L391) + +Adds a locale prefix to the given path. + +#### Parameters + +##### path + +`string` + +The path. + +##### options + +The options for adding the locale prefix. + +###### defaultLocale + +`string` + +The default locale. + +###### locale + +`string` + +The locale. + +#### Returns + +`string` + +The path with the locale prefix. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`addLocalePrefix`](NextDrupal.md#addlocaleprefix) + +--- + +### buildEndpoint() + +> **buildEndpoint**(`params`): `Promise`\<`string`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:699](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L699) + +Builds an endpoint URL for the specified parameters. + +#### Parameters + +##### params + +`object` & `object` = `{}` + +The parameters for the endpoint. + +#### Returns + +`Promise`\<`string`\> + +The built endpoint URL. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`buildEndpoint`](NextDrupal.md#buildendpoint) + +--- + +### buildMenuTree() + +> **buildMenuTree**(`links`, `parent`): `DrupalMenuTree` + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:84](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L84) + +#### Parameters + +##### links + +[`DrupalMenuItem`](../interfaces/DrupalMenuItem.md)[] + +##### parent + +`string` = `""` + +#### Returns + +`DrupalMenuTree` + +--- + +### buildStaticPathsFromResources() + +> **buildStaticPathsFromResources**(`resources`, `options`?): `object`[] + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:358](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L358) + +Builds static paths from resources. + +#### Parameters + +##### resources + +`object`[] + +The resources. + +##### options? + +Options for the request. + +###### locale + +`string` + +###### pathPrefix + +`string` + +#### Returns + +`object`[] + +The built static paths. + +--- + +### buildStaticPathsParamsFromPaths() + +> **buildStaticPathsParamsFromPaths**(`paths`, `options`?): `object`[] + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:387](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L387) + +Builds static paths parameters from paths. + +#### Parameters + +##### paths + +`string`[] + +The paths. + +##### options? + +Options for the request. + +###### locale + +`string` + +###### pathPrefix + +`string` + +#### Returns + +`object`[] + +The built static paths parameters. + +--- + +### buildUrl() + +> **buildUrl**(`path`, `searchParams`?): `URL` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:276](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L276) + +Builds a URL with the given path and search parameters. + +#### Parameters + +##### path + +`string` + +The URL path. + +##### searchParams? + +[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.md) + +The search parameters. + +#### Returns + +`URL` + +The constructed URL. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`buildUrl`](NextDrupal.md#buildurl) + +--- + +### constructPathFromSegment() + +> **constructPathFromSegment**(`segment`, `options`): `string` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:335](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L335) + +Constructs a path from the given segment and options. + +#### Parameters + +##### segment + +The path segment. + +`string` | `string`[] + +##### options + +The options for constructing the path. + +###### defaultLocale + +`string` + +The default locale. + +###### locale + +`string` + +The locale. + +###### pathPrefix + +`string` + +The path prefix. + +#### Returns + +`string` + +The constructed path. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`constructPathFromSegment`](NextDrupal.md#constructpathfromsegment) + +--- + +### createFileResource() + +> **createFileResource**\<`T`\>(`type`, `body`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:149](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L149) + +Creates a new file resource for the specified media type. + +#### Type Parameters + +• **T** = [`DrupalFile`](../interfaces/DrupalFile.md) + +#### Parameters + +##### type + +`string` + +The type of the media. + +##### body + +[`JsonApiCreateFileResourceBody`](../interfaces/JsonApiCreateFileResourceBody.md) + +The body of the file resource. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The created file resource. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`createFileResource`](NextDrupal.md#createfileresource) + +--- + +### createResource() + +> **createResource**\<`T`\>(`type`, `body`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:101](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L101) + +Creates a new resource of the specified type. + +#### Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +#### Parameters + +##### type + +`string` + +The type of the resource. + +##### body + +[`JsonApiCreateResourceBody`](../interfaces/JsonApiCreateResourceBody.md) + +The body of the resource. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The created resource. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`createResource`](NextDrupal.md#createresource) + +--- + +### debug() + +> **debug**(`message`): `void` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:538](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L538) + +Logs a debug message if debug mode is enabled. + +#### Parameters + +##### message + +`any` + +The debug message. + +#### Returns + +`void` + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`debug`](NextDrupal.md#debug) + +--- + +### deleteResource() + +> **deleteResource**(`type`, `uuid`, `options`?): `Promise`\<`boolean`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:253](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L253) + +Deletes an existing resource of the specified type. + +#### Parameters + +##### type + +`string` + +The type of the resource. + +##### uuid + +`string` + +The UUID of the resource. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`boolean`\> + +True if the resource was deleted, false otherwise. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`deleteResource`](NextDrupal.md#deleteresource) + +--- + +### deserialize() + +> **deserialize**(`body`, `options`?): `TJsonaModel` \| `TJsonaModel`[] + +Defined in: [packages/next-drupal/src/next-drupal.ts:934](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L934) + +Deserializes the response body. + +#### Parameters + +##### body + +`any` + +The response body. + +##### options? + +`any` + +Options for deserialization. + +#### Returns + +`TJsonaModel` \| `TJsonaModel`[] + +The deserialized response body. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`deserialize`](NextDrupal.md#deserialize) + +--- + +### fetch() + +> **fetch**(`input`, `init`): `Promise`\<`Response`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:186](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L186) + +Fetches a resource from the given input URL or path. + +#### Parameters + +##### input + +`RequestInfo` + +The input URL or path. + +##### init + +[`FetchOptions`](../interfaces/FetchOptions.md) = `{}` + +The fetch options. + +#### Returns + +`Promise`\<`Response`\> + +The fetch response. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`fetch`](NextDrupal.md#fetch) + +--- + +### fetchResourceEndpoint() + +> **fetchResourceEndpoint**(`type`, `locale`?): `Promise`\<`URL`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:743](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L743) + +Fetches the endpoint URL for the specified resource type. + +#### Parameters + +##### type + +`string` + +The type of the resource. + +##### locale? + +`string` + +The locale for the request. + +#### Returns + +`Promise`\<`URL`\> + +The fetched endpoint URL. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`fetchResourceEndpoint`](NextDrupal.md#fetchresourceendpoint) + +--- + +### getAccessToken() + +> **getAccessToken**(`clientIdSecret`?): `Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:415](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L415) + +Gets an access token using the provided client ID and secret. + +#### Parameters + +##### clientIdSecret? + +[`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.md) + +The client ID and secret. + +#### Returns + +`Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> + +The access token. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`getAccessToken`](NextDrupal.md#getaccesstoken) + +--- + +### getAuthFromContextAndOptions() + +> **getAuthFromContextAndOptions**(`context`, `options`): `boolean` \| [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:521](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L521) + +Gets the authentication configuration from the context and options. + +#### Parameters + +##### context + +`GetStaticPropsContext` + +The static props context. + +##### options + +[`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) + +Options for the request. + +#### Returns + +`boolean` \| [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +The authentication configuration. + +--- + +### getAuthorizationHeader() + +> **getAuthorizationHeader**(`auth`): `Promise`\<`string`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:234](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L234) + +Gets the authorization header value based on the provided auth configuration. + +#### Parameters + +##### auth + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +The auth configuration. + +#### Returns + +`Promise`\<`string`\> + +The authorization header value. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`getAuthorizationHeader`](NextDrupal.md#getauthorizationheader) + +--- + +### getEntryForResourceType() + +> **getEntryForResourceType**(`resourceType`, `locale`?): `Promise`\<`string`\> + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:73](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L73) + +Gets the entry point for a given resource type. + +#### Parameters + +##### resourceType + +`string` + +The resource type. + +##### locale? + +`string` + +The locale. + +#### Returns + +`Promise`\<`string`\> + +The entry point URL. + +--- + +### getErrorsFromResponse() + +> **getErrorsFromResponse**(`response`): `Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:562](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L562) + +Extracts errors from the fetch response. + +#### Parameters + +##### response + +`Response` + +The fetch response. + +#### Returns + +`Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> + +The extracted errors. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`getErrorsFromResponse`](NextDrupal.md#geterrorsfromresponse) + +--- + +### getIndex() + +> **getIndex**(`locale`?, `options`?): `Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.md)\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:669](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L669) + +Fetches the JSON:API index. + +#### Parameters + +##### locale? + +`string` + +The locale for the request. + +##### options? + +[`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.md)\> + +The JSON:API index. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`getIndex`](NextDrupal.md#getindex) + +--- + +### getMenu() + +> **getMenu**\<`T`\>(`menuName`, `options`?): `Promise`\<\{ `items`: `T`[]; `tree`: `T`[]; \}\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:773](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L773) + +Fetches a menu by its name. + +#### Type Parameters + +• **T** = [`DrupalMenuItem`](../interfaces/DrupalMenuItem.md) + +#### Parameters + +##### menuName + +`string` + +The name of the menu. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<\{ `items`: `T`[]; `tree`: `T`[]; \}\> + +The fetched menu. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`getMenu`](NextDrupal.md#getmenu) + +--- + +### getPathFromContext() + +> **getPathFromContext**(`context`, `options`?): `string` + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:260](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L260) + +Gets the path from the context. + +#### Parameters + +##### context + +`GetStaticPropsContext` + +The static props context. + +##### options? + +Options for the request. + +###### pathPrefix + +`string` + +#### Returns + +`string` + +The constructed path. + +--- + +### getResource() + +> **getResource**\<`T`\>(`type`, `uuid`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:294](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L294) + +Fetches a resource of the specified type by its UUID. + +#### Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +#### Parameters + +##### type + +`string` + +The type of the resource. + +##### uuid + +`string` + +The UUID of the resource. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The fetched resource. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`getResource`](NextDrupal.md#getresource) + +--- + +### getResourceByPath() + +> **getResourceByPath**\<`T`\>(`path`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:356](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L356) + +Fetches a resource of the specified type by its path. + +#### Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +#### Parameters + +##### path + +`string` + +The path of the resource. + +##### options? + +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The fetched resource. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`getResourceByPath`](NextDrupal.md#getresourcebypath) + +--- + +### getResourceCollection() + +> **getResourceCollection**\<`T`\>(`type`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:472](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L472) + +Fetches a collection of resources of the specified type. + +#### Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] + +#### Parameters + +##### type + +`string` + +The type of the resources. + +##### options? + +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The fetched collection of resources. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`getResourceCollection`](NextDrupal.md#getresourcecollection) + +--- + +### getResourceCollectionFromContext() + +> **getResourceCollectionFromContext**\<`T`\>(`type`, `context`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:187](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L187) + +Gets a collection of resources from the context. + +#### Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] + +#### Parameters + +##### type + +`string` + +The type of the resources. + +##### context + +`GetStaticPropsContext` + +The static props context. + +##### options? + +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The fetched collection of resources. + +--- + +### getResourceCollectionPathSegments() + +> **getResourceCollectionPathSegments**(`types`, `options`?): `Promise`\<`object`[]\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:516](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L516) + +Fetches path segments for a collection of resources of the specified types. + +#### Parameters + +##### types + +The types of the resources. + +`string` | `string`[] + +##### options? + +`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) & JsonApiWithNextFetchOptions & (\{ locales: string\[\]; defaultLocale: string; \} \| \{ locales?: undefined; defaultLocale?: never; \}) + +Options for the request. + +#### Returns + +`Promise`\<`object`[]\> + +The fetched path segments. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`getResourceCollectionPathSegments`](NextDrupal.md#getresourcecollectionpathsegments) + +--- + +### getResourceFromContext() + +> **getResourceFromContext**\<`T`\>(`input`, `context`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:96](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L96) + +Gets a resource from the context. + +#### Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +#### Parameters + +##### input + +The input path or translated path. + +`string` | [`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md) + +##### context + +`GetStaticPropsContext` + +The static props context. + +##### options? + +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The fetched resource. + +--- + +### getSearchIndex() + +> **getSearchIndex**\<`T`\>(`name`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:893](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L893) + +Fetches a search index by its name. + +#### Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] + +#### Parameters + +##### name + +`string` + +The name of the search index. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The fetched search index. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`getSearchIndex`](NextDrupal.md#getsearchindex) + +--- + +### getSearchIndexFromContext() + +> **getSearchIndexFromContext**\<`T`\>(`name`, `context`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:215](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L215) + +Gets a search index from the context. + +#### Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] + +#### Parameters + +##### name + +`string` + +The name of the search index. + +##### context + +`GetStaticPropsContext` + +The static props context. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The fetched search index. + +--- + +### getStaticPathsFromContext() + +> **getStaticPathsFromContext**(`types`, `context`, `options`?): `Promise`\<(`string` \| \{ `locale`: `string`; `params`: \{ `slug`: `string`[]; \}; \})[]\> + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:283](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L283) + +Gets static paths from the context. + +#### Parameters + +##### types + +The types of the resources. + +`string` | `string`[] + +##### context + +`GetStaticPathsContext` + +The static paths context. + +##### options? + +`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) + +Options for the request. + +#### Returns + +`Promise`\<(`string` \| \{ `locale`: `string`; `params`: \{ `slug`: `string`[]; \}; \})[]\> + +The fetched static paths. + +--- + +### getView() + +> **getView**\<`T`\>(`name`, `options`?): `Promise`\<[`DrupalView`](../interfaces/DrupalView.md)\<`T`\>\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:845](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L845) + +Fetches a view by its name. + +#### Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md) + +#### Parameters + +##### name + +`string` + +The name of the view. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<[`DrupalView`](../interfaces/DrupalView.md)\<`T`\>\> + +The fetched view. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`getView`](NextDrupal.md#getview) + +--- + +### logOrThrowError() + +> **logOrThrowError**(`error`): `void` + +Defined in: [packages/next-drupal/src/next-drupal.ts:945](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L945) + +Logs or throws an error based on the throwJsonApiErrors flag. + +#### Parameters + +##### error + +`Error` + +The error to log or throw. + +#### Returns + +`void` + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`logOrThrowError`](NextDrupal.md#logorthrowerror) + +--- + +### preview() + +> **preview**(`request`, `response`, `options`?): `Promise`\<`void` \| `NextApiResponse`\> + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:423](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L423) + +Handles preview mode. + +#### Parameters + +##### request + +`NextApiRequest` + +The API request. + +##### response + +`NextApiResponse` + +The API response. + +##### options? + +Options for the request. + +###### enable + +`boolean` + +#### Returns + +`Promise`\<`void` \| `NextApiResponse`\> + +--- + +### previewDisable() + +> **previewDisable**(`request`, `response`): `Promise`\<`void`\> + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:498](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L498) + +Disables preview mode. + +#### Parameters + +##### request + +`NextApiRequest` + +The API request. + +##### response + +`NextApiResponse` + +The API response. + +#### Returns + +`Promise`\<`void`\> + +--- + +### throwIfJsonErrors() + +> **throwIfJsonErrors**(`response`, `messagePrefix`): `Promise`\<`void`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:549](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L549) + +Throws an error if the response contains JSON:API errors. + +#### Parameters + +##### response + +`Response` + +The fetch response. + +##### messagePrefix + +`string` = `""` + +The error message prefix. + +#### Returns + +`Promise`\<`void`\> + +#### Throws + +The JSON:API errors. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`throwIfJsonErrors`](NextDrupal.md#throwifjsonerrors) + +--- + +### translatePath() + +> **translatePath**(`path`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:631](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L631) + +Translates a path to a DrupalTranslatedPath object. + +#### Parameters + +##### path + +`string` + +The path to translate. + +##### options? + +[`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> + +The translated path. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`translatePath`](NextDrupal.md#translatepath) + +--- + +### translatePathFromContext() + +> **translatePathFromContext**(`context`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> + +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:234](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L234) + +Translates a path from the context. + +#### Parameters + +##### context + +`GetStaticPropsContext` + +The static props context. + +##### options? + +`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) + +Options for the request. + +#### Returns + +`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> + +The translated path. + +--- + +### updateResource() + +> **updateResource**\<`T`\>(`type`, `uuid`, `body`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/next-drupal.ts:202](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L202) + +Updates an existing resource of the specified type. + +#### Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +#### Parameters + +##### type + +`string` + +The type of the resource. + +##### uuid + +`string` + +The UUID of the resource. + +##### body + +[`JsonApiUpdateResourceBody`](../interfaces/JsonApiUpdateResourceBody.md) + +The body of the resource. + +##### options? + +[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) + +Options for the request. + +#### Returns + +`Promise`\<`T`\> + +The updated resource. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`updateResource`](NextDrupal.md#updateresource) + +--- + +### validateDraftUrl() + +> **validateDraftUrl**(`searchParams`): `Promise`\<`Response`\> + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:500](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L500) + +Validates the draft URL using the provided search parameters. + +#### Parameters + +##### searchParams + +`URLSearchParams` + +The search parameters. + +#### Returns + +`Promise`\<`Response`\> + +The validation response. + +#### Inherited from + +[`NextDrupal`](NextDrupal.md).[`validateDraftUrl`](NextDrupal.md#validatedrafturl) diff --git a/www/content/api/functions/DrupalPreview.md b/www/content/api/functions/DrupalPreview.md new file mode 100644 index 00000000..4fed7f61 --- /dev/null +++ b/www/content/api/functions/DrupalPreview.md @@ -0,0 +1,35 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalPreview + +# Function: DrupalPreview() + +> **DrupalPreview**(`options`?): (`request`, `response`) => `Promise`\<`void` \| `NextApiResponse`\> + +Defined in: [packages/next-drupal/src/deprecated/preview.ts:12](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/preview.ts#L12) + +## Parameters + +### options? + +`PreviewOptions` + +## Returns + +`Function` + +### Parameters + +#### request + +`any` + +#### response + +`any` + +### Returns + +`Promise`\<`void` \| `NextApiResponse`\> diff --git a/www/content/api/functions/PreviewHandler.md b/www/content/api/functions/PreviewHandler.md new file mode 100644 index 00000000..836fe775 --- /dev/null +++ b/www/content/api/functions/PreviewHandler.md @@ -0,0 +1,29 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / PreviewHandler + +# Function: PreviewHandler() + +> **PreviewHandler**(`request`?, `response`?, `options`?): `Promise`\<`void` \| `NextApiResponse`\> + +Defined in: [packages/next-drupal/src/deprecated/preview.ts:16](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/preview.ts#L16) + +## Parameters + +### request? + +`NextApiRequest` + +### response? + +`NextApiResponse` + +### options? + +`PreviewOptions` + +## Returns + +`Promise`\<`void` \| `NextApiResponse`\> diff --git a/www/content/api/functions/buildUrl.md b/www/content/api/functions/buildUrl.md new file mode 100644 index 00000000..282f7a2e --- /dev/null +++ b/www/content/api/functions/buildUrl.md @@ -0,0 +1,25 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / buildUrl + +# Function: buildUrl() + +> **buildUrl**(`path`, `params`?): `URL` + +Defined in: [packages/next-drupal/src/deprecated/utils.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/utils.ts#L61) + +## Parameters + +### path + +`string` + +### params? + +`string` | `Record`\<`string`, `string`\> | `URLSearchParams` + +## Returns + +`URL` diff --git a/www/content/api/functions/deserialize.md b/www/content/api/functions/deserialize.md new file mode 100644 index 00000000..57eb343e --- /dev/null +++ b/www/content/api/functions/deserialize.md @@ -0,0 +1,25 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / deserialize + +# Function: deserialize() + +> **deserialize**(`body`, `options`?): `TJsonaModel` \| `TJsonaModel`[] + +Defined in: [packages/next-drupal/src/deprecated/utils.ts:11](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/utils.ts#L11) + +## Parameters + +### body + +`any` + +### options? + +`any` + +## Returns + +`TJsonaModel` \| `TJsonaModel`[] diff --git a/www/content/api/functions/getAccessToken.md b/www/content/api/functions/getAccessToken.md new file mode 100644 index 00000000..72665187 --- /dev/null +++ b/www/content/api/functions/getAccessToken.md @@ -0,0 +1,15 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getAccessToken + +# Function: getAccessToken() + +> **getAccessToken**(): `Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> + +Defined in: [packages/next-drupal/src/deprecated/get-access-token.ts:6](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-access-token.ts#L6) + +## Returns + +`Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> diff --git a/www/content/api/functions/getJsonApiIndex.md b/www/content/api/functions/getJsonApiIndex.md new file mode 100644 index 00000000..fceeee5f --- /dev/null +++ b/www/content/api/functions/getJsonApiIndex.md @@ -0,0 +1,27 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getJsonApiIndex + +# Function: getJsonApiIndex() + +> **getJsonApiIndex**(`locale`?, `options`?): `Promise`\<\{ `links`: \{\}; \}\> + +Defined in: [packages/next-drupal/src/deprecated/utils.ts:26](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/utils.ts#L26) + +## Parameters + +### locale? + +`string` + +### options? + +#### accessToken + +[`AccessToken`](../interfaces/AccessToken.md) + +## Returns + +`Promise`\<\{ `links`: \{\}; \}\> diff --git a/www/content/api/functions/getJsonApiPathForResourceType.md b/www/content/api/functions/getJsonApiPathForResourceType.md new file mode 100644 index 00000000..1163a519 --- /dev/null +++ b/www/content/api/functions/getJsonApiPathForResourceType.md @@ -0,0 +1,25 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getJsonApiPathForResourceType + +# Function: getJsonApiPathForResourceType() + +> **getJsonApiPathForResourceType**(`type`, `locale`?): `Promise`\<`string`\> + +Defined in: [packages/next-drupal/src/deprecated/utils.ts:17](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/utils.ts#L17) + +## Parameters + +### type + +`string` + +### locale? + +`string` + +## Returns + +`Promise`\<`string`\> diff --git a/www/content/api/functions/getMenu.md b/www/content/api/functions/getMenu.md new file mode 100644 index 00000000..3fbf66a8 --- /dev/null +++ b/www/content/api/functions/getMenu.md @@ -0,0 +1,29 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getMenu + +# Function: getMenu() + +> **getMenu**\<`T`\>(`name`, `options`?): `Promise`\<\{ `items`: `T`[]; `tree`: `T`[]; \}\> + +Defined in: [packages/next-drupal/src/deprecated/get-menu.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-menu.ts#L5) + +## Type Parameters + +• **T** _extends_ [`DrupalMenuItem`](../interfaces/DrupalMenuItem.md) + +## Parameters + +### name + +`string` + +### options? + +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) + +## Returns + +`Promise`\<\{ `items`: `T`[]; `tree`: `T`[]; \}\> diff --git a/www/content/api/functions/getPathsFromContext.md b/www/content/api/functions/getPathsFromContext.md new file mode 100644 index 00000000..0ccaee19 --- /dev/null +++ b/www/content/api/functions/getPathsFromContext.md @@ -0,0 +1,35 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getPathsFromContext + +# Function: getPathsFromContext() + +> **getPathsFromContext**(`types`, `context`, `options`): `Promise`\<`GetStaticPathsResult`\[`"paths"`\]\> + +Defined in: [packages/next-drupal/src/deprecated/get-paths.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-paths.ts#L5) + +## Parameters + +### types + +`string` | `string`[] + +### context + +`GetStaticPathsContext` + +### options + +#### accessToken + +[`AccessToken`](../interfaces/AccessToken.md) + +#### params + +[`JsonApiParams`](../type-aliases/JsonApiParams.md) + +## Returns + +`Promise`\<`GetStaticPathsResult`\[`"paths"`\]\> diff --git a/www/content/api/functions/getResource.md b/www/content/api/functions/getResource.md new file mode 100644 index 00000000..241f7f65 --- /dev/null +++ b/www/content/api/functions/getResource.md @@ -0,0 +1,33 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getResource + +# Function: getResource() + +> **getResource**\<`T`\>(`type`, `uuid`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:166](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource.ts#L166) + +## Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +## Parameters + +### type + +`string` + +### uuid + +`string` + +### options? + +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) + +## Returns + +`Promise`\<`T`\> diff --git a/www/content/api/functions/getResourceByPath.md b/www/content/api/functions/getResourceByPath.md new file mode 100644 index 00000000..c5eacf4e --- /dev/null +++ b/www/content/api/functions/getResourceByPath.md @@ -0,0 +1,29 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getResourceByPath + +# Function: getResourceByPath() + +> **getResourceByPath**\<`T`\>(`path`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:68](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource.ts#L68) + +## Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +## Parameters + +### path + +`string` + +### options? + +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) + +## Returns + +`Promise`\<`T`\> diff --git a/www/content/api/functions/getResourceCollection.md b/www/content/api/functions/getResourceCollection.md new file mode 100644 index 00000000..8e458ab0 --- /dev/null +++ b/www/content/api/functions/getResourceCollection.md @@ -0,0 +1,29 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getResourceCollection + +# Function: getResourceCollection() + +> **getResourceCollection**\<`T`\>(`type`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/deprecated/get-resource-collection.ts:11](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource-collection.ts#L11) + +## Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] + +## Parameters + +### type + +`string` + +### options? + +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) + +## Returns + +`Promise`\<`T`\> diff --git a/www/content/api/functions/getResourceCollectionFromContext.md b/www/content/api/functions/getResourceCollectionFromContext.md new file mode 100644 index 00000000..64424e8b --- /dev/null +++ b/www/content/api/functions/getResourceCollectionFromContext.md @@ -0,0 +1,39 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getResourceCollectionFromContext + +# Function: getResourceCollectionFromContext() + +> **getResourceCollectionFromContext**\<`T`\>(`type`, `context`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/deprecated/get-resource-collection.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource-collection.ts#L49) + +## Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] + +## Parameters + +### type + +`string` + +### context + +`GetStaticPropsContext` + +### options? + +#### deserialize + +`boolean` + +#### params + +[`JsonApiParams`](../type-aliases/JsonApiParams.md) + +## Returns + +`Promise`\<`T`\> diff --git a/www/content/api/functions/getResourceFromContext.md b/www/content/api/functions/getResourceFromContext.md new file mode 100644 index 00000000..5ccf7bd1 --- /dev/null +++ b/www/content/api/functions/getResourceFromContext.md @@ -0,0 +1,51 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getResourceFromContext + +# Function: getResourceFromContext() + +> **getResourceFromContext**\<`T`\>(`type`, `context`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:13](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource.ts#L13) + +## Type Parameters + +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) + +## Parameters + +### type + +`string` + +### context + +`GetStaticPropsContext` + +### options? + +#### accessToken + +[`AccessToken`](../interfaces/AccessToken.md) + +#### deserialize + +`boolean` + +#### isVersionable + +`boolean` + +#### params + +[`JsonApiParams`](../type-aliases/JsonApiParams.md) + +#### prefix + +`string` + +## Returns + +`Promise`\<`T`\> diff --git a/www/content/api/functions/getResourcePreviewUrl.md b/www/content/api/functions/getResourcePreviewUrl.md new file mode 100644 index 00000000..b0ccda84 --- /dev/null +++ b/www/content/api/functions/getResourcePreviewUrl.md @@ -0,0 +1,25 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getResourcePreviewUrl + +# Function: getResourcePreviewUrl() + +> **getResourcePreviewUrl**(`slug`, `options`?): `Promise`\<`any`\> + +Defined in: [packages/next-drupal/src/deprecated/preview.ts:67](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/preview.ts#L67) + +## Parameters + +### slug + +`string` + +### options? + +`GetResourcePreviewUrlOptions` + +## Returns + +`Promise`\<`any`\> diff --git a/www/content/api/functions/getResourceTypeFromContext.md b/www/content/api/functions/getResourceTypeFromContext.md new file mode 100644 index 00000000..b34fd9cc --- /dev/null +++ b/www/content/api/functions/getResourceTypeFromContext.md @@ -0,0 +1,31 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getResourceTypeFromContext + +# Function: getResourceTypeFromContext() + +> **getResourceTypeFromContext**(`context`, `options`?): `Promise`\<`string`\> + +Defined in: [packages/next-drupal/src/deprecated/get-resource-type.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource-type.ts#L5) + +## Parameters + +### context + +`GetStaticPropsContext` + +### options? + +#### accessToken + +[`AccessToken`](../interfaces/AccessToken.md) + +#### prefix + +`string` + +## Returns + +`Promise`\<`string`\> diff --git a/www/content/api/functions/getSearchIndex.md b/www/content/api/functions/getSearchIndex.md new file mode 100644 index 00000000..0001c1e3 --- /dev/null +++ b/www/content/api/functions/getSearchIndex.md @@ -0,0 +1,29 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getSearchIndex + +# Function: getSearchIndex() + +> **getSearchIndex**\<`T`\>(`name`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/deprecated/get-search-index.ts:6](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-search-index.ts#L6) + +## Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] + +## Parameters + +### name + +`string` + +### options? + +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) + +## Returns + +`Promise`\<`T`\> diff --git a/www/content/api/functions/getSearchIndexFromContext.md b/www/content/api/functions/getSearchIndexFromContext.md new file mode 100644 index 00000000..2cd298c1 --- /dev/null +++ b/www/content/api/functions/getSearchIndexFromContext.md @@ -0,0 +1,33 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getSearchIndexFromContext + +# Function: getSearchIndexFromContext() + +> **getSearchIndexFromContext**\<`T`\>(`name`, `context`, `options`?): `Promise`\<`T`\> + +Defined in: [packages/next-drupal/src/deprecated/get-search-index.ts:38](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-search-index.ts#L38) + +## Type Parameters + +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] + +## Parameters + +### name + +`string` + +### context + +`GetStaticPropsContext` + +### options? + +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) + +## Returns + +`Promise`\<`T`\> diff --git a/www/content/api/functions/getView.md b/www/content/api/functions/getView.md new file mode 100644 index 00000000..07df6b97 --- /dev/null +++ b/www/content/api/functions/getView.md @@ -0,0 +1,29 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / getView + +# Function: getView() + +> **getView**\<`T`\>(`name`, `options`?): `Promise`\<\{ `links`: \{ \[key in "next" \| "prev" \| "self"\]?: \{ href: "string" \} \}; `meta`: `Record`\<`string`, `any`\>; `results`: `T`; \}\> + +Defined in: [packages/next-drupal/src/deprecated/get-view.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-view.ts#L5) + +## Type Parameters + +• **T** + +## Parameters + +### name + +`string` + +### options? + +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) + +## Returns + +`Promise`\<\{ `links`: \{ \[key in "next" \| "prev" \| "self"\]?: \{ href: "string" \} \}; `meta`: `Record`\<`string`, `any`\>; `results`: `T`; \}\> diff --git a/www/content/api/functions/isAccessTokenAuth.md b/www/content/api/functions/isAccessTokenAuth.md new file mode 100644 index 00000000..31ecb190 --- /dev/null +++ b/www/content/api/functions/isAccessTokenAuth.md @@ -0,0 +1,27 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / isAccessTokenAuth + +# Function: isAccessTokenAuth() + +> **isAccessTokenAuth**(`auth`): `auth is AccessToken` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:610](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L610) + +Checks if the provided auth configuration is access token auth. + +## Parameters + +### auth + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +The auth configuration. + +## Returns + +`auth is AccessToken` + +True if the auth configuration is access token auth, false otherwise. diff --git a/www/content/api/functions/isBasicAuth.md b/www/content/api/functions/isBasicAuth.md new file mode 100644 index 00000000..00ed030c --- /dev/null +++ b/www/content/api/functions/isBasicAuth.md @@ -0,0 +1,27 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / isBasicAuth + +# Function: isBasicAuth() + +> **isBasicAuth**(`auth`): `auth is NextDrupalAuthUsernamePassword` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:595](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L595) + +Checks if the provided auth configuration is basic auth. + +## Parameters + +### auth + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +The auth configuration. + +## Returns + +`auth is NextDrupalAuthUsernamePassword` + +True if the auth configuration is basic auth, false otherwise. diff --git a/www/content/api/functions/isClientIdSecretAuth.md b/www/content/api/functions/isClientIdSecretAuth.md new file mode 100644 index 00000000..e7e20ea3 --- /dev/null +++ b/www/content/api/functions/isClientIdSecretAuth.md @@ -0,0 +1,27 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / isClientIdSecretAuth + +# Function: isClientIdSecretAuth() + +> **isClientIdSecretAuth**(`auth`): `auth is NextDrupalAuthClientIdSecret` + +Defined in: [packages/next-drupal/src/next-drupal-base.ts:625](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L625) + +Checks if the provided auth configuration is client ID and secret auth. + +## Parameters + +### auth + +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +The auth configuration. + +## Returns + +`auth is NextDrupalAuthClientIdSecret` + +True if the auth configuration is client ID and secret auth, false otherwise. diff --git a/www/content/api/functions/syncDrupalPreviewRoutes.md b/www/content/api/functions/syncDrupalPreviewRoutes.md new file mode 100644 index 00000000..4d296452 --- /dev/null +++ b/www/content/api/functions/syncDrupalPreviewRoutes.md @@ -0,0 +1,21 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / syncDrupalPreviewRoutes + +# Function: syncDrupalPreviewRoutes() + +> **syncDrupalPreviewRoutes**(`path`): `void` + +Defined in: [packages/next-drupal/src/deprecated/utils.ts:128](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/utils.ts#L128) + +## Parameters + +### path + +`any` + +## Returns + +`void` diff --git a/www/content/api/functions/translatePath.md b/www/content/api/functions/translatePath.md new file mode 100644 index 00000000..8554a518 --- /dev/null +++ b/www/content/api/functions/translatePath.md @@ -0,0 +1,27 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / translatePath + +# Function: translatePath() + +> **translatePath**(`path`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> + +Defined in: [packages/next-drupal/src/deprecated/translate-path.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/translate-path.ts#L5) + +## Parameters + +### path + +`string` + +### options? + +#### accessToken + +[`AccessToken`](../interfaces/AccessToken.md) + +## Returns + +`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> diff --git a/www/content/api/functions/translatePathFromContext.md b/www/content/api/functions/translatePathFromContext.md new file mode 100644 index 00000000..3b6252ba --- /dev/null +++ b/www/content/api/functions/translatePathFromContext.md @@ -0,0 +1,31 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / translatePathFromContext + +# Function: translatePathFromContext() + +> **translatePathFromContext**(`context`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> + +Defined in: [packages/next-drupal/src/deprecated/translate-path.ts:28](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/translate-path.ts#L28) + +## Parameters + +### context + +`GetStaticPropsContext` + +### options? + +#### accessToken + +[`AccessToken`](../interfaces/AccessToken.md) + +#### prefix + +`string` + +## Returns + +`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> diff --git a/www/content/api/functions/useJsonaDeserialize.md b/www/content/api/functions/useJsonaDeserialize.md new file mode 100644 index 00000000..6a0f2f17 --- /dev/null +++ b/www/content/api/functions/useJsonaDeserialize.md @@ -0,0 +1,29 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / useJsonaDeserialize + +# Function: useJsonaDeserialize() + +> **useJsonaDeserialize**(): (`body`, `options`) => `TJsonaModel` \| `TJsonaModel`[] + +Defined in: [packages/next-drupal/src/next-drupal.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L37) + +## Returns + +`Function` + +### Parameters + +#### body + +`Record`\<`string`, `unknown`\> + +#### options + +`Record`\<`string`, `unknown`\> + +### Returns + +`TJsonaModel` \| `TJsonaModel`[] diff --git a/www/content/api/globals.md b/www/content/api/globals.md new file mode 100644 index 00000000..2af23eb0 --- /dev/null +++ b/www/content/api/globals.md @@ -0,0 +1,107 @@ +[**next-drupal**](README.md) + +--- + +# next-drupal + +## Classes + +- [JsonApiErrors](classes/JsonApiErrors.md) +- [NextDrupal](classes/NextDrupal.md) +- [NextDrupalBase](classes/NextDrupalBase.md) +- [NextDrupalPages](classes/NextDrupalPages.md) + +## Interfaces + +- [AccessToken](interfaces/AccessToken.md) +- [DataCache](interfaces/DataCache.md) +- [DrupalBlock](interfaces/DrupalBlock.md) +- [DrupalFile](interfaces/DrupalFile.md) +- [DrupalFileMeta](interfaces/DrupalFileMeta.md) +- [DrupalMedia](interfaces/DrupalMedia.md) +- [DrupalMenuItem](interfaces/DrupalMenuItem.md) +- [DrupalNode](interfaces/DrupalNode.md) +- [DrupalParagraph](interfaces/DrupalParagraph.md) +- [DrupalSearchApiFacet](interfaces/DrupalSearchApiFacet.md) +- [DrupalSearchApiJsonApiResponse](interfaces/DrupalSearchApiJsonApiResponse.md) +- [DrupalTaxonomyTerm](interfaces/DrupalTaxonomyTerm.md) +- [DrupalTranslatedPath](interfaces/DrupalTranslatedPath.md) +- [DrupalUser](interfaces/DrupalUser.md) +- [DrupalView](interfaces/DrupalView.md) +- [FetchOptions](interfaces/FetchOptions.md) +- [JsonApiCreateFileResourceBody](interfaces/JsonApiCreateFileResourceBody.md) +- [JsonApiCreateResourceBody](interfaces/JsonApiCreateResourceBody.md) +- [JsonApiError](interfaces/JsonApiError.md) +- [JsonApiLinks](interfaces/JsonApiLinks.md) +- [JsonApiResource](interfaces/JsonApiResource.md) +- [JsonApiResourceBodyRelationship](interfaces/JsonApiResourceBodyRelationship.md) +- [JsonApiResourceWithPath](interfaces/JsonApiResourceWithPath.md) +- [JsonApiResponse](interfaces/JsonApiResponse.md) +- [JsonApiUpdateResourceBody](interfaces/JsonApiUpdateResourceBody.md) +- [Logger](interfaces/Logger.md) +- [NextDrupalAuthClientIdSecret](interfaces/NextDrupalAuthClientIdSecret.md) +- [NextDrupalAuthUsernamePassword](interfaces/NextDrupalAuthUsernamePassword.md) +- [Serializer](interfaces/Serializer.md) + +## Type Aliases + +- [AccessTokenScope](type-aliases/AccessTokenScope.md) +- [BaseUrl](type-aliases/BaseUrl.md) +- [DrupalClientAuth](type-aliases/DrupalClientAuth.md) +- [DrupalClientAuthAccessToken](type-aliases/DrupalClientAuthAccessToken.md) +- [DrupalClientAuthClientIdSecret](type-aliases/DrupalClientAuthClientIdSecret.md) +- [DrupalClientAuthUsernamePassword](type-aliases/DrupalClientAuthUsernamePassword.md) +- [DrupalClientOptions](type-aliases/DrupalClientOptions.md) +- [DrupalMenuItemId](type-aliases/DrupalMenuItemId.md) +- [DrupalMenuLinkContent](type-aliases/DrupalMenuLinkContent.md) +- [DrupalPathAlias](type-aliases/DrupalPathAlias.md) +- [EndpointSearchParams](type-aliases/EndpointSearchParams.md) +- [Fetcher](type-aliases/Fetcher.md) +- [JsonApiOptions](type-aliases/JsonApiOptions.md) +- [JsonApiParams](type-aliases/JsonApiParams.md) +- [JsonApiWithAuthOption](type-aliases/JsonApiWithAuthOption.md) +- [JsonApiWithCacheOptions](type-aliases/JsonApiWithCacheOptions.md) +- [JsonApiWithLocaleOptions](type-aliases/JsonApiWithLocaleOptions.md) +- [JsonApiWithNextFetchOptions](type-aliases/JsonApiWithNextFetchOptions.md) +- [JsonDeserializer](type-aliases/JsonDeserializer.md) +- [Locale](type-aliases/Locale.md) +- [NextDrupalAuth](type-aliases/NextDrupalAuth.md) +- [NextDrupalAuthAccessToken](type-aliases/NextDrupalAuthAccessToken.md) +- [NextDrupalBaseOptions](type-aliases/NextDrupalBaseOptions.md) +- [NextDrupalOptions](type-aliases/NextDrupalOptions.md) +- [PathPrefix](type-aliases/PathPrefix.md) + +## Variables + +- [DRAFT_DATA_COOKIE_NAME](variables/DRAFT_DATA_COOKIE_NAME.md) +- [DRAFT_MODE_COOKIE_NAME](variables/DRAFT_MODE_COOKIE_NAME.md) +- [DrupalClient](variables/DrupalClient.md) + +## Functions + +- [buildUrl](functions/buildUrl.md) +- [deserialize](functions/deserialize.md) +- [DrupalPreview](functions/DrupalPreview.md) +- [getAccessToken](functions/getAccessToken.md) +- [getJsonApiIndex](functions/getJsonApiIndex.md) +- [getJsonApiPathForResourceType](functions/getJsonApiPathForResourceType.md) +- [getMenu](functions/getMenu.md) +- [getPathsFromContext](functions/getPathsFromContext.md) +- [getResource](functions/getResource.md) +- [getResourceByPath](functions/getResourceByPath.md) +- [getResourceCollection](functions/getResourceCollection.md) +- [getResourceCollectionFromContext](functions/getResourceCollectionFromContext.md) +- [getResourceFromContext](functions/getResourceFromContext.md) +- [getResourcePreviewUrl](functions/getResourcePreviewUrl.md) +- [getResourceTypeFromContext](functions/getResourceTypeFromContext.md) +- [getSearchIndex](functions/getSearchIndex.md) +- [getSearchIndexFromContext](functions/getSearchIndexFromContext.md) +- [getView](functions/getView.md) +- [isAccessTokenAuth](functions/isAccessTokenAuth.md) +- [isBasicAuth](functions/isBasicAuth.md) +- [isClientIdSecretAuth](functions/isClientIdSecretAuth.md) +- [PreviewHandler](functions/PreviewHandler.md) +- [syncDrupalPreviewRoutes](functions/syncDrupalPreviewRoutes.md) +- [translatePath](functions/translatePath.md) +- [translatePathFromContext](functions/translatePathFromContext.md) +- [useJsonaDeserialize](functions/useJsonaDeserialize.md) diff --git a/www/content/api/interfaces/AccessToken.md b/www/content/api/interfaces/AccessToken.md new file mode 100644 index 00000000..b8485450 --- /dev/null +++ b/www/content/api/interfaces/AccessToken.md @@ -0,0 +1,41 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / AccessToken + +# Interface: AccessToken + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L113) + +## Properties + +### access_token + +> **access_token**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:115](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L115) + +--- + +### expires_in + +> **expires_in**: `number` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:116](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L116) + +--- + +### refresh_token? + +> `optional` **refresh_token**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:117](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L117) + +--- + +### token_type + +> **token_type**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:114](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L114) diff --git a/www/content/api/interfaces/DataCache.md b/www/content/api/interfaces/DataCache.md new file mode 100644 index 00000000..e82eab96 --- /dev/null +++ b/www/content/api/interfaces/DataCache.md @@ -0,0 +1,71 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DataCache + +# Interface: DataCache + +Defined in: [packages/next-drupal/src/types/next-drupal.ts:51](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L51) + +## Methods + +### del()? + +> `optional` **del**(`keys`): `Promise`\<`unknown`\> + +Defined in: [packages/next-drupal/src/types/next-drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L56) + +#### Parameters + +##### keys + +`any` + +#### Returns + +`Promise`\<`unknown`\> + +--- + +### get() + +> **get**(`key`): `Promise`\<`unknown`\> + +Defined in: [packages/next-drupal/src/types/next-drupal.ts:52](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L52) + +#### Parameters + +##### key + +`any` + +#### Returns + +`Promise`\<`unknown`\> + +--- + +### set() + +> **set**(`key`, `value`, `ttl`?): `Promise`\<`unknown`\> + +Defined in: [packages/next-drupal/src/types/next-drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L54) + +#### Parameters + +##### key + +`any` + +##### value + +`any` + +##### ttl? + +`number` + +#### Returns + +`Promise`\<`unknown`\> diff --git a/www/content/api/interfaces/DrupalBlock.md b/www/content/api/interfaces/DrupalBlock.md new file mode 100644 index 00000000..8c54e069 --- /dev/null +++ b/www/content/api/interfaces/DrupalBlock.md @@ -0,0 +1,73 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalBlock + +# Interface: DrupalBlock + +Defined in: [packages/next-drupal/src/types/drupal.ts:7](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L7) + +## Extends + +- [`JsonApiResource`](JsonApiResource.md) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`id`](JsonApiResource.md#id) + +--- + +### info + +> **info**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:8](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L8) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`langcode`](JsonApiResource.md#langcode) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`status`](JsonApiResource.md#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`type`](JsonApiResource.md#type) diff --git a/www/content/api/interfaces/DrupalFile.md b/www/content/api/interfaces/DrupalFile.md new file mode 100644 index 00000000..3ebf0baf --- /dev/null +++ b/www/content/api/interfaces/DrupalFile.md @@ -0,0 +1,137 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalFile + +# Interface: DrupalFile + +Defined in: [packages/next-drupal/src/types/drupal.ts:11](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L11) + +## Extends + +- [`JsonApiResource`](JsonApiResource.md) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### changed + +> **changed**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:13](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L13) + +--- + +### created + +> **created**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:14](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L14) + +--- + +### drupal_internal\_\_fid + +> **drupal_internal\_\_fid**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:12](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L12) + +--- + +### filemime + +> **filemime**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:21](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L21) + +--- + +### filename + +> **filename**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:15](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L15) + +--- + +### filesize + +> **filesize**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:20](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L20) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`id`](JsonApiResource.md#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`langcode`](JsonApiResource.md#langcode) + +--- + +### resourceIdObjMeta? + +> `optional` **resourceIdObjMeta**: [`DrupalFileMeta`](DrupalFileMeta.md) + +Defined in: [packages/next-drupal/src/types/drupal.ts:22](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L22) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`status`](JsonApiResource.md#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`type`](JsonApiResource.md#type) + +--- + +### uri + +> **uri**: `object` + +Defined in: [packages/next-drupal/src/types/drupal.ts:16](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L16) + +#### url + +> **url**: `string` + +#### value + +> **value**: `string` diff --git a/www/content/api/interfaces/DrupalFileMeta.md b/www/content/api/interfaces/DrupalFileMeta.md new file mode 100644 index 00000000..277b8ac7 --- /dev/null +++ b/www/content/api/interfaces/DrupalFileMeta.md @@ -0,0 +1,41 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalFileMeta + +# Interface: DrupalFileMeta + +Defined in: [packages/next-drupal/src/types/drupal.ts:25](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L25) + +## Properties + +### alt? + +> `optional` **alt**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:26](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L26) + +--- + +### height + +> **height**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:29](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L29) + +--- + +### title? + +> `optional` **title**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:27](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L27) + +--- + +### width + +> **width**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:28](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L28) diff --git a/www/content/api/interfaces/DrupalMedia.md b/www/content/api/interfaces/DrupalMedia.md new file mode 100644 index 00000000..587a3cbb --- /dev/null +++ b/www/content/api/interfaces/DrupalMedia.md @@ -0,0 +1,105 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalMedia + +# Interface: DrupalMedia + +Defined in: [packages/next-drupal/src/types/drupal.ts:32](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L32) + +## Extends + +- [`JsonApiResource`](JsonApiResource.md) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### changed + +> **changed**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:35](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L35) + +--- + +### created + +> **created**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:36](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L36) + +--- + +### drupal_internal\_\_mid + +> **drupal_internal\_\_mid**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:33](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L33) + +--- + +### drupal_internal\_\_vid + +> **drupal_internal\_\_vid**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:34](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L34) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`id`](JsonApiResource.md#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`langcode`](JsonApiResource.md#langcode) + +--- + +### name + +> **name**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L37) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`status`](JsonApiResource.md#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`type`](JsonApiResource.md#type) diff --git a/www/content/api/interfaces/DrupalMenuItem.md b/www/content/api/interfaces/DrupalMenuItem.md new file mode 100644 index 00000000..4b5ca369 --- /dev/null +++ b/www/content/api/interfaces/DrupalMenuItem.md @@ -0,0 +1,137 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalMenuItem + +# Interface: DrupalMenuItem + +Defined in: [packages/next-drupal/src/types/drupal.ts:40](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L40) + +## Properties + +### description + +> **description**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:41](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L41) + +--- + +### enabled + +> **enabled**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:42](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L42) + +--- + +### expanded + +> **expanded**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:43](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L43) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:44](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L44) + +--- + +### items? + +> `optional` **items**: [`DrupalMenuItem`](DrupalMenuItem.md)[] + +Defined in: [packages/next-drupal/src/types/drupal.ts:58](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L58) + +--- + +### menu_name + +> **menu_name**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:45](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L45) + +--- + +### meta + +> **meta**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/next-drupal/src/types/drupal.ts:46](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L46) + +--- + +### options + +> **options**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/next-drupal/src/types/drupal.ts:47](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L47) + +--- + +### parent + +> **parent**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:48](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L48) + +--- + +### provider + +> **provider**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L49) + +--- + +### route + +> **route**: `object` + +Defined in: [packages/next-drupal/src/types/drupal.ts:50](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L50) + +#### name + +> **name**: `string` + +#### parameters + +> **parameters**: `Record`\<`string`, `unknown`\> + +--- + +### title + +> **title**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L54) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:55](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L55) + +--- + +### url + +> **url**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L56) + +--- + +### weight + +> **weight**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:57](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L57) diff --git a/www/content/api/interfaces/DrupalNode.md b/www/content/api/interfaces/DrupalNode.md new file mode 100644 index 00000000..ab6583ef --- /dev/null +++ b/www/content/api/interfaces/DrupalNode.md @@ -0,0 +1,133 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalNode + +# Interface: DrupalNode + +Defined in: [packages/next-drupal/src/types/drupal.ts:63](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L63) + +## Extends + +- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.md) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### changed + +> **changed**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:66](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L66) + +--- + +### created + +> **created**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:67](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L67) + +--- + +### default_langcode + +> **default_langcode**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:69](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L69) + +--- + +### drupal_internal\_\_nid + +> **drupal_internal\_\_nid**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:64](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L64) + +--- + +### drupal_internal\_\_vid + +> **drupal_internal\_\_vid**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:65](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L65) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`id`](JsonApiResourceWithPath.md#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`langcode`](JsonApiResourceWithPath.md#langcode) + +--- + +### path + +> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.md) + +Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L66) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`path`](JsonApiResourceWithPath.md#path) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`status`](JsonApiResourceWithPath.md#status) + +--- + +### sticky + +> **sticky**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:70](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L70) + +--- + +### title + +> **title**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:68](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L68) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`type`](JsonApiResourceWithPath.md#type) diff --git a/www/content/api/interfaces/DrupalParagraph.md b/www/content/api/interfaces/DrupalParagraph.md new file mode 100644 index 00000000..b2cce6ae --- /dev/null +++ b/www/content/api/interfaces/DrupalParagraph.md @@ -0,0 +1,81 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalParagraph + +# Interface: DrupalParagraph + +Defined in: [packages/next-drupal/src/types/drupal.ts:73](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L73) + +## Extends + +- [`JsonApiResource`](JsonApiResource.md) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### drupal_internal\_\_id + +> **drupal_internal\_\_id**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:74](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L74) + +--- + +### drupal_internal\_\_revision_id + +> **drupal_internal\_\_revision_id**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:75](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L75) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`id`](JsonApiResource.md#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`langcode`](JsonApiResource.md#langcode) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`status`](JsonApiResource.md#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`type`](JsonApiResource.md#type) diff --git a/www/content/api/interfaces/DrupalSearchApiFacet.md b/www/content/api/interfaces/DrupalSearchApiFacet.md new file mode 100644 index 00000000..8fd55ddc --- /dev/null +++ b/www/content/api/interfaces/DrupalSearchApiFacet.md @@ -0,0 +1,65 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalSearchApiFacet + +# Interface: DrupalSearchApiFacet + +Defined in: [packages/next-drupal/src/types/drupal.ts:90](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L90) + +## Properties + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:91](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L91) + +--- + +### label? + +> `optional` **label**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:92](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L92) + +--- + +### path? + +> `optional` **path**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:93](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L93) + +--- + +### terms? + +> `optional` **terms**: `object`[] + +Defined in: [packages/next-drupal/src/types/drupal.ts:94](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L94) + +#### url + +> **url**: `string` + +#### values + +> **values**: `object` + +##### values.active? + +> `optional` **active**: `boolean` + +##### values.count? + +> `optional` **count**: `number` + +##### values.label + +> **label**: `string` + +##### values.value + +> **value**: `string` diff --git a/www/content/api/interfaces/DrupalSearchApiJsonApiResponse.md b/www/content/api/interfaces/DrupalSearchApiJsonApiResponse.md new file mode 100644 index 00000000..0efed59a --- /dev/null +++ b/www/content/api/interfaces/DrupalSearchApiJsonApiResponse.md @@ -0,0 +1,109 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalSearchApiJsonApiResponse + +# Interface: DrupalSearchApiJsonApiResponse + +Defined in: [packages/next-drupal/src/types/drupal.ts:84](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L84) + +## Extends + +- [`JsonApiResponse`](JsonApiResponse.md) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### data + +> **data**: `Record`\<`string`, `any`\>[] + +Defined in: [packages/next-drupal/src/types/resource.ts:12](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L12) + +#### Inherited from + +[`JsonApiResponse`](JsonApiResponse.md).[`data`](JsonApiResponse.md#data) + +--- + +### errors + +> **errors**: [`JsonApiError`](JsonApiError.md)[] + +Defined in: [packages/next-drupal/src/types/resource.ts:13](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L13) + +#### Inherited from + +[`JsonApiResponse`](JsonApiResponse.md).[`errors`](JsonApiResponse.md#errors) + +--- + +### included? + +> `optional` **included**: `Record`\<`string`, `any`\>[] + +Defined in: [packages/next-drupal/src/types/resource.ts:19](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L19) + +#### Inherited from + +[`JsonApiResponse`](JsonApiResponse.md).[`included`](JsonApiResponse.md#included) + +--- + +### jsonapi? + +> `optional` **jsonapi**: `object` + +Defined in: [packages/next-drupal/src/types/resource.ts:8](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L8) + +#### meta + +> **meta**: `Record`\<`string`, `any`\>[] + +#### version + +> **version**: `string` + +#### Inherited from + +[`JsonApiResponse`](JsonApiResponse.md).[`jsonapi`](JsonApiResponse.md#jsonapi) + +--- + +### links? + +> `optional` **links**: [`JsonApiLinks`](JsonApiLinks.md) + +Defined in: [packages/next-drupal/src/types/resource.ts:18](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L18) + +#### Inherited from + +[`JsonApiResponse`](JsonApiResponse.md).[`links`](JsonApiResponse.md#links) + +--- + +### meta + +> **meta**: `object` & `object` + +Defined in: [packages/next-drupal/src/types/drupal.ts:85](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L85) + +#### Type declaration + +##### count + +> **count**: `number` + +#### Type declaration + +##### facets? + +> `optional` **facets**: [`DrupalSearchApiFacet`](DrupalSearchApiFacet.md)[] + +#### Overrides + +[`JsonApiResponse`](JsonApiResponse.md).[`meta`](JsonApiResponse.md#meta) diff --git a/www/content/api/interfaces/DrupalTaxonomyTerm.md b/www/content/api/interfaces/DrupalTaxonomyTerm.md new file mode 100644 index 00000000..a54032b0 --- /dev/null +++ b/www/content/api/interfaces/DrupalTaxonomyTerm.md @@ -0,0 +1,125 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalTaxonomyTerm + +# Interface: DrupalTaxonomyTerm + +Defined in: [packages/next-drupal/src/types/drupal.ts:105](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L105) + +## Extends + +- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.md) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### changed + +> **changed**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:107](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L107) + +--- + +### default_langcode + +> **default_langcode**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:108](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L108) + +--- + +### description + +> **description**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:110](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L110) + +--- + +### drupal_internal\_\_tid + +> **drupal_internal\_\_tid**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:106](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L106) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`id`](JsonApiResourceWithPath.md#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`langcode`](JsonApiResourceWithPath.md#langcode) + +--- + +### name + +> **name**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:109](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L109) + +--- + +### path + +> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.md) + +Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L66) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`path`](JsonApiResourceWithPath.md#path) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`status`](JsonApiResourceWithPath.md#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`type`](JsonApiResourceWithPath.md#type) + +--- + +### weight + +> **weight**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:111](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L111) diff --git a/www/content/api/interfaces/DrupalTranslatedPath.md b/www/content/api/interfaces/DrupalTranslatedPath.md new file mode 100644 index 00000000..0a9bb51d --- /dev/null +++ b/www/content/api/interfaces/DrupalTranslatedPath.md @@ -0,0 +1,125 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalTranslatedPath + +# Interface: DrupalTranslatedPath + +Defined in: [packages/next-drupal/src/types/drupal.ts:114](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L114) + +## Properties + +### entity + +> **entity**: `object` + +Defined in: [packages/next-drupal/src/types/drupal.ts:117](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L117) + +#### bundle + +> **bundle**: `string` + +#### canonical + +> **canonical**: `string` + +#### id + +> **id**: `string` + +#### langcode? + +> `optional` **langcode**: `string` + +#### path? + +> `optional` **path**: `string` + +#### type + +> **type**: `string` + +#### uuid + +> **uuid**: `string` + +--- + +### isHomePath + +> **isHomePath**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:116](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L116) + +--- + +### jsonapi? + +> `optional` **jsonapi**: `object` + +Defined in: [packages/next-drupal/src/types/drupal.ts:127](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L127) + +#### basePath + +> **basePath**: `string` + +#### entryPoint + +> **entryPoint**: `string` + +#### individual + +> **individual**: `string` + +#### pathPrefix + +> **pathPrefix**: `string` + +#### resourceName + +> **resourceName**: `string` + +--- + +### label? + +> `optional` **label**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:126](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L126) + +--- + +### meta? + +> `optional` **meta**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/next-drupal/src/types/drupal.ts:134](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L134) + +--- + +### redirect? + +> `optional` **redirect**: `object`[] + +Defined in: [packages/next-drupal/src/types/drupal.ts:135](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L135) + +#### from + +> **from**: `string` + +#### status + +> **status**: `string` + +#### to + +> **to**: `string` + +--- + +### resolved + +> **resolved**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:115](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L115) diff --git a/www/content/api/interfaces/DrupalUser.md b/www/content/api/interfaces/DrupalUser.md new file mode 100644 index 00000000..43916b7a --- /dev/null +++ b/www/content/api/interfaces/DrupalUser.md @@ -0,0 +1,117 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalUser + +# Interface: DrupalUser + +Defined in: [packages/next-drupal/src/types/drupal.ts:142](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L142) + +## Extends + +- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.md) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### changed + +> **changed**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:144](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L144) + +--- + +### created + +> **created**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:145](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L145) + +--- + +### default_langcode + +> **default_langcode**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:146](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L146) + +--- + +### drupal_internal\_\_uid + +> **drupal_internal\_\_uid**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:143](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L143) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`id`](JsonApiResourceWithPath.md#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`langcode`](JsonApiResourceWithPath.md#langcode) + +--- + +### name + +> **name**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:147](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L147) + +--- + +### path + +> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.md) + +Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L66) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`path`](JsonApiResourceWithPath.md#path) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`status`](JsonApiResourceWithPath.md#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`type`](JsonApiResourceWithPath.md#type) diff --git a/www/content/api/interfaces/DrupalView.md b/www/content/api/interfaces/DrupalView.md new file mode 100644 index 00000000..1c591f5f --- /dev/null +++ b/www/content/api/interfaces/DrupalView.md @@ -0,0 +1,53 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalView + +# Interface: DrupalView\ + +Defined in: [packages/next-drupal/src/types/drupal.ts:151](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L151) + +## Type Parameters + +• **T** = `Record`\<`string`, `any`\>[] + +## Properties + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:152](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L152) + +--- + +### links + +> **links**: [`JsonApiLinks`](JsonApiLinks.md) + +Defined in: [packages/next-drupal/src/types/drupal.ts:155](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L155) + +--- + +### meta + +> **meta**: `object` + +Defined in: [packages/next-drupal/src/types/drupal.ts:154](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L154) + +#### Index Signature + +\[`key`: `string`\]: `any` + +#### count + +> **count**: `number` + +--- + +### results + +> **results**: `T` + +Defined in: [packages/next-drupal/src/types/drupal.ts:153](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L153) diff --git a/www/content/api/interfaces/FetchOptions.md b/www/content/api/interfaces/FetchOptions.md new file mode 100644 index 00000000..4a1bcdfc --- /dev/null +++ b/www/content/api/interfaces/FetchOptions.md @@ -0,0 +1,227 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / FetchOptions + +# Interface: FetchOptions + +Defined in: [packages/next-drupal/src/types/options.ts:9](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L9) + +## Extends + +- `RequestInit` + +## Properties + +### body? + +> `optional` **body**: `BodyInit` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1673 + +A BodyInit object or null to set request's body. + +#### Inherited from + +`RequestInit.body` + +--- + +### cache? + +> `optional` **cache**: `RequestCache` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1675 + +A string indicating how the request will interact with the browser's cache to set request's cache. + +#### Inherited from + +`RequestInit.cache` + +--- + +### credentials? + +> `optional` **credentials**: `RequestCredentials` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1677 + +A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials. + +#### Inherited from + +`RequestInit.credentials` + +--- + +### headers? + +> `optional` **headers**: `HeadersInit` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1679 + +A Headers object, an object literal, or an array of two-item arrays to set request's headers. + +#### Inherited from + +`RequestInit.headers` + +--- + +### integrity? + +> `optional` **integrity**: `string` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1681 + +A cryptographic hash of the resource to be fetched by request. Sets request's integrity. + +#### Inherited from + +`RequestInit.integrity` + +--- + +### keepalive? + +> `optional` **keepalive**: `boolean` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1683 + +A boolean to set request's keepalive. + +#### Inherited from + +`RequestInit.keepalive` + +--- + +### method? + +> `optional` **method**: `string` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1685 + +A string to set request's method. + +#### Inherited from + +`RequestInit.method` + +--- + +### mode? + +> `optional` **mode**: `RequestMode` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1687 + +A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. + +#### Inherited from + +`RequestInit.mode` + +--- + +### next? + +> `optional` **next**: `NextFetchRequestConfig` + +Defined in: node_modules/next/types/global.d.ts:59 + +#### Inherited from + +`RequestInit.next` + +--- + +### priority? + +> `optional` **priority**: `RequestPriority` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1688 + +#### Inherited from + +`RequestInit.priority` + +--- + +### redirect? + +> `optional` **redirect**: `RequestRedirect` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1690 + +A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. + +#### Inherited from + +`RequestInit.redirect` + +--- + +### referrer? + +> `optional` **referrer**: `string` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1692 + +A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. + +#### Inherited from + +`RequestInit.referrer` + +--- + +### referrerPolicy? + +> `optional` **referrerPolicy**: `ReferrerPolicy` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1694 + +A referrer policy to set request's referrerPolicy. + +#### Inherited from + +`RequestInit.referrerPolicy` + +--- + +### signal? + +> `optional` **signal**: `AbortSignal` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1696 + +An AbortSignal to set request's signal. + +#### Inherited from + +`RequestInit.signal` + +--- + +### window? + +> `optional` **window**: `null` + +Defined in: node_modules/typescript/lib/lib.dom.d.ts:1698 + +Can only be null. Used to disassociate request from any Window. + +#### Inherited from + +`RequestInit.window` + +--- + +### withAuth? + +> `optional` **withAuth**: `boolean` \| [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) + +Defined in: [packages/next-drupal/src/types/options.ts:10](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L10) diff --git a/www/content/api/interfaces/JsonApiCreateFileResourceBody.md b/www/content/api/interfaces/JsonApiCreateFileResourceBody.md new file mode 100644 index 00000000..c8a51d14 --- /dev/null +++ b/www/content/api/interfaces/JsonApiCreateFileResourceBody.md @@ -0,0 +1,41 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiCreateFileResourceBody + +# Interface: JsonApiCreateFileResourceBody + +Defined in: [packages/next-drupal/src/types/resource.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L37) + +## Properties + +### data + +> **data**: `object` + +Defined in: [packages/next-drupal/src/types/resource.ts:38](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L38) + +#### attributes + +> **attributes**: `object` + +##### attributes.field + +> **field**: `string` + +##### attributes.file + +> **file**: `Buffer` + +##### attributes.filename + +> **filename**: `string` + +##### attributes.type + +> **type**: `string` + +#### type? + +> `optional` **type**: `string` diff --git a/www/content/api/interfaces/JsonApiCreateResourceBody.md b/www/content/api/interfaces/JsonApiCreateResourceBody.md new file mode 100644 index 00000000..cb570c7b --- /dev/null +++ b/www/content/api/interfaces/JsonApiCreateResourceBody.md @@ -0,0 +1,29 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiCreateResourceBody + +# Interface: JsonApiCreateResourceBody + +Defined in: [packages/next-drupal/src/types/resource.ts:29](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L29) + +## Properties + +### data + +> **data**: `object` + +Defined in: [packages/next-drupal/src/types/resource.ts:30](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L30) + +#### attributes? + +> `optional` **attributes**: `Record`\<`string`, `any`\> + +#### relationships? + +> `optional` **relationships**: `Record`\<`string`, [`JsonApiResourceBodyRelationship`](JsonApiResourceBodyRelationship.md)\> + +#### type? + +> `optional` **type**: `string` diff --git a/www/content/api/interfaces/JsonApiError.md b/www/content/api/interfaces/JsonApiError.md new file mode 100644 index 00000000..4cffcd1e --- /dev/null +++ b/www/content/api/interfaces/JsonApiError.md @@ -0,0 +1,57 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiError + +# Interface: JsonApiError + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:2](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L2) + +## Properties + +### code? + +> `optional` **code**: `string` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L5) + +--- + +### detail? + +> `optional` **detail**: `string` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:7](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L7) + +--- + +### id? + +> `optional` **id**: `string` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:3](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L3) + +--- + +### links? + +> `optional` **links**: [`JsonApiLinks`](JsonApiLinks.md) + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:8](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L8) + +--- + +### status? + +> `optional` **status**: `string` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:4](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L4) + +--- + +### title? + +> `optional` **title**: `string` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:6](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L6) diff --git a/www/content/api/interfaces/JsonApiLinks.md b/www/content/api/interfaces/JsonApiLinks.md new file mode 100644 index 00000000..f064fe9b --- /dev/null +++ b/www/content/api/interfaces/JsonApiLinks.md @@ -0,0 +1,13 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiLinks + +# Interface: JsonApiLinks + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:12](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L12) + +## Indexable + +\[`key`: `string`\]: `string` \| `Record`\<`string`, `string`\> diff --git a/www/content/api/interfaces/JsonApiResource.md b/www/content/api/interfaces/JsonApiResource.md new file mode 100644 index 00000000..c56c5015 --- /dev/null +++ b/www/content/api/interfaces/JsonApiResource.md @@ -0,0 +1,57 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiResource + +# Interface: JsonApiResource + +Defined in: [packages/next-drupal/src/types/resource.ts:58](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L58) + +## Extends + +- `Record`\<`string`, `any`\> + +## Extended by + +- [`DrupalBlock`](DrupalBlock.md) +- [`DrupalFile`](DrupalFile.md) +- [`DrupalMedia`](DrupalMedia.md) +- [`DrupalParagraph`](DrupalParagraph.md) +- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.md) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) diff --git a/www/content/api/interfaces/JsonApiResourceBodyRelationship.md b/www/content/api/interfaces/JsonApiResourceBodyRelationship.md new file mode 100644 index 00000000..d3ae59a2 --- /dev/null +++ b/www/content/api/interfaces/JsonApiResourceBodyRelationship.md @@ -0,0 +1,25 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiResourceBodyRelationship + +# Interface: JsonApiResourceBodyRelationship + +Defined in: [packages/next-drupal/src/types/resource.ts:22](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L22) + +## Properties + +### data + +> **data**: `object` + +Defined in: [packages/next-drupal/src/types/resource.ts:23](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L23) + +#### id + +> **id**: `string` + +#### type + +> **type**: `string` diff --git a/www/content/api/interfaces/JsonApiResourceWithPath.md b/www/content/api/interfaces/JsonApiResourceWithPath.md new file mode 100644 index 00000000..423cfee0 --- /dev/null +++ b/www/content/api/interfaces/JsonApiResourceWithPath.md @@ -0,0 +1,79 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiResourceWithPath + +# Interface: JsonApiResourceWithPath + +Defined in: [packages/next-drupal/src/types/resource.ts:65](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L65) + +## Extends + +- [`JsonApiResource`](JsonApiResource.md) + +## Extended by + +- [`DrupalNode`](DrupalNode.md) +- [`DrupalTaxonomyTerm`](DrupalTaxonomyTerm.md) +- [`DrupalUser`](DrupalUser.md) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`id`](JsonApiResource.md#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`langcode`](JsonApiResource.md#langcode) + +--- + +### path + +> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.md) + +Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L66) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`status`](JsonApiResource.md#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.md).[`type`](JsonApiResource.md#type) diff --git a/www/content/api/interfaces/JsonApiResponse.md b/www/content/api/interfaces/JsonApiResponse.md new file mode 100644 index 00000000..d497a03f --- /dev/null +++ b/www/content/api/interfaces/JsonApiResponse.md @@ -0,0 +1,85 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiResponse + +# Interface: JsonApiResponse + +Defined in: [packages/next-drupal/src/types/resource.ts:7](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L7) + +## Extends + +- `Record`\<`string`, `any`\> + +## Extended by + +- [`DrupalSearchApiJsonApiResponse`](DrupalSearchApiJsonApiResponse.md) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### data + +> **data**: `Record`\<`string`, `any`\>[] + +Defined in: [packages/next-drupal/src/types/resource.ts:12](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L12) + +--- + +### errors + +> **errors**: [`JsonApiError`](JsonApiError.md)[] + +Defined in: [packages/next-drupal/src/types/resource.ts:13](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L13) + +--- + +### included? + +> `optional` **included**: `Record`\<`string`, `any`\>[] + +Defined in: [packages/next-drupal/src/types/resource.ts:19](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L19) + +--- + +### jsonapi? + +> `optional` **jsonapi**: `object` + +Defined in: [packages/next-drupal/src/types/resource.ts:8](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L8) + +#### meta + +> **meta**: `Record`\<`string`, `any`\>[] + +#### version + +> **version**: `string` + +--- + +### links? + +> `optional` **links**: [`JsonApiLinks`](JsonApiLinks.md) + +Defined in: [packages/next-drupal/src/types/resource.ts:18](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L18) + +--- + +### meta + +> **meta**: `object` + +Defined in: [packages/next-drupal/src/types/resource.ts:14](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L14) + +#### Index Signature + +\[`key`: `string`\]: `any` + +#### count + +> **count**: `number` diff --git a/www/content/api/interfaces/JsonApiUpdateResourceBody.md b/www/content/api/interfaces/JsonApiUpdateResourceBody.md new file mode 100644 index 00000000..ad4b5342 --- /dev/null +++ b/www/content/api/interfaces/JsonApiUpdateResourceBody.md @@ -0,0 +1,33 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiUpdateResourceBody + +# Interface: JsonApiUpdateResourceBody + +Defined in: [packages/next-drupal/src/types/resource.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L49) + +## Properties + +### data + +> **data**: `object` + +Defined in: [packages/next-drupal/src/types/resource.ts:50](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L50) + +#### attributes? + +> `optional` **attributes**: `Record`\<`string`, `any`\> + +#### id? + +> `optional` **id**: `string` + +#### relationships? + +> `optional` **relationships**: `Record`\<`string`, [`JsonApiResourceBodyRelationship`](JsonApiResourceBodyRelationship.md)\> + +#### type? + +> `optional` **type**: `string` diff --git a/www/content/api/interfaces/Logger.md b/www/content/api/interfaces/Logger.md new file mode 100644 index 00000000..bd5578e3 --- /dev/null +++ b/www/content/api/interfaces/Logger.md @@ -0,0 +1,81 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / Logger + +# Interface: Logger + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:124](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L124) + +## Methods + +### debug() + +> **debug**(`message`): `void` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:127](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L127) + +#### Parameters + +##### message + +`any` + +#### Returns + +`void` + +--- + +### error() + +> **error**(`message`): `void` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:131](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L131) + +#### Parameters + +##### message + +`any` + +#### Returns + +`void` + +--- + +### log() + +> **log**(`message`): `void` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:125](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L125) + +#### Parameters + +##### message + +`any` + +#### Returns + +`void` + +--- + +### warn() + +> **warn**(`message`): `void` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:129](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L129) + +#### Parameters + +##### message + +`any` + +#### Returns + +`void` diff --git a/www/content/api/interfaces/NextDrupalAuthClientIdSecret.md b/www/content/api/interfaces/NextDrupalAuthClientIdSecret.md new file mode 100644 index 00000000..3c42a936 --- /dev/null +++ b/www/content/api/interfaces/NextDrupalAuthClientIdSecret.md @@ -0,0 +1,41 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / NextDrupalAuthClientIdSecret + +# Interface: NextDrupalAuthClientIdSecret + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:101](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L101) + +## Properties + +### clientId + +> **clientId**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L102) + +--- + +### clientSecret + +> **clientSecret**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:103](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L103) + +--- + +### scope? + +> `optional` **scope**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:105](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L105) + +--- + +### url? + +> `optional` **url**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:104](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L104) diff --git a/www/content/api/interfaces/NextDrupalAuthUsernamePassword.md b/www/content/api/interfaces/NextDrupalAuthUsernamePassword.md new file mode 100644 index 00000000..eb4d3233 --- /dev/null +++ b/www/content/api/interfaces/NextDrupalAuthUsernamePassword.md @@ -0,0 +1,25 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / NextDrupalAuthUsernamePassword + +# Interface: NextDrupalAuthUsernamePassword + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:108](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L108) + +## Properties + +### password + +> **password**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:110](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L110) + +--- + +### username + +> **username**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L109) diff --git a/www/content/api/interfaces/Serializer.md b/www/content/api/interfaces/Serializer.md new file mode 100644 index 00000000..7b3bb7a9 --- /dev/null +++ b/www/content/api/interfaces/Serializer.md @@ -0,0 +1,17 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / Serializer + +# Interface: Serializer + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:39](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L39) + +## Properties + +### deserialize + +> **deserialize**: [`JsonDeserializer`](../type-aliases/JsonDeserializer.md) + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:40](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L40) diff --git a/www/content/api/type-aliases/AccessTokenScope.md b/www/content/api/type-aliases/AccessTokenScope.md new file mode 100644 index 00000000..80173509 --- /dev/null +++ b/www/content/api/type-aliases/AccessTokenScope.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / AccessTokenScope + +# Type Alias: AccessTokenScope + +> **AccessTokenScope**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:120](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L120) diff --git a/www/content/api/type-aliases/BaseUrl.md b/www/content/api/type-aliases/BaseUrl.md new file mode 100644 index 00000000..68e67798 --- /dev/null +++ b/www/content/api/type-aliases/BaseUrl.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / BaseUrl + +# Type Alias: BaseUrl + +> **BaseUrl**: `string` + +Defined in: [packages/next-drupal/src/types/options.ts:3](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L3) diff --git a/www/content/api/type-aliases/DrupalClientAuth.md b/www/content/api/type-aliases/DrupalClientAuth.md new file mode 100644 index 00000000..8a1ef6b5 --- /dev/null +++ b/www/content/api/type-aliases/DrupalClientAuth.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalClientAuth + +# Type Alias: DrupalClientAuth + +> **DrupalClientAuth**: [`NextDrupalAuth`](NextDrupalAuth.md) + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:31](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L31) diff --git a/www/content/api/type-aliases/DrupalClientAuthAccessToken.md b/www/content/api/type-aliases/DrupalClientAuthAccessToken.md new file mode 100644 index 00000000..52a6393f --- /dev/null +++ b/www/content/api/type-aliases/DrupalClientAuthAccessToken.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalClientAuthAccessToken + +# Type Alias: DrupalClientAuthAccessToken + +> **DrupalClientAuthAccessToken**: [`NextDrupalAuthAccessToken`](NextDrupalAuthAccessToken.md) + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L37) diff --git a/www/content/api/type-aliases/DrupalClientAuthClientIdSecret.md b/www/content/api/type-aliases/DrupalClientAuthClientIdSecret.md new file mode 100644 index 00000000..44f61fba --- /dev/null +++ b/www/content/api/type-aliases/DrupalClientAuthClientIdSecret.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalClientAuthClientIdSecret + +# Type Alias: DrupalClientAuthClientIdSecret + +> **DrupalClientAuthClientIdSecret**: [`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.md) + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:35](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L35) diff --git a/www/content/api/type-aliases/DrupalClientAuthUsernamePassword.md b/www/content/api/type-aliases/DrupalClientAuthUsernamePassword.md new file mode 100644 index 00000000..b8e5f7cb --- /dev/null +++ b/www/content/api/type-aliases/DrupalClientAuthUsernamePassword.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalClientAuthUsernamePassword + +# Type Alias: DrupalClientAuthUsernamePassword + +> **DrupalClientAuthUsernamePassword**: [`NextDrupalAuthUsernamePassword`](../interfaces/NextDrupalAuthUsernamePassword.md) + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:33](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L33) diff --git a/www/content/api/type-aliases/DrupalClientOptions.md b/www/content/api/type-aliases/DrupalClientOptions.md new file mode 100644 index 00000000..03530f75 --- /dev/null +++ b/www/content/api/type-aliases/DrupalClientOptions.md @@ -0,0 +1,35 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalClientOptions + +# Type Alias: DrupalClientOptions + +> **DrupalClientOptions**: [`NextDrupalOptions`](NextDrupalOptions.md) & `object` + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:9](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L9) + +## Type declaration + +### serializer? + +> `optional` **serializer**: [`Serializer`](../interfaces/Serializer.md) + +Override the default data serializer. You can use this to add your own JSON:API data deserializer. + +- **Default value**: `jsona` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#serializer) + +### useDefaultResourceTypeEntry? + +> `optional` **useDefaultResourceTypeEntry**: `boolean` + +By default, the client will make a request to JSON:API to retrieve the endpoint url. You can turn this off and use the default endpoint based on the resource name. + +- **Default value**: `false` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/configuration#usedefaultresourcetypeentry) diff --git a/www/content/api/type-aliases/DrupalMenuItemId.md b/www/content/api/type-aliases/DrupalMenuItemId.md new file mode 100644 index 00000000..b222a151 --- /dev/null +++ b/www/content/api/type-aliases/DrupalMenuItemId.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalMenuItemId + +# Type Alias: DrupalMenuItemId + +> **DrupalMenuItemId**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L61) diff --git a/www/content/api/type-aliases/DrupalMenuLinkContent.md b/www/content/api/type-aliases/DrupalMenuLinkContent.md new file mode 100644 index 00000000..d629b183 --- /dev/null +++ b/www/content/api/type-aliases/DrupalMenuLinkContent.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalMenuLinkContent + +# Type Alias: DrupalMenuLinkContent + +> **DrupalMenuLinkContent**: [`DrupalMenuItem`](../interfaces/DrupalMenuItem.md) + +Defined in: [packages/next-drupal/src/types/deprecated.ts:6](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/deprecated.ts#L6) diff --git a/www/content/api/type-aliases/DrupalPathAlias.md b/www/content/api/type-aliases/DrupalPathAlias.md new file mode 100644 index 00000000..cc05d14b --- /dev/null +++ b/www/content/api/type-aliases/DrupalPathAlias.md @@ -0,0 +1,25 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalPathAlias + +# Type Alias: DrupalPathAlias + +> **DrupalPathAlias**: `object` + +Defined in: [packages/next-drupal/src/types/drupal.ts:78](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L78) + +## Type declaration + +### alias + +> **alias**: `string` + +### langcode + +> **langcode**: `string` + +### pid + +> **pid**: `number` diff --git a/www/content/api/type-aliases/EndpointSearchParams.md b/www/content/api/type-aliases/EndpointSearchParams.md new file mode 100644 index 00000000..10d9de59 --- /dev/null +++ b/www/content/api/type-aliases/EndpointSearchParams.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / EndpointSearchParams + +# Type Alias: EndpointSearchParams + +> **EndpointSearchParams**: `string` \| `Record`\<`string`, `string`\> \| `URLSearchParams` \| [`JsonApiParams`](JsonApiParams.md) + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:134](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L134) diff --git a/www/content/api/type-aliases/Fetcher.md b/www/content/api/type-aliases/Fetcher.md new file mode 100644 index 00000000..e082176e --- /dev/null +++ b/www/content/api/type-aliases/Fetcher.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / Fetcher + +# Type Alias: Fetcher + +> **Fetcher**: `WindowOrWorkerGlobalScope`\[`"fetch"`\] + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:122](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L122) diff --git a/www/content/api/type-aliases/JsonApiOptions.md b/www/content/api/type-aliases/JsonApiOptions.md new file mode 100644 index 00000000..c0b407ec --- /dev/null +++ b/www/content/api/type-aliases/JsonApiOptions.md @@ -0,0 +1,21 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiOptions + +# Type Alias: JsonApiOptions + +> **JsonApiOptions**: `object` & [`JsonApiWithAuthOption`](JsonApiWithAuthOption.md) & \{ `defaultLocale`: [`Locale`](Locale.md); `locale`: [`Locale`](Locale.md); \} \| \{ `defaultLocale`: `never`; `locale`: `undefined`; \} + +Defined in: [packages/next-drupal/src/types/options.ts:13](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L13) + +## Type declaration + +### deserialize? + +> `optional` **deserialize**: `boolean` + +### params? + +> `optional` **params**: [`JsonApiParams`](JsonApiParams.md) diff --git a/www/content/api/type-aliases/JsonApiParams.md b/www/content/api/type-aliases/JsonApiParams.md new file mode 100644 index 00000000..ddaee4b1 --- /dev/null +++ b/www/content/api/type-aliases/JsonApiParams.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiParams + +# Type Alias: JsonApiParams + +> **JsonApiParams**: `Record`\<`string`, `any`\> + +Defined in: [packages/next-drupal/src/types/options.ts:42](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L42) diff --git a/www/content/api/type-aliases/JsonApiWithAuthOption.md b/www/content/api/type-aliases/JsonApiWithAuthOption.md new file mode 100644 index 00000000..18b867d7 --- /dev/null +++ b/www/content/api/type-aliases/JsonApiWithAuthOption.md @@ -0,0 +1,17 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiWithAuthOption + +# Type Alias: JsonApiWithAuthOption + +> **JsonApiWithAuthOption**: `object` + +Defined in: [packages/next-drupal/src/types/options.ts:28](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L28) + +## Type declaration + +### withAuth? + +> `optional` **withAuth**: `boolean` \| [`NextDrupalAuth`](NextDrupalAuth.md) diff --git a/www/content/api/type-aliases/JsonApiWithCacheOptions.md b/www/content/api/type-aliases/JsonApiWithCacheOptions.md new file mode 100644 index 00000000..203660be --- /dev/null +++ b/www/content/api/type-aliases/JsonApiWithCacheOptions.md @@ -0,0 +1,21 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiWithCacheOptions + +# Type Alias: JsonApiWithCacheOptions + +> **JsonApiWithCacheOptions**: `object` + +Defined in: [packages/next-drupal/src/types/options.ts:32](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L32) + +## Type declaration + +### cacheKey? + +> `optional` **cacheKey**: `string` + +### withCache? + +> `optional` **withCache**: `boolean` diff --git a/www/content/api/type-aliases/JsonApiWithLocaleOptions.md b/www/content/api/type-aliases/JsonApiWithLocaleOptions.md new file mode 100644 index 00000000..e6a109a8 --- /dev/null +++ b/www/content/api/type-aliases/JsonApiWithLocaleOptions.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiWithLocaleOptions + +# Type Alias: JsonApiWithLocaleOptions + +> **JsonApiWithLocaleOptions**: `Omit`\<[`JsonApiOptions`](JsonApiOptions.md), `"withAuth"`\> + +Defined in: [packages/next-drupal/src/types/deprecated.ts:4](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/deprecated.ts#L4) diff --git a/www/content/api/type-aliases/JsonApiWithNextFetchOptions.md b/www/content/api/type-aliases/JsonApiWithNextFetchOptions.md new file mode 100644 index 00000000..4670b330 --- /dev/null +++ b/www/content/api/type-aliases/JsonApiWithNextFetchOptions.md @@ -0,0 +1,17 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonApiWithNextFetchOptions + +# Type Alias: JsonApiWithNextFetchOptions + +> **JsonApiWithNextFetchOptions**: `object` + +Defined in: [packages/next-drupal/src/types/options.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L37) + +## Type declaration + +### next? + +> `optional` **next**: `NextFetchRequestConfig` diff --git a/www/content/api/type-aliases/JsonDeserializer.md b/www/content/api/type-aliases/JsonDeserializer.md new file mode 100644 index 00000000..700f21e6 --- /dev/null +++ b/www/content/api/type-aliases/JsonDeserializer.md @@ -0,0 +1,25 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / JsonDeserializer + +# Type Alias: JsonDeserializer() + +> **JsonDeserializer**: (`body`, `options`?) => `TJsonaModel` \| `TJsonaModel`[] + +Defined in: [packages/next-drupal/src/types/next-drupal.ts:46](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L46) + +## Parameters + +### body + +`Record`\<`string`, `unknown`\> + +### options? + +`Record`\<`string`, `unknown`\> + +## Returns + +`TJsonaModel` \| `TJsonaModel`[] diff --git a/www/content/api/type-aliases/Locale.md b/www/content/api/type-aliases/Locale.md new file mode 100644 index 00000000..15700074 --- /dev/null +++ b/www/content/api/type-aliases/Locale.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / Locale + +# Type Alias: Locale + +> **Locale**: `string` + +Defined in: [packages/next-drupal/src/types/options.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L5) diff --git a/www/content/api/type-aliases/NextDrupalAuth.md b/www/content/api/type-aliases/NextDrupalAuth.md new file mode 100644 index 00000000..0acbaaff --- /dev/null +++ b/www/content/api/type-aliases/NextDrupalAuth.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / NextDrupalAuth + +# Type Alias: NextDrupalAuth + +> **NextDrupalAuth**: [`NextDrupalAuthAccessToken`](NextDrupalAuthAccessToken.md) \| [`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.md) \| [`NextDrupalAuthUsernamePassword`](../interfaces/NextDrupalAuthUsernamePassword.md) \| () => `string` \| `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:92](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L92) diff --git a/www/content/api/type-aliases/NextDrupalAuthAccessToken.md b/www/content/api/type-aliases/NextDrupalAuthAccessToken.md new file mode 100644 index 00000000..f1dd9e7f --- /dev/null +++ b/www/content/api/type-aliases/NextDrupalAuthAccessToken.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / NextDrupalAuthAccessToken + +# Type Alias: NextDrupalAuthAccessToken + +> **NextDrupalAuthAccessToken**: [`AccessToken`](../interfaces/AccessToken.md) + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:99](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L99) diff --git a/www/content/api/type-aliases/NextDrupalBaseOptions.md b/www/content/api/type-aliases/NextDrupalBaseOptions.md new file mode 100644 index 00000000..0d41a092 --- /dev/null +++ b/www/content/api/type-aliases/NextDrupalBaseOptions.md @@ -0,0 +1,109 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / NextDrupalBaseOptions + +# Type Alias: NextDrupalBaseOptions + +> **NextDrupalBaseOptions**: `object` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:3](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L3) + +## Type declaration + +### accessToken? + +> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.md) + +A long-lived access token you can set for the client. + +- **Default value**: `null` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#accesstoken) + +### apiPrefix? + +> `optional` **apiPrefix**: `string` + +Set the JSON:API prefix. + +- **Default value**: `/jsonapi` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#apiprefix) + +### auth? + +> `optional` **auth**: [`NextDrupalAuth`](NextDrupalAuth.md) + +Override the default auth. You can use this to implement your own authentication mechanism. + +[Documentation](https://next-drupal.org/docs/client/configuration#auth) + +### debug? + +> `optional` **debug**: `boolean` + +Set debug to true to enable debug messages. + +- **Default value**: `false` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#debug) + +### fetcher? + +> `optional` **fetcher**: [`Fetcher`](Fetcher.md) + +Override the default fetcher. Use this to add your own fetcher ex. axios. + +- **Default value**: `fetch` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#fetcher) + +### frontPage? + +> `optional` **frontPage**: `string` + +Set the default frontPage. + +- **Default value**: `/home` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#frontpage) + +### headers? + +> `optional` **headers**: `HeadersInit` + +Set custom headers for the fetcher. + +- **Default value**: `{ "Content-Type": "application/vnd.api+json", Accept: "application/vnd.api+json" }` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#headers) + +### logger? + +> `optional` **logger**: [`Logger`](../interfaces/Logger.md) + +Override the default logger. You can use this to send logs to a third-party service. + +- **Default value**: `console` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#logger) + +### withAuth? + +> `optional` **withAuth**: `boolean` + +Set whether the client should use authenticated requests by default. + +- **Default value**: `true` +- **Required**: \*_No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#withauth) diff --git a/www/content/api/type-aliases/NextDrupalOptions.md b/www/content/api/type-aliases/NextDrupalOptions.md new file mode 100644 index 00000000..50f1be9d --- /dev/null +++ b/www/content/api/type-aliases/NextDrupalOptions.md @@ -0,0 +1,57 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / NextDrupalOptions + +# Type Alias: NextDrupalOptions + +> **NextDrupalOptions**: [`NextDrupalBaseOptions`](NextDrupalBaseOptions.md) & `object` + +Defined in: [packages/next-drupal/src/types/next-drupal.ts:4](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L4) + +## Type declaration + +### cache? + +> `optional` **cache**: [`DataCache`](../interfaces/DataCache.md) + +Override the default cache. + +- **Default value**: `node-cache` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#cache) + +### deserializer? + +> `optional` **deserializer**: [`JsonDeserializer`](JsonDeserializer.md) + +Override the default data deserializer. You can use this to add your own JSON:API data deserializer. + +- **Default value**: `(new jsona()).deserialize` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#deserializer) + +### throwJsonApiErrors? + +> `optional` **throwJsonApiErrors**: `boolean` + +If set to true, JSON:API errors are thrown in non-production environments. The errors are shown in the Next.js overlay. + +**Default value**: `true` +**Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#throwjsonapierrors) + +### useDefaultEndpoints? + +> `optional` **useDefaultEndpoints**: `boolean` + +By default, the resource endpoint will be based on the resource name. If you turn this off, a JSON:API request will retrieve the resource's endpoint url. + +- **Default value**: `true` +- **Required**: _No_ + +[Documentation](https://next-drupal.org/docs/client/configuration#usedefaultendpoints) diff --git a/www/content/api/type-aliases/PathPrefix.md b/www/content/api/type-aliases/PathPrefix.md new file mode 100644 index 00000000..f4e994c5 --- /dev/null +++ b/www/content/api/type-aliases/PathPrefix.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / PathPrefix + +# Type Alias: PathPrefix + +> **PathPrefix**: `string` + +Defined in: [packages/next-drupal/src/types/options.ts:7](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L7) diff --git a/www/content/api/variables/DRAFT_DATA_COOKIE_NAME.md b/www/content/api/variables/DRAFT_DATA_COOKIE_NAME.md new file mode 100644 index 00000000..07999cc9 --- /dev/null +++ b/www/content/api/variables/DRAFT_DATA_COOKIE_NAME.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DRAFT_DATA_COOKIE_NAME + +# Variable: DRAFT_DATA_COOKIE_NAME + +> `const` **DRAFT_DATA_COOKIE_NAME**: `"next_drupal_draft_data"` = `"next_drupal_draft_data"` + +Defined in: [packages/next-drupal/src/draft-constants.ts:1](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/draft-constants.ts#L1) diff --git a/www/content/api/variables/DRAFT_MODE_COOKIE_NAME.md b/www/content/api/variables/DRAFT_MODE_COOKIE_NAME.md new file mode 100644 index 00000000..3f211cba --- /dev/null +++ b/www/content/api/variables/DRAFT_MODE_COOKIE_NAME.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DRAFT_MODE_COOKIE_NAME + +# Variable: DRAFT_MODE_COOKIE_NAME + +> `const` **DRAFT_MODE_COOKIE_NAME**: `"__prerender_bypass"` = `"__prerender_bypass"` + +Defined in: [packages/next-drupal/src/draft-constants.ts:4](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/draft-constants.ts#L4) diff --git a/www/content/api/variables/DrupalClient.md b/www/content/api/variables/DrupalClient.md new file mode 100644 index 00000000..1597cb3b --- /dev/null +++ b/www/content/api/variables/DrupalClient.md @@ -0,0 +1,11 @@ +[**next-drupal**](../README.md) + +--- + +[next-drupal](../globals.md) / DrupalClient + +# Variable: DrupalClient + +> `const` **DrupalClient**: _typeof_ [`NextDrupalPages`](../classes/NextDrupalPages.md) = `NextDrupalPages` + +Defined in: [packages/next-drupal/src/deprecated.ts:2](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated.ts#L2) diff --git a/www/package.json b/www/package.json index 1d0c3cb5..73db9260 100644 --- a/www/package.json +++ b/www/package.json @@ -9,7 +9,7 @@ "dev": "next dev -p 4444", "build": "next build", "preview": "next build && next start -p 4444", - "generate:docs": "typedoc --out content/api ../packages/next-drupal/src" + "generate:docs": "typedoc --tsconfig tsconfig.docs.json" }, "dependencies": { "@docsearch/react": "^3.6.0", @@ -25,8 +25,8 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "sharp": "^0.30.7", - "typedoc": "^0.23.9", - "typedoc-plugin-markdown": "^3.11.0" + "typedoc": "^0.27", + "typedoc-plugin-markdown": "^4.4" }, "devDependencies": { "@mapbox/rehype-prism": "^0.8.0", diff --git a/www/tsconfig.docs.json b/www/tsconfig.docs.json new file mode 100644 index 00000000..d4dc75ac --- /dev/null +++ b/www/tsconfig.docs.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es2020", + "moduleResolution": "node", + "esModuleInterop": true, + "skipLibCheck": true + }, + "include": ["../packages/next-drupal/src/**/*"], + "exclude": ["node_modules"] +} diff --git a/www/typedoc.json b/www/typedoc.json index a0533d78..12226f58 100644 --- a/www/typedoc.json +++ b/www/typedoc.json @@ -1,5 +1,5 @@ { - "entryPoints": ["../packages/next-drupal/src"], - "out": "content/api", - "plugin": ["typedoc-plugin-markdown"] + "plugin": ["typedoc-plugin-markdown"], + "entryPoints": ["../packages/next-drupal/src/index.ts"], + "out": "content/api" } diff --git a/yarn.lock b/yarn.lock index c62f6b47..e72e619e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1648,6 +1648,15 @@ resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d" integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA== +"@gerrit0/mini-shiki@^1.24.0": + version "1.26.1" + resolved "https://registry.yarnpkg.com/@gerrit0/mini-shiki/-/mini-shiki-1.26.1.tgz#b59884bd6013976ca66dec197492a1387fdbea52" + integrity sha512-gHFUvv9f1fU2Piou/5Y7Sx5moYxcERbC7CXc6rkDLQTUBg5Dgg9L4u29/nHqfoQ3Y9R0h0BcOhd14uOEZIBP7Q== + dependencies: + "@shikijs/engine-oniguruma" "^1.26.1" + "@shikijs/types" "^1.26.1" + "@shikijs/vscode-textmate" "^10.0.1" + "@hapi/hoek@^9.0.0", "@hapi/hoek@^9.3.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" @@ -2549,6 +2558,27 @@ resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.10.2.tgz#053f1540703faa81dea2966b768ee5581c66aeda" integrity sha512-hw437iINopmQuxWPSUEvqE56NCPsiU8N4AYtfHmJFckclktzK9YQJieD3XkDCDH4OjL+C7zgPUh73R/nrcHrqw== +"@shikijs/engine-oniguruma@^1.26.1": + version "1.26.2" + resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.26.2.tgz#a8a37ef33624dee783e79f7756ef1d0a2b907639" + integrity sha512-mlN7Qrs+w60nKrd7at7XkXSwz6728Pe34taDmHrG6LRHjzCqQ+ysg+/AT6/D2LMk0s2lsr71DjpI73430QP4/w== + dependencies: + "@shikijs/types" "1.26.2" + "@shikijs/vscode-textmate" "^10.0.1" + +"@shikijs/types@1.26.2", "@shikijs/types@^1.26.1": + version "1.26.2" + resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.26.2.tgz#6180cdb5023d21dfe2d2bd784afdfab4e2bce776" + integrity sha512-PO2jucx2FIdlLBPYbIUlMtWSLs5ulcRcuV93cR3T65lkK5SJP4MGBRt9kmWGXiQc0f7+FHj/0BEawditZcI/fQ== + dependencies: + "@shikijs/vscode-textmate" "^10.0.1" + "@types/hast" "^3.0.4" + +"@shikijs/vscode-textmate@^10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@shikijs/vscode-textmate/-/vscode-textmate-10.0.1.tgz#d06d45b67ac5e9b0088e3f67ebd3f25c6c3d711a" + integrity sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg== + "@sideway/address@^4.1.5": version "4.1.5" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.5.tgz#4bc149a0076623ced99ca8208ba780d65a99b9d5" @@ -2867,6 +2897,13 @@ dependencies: "@types/unist" "^2" +"@types/hast@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa" + integrity sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ== + dependencies: + "@types/unist" "*" + "@types/hoist-non-react-statics@^3.3.1": version "3.3.5" resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz#dab7867ef789d87e2b4b0003c9d65c49cc44a494" @@ -2996,6 +3033,11 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== +"@types/unist@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c" + integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== + "@types/unist@^2", "@types/unist@^2.0.0", "@types/unist@^2.0.2", "@types/unist@^2.0.3": version "2.0.10" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.10.tgz#04ffa7f406ab628f7f7e97ca23e290cd8ab15efc" @@ -3341,11 +3383,6 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-sequence-parser@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz#e0aa1cdcbc8f8bb0b5bca625aac41f5f056973cf" - integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== - ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -5243,7 +5280,7 @@ enquirer@~2.3.6: dependencies: ansi-colors "^4.1.1" -entities@^4.2.0, entities@^4.5.0: +entities@^4.2.0, entities@^4.4.0, entities@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== @@ -8215,11 +8252,6 @@ jsonc-parser@^3.0.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== -jsonc-parser@^3.2.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" - integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -8475,6 +8507,13 @@ lines-and-columns@~2.0.3: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.4.tgz#d00318855905d2660d8c0822e3f5a4715855fc42" integrity sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A== +linkify-it@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-5.0.0.tgz#9ef238bfa6dc70bd8e7f9572b52d369af569b421" + integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ== + dependencies: + uc.micro "^2.0.0" + lint-staged@^15.2.2: version "15.2.2" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.2.tgz#ad7cbb5b3ab70e043fa05bff82a09ed286bc4c5f" @@ -8876,10 +8915,17 @@ markdown-escapes@^1.0.0: resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.4.tgz#c95415ef451499d7602b91095f3c8e8975f78535" integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg== -marked@^4.2.12: - version "4.3.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" - integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== +markdown-it@^14.1.0: + version "14.1.0" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-14.1.0.tgz#3c3c5992883c633db4714ccb4d7b5935d98b7d45" + integrity sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== + dependencies: + argparse "^2.0.1" + entities "^4.4.0" + linkify-it "^5.0.0" + mdurl "^2.0.0" + punycode.js "^2.3.1" + uc.micro "^2.1.0" mdast-squeeze-paragraphs@^4.0.0: version "4.0.0" @@ -8960,6 +9006,11 @@ mdurl@^1.0.0: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== +mdurl@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0" + integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== + memoize-one@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-4.1.0.tgz#a2387c58c03fff27ca390c31b764a79addf3f906" @@ -9090,13 +9141,6 @@ minimatch@^5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^7.1.3: - version "7.4.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.6.tgz#845d6f254d8f4a5e4fd6baf44d5f10c8448365fb" - integrity sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw== - dependencies: - brace-expansion "^2.0.1" - minimatch@^8.0.2: version "8.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-8.0.4.tgz#847c1b25c014d4e9a7f68aaf63dedd668a626229" @@ -9111,6 +9155,13 @@ minimatch@^9.0.0, minimatch@^9.0.1, minimatch@^9.0.3, minimatch@^9.0.4: dependencies: brace-expansion "^2.0.1" +minimatch@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -10633,6 +10684,11 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +punycode.js@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" + integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== + punycode@^2.1.0, punycode@^2.1.1: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" @@ -11453,16 +11509,6 @@ shiki@^0.11.1: vscode-oniguruma "^1.6.1" vscode-textmate "^6.0.0" -shiki@^0.14.1: - version "0.14.7" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.7.tgz#c3c9e1853e9737845f1d2ef81b31bcfb07056d4e" - integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg== - dependencies: - ansi-sequence-parser "^1.1.0" - jsonc-parser "^3.2.0" - vscode-oniguruma "^1.7.0" - vscode-textmate "^8.0.0" - side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" @@ -12625,28 +12671,32 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typedoc-plugin-markdown@^3.11.0: - version "3.17.1" - resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.17.1.tgz#c33f42363c185adf842f4699166015f7fe0ed02b" - integrity sha512-QzdU3fj0Kzw2XSdoL15ExLASt2WPqD7FbLeaqwT70+XjKyTshBnUlQA5nNREO1C2P8Uen0CDjsBLMsCQ+zd0lw== - dependencies: - handlebars "^4.7.7" +typedoc-plugin-markdown@^4.4: + version "4.4.1" + resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.4.1.tgz#f57266fa6916cb3837a9c84f59f3aaced309be9a" + integrity sha512-fx23nSCvewI9IR8lzIYtzDphETcgTDuxKcmHKGD4lo36oexC+B1k4NaCOY58Snqb4OlE8OXDAGVcQXYYuLRCNw== -typedoc@^0.23.9: - version "0.23.28" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.23.28.tgz#3ce9c36ef1c273fa849d2dea18651855100d3ccd" - integrity sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w== +typedoc@^0.27: + version "0.27.6" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.27.6.tgz#7e8d067bd5386b7908afcb12c9054a83e8bb326b" + integrity sha512-oBFRoh2Px6jFx366db0lLlihcalq/JzyCVp7Vaq1yphL/tbgx2e+bkpkCgJPunaPvPwoTOXSwasfklWHm7GfAw== dependencies: + "@gerrit0/mini-shiki" "^1.24.0" lunr "^2.3.9" - marked "^4.2.12" - minimatch "^7.1.3" - shiki "^0.14.1" + markdown-it "^14.1.0" + minimatch "^9.0.5" + yaml "^2.6.1" "typescript@>=3 < 6", typescript@^5.4.5: version "5.4.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== +uc.micro@^2.0.0, uc.micro@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" + integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== + uglify-js@^3.1.4: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" @@ -13046,7 +13096,7 @@ void-elements@3.1.0: resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09" integrity sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w== -vscode-oniguruma@^1.6.1, vscode-oniguruma@^1.7.0: +vscode-oniguruma@^1.6.1: version "1.7.0" resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== @@ -13056,11 +13106,6 @@ vscode-textmate@^6.0.0: resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-6.0.0.tgz#a3777197235036814ac9a92451492f2748589210" integrity sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ== -vscode-textmate@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" - integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== - wait-on@7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-7.2.0.tgz#d76b20ed3fc1e2bebc051fae5c1ff93be7892928" @@ -13397,6 +13442,11 @@ yaml@^2.0.0-1, yaml@^2.3.4, yaml@^2.4.1: resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.1.tgz#2e57e0b5e995292c25c75d2658f0664765210eed" integrity sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg== +yaml@^2.6.1: + version "2.7.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.7.0.tgz#aef9bb617a64c937a9a748803786ad8d3ffe1e98" + integrity sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA== + yargs-parser@21.1.1, yargs-parser@^21.0.1, yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" From 1468bce278c437ef90bedf1a28bf72f287592ccb Mon Sep 17 00:00:00 2001 From: Brian Perry Date: Mon, 13 Jan 2025 11:54:22 -0600 Subject: [PATCH 4/4] feat: include autogenerated API reference in docs site --- www/config/docs.ts | 9 + www/content/api/functions/getAccessToken.md | 15 - .../api/functions/syncDrupalPreviewRoutes.md | 21 -- www/content/api/globals.md | 107 ------ www/content/api/interfaces/AccessToken.md | 41 -- www/content/api/interfaces/DrupalBlock.md | 73 ---- www/content/api/interfaces/DrupalFile.md | 137 ------- www/content/api/interfaces/DrupalFileMeta.md | 41 -- www/content/api/interfaces/DrupalMedia.md | 105 ------ www/content/api/interfaces/DrupalMenuItem.md | 137 ------- www/content/api/interfaces/DrupalNode.md | 133 ------- www/content/api/interfaces/DrupalParagraph.md | 81 ---- .../DrupalSearchApiJsonApiResponse.md | 109 ------ .../api/interfaces/DrupalTaxonomyTerm.md | 125 ------- www/content/api/interfaces/DrupalUser.md | 117 ------ www/content/api/interfaces/DrupalView.md | 53 --- www/content/api/interfaces/JsonApiError.md | 57 --- www/content/api/interfaces/JsonApiLinks.md | 13 - www/content/api/interfaces/JsonApiResource.md | 57 --- .../JsonApiResourceBodyRelationship.md | 25 -- .../api/interfaces/JsonApiResourceWithPath.md | 79 ---- .../NextDrupalAuthClientIdSecret.md | 41 -- .../NextDrupalAuthUsernamePassword.md | 25 -- www/content/api/interfaces/Serializer.md | 17 - .../api/type-aliases/AccessTokenScope.md | 11 - www/content/api/type-aliases/BaseUrl.md | 11 - .../api/type-aliases/DrupalClientAuth.md | 11 - .../DrupalClientAuthAccessToken.md | 11 - .../DrupalClientAuthClientIdSecret.md | 11 - .../DrupalClientAuthUsernamePassword.md | 11 - .../api/type-aliases/DrupalMenuItemId.md | 11 - .../api/type-aliases/DrupalMenuLinkContent.md | 11 - www/content/api/type-aliases/Fetcher.md | 11 - .../api/type-aliases/JsonApiOptions.md | 21 -- www/content/api/type-aliases/JsonApiParams.md | 11 - .../type-aliases/JsonApiWithLocaleOptions.md | 11 - www/content/api/type-aliases/Locale.md | 11 - .../api/type-aliases/NextDrupalAuth.md | 11 - .../type-aliases/NextDrupalAuthAccessToken.md | 11 - www/content/api/type-aliases/PathPrefix.md | 11 - .../api/variables/DRAFT_DATA_COOKIE_NAME.md | 11 - .../api/variables/DRAFT_MODE_COOKIE_NAME.md | 11 - www/content/api/variables/DrupalClient.md | 11 - .../{api/README.md => docs/api/README.mdx} | 10 +- .../api/classes/JsonApiErrors.mdx} | 26 +- .../api/classes/NextDrupal.mdx} | 256 +++++++------ .../api/classes/NextDrupalBase.mdx} | 104 +++-- .../api/classes/NextDrupalPages.mdx} | 354 +++++++++--------- .../api/functions/DrupalPreview.mdx} | 8 +- .../api/functions/PreviewHandler.mdx} | 8 +- .../api/functions/buildUrl.mdx} | 8 +- .../api/functions/deserialize.mdx} | 8 +- .../docs/api/functions/getAccessToken.mdx | 11 + .../api/functions/getJsonApiIndex.mdx} | 10 +- .../getJsonApiPathForResourceType.mdx} | 8 +- .../api/functions/getMenu.mdx} | 12 +- .../api/functions/getPathsFromContext.mdx} | 12 +- .../api/functions/getResource.mdx} | 12 +- .../api/functions/getResourceByPath.mdx} | 12 +- .../api/functions/getResourceCollection.mdx} | 12 +- .../getResourceCollectionFromContext.mdx} | 12 +- .../api/functions/getResourceFromContext.mdx} | 14 +- .../api/functions/getResourcePreviewUrl.mdx} | 8 +- .../functions/getResourceTypeFromContext.mdx} | 10 +- .../api/functions/getSearchIndex.mdx} | 12 +- .../functions/getSearchIndexFromContext.mdx} | 12 +- .../api/functions/getView.mdx} | 10 +- .../api/functions/isAccessTokenAuth.mdx} | 10 +- .../api/functions/isBasicAuth.mdx} | 10 +- .../api/functions/isClientIdSecretAuth.mdx} | 10 +- .../api/functions/syncDrupalPreviewRoutes.mdx | 17 + .../api/functions/translatePath.mdx} | 14 +- .../functions/translatePathFromContext.mdx} | 14 +- .../api/functions/useJsonaDeserialize.mdx} | 8 +- www/content/docs/api/globals.mdx | 103 +++++ .../docs/api/interfaces/AccessToken.mdx | 37 ++ .../api/interfaces/DataCache.mdx} | 14 +- .../docs/api/interfaces/DrupalBlock.mdx | 69 ++++ .../docs/api/interfaces/DrupalFile.mdx | 133 +++++++ .../docs/api/interfaces/DrupalFileMeta.mdx | 37 ++ .../docs/api/interfaces/DrupalMedia.mdx | 101 +++++ .../docs/api/interfaces/DrupalMenuItem.mdx | 133 +++++++ .../docs/api/interfaces/DrupalNode.mdx | 129 +++++++ .../docs/api/interfaces/DrupalParagraph.mdx | 77 ++++ .../api/interfaces/DrupalSearchApiFacet.mdx} | 16 +- .../DrupalSearchApiJsonApiResponse.mdx | 105 ++++++ .../api/interfaces/DrupalTaxonomyTerm.mdx | 121 ++++++ .../api/interfaces/DrupalTranslatedPath.mdx} | 22 +- .../docs/api/interfaces/DrupalUser.mdx | 113 ++++++ .../docs/api/interfaces/DrupalView.mdx | 49 +++ .../api/interfaces/FetchOptions.mdx} | 12 +- .../JsonApiCreateFileResourceBody.mdx} | 10 +- .../interfaces/JsonApiCreateResourceBody.mdx} | 12 +- .../docs/api/interfaces/JsonApiError.mdx | 53 +++ .../docs/api/interfaces/JsonApiLinks.mdx | 9 + .../docs/api/interfaces/JsonApiResource.mdx | 53 +++ .../JsonApiResourceBodyRelationship.mdx | 21 ++ .../interfaces/JsonApiResourceWithPath.mdx | 75 ++++ .../api/interfaces/JsonApiResponse.mdx} | 26 +- .../interfaces/JsonApiUpdateResourceBody.mdx} | 12 +- .../api/interfaces/Logger.mdx} | 16 +- .../NextDrupalAuthClientIdSecret.mdx | 37 ++ .../NextDrupalAuthUsernamePassword.mdx | 21 ++ .../docs/api/interfaces/Serializer.mdx | 13 + .../api/type-aliases/AccessTokenScope.mdx | 7 + www/content/docs/api/type-aliases/BaseUrl.mdx | 7 + .../api/type-aliases/DrupalClientAuth.mdx | 7 + .../DrupalClientAuthAccessToken.mdx | 7 + .../DrupalClientAuthClientIdSecret.mdx | 7 + .../DrupalClientAuthUsernamePassword.mdx | 7 + .../api/type-aliases/DrupalClientOptions.mdx} | 12 +- .../api/type-aliases/DrupalMenuItemId.mdx | 7 + .../type-aliases/DrupalMenuLinkContent.mdx | 7 + .../api/type-aliases/DrupalPathAlias.mdx} | 8 +- .../type-aliases/EndpointSearchParams.mdx} | 10 +- www/content/docs/api/type-aliases/Fetcher.mdx | 7 + .../docs/api/type-aliases/JsonApiOptions.mdx | 17 + .../docs/api/type-aliases/JsonApiParams.mdx | 7 + .../type-aliases/JsonApiWithAuthOption.mdx} | 10 +- .../type-aliases/JsonApiWithCacheOptions.mdx} | 8 +- .../type-aliases/JsonApiWithLocaleOptions.mdx | 7 + .../JsonApiWithNextFetchOptions.mdx} | 8 +- .../api/type-aliases/JsonDeserializer.mdx} | 8 +- www/content/docs/api/type-aliases/Locale.mdx | 7 + .../docs/api/type-aliases/NextDrupalAuth.mdx | 7 + .../NextDrupalAuthAccessToken.mdx | 7 + .../type-aliases/NextDrupalBaseOptions.mdx} | 16 +- .../api/type-aliases/NextDrupalOptions.mdx} | 14 +- .../docs/api/type-aliases/PathPrefix.mdx | 7 + .../api/variables/DRAFT_DATA_COOKIE_NAME.mdx | 7 + .../api/variables/DRAFT_MODE_COOKIE_NAME.mdx | 7 + .../docs/api/variables/DrupalClient.mdx | 7 + www/next.config.js | 5 + www/package.json | 10 +- www/typedoc.json | 4 +- 135 files changed, 2209 insertions(+), 2545 deletions(-) delete mode 100644 www/content/api/functions/getAccessToken.md delete mode 100644 www/content/api/functions/syncDrupalPreviewRoutes.md delete mode 100644 www/content/api/globals.md delete mode 100644 www/content/api/interfaces/AccessToken.md delete mode 100644 www/content/api/interfaces/DrupalBlock.md delete mode 100644 www/content/api/interfaces/DrupalFile.md delete mode 100644 www/content/api/interfaces/DrupalFileMeta.md delete mode 100644 www/content/api/interfaces/DrupalMedia.md delete mode 100644 www/content/api/interfaces/DrupalMenuItem.md delete mode 100644 www/content/api/interfaces/DrupalNode.md delete mode 100644 www/content/api/interfaces/DrupalParagraph.md delete mode 100644 www/content/api/interfaces/DrupalSearchApiJsonApiResponse.md delete mode 100644 www/content/api/interfaces/DrupalTaxonomyTerm.md delete mode 100644 www/content/api/interfaces/DrupalUser.md delete mode 100644 www/content/api/interfaces/DrupalView.md delete mode 100644 www/content/api/interfaces/JsonApiError.md delete mode 100644 www/content/api/interfaces/JsonApiLinks.md delete mode 100644 www/content/api/interfaces/JsonApiResource.md delete mode 100644 www/content/api/interfaces/JsonApiResourceBodyRelationship.md delete mode 100644 www/content/api/interfaces/JsonApiResourceWithPath.md delete mode 100644 www/content/api/interfaces/NextDrupalAuthClientIdSecret.md delete mode 100644 www/content/api/interfaces/NextDrupalAuthUsernamePassword.md delete mode 100644 www/content/api/interfaces/Serializer.md delete mode 100644 www/content/api/type-aliases/AccessTokenScope.md delete mode 100644 www/content/api/type-aliases/BaseUrl.md delete mode 100644 www/content/api/type-aliases/DrupalClientAuth.md delete mode 100644 www/content/api/type-aliases/DrupalClientAuthAccessToken.md delete mode 100644 www/content/api/type-aliases/DrupalClientAuthClientIdSecret.md delete mode 100644 www/content/api/type-aliases/DrupalClientAuthUsernamePassword.md delete mode 100644 www/content/api/type-aliases/DrupalMenuItemId.md delete mode 100644 www/content/api/type-aliases/DrupalMenuLinkContent.md delete mode 100644 www/content/api/type-aliases/Fetcher.md delete mode 100644 www/content/api/type-aliases/JsonApiOptions.md delete mode 100644 www/content/api/type-aliases/JsonApiParams.md delete mode 100644 www/content/api/type-aliases/JsonApiWithLocaleOptions.md delete mode 100644 www/content/api/type-aliases/Locale.md delete mode 100644 www/content/api/type-aliases/NextDrupalAuth.md delete mode 100644 www/content/api/type-aliases/NextDrupalAuthAccessToken.md delete mode 100644 www/content/api/type-aliases/PathPrefix.md delete mode 100644 www/content/api/variables/DRAFT_DATA_COOKIE_NAME.md delete mode 100644 www/content/api/variables/DRAFT_MODE_COOKIE_NAME.md delete mode 100644 www/content/api/variables/DrupalClient.md rename www/content/{api/README.md => docs/api/README.mdx} (93%) rename www/content/{api/classes/JsonApiErrors.md => docs/api/classes/JsonApiErrors.mdx} (71%) rename www/content/{api/classes/NextDrupal.md => docs/api/classes/NextDrupal.mdx} (59%) rename www/content/{api/classes/NextDrupalBase.md => docs/api/classes/NextDrupalBase.mdx} (64%) rename www/content/{api/classes/NextDrupalPages.md => docs/api/classes/NextDrupalPages.mdx} (62%) rename www/content/{api/functions/DrupalPreview.md => docs/api/functions/DrupalPreview.mdx} (65%) rename www/content/{api/functions/PreviewHandler.md => docs/api/functions/PreviewHandler.mdx} (64%) rename www/content/{api/functions/buildUrl.md => docs/api/functions/buildUrl.mdx} (56%) rename www/content/{api/functions/deserialize.md => docs/api/functions/deserialize.mdx} (56%) create mode 100644 www/content/docs/api/functions/getAccessToken.mdx rename www/content/{api/functions/getJsonApiIndex.md => docs/api/functions/getJsonApiIndex.mdx} (54%) rename www/content/{api/functions/getJsonApiPathForResourceType.md => docs/api/functions/getJsonApiPathForResourceType.mdx} (56%) rename www/content/{api/functions/getMenu.md => docs/api/functions/getMenu.mdx} (66%) rename www/content/{api/functions/getPathsFromContext.md => docs/api/functions/getPathsFromContext.mdx} (57%) rename www/content/{api/functions/getResource.md => docs/api/functions/getResource.mdx} (64%) rename www/content/{api/functions/getResourceByPath.md => docs/api/functions/getResourceByPath.mdx} (63%) rename www/content/{api/functions/getResourceCollection.md => docs/api/functions/getResourceCollection.mdx} (74%) rename www/content/{api/functions/getResourceCollectionFromContext.md => docs/api/functions/getResourceCollectionFromContext.mdx} (71%) rename www/content/{api/functions/getResourceFromContext.md => docs/api/functions/getResourceFromContext.mdx} (61%) rename www/content/{api/functions/getResourcePreviewUrl.md => docs/api/functions/getResourcePreviewUrl.mdx} (57%) rename www/content/{api/functions/getResourceTypeFromContext.md => docs/api/functions/getResourceTypeFromContext.mdx} (57%) rename www/content/{api/functions/getSearchIndex.md => docs/api/functions/getSearchIndex.mdx} (64%) rename www/content/{api/functions/getSearchIndexFromContext.md => docs/api/functions/getSearchIndexFromContext.mdx} (66%) rename www/content/{api/functions/getView.md => docs/api/functions/getView.mdx} (72%) rename www/content/{api/functions/isAccessTokenAuth.md => docs/api/functions/isAccessTokenAuth.mdx} (59%) rename www/content/{api/functions/isBasicAuth.md => docs/api/functions/isBasicAuth.mdx} (60%) rename www/content/{api/functions/isClientIdSecretAuth.md => docs/api/functions/isClientIdSecretAuth.mdx} (62%) create mode 100644 www/content/docs/api/functions/syncDrupalPreviewRoutes.mdx rename www/content/{api/functions/translatePath.md => docs/api/functions/translatePath.mdx} (50%) rename www/content/{api/functions/translatePathFromContext.md => docs/api/functions/translatePathFromContext.mdx} (61%) rename www/content/{api/functions/useJsonaDeserialize.md => docs/api/functions/useJsonaDeserialize.mdx} (62%) create mode 100644 www/content/docs/api/globals.mdx create mode 100644 www/content/docs/api/interfaces/AccessToken.mdx rename www/content/{api/interfaces/DataCache.md => docs/api/interfaces/DataCache.mdx} (57%) create mode 100644 www/content/docs/api/interfaces/DrupalBlock.mdx create mode 100644 www/content/docs/api/interfaces/DrupalFile.mdx create mode 100644 www/content/docs/api/interfaces/DrupalFileMeta.mdx create mode 100644 www/content/docs/api/interfaces/DrupalMedia.mdx create mode 100644 www/content/docs/api/interfaces/DrupalMenuItem.mdx create mode 100644 www/content/docs/api/interfaces/DrupalNode.mdx create mode 100644 www/content/docs/api/interfaces/DrupalParagraph.mdx rename www/content/{api/interfaces/DrupalSearchApiFacet.md => docs/api/interfaces/DrupalSearchApiFacet.mdx} (53%) create mode 100644 www/content/docs/api/interfaces/DrupalSearchApiJsonApiResponse.mdx create mode 100644 www/content/docs/api/interfaces/DrupalTaxonomyTerm.mdx rename www/content/{api/interfaces/DrupalTranslatedPath.md => docs/api/interfaces/DrupalTranslatedPath.mdx} (58%) create mode 100644 www/content/docs/api/interfaces/DrupalUser.mdx create mode 100644 www/content/docs/api/interfaces/DrupalView.mdx rename www/content/{api/interfaces/FetchOptions.md => docs/api/interfaces/FetchOptions.mdx} (91%) rename www/content/{api/interfaces/JsonApiCreateFileResourceBody.md => docs/api/interfaces/JsonApiCreateFileResourceBody.mdx} (59%) rename www/content/{api/interfaces/JsonApiCreateResourceBody.md => docs/api/interfaces/JsonApiCreateResourceBody.mdx} (51%) create mode 100644 www/content/docs/api/interfaces/JsonApiError.mdx create mode 100644 www/content/docs/api/interfaces/JsonApiLinks.mdx create mode 100644 www/content/docs/api/interfaces/JsonApiResource.mdx create mode 100644 www/content/docs/api/interfaces/JsonApiResourceBodyRelationship.mdx create mode 100644 www/content/docs/api/interfaces/JsonApiResourceWithPath.mdx rename www/content/{api/interfaces/JsonApiResponse.md => docs/api/interfaces/JsonApiResponse.mdx} (51%) rename www/content/{api/interfaces/JsonApiUpdateResourceBody.md => docs/api/interfaces/JsonApiUpdateResourceBody.mdx} (53%) rename www/content/{api/interfaces/Logger.md => docs/api/interfaces/Logger.mdx} (56%) create mode 100644 www/content/docs/api/interfaces/NextDrupalAuthClientIdSecret.mdx create mode 100644 www/content/docs/api/interfaces/NextDrupalAuthUsernamePassword.mdx create mode 100644 www/content/docs/api/interfaces/Serializer.mdx create mode 100644 www/content/docs/api/type-aliases/AccessTokenScope.mdx create mode 100644 www/content/docs/api/type-aliases/BaseUrl.mdx create mode 100644 www/content/docs/api/type-aliases/DrupalClientAuth.mdx create mode 100644 www/content/docs/api/type-aliases/DrupalClientAuthAccessToken.mdx create mode 100644 www/content/docs/api/type-aliases/DrupalClientAuthClientIdSecret.mdx create mode 100644 www/content/docs/api/type-aliases/DrupalClientAuthUsernamePassword.mdx rename www/content/{api/type-aliases/DrupalClientOptions.md => docs/api/type-aliases/DrupalClientOptions.mdx} (78%) create mode 100644 www/content/docs/api/type-aliases/DrupalMenuItemId.mdx create mode 100644 www/content/docs/api/type-aliases/DrupalMenuLinkContent.mdx rename www/content/{api/type-aliases/DrupalPathAlias.md => docs/api/type-aliases/DrupalPathAlias.mdx} (54%) rename www/content/{api/type-aliases/EndpointSearchParams.md => docs/api/type-aliases/EndpointSearchParams.mdx} (53%) create mode 100644 www/content/docs/api/type-aliases/Fetcher.mdx create mode 100644 www/content/docs/api/type-aliases/JsonApiOptions.mdx create mode 100644 www/content/docs/api/type-aliases/JsonApiParams.mdx rename www/content/{api/type-aliases/JsonApiWithAuthOption.md => docs/api/type-aliases/JsonApiWithAuthOption.mdx} (51%) rename www/content/{api/type-aliases/JsonApiWithCacheOptions.md => docs/api/type-aliases/JsonApiWithCacheOptions.mdx} (55%) create mode 100644 www/content/docs/api/type-aliases/JsonApiWithLocaleOptions.mdx rename www/content/{api/type-aliases/JsonApiWithNextFetchOptions.md => docs/api/type-aliases/JsonApiWithNextFetchOptions.mdx} (51%) rename www/content/{api/type-aliases/JsonDeserializer.md => docs/api/type-aliases/JsonDeserializer.mdx} (61%) create mode 100644 www/content/docs/api/type-aliases/Locale.mdx create mode 100644 www/content/docs/api/type-aliases/NextDrupalAuth.mdx create mode 100644 www/content/docs/api/type-aliases/NextDrupalAuthAccessToken.mdx rename www/content/{api/type-aliases/NextDrupalBaseOptions.md => docs/api/type-aliases/NextDrupalBaseOptions.mdx} (84%) rename www/content/{api/type-aliases/NextDrupalOptions.md => docs/api/type-aliases/NextDrupalOptions.mdx} (85%) create mode 100644 www/content/docs/api/type-aliases/PathPrefix.mdx create mode 100644 www/content/docs/api/variables/DRAFT_DATA_COOKIE_NAME.mdx create mode 100644 www/content/docs/api/variables/DRAFT_MODE_COOKIE_NAME.mdx create mode 100644 www/content/docs/api/variables/DrupalClient.mdx diff --git a/www/config/docs.ts b/www/config/docs.ts index 1bdbed9d..86275016 100644 --- a/www/config/docs.ts +++ b/www/config/docs.ts @@ -117,6 +117,15 @@ export const docsConfig: DocsConfig = { }, ], }, + { + title: "API", + items: [ + { + title: "API Reference", + href: "/docs/api/globals", + }, + ], + }, { title: "Reference", items: [ diff --git a/www/content/api/functions/getAccessToken.md b/www/content/api/functions/getAccessToken.md deleted file mode 100644 index 72665187..00000000 --- a/www/content/api/functions/getAccessToken.md +++ /dev/null @@ -1,15 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getAccessToken - -# Function: getAccessToken() - -> **getAccessToken**(): `Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> - -Defined in: [packages/next-drupal/src/deprecated/get-access-token.ts:6](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-access-token.ts#L6) - -## Returns - -`Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> diff --git a/www/content/api/functions/syncDrupalPreviewRoutes.md b/www/content/api/functions/syncDrupalPreviewRoutes.md deleted file mode 100644 index 4d296452..00000000 --- a/www/content/api/functions/syncDrupalPreviewRoutes.md +++ /dev/null @@ -1,21 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / syncDrupalPreviewRoutes - -# Function: syncDrupalPreviewRoutes() - -> **syncDrupalPreviewRoutes**(`path`): `void` - -Defined in: [packages/next-drupal/src/deprecated/utils.ts:128](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/utils.ts#L128) - -## Parameters - -### path - -`any` - -## Returns - -`void` diff --git a/www/content/api/globals.md b/www/content/api/globals.md deleted file mode 100644 index 2af23eb0..00000000 --- a/www/content/api/globals.md +++ /dev/null @@ -1,107 +0,0 @@ -[**next-drupal**](README.md) - ---- - -# next-drupal - -## Classes - -- [JsonApiErrors](classes/JsonApiErrors.md) -- [NextDrupal](classes/NextDrupal.md) -- [NextDrupalBase](classes/NextDrupalBase.md) -- [NextDrupalPages](classes/NextDrupalPages.md) - -## Interfaces - -- [AccessToken](interfaces/AccessToken.md) -- [DataCache](interfaces/DataCache.md) -- [DrupalBlock](interfaces/DrupalBlock.md) -- [DrupalFile](interfaces/DrupalFile.md) -- [DrupalFileMeta](interfaces/DrupalFileMeta.md) -- [DrupalMedia](interfaces/DrupalMedia.md) -- [DrupalMenuItem](interfaces/DrupalMenuItem.md) -- [DrupalNode](interfaces/DrupalNode.md) -- [DrupalParagraph](interfaces/DrupalParagraph.md) -- [DrupalSearchApiFacet](interfaces/DrupalSearchApiFacet.md) -- [DrupalSearchApiJsonApiResponse](interfaces/DrupalSearchApiJsonApiResponse.md) -- [DrupalTaxonomyTerm](interfaces/DrupalTaxonomyTerm.md) -- [DrupalTranslatedPath](interfaces/DrupalTranslatedPath.md) -- [DrupalUser](interfaces/DrupalUser.md) -- [DrupalView](interfaces/DrupalView.md) -- [FetchOptions](interfaces/FetchOptions.md) -- [JsonApiCreateFileResourceBody](interfaces/JsonApiCreateFileResourceBody.md) -- [JsonApiCreateResourceBody](interfaces/JsonApiCreateResourceBody.md) -- [JsonApiError](interfaces/JsonApiError.md) -- [JsonApiLinks](interfaces/JsonApiLinks.md) -- [JsonApiResource](interfaces/JsonApiResource.md) -- [JsonApiResourceBodyRelationship](interfaces/JsonApiResourceBodyRelationship.md) -- [JsonApiResourceWithPath](interfaces/JsonApiResourceWithPath.md) -- [JsonApiResponse](interfaces/JsonApiResponse.md) -- [JsonApiUpdateResourceBody](interfaces/JsonApiUpdateResourceBody.md) -- [Logger](interfaces/Logger.md) -- [NextDrupalAuthClientIdSecret](interfaces/NextDrupalAuthClientIdSecret.md) -- [NextDrupalAuthUsernamePassword](interfaces/NextDrupalAuthUsernamePassword.md) -- [Serializer](interfaces/Serializer.md) - -## Type Aliases - -- [AccessTokenScope](type-aliases/AccessTokenScope.md) -- [BaseUrl](type-aliases/BaseUrl.md) -- [DrupalClientAuth](type-aliases/DrupalClientAuth.md) -- [DrupalClientAuthAccessToken](type-aliases/DrupalClientAuthAccessToken.md) -- [DrupalClientAuthClientIdSecret](type-aliases/DrupalClientAuthClientIdSecret.md) -- [DrupalClientAuthUsernamePassword](type-aliases/DrupalClientAuthUsernamePassword.md) -- [DrupalClientOptions](type-aliases/DrupalClientOptions.md) -- [DrupalMenuItemId](type-aliases/DrupalMenuItemId.md) -- [DrupalMenuLinkContent](type-aliases/DrupalMenuLinkContent.md) -- [DrupalPathAlias](type-aliases/DrupalPathAlias.md) -- [EndpointSearchParams](type-aliases/EndpointSearchParams.md) -- [Fetcher](type-aliases/Fetcher.md) -- [JsonApiOptions](type-aliases/JsonApiOptions.md) -- [JsonApiParams](type-aliases/JsonApiParams.md) -- [JsonApiWithAuthOption](type-aliases/JsonApiWithAuthOption.md) -- [JsonApiWithCacheOptions](type-aliases/JsonApiWithCacheOptions.md) -- [JsonApiWithLocaleOptions](type-aliases/JsonApiWithLocaleOptions.md) -- [JsonApiWithNextFetchOptions](type-aliases/JsonApiWithNextFetchOptions.md) -- [JsonDeserializer](type-aliases/JsonDeserializer.md) -- [Locale](type-aliases/Locale.md) -- [NextDrupalAuth](type-aliases/NextDrupalAuth.md) -- [NextDrupalAuthAccessToken](type-aliases/NextDrupalAuthAccessToken.md) -- [NextDrupalBaseOptions](type-aliases/NextDrupalBaseOptions.md) -- [NextDrupalOptions](type-aliases/NextDrupalOptions.md) -- [PathPrefix](type-aliases/PathPrefix.md) - -## Variables - -- [DRAFT_DATA_COOKIE_NAME](variables/DRAFT_DATA_COOKIE_NAME.md) -- [DRAFT_MODE_COOKIE_NAME](variables/DRAFT_MODE_COOKIE_NAME.md) -- [DrupalClient](variables/DrupalClient.md) - -## Functions - -- [buildUrl](functions/buildUrl.md) -- [deserialize](functions/deserialize.md) -- [DrupalPreview](functions/DrupalPreview.md) -- [getAccessToken](functions/getAccessToken.md) -- [getJsonApiIndex](functions/getJsonApiIndex.md) -- [getJsonApiPathForResourceType](functions/getJsonApiPathForResourceType.md) -- [getMenu](functions/getMenu.md) -- [getPathsFromContext](functions/getPathsFromContext.md) -- [getResource](functions/getResource.md) -- [getResourceByPath](functions/getResourceByPath.md) -- [getResourceCollection](functions/getResourceCollection.md) -- [getResourceCollectionFromContext](functions/getResourceCollectionFromContext.md) -- [getResourceFromContext](functions/getResourceFromContext.md) -- [getResourcePreviewUrl](functions/getResourcePreviewUrl.md) -- [getResourceTypeFromContext](functions/getResourceTypeFromContext.md) -- [getSearchIndex](functions/getSearchIndex.md) -- [getSearchIndexFromContext](functions/getSearchIndexFromContext.md) -- [getView](functions/getView.md) -- [isAccessTokenAuth](functions/isAccessTokenAuth.md) -- [isBasicAuth](functions/isBasicAuth.md) -- [isClientIdSecretAuth](functions/isClientIdSecretAuth.md) -- [PreviewHandler](functions/PreviewHandler.md) -- [syncDrupalPreviewRoutes](functions/syncDrupalPreviewRoutes.md) -- [translatePath](functions/translatePath.md) -- [translatePathFromContext](functions/translatePathFromContext.md) -- [useJsonaDeserialize](functions/useJsonaDeserialize.md) diff --git a/www/content/api/interfaces/AccessToken.md b/www/content/api/interfaces/AccessToken.md deleted file mode 100644 index b8485450..00000000 --- a/www/content/api/interfaces/AccessToken.md +++ /dev/null @@ -1,41 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / AccessToken - -# Interface: AccessToken - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L113) - -## Properties - -### access_token - -> **access_token**: `string` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:115](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L115) - ---- - -### expires_in - -> **expires_in**: `number` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:116](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L116) - ---- - -### refresh_token? - -> `optional` **refresh_token**: `string` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:117](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L117) - ---- - -### token_type - -> **token_type**: `string` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:114](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L114) diff --git a/www/content/api/interfaces/DrupalBlock.md b/www/content/api/interfaces/DrupalBlock.md deleted file mode 100644 index 8c54e069..00000000 --- a/www/content/api/interfaces/DrupalBlock.md +++ /dev/null @@ -1,73 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalBlock - -# Interface: DrupalBlock - -Defined in: [packages/next-drupal/src/types/drupal.ts:7](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L7) - -## Extends - -- [`JsonApiResource`](JsonApiResource.md) - -## Indexable - -\[`key`: `string`\]: `any` - -## Properties - -### id - -> **id**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`id`](JsonApiResource.md#id) - ---- - -### info - -> **info**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:8](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L8) - ---- - -### langcode - -> **langcode**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`langcode`](JsonApiResource.md#langcode) - ---- - -### status - -> **status**: `boolean` - -Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`status`](JsonApiResource.md#status) - ---- - -### type - -> **type**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`type`](JsonApiResource.md#type) diff --git a/www/content/api/interfaces/DrupalFile.md b/www/content/api/interfaces/DrupalFile.md deleted file mode 100644 index 3ebf0baf..00000000 --- a/www/content/api/interfaces/DrupalFile.md +++ /dev/null @@ -1,137 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalFile - -# Interface: DrupalFile - -Defined in: [packages/next-drupal/src/types/drupal.ts:11](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L11) - -## Extends - -- [`JsonApiResource`](JsonApiResource.md) - -## Indexable - -\[`key`: `string`\]: `any` - -## Properties - -### changed - -> **changed**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:13](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L13) - ---- - -### created - -> **created**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:14](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L14) - ---- - -### drupal_internal\_\_fid - -> **drupal_internal\_\_fid**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:12](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L12) - ---- - -### filemime - -> **filemime**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:21](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L21) - ---- - -### filename - -> **filename**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:15](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L15) - ---- - -### filesize - -> **filesize**: `number` - -Defined in: [packages/next-drupal/src/types/drupal.ts:20](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L20) - ---- - -### id - -> **id**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`id`](JsonApiResource.md#id) - ---- - -### langcode - -> **langcode**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`langcode`](JsonApiResource.md#langcode) - ---- - -### resourceIdObjMeta? - -> `optional` **resourceIdObjMeta**: [`DrupalFileMeta`](DrupalFileMeta.md) - -Defined in: [packages/next-drupal/src/types/drupal.ts:22](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L22) - ---- - -### status - -> **status**: `boolean` - -Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`status`](JsonApiResource.md#status) - ---- - -### type - -> **type**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`type`](JsonApiResource.md#type) - ---- - -### uri - -> **uri**: `object` - -Defined in: [packages/next-drupal/src/types/drupal.ts:16](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L16) - -#### url - -> **url**: `string` - -#### value - -> **value**: `string` diff --git a/www/content/api/interfaces/DrupalFileMeta.md b/www/content/api/interfaces/DrupalFileMeta.md deleted file mode 100644 index 277b8ac7..00000000 --- a/www/content/api/interfaces/DrupalFileMeta.md +++ /dev/null @@ -1,41 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalFileMeta - -# Interface: DrupalFileMeta - -Defined in: [packages/next-drupal/src/types/drupal.ts:25](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L25) - -## Properties - -### alt? - -> `optional` **alt**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:26](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L26) - ---- - -### height - -> **height**: `number` - -Defined in: [packages/next-drupal/src/types/drupal.ts:29](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L29) - ---- - -### title? - -> `optional` **title**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:27](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L27) - ---- - -### width - -> **width**: `number` - -Defined in: [packages/next-drupal/src/types/drupal.ts:28](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L28) diff --git a/www/content/api/interfaces/DrupalMedia.md b/www/content/api/interfaces/DrupalMedia.md deleted file mode 100644 index 587a3cbb..00000000 --- a/www/content/api/interfaces/DrupalMedia.md +++ /dev/null @@ -1,105 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalMedia - -# Interface: DrupalMedia - -Defined in: [packages/next-drupal/src/types/drupal.ts:32](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L32) - -## Extends - -- [`JsonApiResource`](JsonApiResource.md) - -## Indexable - -\[`key`: `string`\]: `any` - -## Properties - -### changed - -> **changed**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:35](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L35) - ---- - -### created - -> **created**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:36](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L36) - ---- - -### drupal_internal\_\_mid - -> **drupal_internal\_\_mid**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:33](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L33) - ---- - -### drupal_internal\_\_vid - -> **drupal_internal\_\_vid**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:34](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L34) - ---- - -### id - -> **id**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`id`](JsonApiResource.md#id) - ---- - -### langcode - -> **langcode**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`langcode`](JsonApiResource.md#langcode) - ---- - -### name - -> **name**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L37) - ---- - -### status - -> **status**: `boolean` - -Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`status`](JsonApiResource.md#status) - ---- - -### type - -> **type**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`type`](JsonApiResource.md#type) diff --git a/www/content/api/interfaces/DrupalMenuItem.md b/www/content/api/interfaces/DrupalMenuItem.md deleted file mode 100644 index 4b5ca369..00000000 --- a/www/content/api/interfaces/DrupalMenuItem.md +++ /dev/null @@ -1,137 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalMenuItem - -# Interface: DrupalMenuItem - -Defined in: [packages/next-drupal/src/types/drupal.ts:40](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L40) - -## Properties - -### description - -> **description**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:41](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L41) - ---- - -### enabled - -> **enabled**: `boolean` - -Defined in: [packages/next-drupal/src/types/drupal.ts:42](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L42) - ---- - -### expanded - -> **expanded**: `boolean` - -Defined in: [packages/next-drupal/src/types/drupal.ts:43](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L43) - ---- - -### id - -> **id**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:44](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L44) - ---- - -### items? - -> `optional` **items**: [`DrupalMenuItem`](DrupalMenuItem.md)[] - -Defined in: [packages/next-drupal/src/types/drupal.ts:58](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L58) - ---- - -### menu_name - -> **menu_name**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:45](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L45) - ---- - -### meta - -> **meta**: `Record`\<`string`, `unknown`\> - -Defined in: [packages/next-drupal/src/types/drupal.ts:46](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L46) - ---- - -### options - -> **options**: `Record`\<`string`, `unknown`\> - -Defined in: [packages/next-drupal/src/types/drupal.ts:47](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L47) - ---- - -### parent - -> **parent**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:48](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L48) - ---- - -### provider - -> **provider**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L49) - ---- - -### route - -> **route**: `object` - -Defined in: [packages/next-drupal/src/types/drupal.ts:50](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L50) - -#### name - -> **name**: `string` - -#### parameters - -> **parameters**: `Record`\<`string`, `unknown`\> - ---- - -### title - -> **title**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L54) - ---- - -### type - -> **type**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:55](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L55) - ---- - -### url - -> **url**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L56) - ---- - -### weight - -> **weight**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:57](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L57) diff --git a/www/content/api/interfaces/DrupalNode.md b/www/content/api/interfaces/DrupalNode.md deleted file mode 100644 index ab6583ef..00000000 --- a/www/content/api/interfaces/DrupalNode.md +++ /dev/null @@ -1,133 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalNode - -# Interface: DrupalNode - -Defined in: [packages/next-drupal/src/types/drupal.ts:63](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L63) - -## Extends - -- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.md) - -## Indexable - -\[`key`: `string`\]: `any` - -## Properties - -### changed - -> **changed**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:66](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L66) - ---- - -### created - -> **created**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:67](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L67) - ---- - -### default_langcode - -> **default_langcode**: `boolean` - -Defined in: [packages/next-drupal/src/types/drupal.ts:69](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L69) - ---- - -### drupal_internal\_\_nid - -> **drupal_internal\_\_nid**: `number` - -Defined in: [packages/next-drupal/src/types/drupal.ts:64](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L64) - ---- - -### drupal_internal\_\_vid - -> **drupal_internal\_\_vid**: `number` - -Defined in: [packages/next-drupal/src/types/drupal.ts:65](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L65) - ---- - -### id - -> **id**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`id`](JsonApiResourceWithPath.md#id) - ---- - -### langcode - -> **langcode**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`langcode`](JsonApiResourceWithPath.md#langcode) - ---- - -### path - -> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.md) - -Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L66) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`path`](JsonApiResourceWithPath.md#path) - ---- - -### status - -> **status**: `boolean` - -Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`status`](JsonApiResourceWithPath.md#status) - ---- - -### sticky - -> **sticky**: `boolean` - -Defined in: [packages/next-drupal/src/types/drupal.ts:70](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L70) - ---- - -### title - -> **title**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:68](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L68) - ---- - -### type - -> **type**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`type`](JsonApiResourceWithPath.md#type) diff --git a/www/content/api/interfaces/DrupalParagraph.md b/www/content/api/interfaces/DrupalParagraph.md deleted file mode 100644 index b2cce6ae..00000000 --- a/www/content/api/interfaces/DrupalParagraph.md +++ /dev/null @@ -1,81 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalParagraph - -# Interface: DrupalParagraph - -Defined in: [packages/next-drupal/src/types/drupal.ts:73](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L73) - -## Extends - -- [`JsonApiResource`](JsonApiResource.md) - -## Indexable - -\[`key`: `string`\]: `any` - -## Properties - -### drupal_internal\_\_id - -> **drupal_internal\_\_id**: `number` - -Defined in: [packages/next-drupal/src/types/drupal.ts:74](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L74) - ---- - -### drupal_internal\_\_revision_id - -> **drupal_internal\_\_revision_id**: `number` - -Defined in: [packages/next-drupal/src/types/drupal.ts:75](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L75) - ---- - -### id - -> **id**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`id`](JsonApiResource.md#id) - ---- - -### langcode - -> **langcode**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`langcode`](JsonApiResource.md#langcode) - ---- - -### status - -> **status**: `boolean` - -Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`status`](JsonApiResource.md#status) - ---- - -### type - -> **type**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`type`](JsonApiResource.md#type) diff --git a/www/content/api/interfaces/DrupalSearchApiJsonApiResponse.md b/www/content/api/interfaces/DrupalSearchApiJsonApiResponse.md deleted file mode 100644 index 0efed59a..00000000 --- a/www/content/api/interfaces/DrupalSearchApiJsonApiResponse.md +++ /dev/null @@ -1,109 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalSearchApiJsonApiResponse - -# Interface: DrupalSearchApiJsonApiResponse - -Defined in: [packages/next-drupal/src/types/drupal.ts:84](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L84) - -## Extends - -- [`JsonApiResponse`](JsonApiResponse.md) - -## Indexable - -\[`key`: `string`\]: `any` - -## Properties - -### data - -> **data**: `Record`\<`string`, `any`\>[] - -Defined in: [packages/next-drupal/src/types/resource.ts:12](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L12) - -#### Inherited from - -[`JsonApiResponse`](JsonApiResponse.md).[`data`](JsonApiResponse.md#data) - ---- - -### errors - -> **errors**: [`JsonApiError`](JsonApiError.md)[] - -Defined in: [packages/next-drupal/src/types/resource.ts:13](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L13) - -#### Inherited from - -[`JsonApiResponse`](JsonApiResponse.md).[`errors`](JsonApiResponse.md#errors) - ---- - -### included? - -> `optional` **included**: `Record`\<`string`, `any`\>[] - -Defined in: [packages/next-drupal/src/types/resource.ts:19](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L19) - -#### Inherited from - -[`JsonApiResponse`](JsonApiResponse.md).[`included`](JsonApiResponse.md#included) - ---- - -### jsonapi? - -> `optional` **jsonapi**: `object` - -Defined in: [packages/next-drupal/src/types/resource.ts:8](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L8) - -#### meta - -> **meta**: `Record`\<`string`, `any`\>[] - -#### version - -> **version**: `string` - -#### Inherited from - -[`JsonApiResponse`](JsonApiResponse.md).[`jsonapi`](JsonApiResponse.md#jsonapi) - ---- - -### links? - -> `optional` **links**: [`JsonApiLinks`](JsonApiLinks.md) - -Defined in: [packages/next-drupal/src/types/resource.ts:18](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L18) - -#### Inherited from - -[`JsonApiResponse`](JsonApiResponse.md).[`links`](JsonApiResponse.md#links) - ---- - -### meta - -> **meta**: `object` & `object` - -Defined in: [packages/next-drupal/src/types/drupal.ts:85](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L85) - -#### Type declaration - -##### count - -> **count**: `number` - -#### Type declaration - -##### facets? - -> `optional` **facets**: [`DrupalSearchApiFacet`](DrupalSearchApiFacet.md)[] - -#### Overrides - -[`JsonApiResponse`](JsonApiResponse.md).[`meta`](JsonApiResponse.md#meta) diff --git a/www/content/api/interfaces/DrupalTaxonomyTerm.md b/www/content/api/interfaces/DrupalTaxonomyTerm.md deleted file mode 100644 index a54032b0..00000000 --- a/www/content/api/interfaces/DrupalTaxonomyTerm.md +++ /dev/null @@ -1,125 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalTaxonomyTerm - -# Interface: DrupalTaxonomyTerm - -Defined in: [packages/next-drupal/src/types/drupal.ts:105](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L105) - -## Extends - -- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.md) - -## Indexable - -\[`key`: `string`\]: `any` - -## Properties - -### changed - -> **changed**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:107](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L107) - ---- - -### default_langcode - -> **default_langcode**: `boolean` - -Defined in: [packages/next-drupal/src/types/drupal.ts:108](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L108) - ---- - -### description - -> **description**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:110](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L110) - ---- - -### drupal_internal\_\_tid - -> **drupal_internal\_\_tid**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:106](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L106) - ---- - -### id - -> **id**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`id`](JsonApiResourceWithPath.md#id) - ---- - -### langcode - -> **langcode**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`langcode`](JsonApiResourceWithPath.md#langcode) - ---- - -### name - -> **name**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:109](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L109) - ---- - -### path - -> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.md) - -Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L66) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`path`](JsonApiResourceWithPath.md#path) - ---- - -### status - -> **status**: `boolean` - -Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`status`](JsonApiResourceWithPath.md#status) - ---- - -### type - -> **type**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`type`](JsonApiResourceWithPath.md#type) - ---- - -### weight - -> **weight**: `number` - -Defined in: [packages/next-drupal/src/types/drupal.ts:111](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L111) diff --git a/www/content/api/interfaces/DrupalUser.md b/www/content/api/interfaces/DrupalUser.md deleted file mode 100644 index 43916b7a..00000000 --- a/www/content/api/interfaces/DrupalUser.md +++ /dev/null @@ -1,117 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalUser - -# Interface: DrupalUser - -Defined in: [packages/next-drupal/src/types/drupal.ts:142](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L142) - -## Extends - -- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.md) - -## Indexable - -\[`key`: `string`\]: `any` - -## Properties - -### changed - -> **changed**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:144](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L144) - ---- - -### created - -> **created**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:145](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L145) - ---- - -### default_langcode - -> **default_langcode**: `boolean` - -Defined in: [packages/next-drupal/src/types/drupal.ts:146](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L146) - ---- - -### drupal_internal\_\_uid - -> **drupal_internal\_\_uid**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:143](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L143) - ---- - -### id - -> **id**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`id`](JsonApiResourceWithPath.md#id) - ---- - -### langcode - -> **langcode**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`langcode`](JsonApiResourceWithPath.md#langcode) - ---- - -### name - -> **name**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:147](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L147) - ---- - -### path - -> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.md) - -Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L66) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`path`](JsonApiResourceWithPath.md#path) - ---- - -### status - -> **status**: `boolean` - -Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`status`](JsonApiResourceWithPath.md#status) - ---- - -### type - -> **type**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) - -#### Inherited from - -[`JsonApiResourceWithPath`](JsonApiResourceWithPath.md).[`type`](JsonApiResourceWithPath.md#type) diff --git a/www/content/api/interfaces/DrupalView.md b/www/content/api/interfaces/DrupalView.md deleted file mode 100644 index 1c591f5f..00000000 --- a/www/content/api/interfaces/DrupalView.md +++ /dev/null @@ -1,53 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalView - -# Interface: DrupalView\ - -Defined in: [packages/next-drupal/src/types/drupal.ts:151](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L151) - -## Type Parameters - -• **T** = `Record`\<`string`, `any`\>[] - -## Properties - -### id - -> **id**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:152](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L152) - ---- - -### links - -> **links**: [`JsonApiLinks`](JsonApiLinks.md) - -Defined in: [packages/next-drupal/src/types/drupal.ts:155](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L155) - ---- - -### meta - -> **meta**: `object` - -Defined in: [packages/next-drupal/src/types/drupal.ts:154](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L154) - -#### Index Signature - -\[`key`: `string`\]: `any` - -#### count - -> **count**: `number` - ---- - -### results - -> **results**: `T` - -Defined in: [packages/next-drupal/src/types/drupal.ts:153](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L153) diff --git a/www/content/api/interfaces/JsonApiError.md b/www/content/api/interfaces/JsonApiError.md deleted file mode 100644 index 4cffcd1e..00000000 --- a/www/content/api/interfaces/JsonApiError.md +++ /dev/null @@ -1,57 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiError - -# Interface: JsonApiError - -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:2](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L2) - -## Properties - -### code? - -> `optional` **code**: `string` - -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L5) - ---- - -### detail? - -> `optional` **detail**: `string` - -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:7](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L7) - ---- - -### id? - -> `optional` **id**: `string` - -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:3](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L3) - ---- - -### links? - -> `optional` **links**: [`JsonApiLinks`](JsonApiLinks.md) - -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:8](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L8) - ---- - -### status? - -> `optional` **status**: `string` - -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:4](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L4) - ---- - -### title? - -> `optional` **title**: `string` - -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:6](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L6) diff --git a/www/content/api/interfaces/JsonApiLinks.md b/www/content/api/interfaces/JsonApiLinks.md deleted file mode 100644 index f064fe9b..00000000 --- a/www/content/api/interfaces/JsonApiLinks.md +++ /dev/null @@ -1,13 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiLinks - -# Interface: JsonApiLinks - -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:12](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L12) - -## Indexable - -\[`key`: `string`\]: `string` \| `Record`\<`string`, `string`\> diff --git a/www/content/api/interfaces/JsonApiResource.md b/www/content/api/interfaces/JsonApiResource.md deleted file mode 100644 index c56c5015..00000000 --- a/www/content/api/interfaces/JsonApiResource.md +++ /dev/null @@ -1,57 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiResource - -# Interface: JsonApiResource - -Defined in: [packages/next-drupal/src/types/resource.ts:58](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L58) - -## Extends - -- `Record`\<`string`, `any`\> - -## Extended by - -- [`DrupalBlock`](DrupalBlock.md) -- [`DrupalFile`](DrupalFile.md) -- [`DrupalMedia`](DrupalMedia.md) -- [`DrupalParagraph`](DrupalParagraph.md) -- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.md) - -## Indexable - -\[`key`: `string`\]: `any` - -## Properties - -### id - -> **id**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) - ---- - -### langcode - -> **langcode**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) - ---- - -### status - -> **status**: `boolean` - -Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) - ---- - -### type - -> **type**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) diff --git a/www/content/api/interfaces/JsonApiResourceBodyRelationship.md b/www/content/api/interfaces/JsonApiResourceBodyRelationship.md deleted file mode 100644 index d3ae59a2..00000000 --- a/www/content/api/interfaces/JsonApiResourceBodyRelationship.md +++ /dev/null @@ -1,25 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiResourceBodyRelationship - -# Interface: JsonApiResourceBodyRelationship - -Defined in: [packages/next-drupal/src/types/resource.ts:22](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L22) - -## Properties - -### data - -> **data**: `object` - -Defined in: [packages/next-drupal/src/types/resource.ts:23](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L23) - -#### id - -> **id**: `string` - -#### type - -> **type**: `string` diff --git a/www/content/api/interfaces/JsonApiResourceWithPath.md b/www/content/api/interfaces/JsonApiResourceWithPath.md deleted file mode 100644 index 423cfee0..00000000 --- a/www/content/api/interfaces/JsonApiResourceWithPath.md +++ /dev/null @@ -1,79 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiResourceWithPath - -# Interface: JsonApiResourceWithPath - -Defined in: [packages/next-drupal/src/types/resource.ts:65](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L65) - -## Extends - -- [`JsonApiResource`](JsonApiResource.md) - -## Extended by - -- [`DrupalNode`](DrupalNode.md) -- [`DrupalTaxonomyTerm`](DrupalTaxonomyTerm.md) -- [`DrupalUser`](DrupalUser.md) - -## Indexable - -\[`key`: `string`\]: `any` - -## Properties - -### id - -> **id**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L59) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`id`](JsonApiResource.md#id) - ---- - -### langcode - -> **langcode**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L61) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`langcode`](JsonApiResource.md#langcode) - ---- - -### path - -> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.md) - -Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L66) - ---- - -### status - -> **status**: `boolean` - -Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L62) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`status`](JsonApiResource.md#status) - ---- - -### type - -> **type**: `string` - -Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L60) - -#### Inherited from - -[`JsonApiResource`](JsonApiResource.md).[`type`](JsonApiResource.md#type) diff --git a/www/content/api/interfaces/NextDrupalAuthClientIdSecret.md b/www/content/api/interfaces/NextDrupalAuthClientIdSecret.md deleted file mode 100644 index 3c42a936..00000000 --- a/www/content/api/interfaces/NextDrupalAuthClientIdSecret.md +++ /dev/null @@ -1,41 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / NextDrupalAuthClientIdSecret - -# Interface: NextDrupalAuthClientIdSecret - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:101](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L101) - -## Properties - -### clientId - -> **clientId**: `string` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L102) - ---- - -### clientSecret - -> **clientSecret**: `string` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:103](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L103) - ---- - -### scope? - -> `optional` **scope**: `string` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:105](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L105) - ---- - -### url? - -> `optional` **url**: `string` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:104](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L104) diff --git a/www/content/api/interfaces/NextDrupalAuthUsernamePassword.md b/www/content/api/interfaces/NextDrupalAuthUsernamePassword.md deleted file mode 100644 index eb4d3233..00000000 --- a/www/content/api/interfaces/NextDrupalAuthUsernamePassword.md +++ /dev/null @@ -1,25 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / NextDrupalAuthUsernamePassword - -# Interface: NextDrupalAuthUsernamePassword - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:108](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L108) - -## Properties - -### password - -> **password**: `string` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:110](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L110) - ---- - -### username - -> **username**: `string` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L109) diff --git a/www/content/api/interfaces/Serializer.md b/www/content/api/interfaces/Serializer.md deleted file mode 100644 index 7b3bb7a9..00000000 --- a/www/content/api/interfaces/Serializer.md +++ /dev/null @@ -1,17 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / Serializer - -# Interface: Serializer - -Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:39](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L39) - -## Properties - -### deserialize - -> **deserialize**: [`JsonDeserializer`](../type-aliases/JsonDeserializer.md) - -Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:40](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L40) diff --git a/www/content/api/type-aliases/AccessTokenScope.md b/www/content/api/type-aliases/AccessTokenScope.md deleted file mode 100644 index 80173509..00000000 --- a/www/content/api/type-aliases/AccessTokenScope.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / AccessTokenScope - -# Type Alias: AccessTokenScope - -> **AccessTokenScope**: `string` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:120](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L120) diff --git a/www/content/api/type-aliases/BaseUrl.md b/www/content/api/type-aliases/BaseUrl.md deleted file mode 100644 index 68e67798..00000000 --- a/www/content/api/type-aliases/BaseUrl.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / BaseUrl - -# Type Alias: BaseUrl - -> **BaseUrl**: `string` - -Defined in: [packages/next-drupal/src/types/options.ts:3](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L3) diff --git a/www/content/api/type-aliases/DrupalClientAuth.md b/www/content/api/type-aliases/DrupalClientAuth.md deleted file mode 100644 index 8a1ef6b5..00000000 --- a/www/content/api/type-aliases/DrupalClientAuth.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalClientAuth - -# Type Alias: DrupalClientAuth - -> **DrupalClientAuth**: [`NextDrupalAuth`](NextDrupalAuth.md) - -Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:31](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L31) diff --git a/www/content/api/type-aliases/DrupalClientAuthAccessToken.md b/www/content/api/type-aliases/DrupalClientAuthAccessToken.md deleted file mode 100644 index 52a6393f..00000000 --- a/www/content/api/type-aliases/DrupalClientAuthAccessToken.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalClientAuthAccessToken - -# Type Alias: DrupalClientAuthAccessToken - -> **DrupalClientAuthAccessToken**: [`NextDrupalAuthAccessToken`](NextDrupalAuthAccessToken.md) - -Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L37) diff --git a/www/content/api/type-aliases/DrupalClientAuthClientIdSecret.md b/www/content/api/type-aliases/DrupalClientAuthClientIdSecret.md deleted file mode 100644 index 44f61fba..00000000 --- a/www/content/api/type-aliases/DrupalClientAuthClientIdSecret.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalClientAuthClientIdSecret - -# Type Alias: DrupalClientAuthClientIdSecret - -> **DrupalClientAuthClientIdSecret**: [`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.md) - -Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:35](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L35) diff --git a/www/content/api/type-aliases/DrupalClientAuthUsernamePassword.md b/www/content/api/type-aliases/DrupalClientAuthUsernamePassword.md deleted file mode 100644 index b8e5f7cb..00000000 --- a/www/content/api/type-aliases/DrupalClientAuthUsernamePassword.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalClientAuthUsernamePassword - -# Type Alias: DrupalClientAuthUsernamePassword - -> **DrupalClientAuthUsernamePassword**: [`NextDrupalAuthUsernamePassword`](../interfaces/NextDrupalAuthUsernamePassword.md) - -Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:33](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L33) diff --git a/www/content/api/type-aliases/DrupalMenuItemId.md b/www/content/api/type-aliases/DrupalMenuItemId.md deleted file mode 100644 index b222a151..00000000 --- a/www/content/api/type-aliases/DrupalMenuItemId.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalMenuItemId - -# Type Alias: DrupalMenuItemId - -> **DrupalMenuItemId**: `string` - -Defined in: [packages/next-drupal/src/types/drupal.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L61) diff --git a/www/content/api/type-aliases/DrupalMenuLinkContent.md b/www/content/api/type-aliases/DrupalMenuLinkContent.md deleted file mode 100644 index d629b183..00000000 --- a/www/content/api/type-aliases/DrupalMenuLinkContent.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalMenuLinkContent - -# Type Alias: DrupalMenuLinkContent - -> **DrupalMenuLinkContent**: [`DrupalMenuItem`](../interfaces/DrupalMenuItem.md) - -Defined in: [packages/next-drupal/src/types/deprecated.ts:6](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/deprecated.ts#L6) diff --git a/www/content/api/type-aliases/Fetcher.md b/www/content/api/type-aliases/Fetcher.md deleted file mode 100644 index e082176e..00000000 --- a/www/content/api/type-aliases/Fetcher.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / Fetcher - -# Type Alias: Fetcher - -> **Fetcher**: `WindowOrWorkerGlobalScope`\[`"fetch"`\] - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:122](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L122) diff --git a/www/content/api/type-aliases/JsonApiOptions.md b/www/content/api/type-aliases/JsonApiOptions.md deleted file mode 100644 index c0b407ec..00000000 --- a/www/content/api/type-aliases/JsonApiOptions.md +++ /dev/null @@ -1,21 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiOptions - -# Type Alias: JsonApiOptions - -> **JsonApiOptions**: `object` & [`JsonApiWithAuthOption`](JsonApiWithAuthOption.md) & \{ `defaultLocale`: [`Locale`](Locale.md); `locale`: [`Locale`](Locale.md); \} \| \{ `defaultLocale`: `never`; `locale`: `undefined`; \} - -Defined in: [packages/next-drupal/src/types/options.ts:13](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L13) - -## Type declaration - -### deserialize? - -> `optional` **deserialize**: `boolean` - -### params? - -> `optional` **params**: [`JsonApiParams`](JsonApiParams.md) diff --git a/www/content/api/type-aliases/JsonApiParams.md b/www/content/api/type-aliases/JsonApiParams.md deleted file mode 100644 index ddaee4b1..00000000 --- a/www/content/api/type-aliases/JsonApiParams.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiParams - -# Type Alias: JsonApiParams - -> **JsonApiParams**: `Record`\<`string`, `any`\> - -Defined in: [packages/next-drupal/src/types/options.ts:42](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L42) diff --git a/www/content/api/type-aliases/JsonApiWithLocaleOptions.md b/www/content/api/type-aliases/JsonApiWithLocaleOptions.md deleted file mode 100644 index e6a109a8..00000000 --- a/www/content/api/type-aliases/JsonApiWithLocaleOptions.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiWithLocaleOptions - -# Type Alias: JsonApiWithLocaleOptions - -> **JsonApiWithLocaleOptions**: `Omit`\<[`JsonApiOptions`](JsonApiOptions.md), `"withAuth"`\> - -Defined in: [packages/next-drupal/src/types/deprecated.ts:4](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/deprecated.ts#L4) diff --git a/www/content/api/type-aliases/Locale.md b/www/content/api/type-aliases/Locale.md deleted file mode 100644 index 15700074..00000000 --- a/www/content/api/type-aliases/Locale.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / Locale - -# Type Alias: Locale - -> **Locale**: `string` - -Defined in: [packages/next-drupal/src/types/options.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L5) diff --git a/www/content/api/type-aliases/NextDrupalAuth.md b/www/content/api/type-aliases/NextDrupalAuth.md deleted file mode 100644 index 0acbaaff..00000000 --- a/www/content/api/type-aliases/NextDrupalAuth.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / NextDrupalAuth - -# Type Alias: NextDrupalAuth - -> **NextDrupalAuth**: [`NextDrupalAuthAccessToken`](NextDrupalAuthAccessToken.md) \| [`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.md) \| [`NextDrupalAuthUsernamePassword`](../interfaces/NextDrupalAuthUsernamePassword.md) \| () => `string` \| `string` - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:92](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L92) diff --git a/www/content/api/type-aliases/NextDrupalAuthAccessToken.md b/www/content/api/type-aliases/NextDrupalAuthAccessToken.md deleted file mode 100644 index f1dd9e7f..00000000 --- a/www/content/api/type-aliases/NextDrupalAuthAccessToken.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / NextDrupalAuthAccessToken - -# Type Alias: NextDrupalAuthAccessToken - -> **NextDrupalAuthAccessToken**: [`AccessToken`](../interfaces/AccessToken.md) - -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:99](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L99) diff --git a/www/content/api/type-aliases/PathPrefix.md b/www/content/api/type-aliases/PathPrefix.md deleted file mode 100644 index f4e994c5..00000000 --- a/www/content/api/type-aliases/PathPrefix.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / PathPrefix - -# Type Alias: PathPrefix - -> **PathPrefix**: `string` - -Defined in: [packages/next-drupal/src/types/options.ts:7](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L7) diff --git a/www/content/api/variables/DRAFT_DATA_COOKIE_NAME.md b/www/content/api/variables/DRAFT_DATA_COOKIE_NAME.md deleted file mode 100644 index 07999cc9..00000000 --- a/www/content/api/variables/DRAFT_DATA_COOKIE_NAME.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DRAFT_DATA_COOKIE_NAME - -# Variable: DRAFT_DATA_COOKIE_NAME - -> `const` **DRAFT_DATA_COOKIE_NAME**: `"next_drupal_draft_data"` = `"next_drupal_draft_data"` - -Defined in: [packages/next-drupal/src/draft-constants.ts:1](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/draft-constants.ts#L1) diff --git a/www/content/api/variables/DRAFT_MODE_COOKIE_NAME.md b/www/content/api/variables/DRAFT_MODE_COOKIE_NAME.md deleted file mode 100644 index 3f211cba..00000000 --- a/www/content/api/variables/DRAFT_MODE_COOKIE_NAME.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DRAFT_MODE_COOKIE_NAME - -# Variable: DRAFT_MODE_COOKIE_NAME - -> `const` **DRAFT_MODE_COOKIE_NAME**: `"__prerender_bypass"` = `"__prerender_bypass"` - -Defined in: [packages/next-drupal/src/draft-constants.ts:4](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/draft-constants.ts#L4) diff --git a/www/content/api/variables/DrupalClient.md b/www/content/api/variables/DrupalClient.md deleted file mode 100644 index 1597cb3b..00000000 --- a/www/content/api/variables/DrupalClient.md +++ /dev/null @@ -1,11 +0,0 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalClient - -# Variable: DrupalClient - -> `const` **DrupalClient**: _typeof_ [`NextDrupalPages`](../classes/NextDrupalPages.md) = `NextDrupalPages` - -Defined in: [packages/next-drupal/src/deprecated.ts:2](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated.ts#L2) diff --git a/www/content/api/README.md b/www/content/docs/api/README.mdx similarity index 93% rename from www/content/api/README.md rename to www/content/docs/api/README.mdx index 3d2faf74..c5dc3e26 100644 --- a/www/content/api/README.md +++ b/www/content/docs/api/README.mdx @@ -1,9 +1,9 @@ -**next-drupal** - ---- -
- Next.js for drupal + Next.js for drupal

Next.js for Drupal

Next-generation front-end for your Drupal site.

diff --git a/www/content/api/classes/JsonApiErrors.md b/www/content/docs/api/classes/JsonApiErrors.mdx similarity index 71% rename from www/content/api/classes/JsonApiErrors.md rename to www/content/docs/api/classes/JsonApiErrors.mdx index d25d2bd4..ea6f29e3 100644 --- a/www/content/api/classes/JsonApiErrors.md +++ b/www/content/docs/api/classes/JsonApiErrors.mdx @@ -1,12 +1,8 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiErrors +[next-drupal](../globals.mdx) / JsonApiErrors # Class: JsonApiErrors -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:16](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L16) +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:16](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L16) ## Extends @@ -16,15 +12,15 @@ Defined in: [packages/next-drupal/src/jsonapi-errors.ts:16](https://github.com/c ### new JsonApiErrors() -> **new JsonApiErrors**(`errors`, `statusCode`, `messagePrefix`): [`JsonApiErrors`](JsonApiErrors.md) +> **new JsonApiErrors**(`errors`, `statusCode`, `messagePrefix`): [`JsonApiErrors`](JsonApiErrors.mdx) -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:20](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L20) +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:20](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L20) #### Parameters ##### errors -`string` | [`JsonApiError`](../interfaces/JsonApiError.md)[] +`string` | [`JsonApiError`](../interfaces/JsonApiError.mdx)[] ##### statusCode @@ -36,7 +32,7 @@ Defined in: [packages/next-drupal/src/jsonapi-errors.ts:20](https://github.com/c #### Returns -[`JsonApiErrors`](JsonApiErrors.md) +[`JsonApiErrors`](JsonApiErrors.mdx) #### Overrides @@ -46,9 +42,9 @@ Defined in: [packages/next-drupal/src/jsonapi-errors.ts:20](https://github.com/c ### errors -> **errors**: `string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[] +> **errors**: `string` \| [`JsonApiError`](../interfaces/JsonApiError.mdx)[] -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:17](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L17) +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:17](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L17) --- @@ -92,7 +88,7 @@ Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078 > **statusCode**: `number` -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:18](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L18) +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:18](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L18) --- @@ -172,13 +168,13 @@ Create .stack property on a target object > `static` **formatMessage**(`errors`): `string` -Defined in: [packages/next-drupal/src/jsonapi-errors.ts:34](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/jsonapi-errors.ts#L34) +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:34](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L34) #### Parameters ##### errors -`string` | [`JsonApiError`](../interfaces/JsonApiError.md)[] +`string` | [`JsonApiError`](../interfaces/JsonApiError.mdx)[] #### Returns diff --git a/www/content/api/classes/NextDrupal.md b/www/content/docs/api/classes/NextDrupal.mdx similarity index 59% rename from www/content/api/classes/NextDrupal.md rename to www/content/docs/api/classes/NextDrupal.mdx index 12441f3d..f27d1d22 100644 --- a/www/content/api/classes/NextDrupal.md +++ b/www/content/docs/api/classes/NextDrupal.mdx @@ -1,31 +1,27 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / NextDrupal +[next-drupal](../globals.mdx) / NextDrupal # Class: NextDrupal -Defined in: [packages/next-drupal/src/next-drupal.ts:51](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L51) +Defined in: [packages/next-drupal/src/next-drupal.ts:51](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L51) The NextDrupal class extends the NextDrupalBase class and provides methods for interacting with a Drupal backend. ## Extends -- [`NextDrupalBase`](NextDrupalBase.md) +- [`NextDrupalBase`](NextDrupalBase.mdx) ## Extended by -- [`NextDrupalPages`](NextDrupalPages.md) +- [`NextDrupalPages`](NextDrupalPages.mdx) ## Constructors ### new NextDrupal() -> **new NextDrupal**(`baseUrl`, `options`): [`NextDrupal`](NextDrupal.md) +> **new NextDrupal**(`baseUrl`, `options`): [`NextDrupal`](NextDrupal.mdx) -Defined in: [packages/next-drupal/src/next-drupal.ts:68](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L68) +Defined in: [packages/next-drupal/src/next-drupal.ts:68](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L68) Instantiates a new NextDrupal. @@ -41,29 +37,29 @@ The baseUrl of your Drupal site. Do not add the /jsonapi suffix. ##### options -[`NextDrupalOptions`](../type-aliases/NextDrupalOptions.md) = `{}` +[`NextDrupalOptions`](../type-aliases/NextDrupalOptions.mdx) = `{}` Options for NextDrupal. #### Returns -[`NextDrupal`](NextDrupal.md) +[`NextDrupal`](NextDrupal.mdx) #### Overrides -[`NextDrupalBase`](NextDrupalBase.md).[`constructor`](NextDrupalBase.md#constructors) +[`NextDrupalBase`](NextDrupalBase.mdx).[`constructor`](NextDrupalBase.mdx#constructors) ## Properties ### accessToken? -> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.md) +> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L37) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L37) #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`accessToken`](NextDrupalBase.md#accesstoken) +[`NextDrupalBase`](NextDrupalBase.mdx).[`accessToken`](NextDrupalBase.mdx#accesstoken) --- @@ -71,27 +67,27 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com > **baseUrl**: `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:39](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L39) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:39](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L39) #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`baseUrl`](NextDrupalBase.md#baseurl-1) +[`NextDrupalBase`](NextDrupalBase.mdx).[`baseUrl`](NextDrupalBase.mdx#baseurl-1) --- ### cache? -> `optional` **cache**: [`DataCache`](../interfaces/DataCache.md) +> `optional` **cache**: [`DataCache`](../interfaces/DataCache.mdx) -Defined in: [packages/next-drupal/src/next-drupal.ts:52](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L52) +Defined in: [packages/next-drupal/src/next-drupal.ts:52](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L52) --- ### deserializer -> **deserializer**: [`JsonDeserializer`](../type-aliases/JsonDeserializer.md) +> **deserializer**: [`JsonDeserializer`](../type-aliases/JsonDeserializer.mdx) -Defined in: [packages/next-drupal/src/next-drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L54) +Defined in: [packages/next-drupal/src/next-drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L54) --- @@ -99,7 +95,7 @@ Defined in: [packages/next-drupal/src/next-drupal.ts:54](https://github.com/chap > `optional` **fetcher**: (`input`, `init`?) => `Promise`\<`Response`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L41) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L41) [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) @@ -119,7 +115,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`fetcher`](NextDrupalBase.md#fetcher) +[`NextDrupalBase`](NextDrupalBase.mdx).[`fetcher`](NextDrupalBase.mdx#fetcher) --- @@ -127,11 +123,11 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com > **frontPage**: `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L43) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L43) #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`frontPage`](NextDrupalBase.md#frontpage) +[`NextDrupalBase`](NextDrupalBase.mdx).[`frontPage`](NextDrupalBase.mdx#frontpage) --- @@ -139,23 +135,23 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com > **isDebugEnabled**: `boolean` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:45](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L45) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:45](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L45) #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`isDebugEnabled`](NextDrupalBase.md#isdebugenabled) +[`NextDrupalBase`](NextDrupalBase.mdx).[`isDebugEnabled`](NextDrupalBase.mdx#isdebugenabled) --- ### logger -> **logger**: [`Logger`](../interfaces/Logger.md) +> **logger**: [`Logger`](../interfaces/Logger.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L47) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L47) #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`logger`](NextDrupalBase.md#logger) +[`NextDrupalBase`](NextDrupalBase.mdx).[`logger`](NextDrupalBase.mdx#logger) --- @@ -163,7 +159,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com > **throwJsonApiErrors**: `boolean` -Defined in: [packages/next-drupal/src/next-drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L56) +Defined in: [packages/next-drupal/src/next-drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L56) --- @@ -171,7 +167,7 @@ Defined in: [packages/next-drupal/src/next-drupal.ts:56](https://github.com/chap > **useDefaultEndpoints**: `boolean` -Defined in: [packages/next-drupal/src/next-drupal.ts:58](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L58) +Defined in: [packages/next-drupal/src/next-drupal.ts:58](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L58) --- @@ -179,11 +175,11 @@ Defined in: [packages/next-drupal/src/next-drupal.ts:58](https://github.com/chap > **withAuth**: `boolean` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L49) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L49) #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`withAuth`](NextDrupalBase.md#withauth) +[`NextDrupalBase`](NextDrupalBase.mdx).[`withAuth`](NextDrupalBase.mdx#withauth) ## Accessors @@ -193,7 +189,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com > **get** **apiPrefix**(): `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L109) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L109) ##### Returns @@ -203,7 +199,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.co > **set** **apiPrefix**(`apiPrefix`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L102) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L102) ##### Parameters @@ -217,7 +213,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.co #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`apiPrefix`](NextDrupalBase.md#apiprefix) +[`NextDrupalBase`](NextDrupalBase.mdx).[`apiPrefix`](NextDrupalBase.mdx#apiprefix) --- @@ -225,25 +221,25 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.co #### Get Signature -> **get** **auth**(): [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +> **get** **auth**(): [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:158](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L158) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:158](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L158) ##### Returns -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) #### Set Signature > **set** **auth**(`auth`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L113) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L113) ##### Parameters ###### auth -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) ##### Returns @@ -251,7 +247,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.co #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`auth`](NextDrupalBase.md#auth) +[`NextDrupalBase`](NextDrupalBase.mdx).[`auth`](NextDrupalBase.mdx#auth) --- @@ -261,7 +257,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.co > **get** **headers**(): `HeadersInit` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L166) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L166) ##### Returns @@ -271,7 +267,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.co > **set** **headers**(`headers`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L162) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L162) ##### Parameters @@ -285,7 +281,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.co #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`headers`](NextDrupalBase.md#headers) +[`NextDrupalBase`](NextDrupalBase.mdx).[`headers`](NextDrupalBase.mdx#headers) --- @@ -293,25 +289,25 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.co #### Get Signature -> **get** **token**(): [`AccessToken`](../interfaces/AccessToken.md) +> **get** **token**(): [`AccessToken`](../interfaces/AccessToken.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:175](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L175) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:175](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L175) ##### Returns -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) #### Set Signature > **set** **token**(`token`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L170) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L170) ##### Parameters ###### token -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) ##### Returns @@ -319,7 +315,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.co #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`token`](NextDrupalBase.md#token) +[`NextDrupalBase`](NextDrupalBase.mdx).[`token`](NextDrupalBase.mdx#token) ## Methods @@ -327,7 +323,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.co > **addLocalePrefix**(`path`, `options`): `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:391](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L391) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:391](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L391) Adds a locale prefix to the given path. @@ -363,7 +359,7 @@ The path with the locale prefix. #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`addLocalePrefix`](NextDrupalBase.md#addlocaleprefix) +[`NextDrupalBase`](NextDrupalBase.mdx).[`addLocalePrefix`](NextDrupalBase.mdx#addlocaleprefix) --- @@ -371,7 +367,7 @@ The path with the locale prefix. > **buildEndpoint**(`params`): `Promise`\<`string`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:699](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L699) +Defined in: [packages/next-drupal/src/next-drupal.ts:699](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L699) Builds an endpoint URL for the specified parameters. @@ -391,7 +387,7 @@ The built endpoint URL. #### Overrides -[`NextDrupalBase`](NextDrupalBase.md).[`buildEndpoint`](NextDrupalBase.md#buildendpoint) +[`NextDrupalBase`](NextDrupalBase.mdx).[`buildEndpoint`](NextDrupalBase.mdx#buildendpoint) --- @@ -399,7 +395,7 @@ The built endpoint URL. > **buildUrl**(`path`, `searchParams`?): `URL` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:276](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L276) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:276](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L276) Builds a URL with the given path and search parameters. @@ -413,7 +409,7 @@ The URL path. ##### searchParams? -[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.md) +[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.mdx) The search parameters. @@ -425,7 +421,7 @@ The constructed URL. #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`buildUrl`](NextDrupalBase.md#buildurl) +[`NextDrupalBase`](NextDrupalBase.mdx).[`buildUrl`](NextDrupalBase.mdx#buildurl) --- @@ -433,7 +429,7 @@ The constructed URL. > **constructPathFromSegment**(`segment`, `options`): `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:335](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L335) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:335](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L335) Constructs a path from the given segment and options. @@ -475,7 +471,7 @@ The constructed path. #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`constructPathFromSegment`](NextDrupalBase.md#constructpathfromsegment) +[`NextDrupalBase`](NextDrupalBase.mdx).[`constructPathFromSegment`](NextDrupalBase.mdx#constructpathfromsegment) --- @@ -483,13 +479,13 @@ The constructed path. > **createFileResource**\<`T`\>(`type`, `body`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:149](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L149) +Defined in: [packages/next-drupal/src/next-drupal.ts:149](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L149) Creates a new file resource for the specified media type. #### Type Parameters -• **T** = [`DrupalFile`](../interfaces/DrupalFile.md) +• **T** = [`DrupalFile`](../interfaces/DrupalFile.mdx) #### Parameters @@ -501,13 +497,13 @@ The type of the media. ##### body -[`JsonApiCreateFileResourceBody`](../interfaces/JsonApiCreateFileResourceBody.md) +[`JsonApiCreateFileResourceBody`](../interfaces/JsonApiCreateFileResourceBody.mdx) The body of the file resource. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) Options for the request. @@ -523,13 +519,13 @@ The created file resource. > **createResource**\<`T`\>(`type`, `body`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:101](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L101) +Defined in: [packages/next-drupal/src/next-drupal.ts:101](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L101) Creates a new resource of the specified type. #### Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) #### Parameters @@ -541,13 +537,13 @@ The type of the resource. ##### body -[`JsonApiCreateResourceBody`](../interfaces/JsonApiCreateResourceBody.md) +[`JsonApiCreateResourceBody`](../interfaces/JsonApiCreateResourceBody.mdx) The body of the resource. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) Options for the request. @@ -563,7 +559,7 @@ The created resource. > **debug**(`message`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:538](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L538) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:538](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L538) Logs a debug message if debug mode is enabled. @@ -581,7 +577,7 @@ The debug message. #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`debug`](NextDrupalBase.md#debug) +[`NextDrupalBase`](NextDrupalBase.mdx).[`debug`](NextDrupalBase.mdx#debug) --- @@ -589,7 +585,7 @@ The debug message. > **deleteResource**(`type`, `uuid`, `options`?): `Promise`\<`boolean`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:253](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L253) +Defined in: [packages/next-drupal/src/next-drupal.ts:253](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L253) Deletes an existing resource of the specified type. @@ -609,7 +605,7 @@ The UUID of the resource. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) Options for the request. @@ -625,7 +621,7 @@ True if the resource was deleted, false otherwise. > **deserialize**(`body`, `options`?): `TJsonaModel` \| `TJsonaModel`[] -Defined in: [packages/next-drupal/src/next-drupal.ts:934](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L934) +Defined in: [packages/next-drupal/src/next-drupal.ts:934](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L934) Deserializes the response body. @@ -655,7 +651,7 @@ The deserialized response body. > **fetch**(`input`, `init`): `Promise`\<`Response`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:186](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L186) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:186](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L186) Fetches a resource from the given input URL or path. @@ -669,7 +665,7 @@ The input URL or path. ##### init -[`FetchOptions`](../interfaces/FetchOptions.md) = `{}` +[`FetchOptions`](../interfaces/FetchOptions.mdx) = `{}` The fetch options. @@ -681,7 +677,7 @@ The fetch response. #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`fetch`](NextDrupalBase.md#fetch) +[`NextDrupalBase`](NextDrupalBase.mdx).[`fetch`](NextDrupalBase.mdx#fetch) --- @@ -689,7 +685,7 @@ The fetch response. > **fetchResourceEndpoint**(`type`, `locale`?): `Promise`\<`URL`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:743](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L743) +Defined in: [packages/next-drupal/src/next-drupal.ts:743](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L743) Fetches the endpoint URL for the specified resource type. @@ -717,9 +713,9 @@ The fetched endpoint URL. ### getAccessToken() -> **getAccessToken**(`clientIdSecret`?): `Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> +> **getAccessToken**(`clientIdSecret`?): `Promise`\<[`AccessToken`](../interfaces/AccessToken.mdx)\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:415](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L415) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:415](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L415) Gets an access token using the provided client ID and secret. @@ -727,19 +723,19 @@ Gets an access token using the provided client ID and secret. ##### clientIdSecret? -[`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.md) +[`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.mdx) The client ID and secret. #### Returns -`Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> +`Promise`\<[`AccessToken`](../interfaces/AccessToken.mdx)\> The access token. #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`getAccessToken`](NextDrupalBase.md#getaccesstoken) +[`NextDrupalBase`](NextDrupalBase.mdx).[`getAccessToken`](NextDrupalBase.mdx#getaccesstoken) --- @@ -747,7 +743,7 @@ The access token. > **getAuthorizationHeader**(`auth`): `Promise`\<`string`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:234](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L234) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:234](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L234) Gets the authorization header value based on the provided auth configuration. @@ -755,7 +751,7 @@ Gets the authorization header value based on the provided auth configuration. ##### auth -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) The auth configuration. @@ -767,15 +763,15 @@ The authorization header value. #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`getAuthorizationHeader`](NextDrupalBase.md#getauthorizationheader) +[`NextDrupalBase`](NextDrupalBase.mdx).[`getAuthorizationHeader`](NextDrupalBase.mdx#getauthorizationheader) --- ### getErrorsFromResponse() -> **getErrorsFromResponse**(`response`): `Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> +> **getErrorsFromResponse**(`response`): `Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.mdx)[]\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:562](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L562) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:562](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L562) Extracts errors from the fetch response. @@ -789,21 +785,21 @@ The fetch response. #### Returns -`Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> +`Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.mdx)[]\> The extracted errors. #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`getErrorsFromResponse`](NextDrupalBase.md#geterrorsfromresponse) +[`NextDrupalBase`](NextDrupalBase.mdx).[`getErrorsFromResponse`](NextDrupalBase.mdx#geterrorsfromresponse) --- ### getIndex() -> **getIndex**(`locale`?, `options`?): `Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.md)\> +> **getIndex**(`locale`?, `options`?): `Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.mdx)\> -Defined in: [packages/next-drupal/src/next-drupal.ts:669](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L669) +Defined in: [packages/next-drupal/src/next-drupal.ts:669](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L669) Fetches the JSON:API index. @@ -817,13 +813,13 @@ The locale for the request. ##### options? -[`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. #### Returns -`Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.md)\> +`Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.mdx)\> The JSON:API index. @@ -833,13 +829,13 @@ The JSON:API index. > **getMenu**\<`T`\>(`menuName`, `options`?): `Promise`\<\{ `items`: `T`[]; `tree`: `T`[]; \}\> -Defined in: [packages/next-drupal/src/next-drupal.ts:773](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L773) +Defined in: [packages/next-drupal/src/next-drupal.ts:773](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L773) Fetches a menu by its name. #### Type Parameters -• **T** = [`DrupalMenuItem`](../interfaces/DrupalMenuItem.md) +• **T** = [`DrupalMenuItem`](../interfaces/DrupalMenuItem.mdx) #### Parameters @@ -851,7 +847,7 @@ The name of the menu. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. @@ -867,13 +863,13 @@ The fetched menu. > **getResource**\<`T`\>(`type`, `uuid`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:294](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L294) +Defined in: [packages/next-drupal/src/next-drupal.ts:294](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L294) Fetches a resource of the specified type by its UUID. #### Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) #### Parameters @@ -891,7 +887,7 @@ The UUID of the resource. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. @@ -907,13 +903,13 @@ The fetched resource. > **getResourceByPath**\<`T`\>(`path`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:356](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L356) +Defined in: [packages/next-drupal/src/next-drupal.ts:356](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L356) Fetches a resource of the specified type by its path. #### Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) #### Parameters @@ -925,7 +921,7 @@ The path of the resource. ##### options? -`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. @@ -941,13 +937,13 @@ The fetched resource. > **getResourceCollection**\<`T`\>(`type`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:472](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L472) +Defined in: [packages/next-drupal/src/next-drupal.ts:472](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L472) Fetches a collection of resources of the specified type. #### Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx)[] #### Parameters @@ -959,7 +955,7 @@ The type of the resources. ##### options? -`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. @@ -975,7 +971,7 @@ The fetched collection of resources. > **getResourceCollectionPathSegments**(`types`, `options`?): `Promise`\<`object`[]\> -Defined in: [packages/next-drupal/src/next-drupal.ts:516](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L516) +Defined in: [packages/next-drupal/src/next-drupal.ts:516](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L516) Fetches path segments for a collection of resources of the specified types. @@ -989,7 +985,7 @@ The types of the resources. ##### options? -`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) & JsonApiWithNextFetchOptions & (\{ locales: string\[\]; defaultLocale: string; \} \| \{ locales?: undefined; defaultLocale?: never; \}) +`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.mdx) & JsonApiWithNextFetchOptions & (\{ locales: string\[\]; defaultLocale: string; \} \| \{ locales?: undefined; defaultLocale?: never; \}) Options for the request. @@ -1005,13 +1001,13 @@ The fetched path segments. > **getSearchIndex**\<`T`\>(`name`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:893](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L893) +Defined in: [packages/next-drupal/src/next-drupal.ts:893](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L893) Fetches a search index by its name. #### Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx)[] #### Parameters @@ -1023,7 +1019,7 @@ The name of the search index. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. @@ -1037,15 +1033,15 @@ The fetched search index. ### getView() -> **getView**\<`T`\>(`name`, `options`?): `Promise`\<[`DrupalView`](../interfaces/DrupalView.md)\<`T`\>\> +> **getView**\<`T`\>(`name`, `options`?): `Promise`\<[`DrupalView`](../interfaces/DrupalView.mdx)\<`T`\>\> -Defined in: [packages/next-drupal/src/next-drupal.ts:845](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L845) +Defined in: [packages/next-drupal/src/next-drupal.ts:845](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L845) Fetches a view by its name. #### Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx) #### Parameters @@ -1057,13 +1053,13 @@ The name of the view. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. #### Returns -`Promise`\<[`DrupalView`](../interfaces/DrupalView.md)\<`T`\>\> +`Promise`\<[`DrupalView`](../interfaces/DrupalView.mdx)\<`T`\>\> The fetched view. @@ -1073,7 +1069,7 @@ The fetched view. > **logOrThrowError**(`error`): `void` -Defined in: [packages/next-drupal/src/next-drupal.ts:945](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L945) +Defined in: [packages/next-drupal/src/next-drupal.ts:945](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L945) Logs or throws an error based on the throwJsonApiErrors flag. @@ -1095,7 +1091,7 @@ The error to log or throw. > **throwIfJsonErrors**(`response`, `messagePrefix`): `Promise`\<`void`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:549](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L549) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:549](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L549) Throws an error if the response contains JSON:API errors. @@ -1123,15 +1119,15 @@ The JSON:API errors. #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`throwIfJsonErrors`](NextDrupalBase.md#throwifjsonerrors) +[`NextDrupalBase`](NextDrupalBase.mdx).[`throwIfJsonErrors`](NextDrupalBase.mdx#throwifjsonerrors) --- ### translatePath() -> **translatePath**(`path`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> +> **translatePath**(`path`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.mdx)\> -Defined in: [packages/next-drupal/src/next-drupal.ts:631](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L631) +Defined in: [packages/next-drupal/src/next-drupal.ts:631](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L631) Translates a path to a DrupalTranslatedPath object. @@ -1145,13 +1141,13 @@ The path to translate. ##### options? -[`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. #### Returns -`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> +`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.mdx)\> The translated path. @@ -1161,13 +1157,13 @@ The translated path. > **updateResource**\<`T`\>(`type`, `uuid`, `body`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:202](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L202) +Defined in: [packages/next-drupal/src/next-drupal.ts:202](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L202) Updates an existing resource of the specified type. #### Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) #### Parameters @@ -1185,13 +1181,13 @@ The UUID of the resource. ##### body -[`JsonApiUpdateResourceBody`](../interfaces/JsonApiUpdateResourceBody.md) +[`JsonApiUpdateResourceBody`](../interfaces/JsonApiUpdateResourceBody.mdx) The body of the resource. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) Options for the request. @@ -1207,7 +1203,7 @@ The updated resource. > **validateDraftUrl**(`searchParams`): `Promise`\<`Response`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:500](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L500) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:500](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L500) Validates the draft URL using the provided search parameters. @@ -1227,4 +1223,4 @@ The validation response. #### Inherited from -[`NextDrupalBase`](NextDrupalBase.md).[`validateDraftUrl`](NextDrupalBase.md#validatedrafturl) +[`NextDrupalBase`](NextDrupalBase.mdx).[`validateDraftUrl`](NextDrupalBase.mdx#validatedrafturl) diff --git a/www/content/api/classes/NextDrupalBase.md b/www/content/docs/api/classes/NextDrupalBase.mdx similarity index 64% rename from www/content/api/classes/NextDrupalBase.md rename to www/content/docs/api/classes/NextDrupalBase.mdx index 7d9c2fb1..572afd32 100644 --- a/www/content/api/classes/NextDrupalBase.md +++ b/www/content/docs/api/classes/NextDrupalBase.mdx @@ -1,26 +1,22 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / NextDrupalBase +[next-drupal](../globals.mdx) / NextDrupalBase # Class: NextDrupalBase -Defined in: [packages/next-drupal/src/next-drupal-base.ts:36](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L36) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:36](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L36) The base class for NextDrupal clients. ## Extended by -- [`NextDrupal`](NextDrupal.md) +- [`NextDrupal`](NextDrupal.mdx) ## Constructors ### new NextDrupalBase() -> **new NextDrupalBase**(`baseUrl`, `options`): [`NextDrupalBase`](NextDrupalBase.md) +> **new NextDrupalBase**(`baseUrl`, `options`): [`NextDrupalBase`](NextDrupalBase.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:71](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L71) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:71](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L71) Instantiates a new NextDrupalBase. @@ -36,21 +32,21 @@ The baseUrl of your Drupal site. Do not add the /jsonapi suffix. ##### options -[`NextDrupalBaseOptions`](../type-aliases/NextDrupalBaseOptions.md) = `{}` +[`NextDrupalBaseOptions`](../type-aliases/NextDrupalBaseOptions.mdx) = `{}` Options for NextDrupalBase. #### Returns -[`NextDrupalBase`](NextDrupalBase.md) +[`NextDrupalBase`](NextDrupalBase.mdx) ## Properties ### accessToken? -> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.md) +> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L37) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L37) --- @@ -58,7 +54,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com > **baseUrl**: `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:39](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L39) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:39](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L39) --- @@ -66,7 +62,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:39](https://github.com > `optional` **fetcher**: (`input`, `init`?) => `Promise`\<`Response`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L41) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L41) [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) @@ -90,7 +86,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com > **frontPage**: `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L43) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L43) --- @@ -98,15 +94,15 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com > **isDebugEnabled**: `boolean` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:45](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L45) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:45](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L45) --- ### logger -> **logger**: [`Logger`](../interfaces/Logger.md) +> **logger**: [`Logger`](../interfaces/Logger.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L47) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L47) --- @@ -114,7 +110,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com > **withAuth**: `boolean` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L49) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L49) ## Accessors @@ -124,7 +120,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com > **get** **apiPrefix**(): `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L109) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L109) ##### Returns @@ -134,7 +130,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.co > **set** **apiPrefix**(`apiPrefix`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L102) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L102) ##### Parameters @@ -152,25 +148,25 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.co #### Get Signature -> **get** **auth**(): [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +> **get** **auth**(): [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:158](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L158) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:158](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L158) ##### Returns -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) #### Set Signature > **set** **auth**(`auth`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L113) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L113) ##### Parameters ###### auth -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) ##### Returns @@ -184,7 +180,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.co > **get** **headers**(): `HeadersInit` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L166) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L166) ##### Returns @@ -194,7 +190,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.co > **set** **headers**(`headers`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L162) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L162) ##### Parameters @@ -212,25 +208,25 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.co #### Get Signature -> **get** **token**(): [`AccessToken`](../interfaces/AccessToken.md) +> **get** **token**(): [`AccessToken`](../interfaces/AccessToken.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:175](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L175) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:175](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L175) ##### Returns -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) #### Set Signature > **set** **token**(`token`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L170) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L170) ##### Parameters ###### token -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) ##### Returns @@ -242,7 +238,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.co > **addLocalePrefix**(`path`, `options`): `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:391](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L391) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:391](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L391) Adds a locale prefix to the given path. @@ -282,7 +278,7 @@ The path with the locale prefix. > **buildEndpoint**(`options`): `Promise`\<`string`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:304](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L304) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:304](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L304) Builds an endpoint URL with the given options. @@ -306,7 +302,7 @@ The path. ###### searchParams -[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.md) +[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.mdx) The search parameters. @@ -322,7 +318,7 @@ The constructed endpoint URL. > **buildUrl**(`path`, `searchParams`?): `URL` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:276](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L276) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:276](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L276) Builds a URL with the given path and search parameters. @@ -336,7 +332,7 @@ The URL path. ##### searchParams? -[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.md) +[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.mdx) The search parameters. @@ -352,7 +348,7 @@ The constructed URL. > **constructPathFromSegment**(`segment`, `options`): `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:335](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L335) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:335](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L335) Constructs a path from the given segment and options. @@ -398,7 +394,7 @@ The constructed path. > **debug**(`message`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:538](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L538) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:538](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L538) Logs a debug message if debug mode is enabled. @@ -420,7 +416,7 @@ The debug message. > **fetch**(`input`, `init`): `Promise`\<`Response`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:186](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L186) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:186](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L186) Fetches a resource from the given input URL or path. @@ -434,7 +430,7 @@ The input URL or path. ##### init -[`FetchOptions`](../interfaces/FetchOptions.md) = `{}` +[`FetchOptions`](../interfaces/FetchOptions.mdx) = `{}` The fetch options. @@ -448,9 +444,9 @@ The fetch response. ### getAccessToken() -> **getAccessToken**(`clientIdSecret`?): `Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> +> **getAccessToken**(`clientIdSecret`?): `Promise`\<[`AccessToken`](../interfaces/AccessToken.mdx)\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:415](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L415) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:415](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L415) Gets an access token using the provided client ID and secret. @@ -458,13 +454,13 @@ Gets an access token using the provided client ID and secret. ##### clientIdSecret? -[`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.md) +[`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.mdx) The client ID and secret. #### Returns -`Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> +`Promise`\<[`AccessToken`](../interfaces/AccessToken.mdx)\> The access token. @@ -474,7 +470,7 @@ The access token. > **getAuthorizationHeader**(`auth`): `Promise`\<`string`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:234](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L234) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:234](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L234) Gets the authorization header value based on the provided auth configuration. @@ -482,7 +478,7 @@ Gets the authorization header value based on the provided auth configuration. ##### auth -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) The auth configuration. @@ -496,9 +492,9 @@ The authorization header value. ### getErrorsFromResponse() -> **getErrorsFromResponse**(`response`): `Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> +> **getErrorsFromResponse**(`response`): `Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.mdx)[]\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:562](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L562) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:562](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L562) Extracts errors from the fetch response. @@ -512,7 +508,7 @@ The fetch response. #### Returns -`Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> +`Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.mdx)[]\> The extracted errors. @@ -522,7 +518,7 @@ The extracted errors. > **throwIfJsonErrors**(`response`, `messagePrefix`): `Promise`\<`void`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:549](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L549) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:549](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L549) Throws an error if the response contains JSON:API errors. @@ -554,7 +550,7 @@ The JSON:API errors. > **validateDraftUrl**(`searchParams`): `Promise`\<`Response`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:500](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L500) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:500](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L500) Validates the draft URL using the provided search parameters. diff --git a/www/content/api/classes/NextDrupalPages.md b/www/content/docs/api/classes/NextDrupalPages.mdx similarity index 62% rename from www/content/api/classes/NextDrupalPages.md rename to www/content/docs/api/classes/NextDrupalPages.mdx index 745a6e1d..991baf27 100644 --- a/www/content/api/classes/NextDrupalPages.md +++ b/www/content/docs/api/classes/NextDrupalPages.mdx @@ -1,27 +1,23 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / NextDrupalPages +[next-drupal](../globals.mdx) / NextDrupalPages # Class: NextDrupalPages -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:34](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L34) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:34](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L34) The NextDrupalPages class extends the NextDrupal class and provides methods for interacting with a Drupal backend in the context of Next.js pages. ## Extends -- [`NextDrupal`](NextDrupal.md) +- [`NextDrupal`](NextDrupal.mdx) ## Constructors ### new NextDrupalPages() -> **new NextDrupalPages**(`baseUrl`, `options`): [`NextDrupalPages`](NextDrupalPages.md) +> **new NextDrupalPages**(`baseUrl`, `options`): [`NextDrupalPages`](NextDrupalPages.mdx) -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:45](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L45) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:45](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L45) Instantiates a new NextDrupalPages. @@ -37,29 +33,29 @@ The baseUrl of your Drupal site. Do not add the /jsonapi suffix. ##### options -[`DrupalClientOptions`](../type-aliases/DrupalClientOptions.md) = `{}` +[`DrupalClientOptions`](../type-aliases/DrupalClientOptions.mdx) = `{}` Options for the client. See Experiment_DrupalClientOptions. #### Returns -[`NextDrupalPages`](NextDrupalPages.md) +[`NextDrupalPages`](NextDrupalPages.mdx) #### Overrides -[`NextDrupal`](NextDrupal.md).[`constructor`](NextDrupal.md#constructors) +[`NextDrupal`](NextDrupal.mdx).[`constructor`](NextDrupal.mdx#constructors) ## Properties ### accessToken? -> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.md) +> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L37) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L37) #### Inherited from -[`NextDrupal`](NextDrupal.md).[`accessToken`](NextDrupal.md#accesstoken) +[`NextDrupal`](NextDrupal.mdx).[`accessToken`](NextDrupal.mdx#accesstoken) --- @@ -67,35 +63,35 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:37](https://github.com > **baseUrl**: `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:39](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L39) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:39](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L39) #### Inherited from -[`NextDrupal`](NextDrupal.md).[`baseUrl`](NextDrupal.md#baseurl-1) +[`NextDrupal`](NextDrupal.mdx).[`baseUrl`](NextDrupal.mdx#baseurl-1) --- ### cache? -> `optional` **cache**: [`DataCache`](../interfaces/DataCache.md) +> `optional` **cache**: [`DataCache`](../interfaces/DataCache.mdx) -Defined in: [packages/next-drupal/src/next-drupal.ts:52](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L52) +Defined in: [packages/next-drupal/src/next-drupal.ts:52](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L52) #### Inherited from -[`NextDrupal`](NextDrupal.md).[`cache`](NextDrupal.md#cache) +[`NextDrupal`](NextDrupal.mdx).[`cache`](NextDrupal.mdx#cache) --- ### deserializer -> **deserializer**: [`JsonDeserializer`](../type-aliases/JsonDeserializer.md) +> **deserializer**: [`JsonDeserializer`](../type-aliases/JsonDeserializer.mdx) -Defined in: [packages/next-drupal/src/next-drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L54) +Defined in: [packages/next-drupal/src/next-drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L54) #### Inherited from -[`NextDrupal`](NextDrupal.md).[`deserializer`](NextDrupal.md#deserializer) +[`NextDrupal`](NextDrupal.mdx).[`deserializer`](NextDrupal.mdx#deserializer) --- @@ -103,7 +99,7 @@ Defined in: [packages/next-drupal/src/next-drupal.ts:54](https://github.com/chap > `optional` **fetcher**: (`input`, `init`?) => `Promise`\<`Response`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L41) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L41) [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) @@ -123,7 +119,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com #### Inherited from -[`NextDrupal`](NextDrupal.md).[`fetcher`](NextDrupal.md#fetcher) +[`NextDrupal`](NextDrupal.mdx).[`fetcher`](NextDrupal.mdx#fetcher) --- @@ -131,11 +127,11 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:41](https://github.com > **frontPage**: `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L43) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L43) #### Inherited from -[`NextDrupal`](NextDrupal.md).[`frontPage`](NextDrupal.md#frontpage) +[`NextDrupal`](NextDrupal.mdx).[`frontPage`](NextDrupal.mdx#frontpage) --- @@ -143,7 +139,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:43](https://github.com > **getPathsFromContext**: (`types`, `context`, `options`?) => `Promise`\<(`string` \| \{ `locale`: `string`; `params`: \{ `slug`: `string`[]; \}; \})[]\> -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:273](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L273) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:273](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L273) Gets static paths from the context. @@ -163,7 +159,7 @@ The static paths context. ##### options? -`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) +`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.mdx) Options for the request. @@ -179,23 +175,23 @@ The fetched static paths. > **isDebugEnabled**: `boolean` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:45](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L45) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:45](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L45) #### Inherited from -[`NextDrupal`](NextDrupal.md).[`isDebugEnabled`](NextDrupal.md#isdebugenabled) +[`NextDrupal`](NextDrupal.mdx).[`isDebugEnabled`](NextDrupal.mdx#isdebugenabled) --- ### logger -> **logger**: [`Logger`](../interfaces/Logger.md) +> **logger**: [`Logger`](../interfaces/Logger.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L47) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L47) #### Inherited from -[`NextDrupal`](NextDrupal.md).[`logger`](NextDrupal.md#logger) +[`NextDrupal`](NextDrupal.mdx).[`logger`](NextDrupal.mdx#logger) --- @@ -203,11 +199,11 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:47](https://github.com > **throwJsonApiErrors**: `boolean` -Defined in: [packages/next-drupal/src/next-drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L56) +Defined in: [packages/next-drupal/src/next-drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L56) #### Inherited from -[`NextDrupal`](NextDrupal.md).[`throwJsonApiErrors`](NextDrupal.md#throwjsonapierrors) +[`NextDrupal`](NextDrupal.mdx).[`throwJsonApiErrors`](NextDrupal.mdx#throwjsonapierrors) --- @@ -215,11 +211,11 @@ Defined in: [packages/next-drupal/src/next-drupal.ts:56](https://github.com/chap > **useDefaultEndpoints**: `boolean` -Defined in: [packages/next-drupal/src/next-drupal.ts:58](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L58) +Defined in: [packages/next-drupal/src/next-drupal.ts:58](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L58) #### Inherited from -[`NextDrupal`](NextDrupal.md).[`useDefaultEndpoints`](NextDrupal.md#usedefaultendpoints) +[`NextDrupal`](NextDrupal.mdx).[`useDefaultEndpoints`](NextDrupal.mdx#usedefaultendpoints) --- @@ -227,11 +223,11 @@ Defined in: [packages/next-drupal/src/next-drupal.ts:58](https://github.com/chap > **withAuth**: `boolean` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L49) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L49) #### Inherited from -[`NextDrupal`](NextDrupal.md).[`withAuth`](NextDrupal.md#withauth) +[`NextDrupal`](NextDrupal.mdx).[`withAuth`](NextDrupal.mdx#withauth) ## Accessors @@ -241,7 +237,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:49](https://github.com > **get** **apiPrefix**(): `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L109) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L109) ##### Returns @@ -251,7 +247,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:109](https://github.co > **set** **apiPrefix**(`apiPrefix`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L102) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L102) ##### Parameters @@ -265,7 +261,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.co #### Inherited from -[`NextDrupal`](NextDrupal.md).[`apiPrefix`](NextDrupal.md#apiprefix) +[`NextDrupal`](NextDrupal.mdx).[`apiPrefix`](NextDrupal.mdx#apiprefix) --- @@ -273,25 +269,25 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:102](https://github.co #### Get Signature -> **get** **auth**(): [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +> **get** **auth**(): [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:158](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L158) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:158](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L158) ##### Returns -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) #### Set Signature > **set** **auth**(`auth`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L113) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L113) ##### Parameters ###### auth -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) ##### Returns @@ -299,7 +295,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.co #### Inherited from -[`NextDrupal`](NextDrupal.md).[`auth`](NextDrupal.md#auth) +[`NextDrupal`](NextDrupal.mdx).[`auth`](NextDrupal.mdx#auth) --- @@ -309,7 +305,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:113](https://github.co > **get** **headers**(): `HeadersInit` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L166) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L166) ##### Returns @@ -319,7 +315,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:166](https://github.co > **set** **headers**(`headers`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L162) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L162) ##### Parameters @@ -333,7 +329,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.co #### Inherited from -[`NextDrupal`](NextDrupal.md).[`headers`](NextDrupal.md#headers) +[`NextDrupal`](NextDrupal.mdx).[`headers`](NextDrupal.mdx#headers) --- @@ -341,25 +337,25 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:162](https://github.co #### Get Signature -> **get** **token**(): [`AccessToken`](../interfaces/AccessToken.md) +> **get** **token**(): [`AccessToken`](../interfaces/AccessToken.mdx) -Defined in: [packages/next-drupal/src/next-drupal-base.ts:175](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L175) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:175](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L175) ##### Returns -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) #### Set Signature > **set** **token**(`token`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L170) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L170) ##### Parameters ###### token -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) ##### Returns @@ -367,7 +363,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.co #### Inherited from -[`NextDrupal`](NextDrupal.md).[`token`](NextDrupal.md#token) +[`NextDrupal`](NextDrupal.mdx).[`token`](NextDrupal.mdx#token) ## Methods @@ -375,7 +371,7 @@ Defined in: [packages/next-drupal/src/next-drupal-base.ts:170](https://github.co > **addLocalePrefix**(`path`, `options`): `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:391](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L391) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:391](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L391) Adds a locale prefix to the given path. @@ -411,7 +407,7 @@ The path with the locale prefix. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`addLocalePrefix`](NextDrupal.md#addlocaleprefix) +[`NextDrupal`](NextDrupal.mdx).[`addLocalePrefix`](NextDrupal.mdx#addlocaleprefix) --- @@ -419,7 +415,7 @@ The path with the locale prefix. > **buildEndpoint**(`params`): `Promise`\<`string`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:699](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L699) +Defined in: [packages/next-drupal/src/next-drupal.ts:699](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L699) Builds an endpoint URL for the specified parameters. @@ -439,7 +435,7 @@ The built endpoint URL. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`buildEndpoint`](NextDrupal.md#buildendpoint) +[`NextDrupal`](NextDrupal.mdx).[`buildEndpoint`](NextDrupal.mdx#buildendpoint) --- @@ -447,13 +443,13 @@ The built endpoint URL. > **buildMenuTree**(`links`, `parent`): `DrupalMenuTree` -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:84](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L84) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:84](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L84) #### Parameters ##### links -[`DrupalMenuItem`](../interfaces/DrupalMenuItem.md)[] +[`DrupalMenuItem`](../interfaces/DrupalMenuItem.mdx)[] ##### parent @@ -469,7 +465,7 @@ Defined in: [packages/next-drupal/src/next-drupal-pages.ts:84](https://github.co > **buildStaticPathsFromResources**(`resources`, `options`?): `object`[] -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:358](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L358) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:358](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L358) Builds static paths from resources. @@ -505,7 +501,7 @@ The built static paths. > **buildStaticPathsParamsFromPaths**(`paths`, `options`?): `object`[] -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:387](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L387) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:387](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L387) Builds static paths parameters from paths. @@ -541,7 +537,7 @@ The built static paths parameters. > **buildUrl**(`path`, `searchParams`?): `URL` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:276](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L276) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:276](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L276) Builds a URL with the given path and search parameters. @@ -555,7 +551,7 @@ The URL path. ##### searchParams? -[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.md) +[`EndpointSearchParams`](../type-aliases/EndpointSearchParams.mdx) The search parameters. @@ -567,7 +563,7 @@ The constructed URL. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`buildUrl`](NextDrupal.md#buildurl) +[`NextDrupal`](NextDrupal.mdx).[`buildUrl`](NextDrupal.mdx#buildurl) --- @@ -575,7 +571,7 @@ The constructed URL. > **constructPathFromSegment**(`segment`, `options`): `string` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:335](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L335) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:335](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L335) Constructs a path from the given segment and options. @@ -617,7 +613,7 @@ The constructed path. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`constructPathFromSegment`](NextDrupal.md#constructpathfromsegment) +[`NextDrupal`](NextDrupal.mdx).[`constructPathFromSegment`](NextDrupal.mdx#constructpathfromsegment) --- @@ -625,13 +621,13 @@ The constructed path. > **createFileResource**\<`T`\>(`type`, `body`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:149](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L149) +Defined in: [packages/next-drupal/src/next-drupal.ts:149](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L149) Creates a new file resource for the specified media type. #### Type Parameters -• **T** = [`DrupalFile`](../interfaces/DrupalFile.md) +• **T** = [`DrupalFile`](../interfaces/DrupalFile.mdx) #### Parameters @@ -643,13 +639,13 @@ The type of the media. ##### body -[`JsonApiCreateFileResourceBody`](../interfaces/JsonApiCreateFileResourceBody.md) +[`JsonApiCreateFileResourceBody`](../interfaces/JsonApiCreateFileResourceBody.mdx) The body of the file resource. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) Options for the request. @@ -661,7 +657,7 @@ The created file resource. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`createFileResource`](NextDrupal.md#createfileresource) +[`NextDrupal`](NextDrupal.mdx).[`createFileResource`](NextDrupal.mdx#createfileresource) --- @@ -669,13 +665,13 @@ The created file resource. > **createResource**\<`T`\>(`type`, `body`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:101](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L101) +Defined in: [packages/next-drupal/src/next-drupal.ts:101](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L101) Creates a new resource of the specified type. #### Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) #### Parameters @@ -687,13 +683,13 @@ The type of the resource. ##### body -[`JsonApiCreateResourceBody`](../interfaces/JsonApiCreateResourceBody.md) +[`JsonApiCreateResourceBody`](../interfaces/JsonApiCreateResourceBody.mdx) The body of the resource. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) Options for the request. @@ -705,7 +701,7 @@ The created resource. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`createResource`](NextDrupal.md#createresource) +[`NextDrupal`](NextDrupal.mdx).[`createResource`](NextDrupal.mdx#createresource) --- @@ -713,7 +709,7 @@ The created resource. > **debug**(`message`): `void` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:538](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L538) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:538](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L538) Logs a debug message if debug mode is enabled. @@ -731,7 +727,7 @@ The debug message. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`debug`](NextDrupal.md#debug) +[`NextDrupal`](NextDrupal.mdx).[`debug`](NextDrupal.mdx#debug) --- @@ -739,7 +735,7 @@ The debug message. > **deleteResource**(`type`, `uuid`, `options`?): `Promise`\<`boolean`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:253](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L253) +Defined in: [packages/next-drupal/src/next-drupal.ts:253](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L253) Deletes an existing resource of the specified type. @@ -759,7 +755,7 @@ The UUID of the resource. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) Options for the request. @@ -771,7 +767,7 @@ True if the resource was deleted, false otherwise. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`deleteResource`](NextDrupal.md#deleteresource) +[`NextDrupal`](NextDrupal.mdx).[`deleteResource`](NextDrupal.mdx#deleteresource) --- @@ -779,7 +775,7 @@ True if the resource was deleted, false otherwise. > **deserialize**(`body`, `options`?): `TJsonaModel` \| `TJsonaModel`[] -Defined in: [packages/next-drupal/src/next-drupal.ts:934](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L934) +Defined in: [packages/next-drupal/src/next-drupal.ts:934](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L934) Deserializes the response body. @@ -805,7 +801,7 @@ The deserialized response body. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`deserialize`](NextDrupal.md#deserialize) +[`NextDrupal`](NextDrupal.mdx).[`deserialize`](NextDrupal.mdx#deserialize) --- @@ -813,7 +809,7 @@ The deserialized response body. > **fetch**(`input`, `init`): `Promise`\<`Response`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:186](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L186) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:186](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L186) Fetches a resource from the given input URL or path. @@ -827,7 +823,7 @@ The input URL or path. ##### init -[`FetchOptions`](../interfaces/FetchOptions.md) = `{}` +[`FetchOptions`](../interfaces/FetchOptions.mdx) = `{}` The fetch options. @@ -839,7 +835,7 @@ The fetch response. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`fetch`](NextDrupal.md#fetch) +[`NextDrupal`](NextDrupal.mdx).[`fetch`](NextDrupal.mdx#fetch) --- @@ -847,7 +843,7 @@ The fetch response. > **fetchResourceEndpoint**(`type`, `locale`?): `Promise`\<`URL`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:743](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L743) +Defined in: [packages/next-drupal/src/next-drupal.ts:743](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L743) Fetches the endpoint URL for the specified resource type. @@ -873,15 +869,15 @@ The fetched endpoint URL. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`fetchResourceEndpoint`](NextDrupal.md#fetchresourceendpoint) +[`NextDrupal`](NextDrupal.mdx).[`fetchResourceEndpoint`](NextDrupal.mdx#fetchresourceendpoint) --- ### getAccessToken() -> **getAccessToken**(`clientIdSecret`?): `Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> +> **getAccessToken**(`clientIdSecret`?): `Promise`\<[`AccessToken`](../interfaces/AccessToken.mdx)\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:415](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L415) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:415](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L415) Gets an access token using the provided client ID and secret. @@ -889,27 +885,27 @@ Gets an access token using the provided client ID and secret. ##### clientIdSecret? -[`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.md) +[`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.mdx) The client ID and secret. #### Returns -`Promise`\<[`AccessToken`](../interfaces/AccessToken.md)\> +`Promise`\<[`AccessToken`](../interfaces/AccessToken.mdx)\> The access token. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`getAccessToken`](NextDrupal.md#getaccesstoken) +[`NextDrupal`](NextDrupal.mdx).[`getAccessToken`](NextDrupal.mdx#getaccesstoken) --- ### getAuthFromContextAndOptions() -> **getAuthFromContextAndOptions**(`context`, `options`): `boolean` \| [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +> **getAuthFromContextAndOptions**(`context`, `options`): `boolean` \| [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:521](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L521) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:521](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L521) Gets the authentication configuration from the context and options. @@ -923,13 +919,13 @@ The static props context. ##### options -[`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) +[`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.mdx) Options for the request. #### Returns -`boolean` \| [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +`boolean` \| [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) The authentication configuration. @@ -939,7 +935,7 @@ The authentication configuration. > **getAuthorizationHeader**(`auth`): `Promise`\<`string`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:234](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L234) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:234](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L234) Gets the authorization header value based on the provided auth configuration. @@ -947,7 +943,7 @@ Gets the authorization header value based on the provided auth configuration. ##### auth -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) The auth configuration. @@ -959,7 +955,7 @@ The authorization header value. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`getAuthorizationHeader`](NextDrupal.md#getauthorizationheader) +[`NextDrupal`](NextDrupal.mdx).[`getAuthorizationHeader`](NextDrupal.mdx#getauthorizationheader) --- @@ -967,7 +963,7 @@ The authorization header value. > **getEntryForResourceType**(`resourceType`, `locale`?): `Promise`\<`string`\> -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:73](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L73) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:73](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L73) Gets the entry point for a given resource type. @@ -995,9 +991,9 @@ The entry point URL. ### getErrorsFromResponse() -> **getErrorsFromResponse**(`response`): `Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> +> **getErrorsFromResponse**(`response`): `Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.mdx)[]\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:562](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L562) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:562](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L562) Extracts errors from the fetch response. @@ -1011,21 +1007,21 @@ The fetch response. #### Returns -`Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.md)[]\> +`Promise`\<`string` \| [`JsonApiError`](../interfaces/JsonApiError.mdx)[]\> The extracted errors. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`getErrorsFromResponse`](NextDrupal.md#geterrorsfromresponse) +[`NextDrupal`](NextDrupal.mdx).[`getErrorsFromResponse`](NextDrupal.mdx#geterrorsfromresponse) --- ### getIndex() -> **getIndex**(`locale`?, `options`?): `Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.md)\> +> **getIndex**(`locale`?, `options`?): `Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.mdx)\> -Defined in: [packages/next-drupal/src/next-drupal.ts:669](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L669) +Defined in: [packages/next-drupal/src/next-drupal.ts:669](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L669) Fetches the JSON:API index. @@ -1039,19 +1035,19 @@ The locale for the request. ##### options? -[`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. #### Returns -`Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.md)\> +`Promise`\<[`JsonApiResponse`](../interfaces/JsonApiResponse.mdx)\> The JSON:API index. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`getIndex`](NextDrupal.md#getindex) +[`NextDrupal`](NextDrupal.mdx).[`getIndex`](NextDrupal.mdx#getindex) --- @@ -1059,13 +1055,13 @@ The JSON:API index. > **getMenu**\<`T`\>(`menuName`, `options`?): `Promise`\<\{ `items`: `T`[]; `tree`: `T`[]; \}\> -Defined in: [packages/next-drupal/src/next-drupal.ts:773](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L773) +Defined in: [packages/next-drupal/src/next-drupal.ts:773](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L773) Fetches a menu by its name. #### Type Parameters -• **T** = [`DrupalMenuItem`](../interfaces/DrupalMenuItem.md) +• **T** = [`DrupalMenuItem`](../interfaces/DrupalMenuItem.mdx) #### Parameters @@ -1077,7 +1073,7 @@ The name of the menu. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. @@ -1089,7 +1085,7 @@ The fetched menu. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`getMenu`](NextDrupal.md#getmenu) +[`NextDrupal`](NextDrupal.mdx).[`getMenu`](NextDrupal.mdx#getmenu) --- @@ -1097,7 +1093,7 @@ The fetched menu. > **getPathFromContext**(`context`, `options`?): `string` -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:260](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L260) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:260](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L260) Gets the path from the context. @@ -1129,13 +1125,13 @@ The constructed path. > **getResource**\<`T`\>(`type`, `uuid`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:294](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L294) +Defined in: [packages/next-drupal/src/next-drupal.ts:294](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L294) Fetches a resource of the specified type by its UUID. #### Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) #### Parameters @@ -1153,7 +1149,7 @@ The UUID of the resource. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithCacheOptions`](../type-aliases/JsonApiWithCacheOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. @@ -1165,7 +1161,7 @@ The fetched resource. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`getResource`](NextDrupal.md#getresource) +[`NextDrupal`](NextDrupal.mdx).[`getResource`](NextDrupal.mdx#getresource) --- @@ -1173,13 +1169,13 @@ The fetched resource. > **getResourceByPath**\<`T`\>(`path`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:356](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L356) +Defined in: [packages/next-drupal/src/next-drupal.ts:356](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L356) Fetches a resource of the specified type by its path. #### Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) #### Parameters @@ -1191,7 +1187,7 @@ The path of the resource. ##### options? -`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. @@ -1203,7 +1199,7 @@ The fetched resource. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`getResourceByPath`](NextDrupal.md#getresourcebypath) +[`NextDrupal`](NextDrupal.mdx).[`getResourceByPath`](NextDrupal.mdx#getresourcebypath) --- @@ -1211,13 +1207,13 @@ The fetched resource. > **getResourceCollection**\<`T`\>(`type`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:472](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L472) +Defined in: [packages/next-drupal/src/next-drupal.ts:472](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L472) Fetches a collection of resources of the specified type. #### Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx)[] #### Parameters @@ -1229,7 +1225,7 @@ The type of the resources. ##### options? -`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. @@ -1241,7 +1237,7 @@ The fetched collection of resources. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`getResourceCollection`](NextDrupal.md#getresourcecollection) +[`NextDrupal`](NextDrupal.mdx).[`getResourceCollection`](NextDrupal.mdx#getresourcecollection) --- @@ -1249,13 +1245,13 @@ The fetched collection of resources. > **getResourceCollectionFromContext**\<`T`\>(`type`, `context`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:187](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L187) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:187](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L187) Gets a collection of resources from the context. #### Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx)[] #### Parameters @@ -1273,7 +1269,7 @@ The static props context. ##### options? -`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) Options for the request. @@ -1289,7 +1285,7 @@ The fetched collection of resources. > **getResourceCollectionPathSegments**(`types`, `options`?): `Promise`\<`object`[]\> -Defined in: [packages/next-drupal/src/next-drupal.ts:516](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L516) +Defined in: [packages/next-drupal/src/next-drupal.ts:516](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L516) Fetches path segments for a collection of resources of the specified types. @@ -1303,7 +1299,7 @@ The types of the resources. ##### options? -`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) & JsonApiWithNextFetchOptions & (\{ locales: string\[\]; defaultLocale: string; \} \| \{ locales?: undefined; defaultLocale?: never; \}) +`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.mdx) & JsonApiWithNextFetchOptions & (\{ locales: string\[\]; defaultLocale: string; \} \| \{ locales?: undefined; defaultLocale?: never; \}) Options for the request. @@ -1315,7 +1311,7 @@ The fetched path segments. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`getResourceCollectionPathSegments`](NextDrupal.md#getresourcecollectionpathsegments) +[`NextDrupal`](NextDrupal.mdx).[`getResourceCollectionPathSegments`](NextDrupal.mdx#getresourcecollectionpathsegments) --- @@ -1323,13 +1319,13 @@ The fetched path segments. > **getResourceFromContext**\<`T`\>(`input`, `context`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:96](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L96) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:96](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L96) Gets a resource from the context. #### Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) #### Parameters @@ -1337,7 +1333,7 @@ Gets a resource from the context. The input path or translated path. -`string` | [`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md) +`string` | [`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.mdx) ##### context @@ -1347,7 +1343,7 @@ The static props context. ##### options? -`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.md) +`object` & [`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) Options for the request. @@ -1363,13 +1359,13 @@ The fetched resource. > **getSearchIndex**\<`T`\>(`name`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:893](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L893) +Defined in: [packages/next-drupal/src/next-drupal.ts:893](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L893) Fetches a search index by its name. #### Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx)[] #### Parameters @@ -1381,7 +1377,7 @@ The name of the search index. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. @@ -1393,7 +1389,7 @@ The fetched search index. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`getSearchIndex`](NextDrupal.md#getsearchindex) +[`NextDrupal`](NextDrupal.mdx).[`getSearchIndex`](NextDrupal.mdx#getsearchindex) --- @@ -1401,13 +1397,13 @@ The fetched search index. > **getSearchIndexFromContext**\<`T`\>(`name`, `context`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:215](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L215) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:215](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L215) Gets a search index from the context. #### Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx)[] #### Parameters @@ -1425,7 +1421,7 @@ The static props context. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) Options for the request. @@ -1441,7 +1437,7 @@ The fetched search index. > **getStaticPathsFromContext**(`types`, `context`, `options`?): `Promise`\<(`string` \| \{ `locale`: `string`; `params`: \{ `slug`: `string`[]; \}; \})[]\> -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:283](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L283) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:283](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L283) Gets static paths from the context. @@ -1461,7 +1457,7 @@ The static paths context. ##### options? -`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) +`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.mdx) Options for the request. @@ -1475,15 +1471,15 @@ The fetched static paths. ### getView() -> **getView**\<`T`\>(`name`, `options`?): `Promise`\<[`DrupalView`](../interfaces/DrupalView.md)\<`T`\>\> +> **getView**\<`T`\>(`name`, `options`?): `Promise`\<[`DrupalView`](../interfaces/DrupalView.mdx)\<`T`\>\> -Defined in: [packages/next-drupal/src/next-drupal.ts:845](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L845) +Defined in: [packages/next-drupal/src/next-drupal.ts:845](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L845) Fetches a view by its name. #### Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx) #### Parameters @@ -1495,19 +1491,19 @@ The name of the view. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. #### Returns -`Promise`\<[`DrupalView`](../interfaces/DrupalView.md)\<`T`\>\> +`Promise`\<[`DrupalView`](../interfaces/DrupalView.mdx)\<`T`\>\> The fetched view. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`getView`](NextDrupal.md#getview) +[`NextDrupal`](NextDrupal.mdx).[`getView`](NextDrupal.mdx#getview) --- @@ -1515,7 +1511,7 @@ The fetched view. > **logOrThrowError**(`error`): `void` -Defined in: [packages/next-drupal/src/next-drupal.ts:945](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L945) +Defined in: [packages/next-drupal/src/next-drupal.ts:945](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L945) Logs or throws an error based on the throwJsonApiErrors flag. @@ -1533,7 +1529,7 @@ The error to log or throw. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`logOrThrowError`](NextDrupal.md#logorthrowerror) +[`NextDrupal`](NextDrupal.mdx).[`logOrThrowError`](NextDrupal.mdx#logorthrowerror) --- @@ -1541,7 +1537,7 @@ The error to log or throw. > **preview**(`request`, `response`, `options`?): `Promise`\<`void` \| `NextApiResponse`\> -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:423](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L423) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:423](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L423) Handles preview mode. @@ -1577,7 +1573,7 @@ Options for the request. > **previewDisable**(`request`, `response`): `Promise`\<`void`\> -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:498](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L498) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:498](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L498) Disables preview mode. @@ -1605,7 +1601,7 @@ The API response. > **throwIfJsonErrors**(`response`, `messagePrefix`): `Promise`\<`void`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:549](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L549) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:549](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L549) Throws an error if the response contains JSON:API errors. @@ -1633,15 +1629,15 @@ The JSON:API errors. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`throwIfJsonErrors`](NextDrupal.md#throwifjsonerrors) +[`NextDrupal`](NextDrupal.mdx).[`throwIfJsonErrors`](NextDrupal.mdx#throwifjsonerrors) --- ### translatePath() -> **translatePath**(`path`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> +> **translatePath**(`path`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.mdx)\> -Defined in: [packages/next-drupal/src/next-drupal.ts:631](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L631) +Defined in: [packages/next-drupal/src/next-drupal.ts:631](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L631) Translates a path to a DrupalTranslatedPath object. @@ -1655,27 +1651,27 @@ The path to translate. ##### options? -[`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.md) +[`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.mdx) & [`JsonApiWithNextFetchOptions`](../type-aliases/JsonApiWithNextFetchOptions.mdx) Options for the request. #### Returns -`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> +`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.mdx)\> The translated path. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`translatePath`](NextDrupal.md#translatepath) +[`NextDrupal`](NextDrupal.mdx).[`translatePath`](NextDrupal.mdx#translatepath) --- ### translatePathFromContext() -> **translatePathFromContext**(`context`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> +> **translatePathFromContext**(`context`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.mdx)\> -Defined in: [packages/next-drupal/src/next-drupal-pages.ts:234](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-pages.ts#L234) +Defined in: [packages/next-drupal/src/next-drupal-pages.ts:234](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-pages.ts#L234) Translates a path from the context. @@ -1689,13 +1685,13 @@ The static props context. ##### options? -`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.md) +`object` & [`JsonApiWithAuthOption`](../type-aliases/JsonApiWithAuthOption.mdx) Options for the request. #### Returns -`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> +`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.mdx)\> The translated path. @@ -1705,13 +1701,13 @@ The translated path. > **updateResource**\<`T`\>(`type`, `uuid`, `body`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/next-drupal.ts:202](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L202) +Defined in: [packages/next-drupal/src/next-drupal.ts:202](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L202) Updates an existing resource of the specified type. #### Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) #### Parameters @@ -1729,13 +1725,13 @@ The UUID of the resource. ##### body -[`JsonApiUpdateResourceBody`](../interfaces/JsonApiUpdateResourceBody.md) +[`JsonApiUpdateResourceBody`](../interfaces/JsonApiUpdateResourceBody.mdx) The body of the resource. ##### options? -[`JsonApiOptions`](../type-aliases/JsonApiOptions.md) +[`JsonApiOptions`](../type-aliases/JsonApiOptions.mdx) Options for the request. @@ -1747,7 +1743,7 @@ The updated resource. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`updateResource`](NextDrupal.md#updateresource) +[`NextDrupal`](NextDrupal.mdx).[`updateResource`](NextDrupal.mdx#updateresource) --- @@ -1755,7 +1751,7 @@ The updated resource. > **validateDraftUrl**(`searchParams`): `Promise`\<`Response`\> -Defined in: [packages/next-drupal/src/next-drupal-base.ts:500](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L500) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:500](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L500) Validates the draft URL using the provided search parameters. @@ -1775,4 +1771,4 @@ The validation response. #### Inherited from -[`NextDrupal`](NextDrupal.md).[`validateDraftUrl`](NextDrupal.md#validatedrafturl) +[`NextDrupal`](NextDrupal.mdx).[`validateDraftUrl`](NextDrupal.mdx#validatedrafturl) diff --git a/www/content/api/functions/DrupalPreview.md b/www/content/docs/api/functions/DrupalPreview.mdx similarity index 65% rename from www/content/api/functions/DrupalPreview.md rename to www/content/docs/api/functions/DrupalPreview.mdx index 4fed7f61..22a88cea 100644 --- a/www/content/api/functions/DrupalPreview.md +++ b/www/content/docs/api/functions/DrupalPreview.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalPreview +[next-drupal](../globals.mdx) / DrupalPreview # Function: DrupalPreview() > **DrupalPreview**(`options`?): (`request`, `response`) => `Promise`\<`void` \| `NextApiResponse`\> -Defined in: [packages/next-drupal/src/deprecated/preview.ts:12](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/preview.ts#L12) +Defined in: [packages/next-drupal/src/deprecated/preview.ts:12](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/preview.ts#L12) ## Parameters diff --git a/www/content/api/functions/PreviewHandler.md b/www/content/docs/api/functions/PreviewHandler.mdx similarity index 64% rename from www/content/api/functions/PreviewHandler.md rename to www/content/docs/api/functions/PreviewHandler.mdx index 836fe775..fcfe3e7d 100644 --- a/www/content/api/functions/PreviewHandler.md +++ b/www/content/docs/api/functions/PreviewHandler.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / PreviewHandler +[next-drupal](../globals.mdx) / PreviewHandler # Function: PreviewHandler() > **PreviewHandler**(`request`?, `response`?, `options`?): `Promise`\<`void` \| `NextApiResponse`\> -Defined in: [packages/next-drupal/src/deprecated/preview.ts:16](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/preview.ts#L16) +Defined in: [packages/next-drupal/src/deprecated/preview.ts:16](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/preview.ts#L16) ## Parameters diff --git a/www/content/api/functions/buildUrl.md b/www/content/docs/api/functions/buildUrl.mdx similarity index 56% rename from www/content/api/functions/buildUrl.md rename to www/content/docs/api/functions/buildUrl.mdx index 282f7a2e..8bc19de5 100644 --- a/www/content/api/functions/buildUrl.md +++ b/www/content/docs/api/functions/buildUrl.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / buildUrl +[next-drupal](../globals.mdx) / buildUrl # Function: buildUrl() > **buildUrl**(`path`, `params`?): `URL` -Defined in: [packages/next-drupal/src/deprecated/utils.ts:61](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/utils.ts#L61) +Defined in: [packages/next-drupal/src/deprecated/utils.ts:61](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/utils.ts#L61) ## Parameters diff --git a/www/content/api/functions/deserialize.md b/www/content/docs/api/functions/deserialize.mdx similarity index 56% rename from www/content/api/functions/deserialize.md rename to www/content/docs/api/functions/deserialize.mdx index 57eb343e..54d92778 100644 --- a/www/content/api/functions/deserialize.md +++ b/www/content/docs/api/functions/deserialize.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / deserialize +[next-drupal](../globals.mdx) / deserialize # Function: deserialize() > **deserialize**(`body`, `options`?): `TJsonaModel` \| `TJsonaModel`[] -Defined in: [packages/next-drupal/src/deprecated/utils.ts:11](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/utils.ts#L11) +Defined in: [packages/next-drupal/src/deprecated/utils.ts:11](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/utils.ts#L11) ## Parameters diff --git a/www/content/docs/api/functions/getAccessToken.mdx b/www/content/docs/api/functions/getAccessToken.mdx new file mode 100644 index 00000000..8562a992 --- /dev/null +++ b/www/content/docs/api/functions/getAccessToken.mdx @@ -0,0 +1,11 @@ +[next-drupal](../globals.mdx) / getAccessToken + +# Function: getAccessToken() + +> **getAccessToken**(): `Promise`\<[`AccessToken`](../interfaces/AccessToken.mdx)\> + +Defined in: [packages/next-drupal/src/deprecated/get-access-token.ts:6](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-access-token.ts#L6) + +## Returns + +`Promise`\<[`AccessToken`](../interfaces/AccessToken.mdx)\> diff --git a/www/content/api/functions/getJsonApiIndex.md b/www/content/docs/api/functions/getJsonApiIndex.mdx similarity index 54% rename from www/content/api/functions/getJsonApiIndex.md rename to www/content/docs/api/functions/getJsonApiIndex.mdx index fceeee5f..c9e00c77 100644 --- a/www/content/api/functions/getJsonApiIndex.md +++ b/www/content/docs/api/functions/getJsonApiIndex.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getJsonApiIndex +[next-drupal](../globals.mdx) / getJsonApiIndex # Function: getJsonApiIndex() > **getJsonApiIndex**(`locale`?, `options`?): `Promise`\<\{ `links`: \{\}; \}\> -Defined in: [packages/next-drupal/src/deprecated/utils.ts:26](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/utils.ts#L26) +Defined in: [packages/next-drupal/src/deprecated/utils.ts:26](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/utils.ts#L26) ## Parameters @@ -20,7 +16,7 @@ Defined in: [packages/next-drupal/src/deprecated/utils.ts:26](https://github.com #### accessToken -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) ## Returns diff --git a/www/content/api/functions/getJsonApiPathForResourceType.md b/www/content/docs/api/functions/getJsonApiPathForResourceType.mdx similarity index 56% rename from www/content/api/functions/getJsonApiPathForResourceType.md rename to www/content/docs/api/functions/getJsonApiPathForResourceType.mdx index 1163a519..179a20a8 100644 --- a/www/content/api/functions/getJsonApiPathForResourceType.md +++ b/www/content/docs/api/functions/getJsonApiPathForResourceType.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getJsonApiPathForResourceType +[next-drupal](../globals.mdx) / getJsonApiPathForResourceType # Function: getJsonApiPathForResourceType() > **getJsonApiPathForResourceType**(`type`, `locale`?): `Promise`\<`string`\> -Defined in: [packages/next-drupal/src/deprecated/utils.ts:17](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/utils.ts#L17) +Defined in: [packages/next-drupal/src/deprecated/utils.ts:17](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/utils.ts#L17) ## Parameters diff --git a/www/content/api/functions/getMenu.md b/www/content/docs/api/functions/getMenu.mdx similarity index 66% rename from www/content/api/functions/getMenu.md rename to www/content/docs/api/functions/getMenu.mdx index 3fbf66a8..44b4fa42 100644 --- a/www/content/api/functions/getMenu.md +++ b/www/content/docs/api/functions/getMenu.mdx @@ -1,18 +1,14 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getMenu +[next-drupal](../globals.mdx) / getMenu # Function: getMenu() > **getMenu**\<`T`\>(`name`, `options`?): `Promise`\<\{ `items`: `T`[]; `tree`: `T`[]; \}\> -Defined in: [packages/next-drupal/src/deprecated/get-menu.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-menu.ts#L5) +Defined in: [packages/next-drupal/src/deprecated/get-menu.ts:5](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-menu.ts#L5) ## Type Parameters -• **T** _extends_ [`DrupalMenuItem`](../interfaces/DrupalMenuItem.md) +• **T** _extends_ [`DrupalMenuItem`](../interfaces/DrupalMenuItem.mdx) ## Parameters @@ -22,7 +18,7 @@ Defined in: [packages/next-drupal/src/deprecated/get-menu.ts:5](https://github.c ### options? -`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.mdx) ## Returns diff --git a/www/content/api/functions/getPathsFromContext.md b/www/content/docs/api/functions/getPathsFromContext.mdx similarity index 57% rename from www/content/api/functions/getPathsFromContext.md rename to www/content/docs/api/functions/getPathsFromContext.mdx index 0ccaee19..f7fa8418 100644 --- a/www/content/api/functions/getPathsFromContext.md +++ b/www/content/docs/api/functions/getPathsFromContext.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getPathsFromContext +[next-drupal](../globals.mdx) / getPathsFromContext # Function: getPathsFromContext() > **getPathsFromContext**(`types`, `context`, `options`): `Promise`\<`GetStaticPathsResult`\[`"paths"`\]\> -Defined in: [packages/next-drupal/src/deprecated/get-paths.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-paths.ts#L5) +Defined in: [packages/next-drupal/src/deprecated/get-paths.ts:5](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-paths.ts#L5) ## Parameters @@ -24,11 +20,11 @@ Defined in: [packages/next-drupal/src/deprecated/get-paths.ts:5](https://github. #### accessToken -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) #### params -[`JsonApiParams`](../type-aliases/JsonApiParams.md) +[`JsonApiParams`](../type-aliases/JsonApiParams.mdx) ## Returns diff --git a/www/content/api/functions/getResource.md b/www/content/docs/api/functions/getResource.mdx similarity index 64% rename from www/content/api/functions/getResource.md rename to www/content/docs/api/functions/getResource.mdx index 241f7f65..4ff2f832 100644 --- a/www/content/api/functions/getResource.md +++ b/www/content/docs/api/functions/getResource.mdx @@ -1,18 +1,14 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getResource +[next-drupal](../globals.mdx) / getResource # Function: getResource() > **getResource**\<`T`\>(`type`, `uuid`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:166](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource.ts#L166) +Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:166](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-resource.ts#L166) ## Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) ## Parameters @@ -26,7 +22,7 @@ Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:166](https://gi ### options? -`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.mdx) ## Returns diff --git a/www/content/api/functions/getResourceByPath.md b/www/content/docs/api/functions/getResourceByPath.mdx similarity index 63% rename from www/content/api/functions/getResourceByPath.md rename to www/content/docs/api/functions/getResourceByPath.mdx index c5eacf4e..8c302ef7 100644 --- a/www/content/api/functions/getResourceByPath.md +++ b/www/content/docs/api/functions/getResourceByPath.mdx @@ -1,18 +1,14 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getResourceByPath +[next-drupal](../globals.mdx) / getResourceByPath # Function: getResourceByPath() > **getResourceByPath**\<`T`\>(`path`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:68](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource.ts#L68) +Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:68](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-resource.ts#L68) ## Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) ## Parameters @@ -22,7 +18,7 @@ Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:68](https://git ### options? -`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.mdx) ## Returns diff --git a/www/content/api/functions/getResourceCollection.md b/www/content/docs/api/functions/getResourceCollection.mdx similarity index 74% rename from www/content/api/functions/getResourceCollection.md rename to www/content/docs/api/functions/getResourceCollection.mdx index 8e458ab0..b9822394 100644 --- a/www/content/api/functions/getResourceCollection.md +++ b/www/content/docs/api/functions/getResourceCollection.mdx @@ -1,18 +1,14 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getResourceCollection +[next-drupal](../globals.mdx) / getResourceCollection # Function: getResourceCollection() > **getResourceCollection**\<`T`\>(`type`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/deprecated/get-resource-collection.ts:11](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource-collection.ts#L11) +Defined in: [packages/next-drupal/src/deprecated/get-resource-collection.ts:11](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-resource-collection.ts#L11) ## Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx)[] ## Parameters @@ -22,7 +18,7 @@ Defined in: [packages/next-drupal/src/deprecated/get-resource-collection.ts:11]( ### options? -`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.mdx) ## Returns diff --git a/www/content/api/functions/getResourceCollectionFromContext.md b/www/content/docs/api/functions/getResourceCollectionFromContext.mdx similarity index 71% rename from www/content/api/functions/getResourceCollectionFromContext.md rename to www/content/docs/api/functions/getResourceCollectionFromContext.mdx index 64424e8b..c779f9e1 100644 --- a/www/content/api/functions/getResourceCollectionFromContext.md +++ b/www/content/docs/api/functions/getResourceCollectionFromContext.mdx @@ -1,18 +1,14 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getResourceCollectionFromContext +[next-drupal](../globals.mdx) / getResourceCollectionFromContext # Function: getResourceCollectionFromContext() > **getResourceCollectionFromContext**\<`T`\>(`type`, `context`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/deprecated/get-resource-collection.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource-collection.ts#L49) +Defined in: [packages/next-drupal/src/deprecated/get-resource-collection.ts:49](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-resource-collection.ts#L49) ## Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx)[] ## Parameters @@ -32,7 +28,7 @@ Defined in: [packages/next-drupal/src/deprecated/get-resource-collection.ts:49]( #### params -[`JsonApiParams`](../type-aliases/JsonApiParams.md) +[`JsonApiParams`](../type-aliases/JsonApiParams.mdx) ## Returns diff --git a/www/content/api/functions/getResourceFromContext.md b/www/content/docs/api/functions/getResourceFromContext.mdx similarity index 61% rename from www/content/api/functions/getResourceFromContext.md rename to www/content/docs/api/functions/getResourceFromContext.mdx index 5ccf7bd1..aa9852eb 100644 --- a/www/content/api/functions/getResourceFromContext.md +++ b/www/content/docs/api/functions/getResourceFromContext.mdx @@ -1,18 +1,14 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getResourceFromContext +[next-drupal](../globals.mdx) / getResourceFromContext # Function: getResourceFromContext() > **getResourceFromContext**\<`T`\>(`type`, `context`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:13](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource.ts#L13) +Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:13](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-resource.ts#L13) ## Type Parameters -• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.md) +• **T** _extends_ [`JsonApiResource`](../interfaces/JsonApiResource.mdx) ## Parameters @@ -28,7 +24,7 @@ Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:13](https://git #### accessToken -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) #### deserialize @@ -40,7 +36,7 @@ Defined in: [packages/next-drupal/src/deprecated/get-resource.ts:13](https://git #### params -[`JsonApiParams`](../type-aliases/JsonApiParams.md) +[`JsonApiParams`](../type-aliases/JsonApiParams.mdx) #### prefix diff --git a/www/content/api/functions/getResourcePreviewUrl.md b/www/content/docs/api/functions/getResourcePreviewUrl.mdx similarity index 57% rename from www/content/api/functions/getResourcePreviewUrl.md rename to www/content/docs/api/functions/getResourcePreviewUrl.mdx index b0ccda84..560a85ef 100644 --- a/www/content/api/functions/getResourcePreviewUrl.md +++ b/www/content/docs/api/functions/getResourcePreviewUrl.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getResourcePreviewUrl +[next-drupal](../globals.mdx) / getResourcePreviewUrl # Function: getResourcePreviewUrl() > **getResourcePreviewUrl**(`slug`, `options`?): `Promise`\<`any`\> -Defined in: [packages/next-drupal/src/deprecated/preview.ts:67](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/preview.ts#L67) +Defined in: [packages/next-drupal/src/deprecated/preview.ts:67](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/preview.ts#L67) ## Parameters diff --git a/www/content/api/functions/getResourceTypeFromContext.md b/www/content/docs/api/functions/getResourceTypeFromContext.mdx similarity index 57% rename from www/content/api/functions/getResourceTypeFromContext.md rename to www/content/docs/api/functions/getResourceTypeFromContext.mdx index b34fd9cc..fb760d18 100644 --- a/www/content/api/functions/getResourceTypeFromContext.md +++ b/www/content/docs/api/functions/getResourceTypeFromContext.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getResourceTypeFromContext +[next-drupal](../globals.mdx) / getResourceTypeFromContext # Function: getResourceTypeFromContext() > **getResourceTypeFromContext**(`context`, `options`?): `Promise`\<`string`\> -Defined in: [packages/next-drupal/src/deprecated/get-resource-type.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-resource-type.ts#L5) +Defined in: [packages/next-drupal/src/deprecated/get-resource-type.ts:5](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-resource-type.ts#L5) ## Parameters @@ -20,7 +16,7 @@ Defined in: [packages/next-drupal/src/deprecated/get-resource-type.ts:5](https:/ #### accessToken -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) #### prefix diff --git a/www/content/api/functions/getSearchIndex.md b/www/content/docs/api/functions/getSearchIndex.mdx similarity index 64% rename from www/content/api/functions/getSearchIndex.md rename to www/content/docs/api/functions/getSearchIndex.mdx index 0001c1e3..63003ed2 100644 --- a/www/content/api/functions/getSearchIndex.md +++ b/www/content/docs/api/functions/getSearchIndex.mdx @@ -1,18 +1,14 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getSearchIndex +[next-drupal](../globals.mdx) / getSearchIndex # Function: getSearchIndex() > **getSearchIndex**\<`T`\>(`name`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/deprecated/get-search-index.ts:6](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-search-index.ts#L6) +Defined in: [packages/next-drupal/src/deprecated/get-search-index.ts:6](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-search-index.ts#L6) ## Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx)[] ## Parameters @@ -22,7 +18,7 @@ Defined in: [packages/next-drupal/src/deprecated/get-search-index.ts:6](https:// ### options? -`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.mdx) ## Returns diff --git a/www/content/api/functions/getSearchIndexFromContext.md b/www/content/docs/api/functions/getSearchIndexFromContext.mdx similarity index 66% rename from www/content/api/functions/getSearchIndexFromContext.md rename to www/content/docs/api/functions/getSearchIndexFromContext.mdx index 2cd298c1..cbbb358a 100644 --- a/www/content/api/functions/getSearchIndexFromContext.md +++ b/www/content/docs/api/functions/getSearchIndexFromContext.mdx @@ -1,18 +1,14 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getSearchIndexFromContext +[next-drupal](../globals.mdx) / getSearchIndexFromContext # Function: getSearchIndexFromContext() > **getSearchIndexFromContext**\<`T`\>(`name`, `context`, `options`?): `Promise`\<`T`\> -Defined in: [packages/next-drupal/src/deprecated/get-search-index.ts:38](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-search-index.ts#L38) +Defined in: [packages/next-drupal/src/deprecated/get-search-index.ts:38](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-search-index.ts#L38) ## Type Parameters -• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.md)[] +• **T** = [`JsonApiResource`](../interfaces/JsonApiResource.mdx)[] ## Parameters @@ -26,7 +22,7 @@ Defined in: [packages/next-drupal/src/deprecated/get-search-index.ts:38](https:/ ### options? -`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.mdx) ## Returns diff --git a/www/content/api/functions/getView.md b/www/content/docs/api/functions/getView.mdx similarity index 72% rename from www/content/api/functions/getView.md rename to www/content/docs/api/functions/getView.mdx index 07df6b97..c2f79954 100644 --- a/www/content/api/functions/getView.md +++ b/www/content/docs/api/functions/getView.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / getView +[next-drupal](../globals.mdx) / getView # Function: getView() > **getView**\<`T`\>(`name`, `options`?): `Promise`\<\{ `links`: \{ \[key in "next" \| "prev" \| "self"\]?: \{ href: "string" \} \}; `meta`: `Record`\<`string`, `any`\>; `results`: `T`; \}\> -Defined in: [packages/next-drupal/src/deprecated/get-view.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/get-view.ts#L5) +Defined in: [packages/next-drupal/src/deprecated/get-view.ts:5](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/get-view.ts#L5) ## Type Parameters @@ -22,7 +18,7 @@ Defined in: [packages/next-drupal/src/deprecated/get-view.ts:5](https://github.c ### options? -`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.md) +`object` & [`JsonApiWithLocaleOptions`](../type-aliases/JsonApiWithLocaleOptions.mdx) ## Returns diff --git a/www/content/api/functions/isAccessTokenAuth.md b/www/content/docs/api/functions/isAccessTokenAuth.mdx similarity index 59% rename from www/content/api/functions/isAccessTokenAuth.md rename to www/content/docs/api/functions/isAccessTokenAuth.mdx index 31ecb190..a491cdc6 100644 --- a/www/content/api/functions/isAccessTokenAuth.md +++ b/www/content/docs/api/functions/isAccessTokenAuth.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / isAccessTokenAuth +[next-drupal](../globals.mdx) / isAccessTokenAuth # Function: isAccessTokenAuth() > **isAccessTokenAuth**(`auth`): `auth is AccessToken` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:610](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L610) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:610](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L610) Checks if the provided auth configuration is access token auth. @@ -16,7 +12,7 @@ Checks if the provided auth configuration is access token auth. ### auth -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) The auth configuration. diff --git a/www/content/api/functions/isBasicAuth.md b/www/content/docs/api/functions/isBasicAuth.mdx similarity index 60% rename from www/content/api/functions/isBasicAuth.md rename to www/content/docs/api/functions/isBasicAuth.mdx index 00ed030c..0f33ef98 100644 --- a/www/content/api/functions/isBasicAuth.md +++ b/www/content/docs/api/functions/isBasicAuth.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / isBasicAuth +[next-drupal](../globals.mdx) / isBasicAuth # Function: isBasicAuth() > **isBasicAuth**(`auth`): `auth is NextDrupalAuthUsernamePassword` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:595](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L595) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:595](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L595) Checks if the provided auth configuration is basic auth. @@ -16,7 +12,7 @@ Checks if the provided auth configuration is basic auth. ### auth -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) The auth configuration. diff --git a/www/content/api/functions/isClientIdSecretAuth.md b/www/content/docs/api/functions/isClientIdSecretAuth.mdx similarity index 62% rename from www/content/api/functions/isClientIdSecretAuth.md rename to www/content/docs/api/functions/isClientIdSecretAuth.mdx index e7e20ea3..594507ec 100644 --- a/www/content/api/functions/isClientIdSecretAuth.md +++ b/www/content/docs/api/functions/isClientIdSecretAuth.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / isClientIdSecretAuth +[next-drupal](../globals.mdx) / isClientIdSecretAuth # Function: isClientIdSecretAuth() > **isClientIdSecretAuth**(`auth`): `auth is NextDrupalAuthClientIdSecret` -Defined in: [packages/next-drupal/src/next-drupal-base.ts:625](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal-base.ts#L625) +Defined in: [packages/next-drupal/src/next-drupal-base.ts:625](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal-base.ts#L625) Checks if the provided auth configuration is client ID and secret auth. @@ -16,7 +12,7 @@ Checks if the provided auth configuration is client ID and secret auth. ### auth -[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +[`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) The auth configuration. diff --git a/www/content/docs/api/functions/syncDrupalPreviewRoutes.mdx b/www/content/docs/api/functions/syncDrupalPreviewRoutes.mdx new file mode 100644 index 00000000..42549e2d --- /dev/null +++ b/www/content/docs/api/functions/syncDrupalPreviewRoutes.mdx @@ -0,0 +1,17 @@ +[next-drupal](../globals.mdx) / syncDrupalPreviewRoutes + +# Function: syncDrupalPreviewRoutes() + +> **syncDrupalPreviewRoutes**(`path`): `void` + +Defined in: [packages/next-drupal/src/deprecated/utils.ts:128](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/utils.ts#L128) + +## Parameters + +### path + +`any` + +## Returns + +`void` diff --git a/www/content/api/functions/translatePath.md b/www/content/docs/api/functions/translatePath.mdx similarity index 50% rename from www/content/api/functions/translatePath.md rename to www/content/docs/api/functions/translatePath.mdx index 8554a518..d14f7b30 100644 --- a/www/content/api/functions/translatePath.md +++ b/www/content/docs/api/functions/translatePath.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / translatePath +[next-drupal](../globals.mdx) / translatePath # Function: translatePath() -> **translatePath**(`path`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> +> **translatePath**(`path`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.mdx)\> -Defined in: [packages/next-drupal/src/deprecated/translate-path.ts:5](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/translate-path.ts#L5) +Defined in: [packages/next-drupal/src/deprecated/translate-path.ts:5](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/translate-path.ts#L5) ## Parameters @@ -20,8 +16,8 @@ Defined in: [packages/next-drupal/src/deprecated/translate-path.ts:5](https://gi #### accessToken -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) ## Returns -`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> +`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.mdx)\> diff --git a/www/content/api/functions/translatePathFromContext.md b/www/content/docs/api/functions/translatePathFromContext.mdx similarity index 61% rename from www/content/api/functions/translatePathFromContext.md rename to www/content/docs/api/functions/translatePathFromContext.mdx index 3b6252ba..4f742614 100644 --- a/www/content/api/functions/translatePathFromContext.md +++ b/www/content/docs/api/functions/translatePathFromContext.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / translatePathFromContext +[next-drupal](../globals.mdx) / translatePathFromContext # Function: translatePathFromContext() -> **translatePathFromContext**(`context`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> +> **translatePathFromContext**(`context`, `options`?): `Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.mdx)\> -Defined in: [packages/next-drupal/src/deprecated/translate-path.ts:28](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/deprecated/translate-path.ts#L28) +Defined in: [packages/next-drupal/src/deprecated/translate-path.ts:28](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated/translate-path.ts#L28) ## Parameters @@ -20,7 +16,7 @@ Defined in: [packages/next-drupal/src/deprecated/translate-path.ts:28](https://g #### accessToken -[`AccessToken`](../interfaces/AccessToken.md) +[`AccessToken`](../interfaces/AccessToken.mdx) #### prefix @@ -28,4 +24,4 @@ Defined in: [packages/next-drupal/src/deprecated/translate-path.ts:28](https://g ## Returns -`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.md)\> +`Promise`\<[`DrupalTranslatedPath`](../interfaces/DrupalTranslatedPath.mdx)\> diff --git a/www/content/api/functions/useJsonaDeserialize.md b/www/content/docs/api/functions/useJsonaDeserialize.mdx similarity index 62% rename from www/content/api/functions/useJsonaDeserialize.md rename to www/content/docs/api/functions/useJsonaDeserialize.mdx index 6a0f2f17..d80c02ab 100644 --- a/www/content/api/functions/useJsonaDeserialize.md +++ b/www/content/docs/api/functions/useJsonaDeserialize.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / useJsonaDeserialize +[next-drupal](../globals.mdx) / useJsonaDeserialize # Function: useJsonaDeserialize() > **useJsonaDeserialize**(): (`body`, `options`) => `TJsonaModel` \| `TJsonaModel`[] -Defined in: [packages/next-drupal/src/next-drupal.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/next-drupal.ts#L37) +Defined in: [packages/next-drupal/src/next-drupal.ts:37](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/next-drupal.ts#L37) ## Returns diff --git a/www/content/docs/api/globals.mdx b/www/content/docs/api/globals.mdx new file mode 100644 index 00000000..a4cdd416 --- /dev/null +++ b/www/content/docs/api/globals.mdx @@ -0,0 +1,103 @@ +# next-drupal + +## Classes + +- [JsonApiErrors](classes/JsonApiErrors.mdx) +- [NextDrupal](classes/NextDrupal.mdx) +- [NextDrupalBase](classes/NextDrupalBase.mdx) +- [NextDrupalPages](classes/NextDrupalPages.mdx) + +## Interfaces + +- [AccessToken](interfaces/AccessToken.mdx) +- [DataCache](interfaces/DataCache.mdx) +- [DrupalBlock](interfaces/DrupalBlock.mdx) +- [DrupalFile](interfaces/DrupalFile.mdx) +- [DrupalFileMeta](interfaces/DrupalFileMeta.mdx) +- [DrupalMedia](interfaces/DrupalMedia.mdx) +- [DrupalMenuItem](interfaces/DrupalMenuItem.mdx) +- [DrupalNode](interfaces/DrupalNode.mdx) +- [DrupalParagraph](interfaces/DrupalParagraph.mdx) +- [DrupalSearchApiFacet](interfaces/DrupalSearchApiFacet.mdx) +- [DrupalSearchApiJsonApiResponse](interfaces/DrupalSearchApiJsonApiResponse.mdx) +- [DrupalTaxonomyTerm](interfaces/DrupalTaxonomyTerm.mdx) +- [DrupalTranslatedPath](interfaces/DrupalTranslatedPath.mdx) +- [DrupalUser](interfaces/DrupalUser.mdx) +- [DrupalView](interfaces/DrupalView.mdx) +- [FetchOptions](interfaces/FetchOptions.mdx) +- [JsonApiCreateFileResourceBody](interfaces/JsonApiCreateFileResourceBody.mdx) +- [JsonApiCreateResourceBody](interfaces/JsonApiCreateResourceBody.mdx) +- [JsonApiError](interfaces/JsonApiError.mdx) +- [JsonApiLinks](interfaces/JsonApiLinks.mdx) +- [JsonApiResource](interfaces/JsonApiResource.mdx) +- [JsonApiResourceBodyRelationship](interfaces/JsonApiResourceBodyRelationship.mdx) +- [JsonApiResourceWithPath](interfaces/JsonApiResourceWithPath.mdx) +- [JsonApiResponse](interfaces/JsonApiResponse.mdx) +- [JsonApiUpdateResourceBody](interfaces/JsonApiUpdateResourceBody.mdx) +- [Logger](interfaces/Logger.mdx) +- [NextDrupalAuthClientIdSecret](interfaces/NextDrupalAuthClientIdSecret.mdx) +- [NextDrupalAuthUsernamePassword](interfaces/NextDrupalAuthUsernamePassword.mdx) +- [Serializer](interfaces/Serializer.mdx) + +## Type Aliases + +- [AccessTokenScope](type-aliases/AccessTokenScope.mdx) +- [BaseUrl](type-aliases/BaseUrl.mdx) +- [DrupalClientAuth](type-aliases/DrupalClientAuth.mdx) +- [DrupalClientAuthAccessToken](type-aliases/DrupalClientAuthAccessToken.mdx) +- [DrupalClientAuthClientIdSecret](type-aliases/DrupalClientAuthClientIdSecret.mdx) +- [DrupalClientAuthUsernamePassword](type-aliases/DrupalClientAuthUsernamePassword.mdx) +- [DrupalClientOptions](type-aliases/DrupalClientOptions.mdx) +- [DrupalMenuItemId](type-aliases/DrupalMenuItemId.mdx) +- [DrupalMenuLinkContent](type-aliases/DrupalMenuLinkContent.mdx) +- [DrupalPathAlias](type-aliases/DrupalPathAlias.mdx) +- [EndpointSearchParams](type-aliases/EndpointSearchParams.mdx) +- [Fetcher](type-aliases/Fetcher.mdx) +- [JsonApiOptions](type-aliases/JsonApiOptions.mdx) +- [JsonApiParams](type-aliases/JsonApiParams.mdx) +- [JsonApiWithAuthOption](type-aliases/JsonApiWithAuthOption.mdx) +- [JsonApiWithCacheOptions](type-aliases/JsonApiWithCacheOptions.mdx) +- [JsonApiWithLocaleOptions](type-aliases/JsonApiWithLocaleOptions.mdx) +- [JsonApiWithNextFetchOptions](type-aliases/JsonApiWithNextFetchOptions.mdx) +- [JsonDeserializer](type-aliases/JsonDeserializer.mdx) +- [Locale](type-aliases/Locale.mdx) +- [NextDrupalAuth](type-aliases/NextDrupalAuth.mdx) +- [NextDrupalAuthAccessToken](type-aliases/NextDrupalAuthAccessToken.mdx) +- [NextDrupalBaseOptions](type-aliases/NextDrupalBaseOptions.mdx) +- [NextDrupalOptions](type-aliases/NextDrupalOptions.mdx) +- [PathPrefix](type-aliases/PathPrefix.mdx) + +## Variables + +- [DRAFT_DATA_COOKIE_NAME](variables/DRAFT_DATA_COOKIE_NAME.mdx) +- [DRAFT_MODE_COOKIE_NAME](variables/DRAFT_MODE_COOKIE_NAME.mdx) +- [DrupalClient](variables/DrupalClient.mdx) + +## Functions + +- [buildUrl](functions/buildUrl.mdx) +- [deserialize](functions/deserialize.mdx) +- [DrupalPreview](functions/DrupalPreview.mdx) +- [getAccessToken](functions/getAccessToken.mdx) +- [getJsonApiIndex](functions/getJsonApiIndex.mdx) +- [getJsonApiPathForResourceType](functions/getJsonApiPathForResourceType.mdx) +- [getMenu](functions/getMenu.mdx) +- [getPathsFromContext](functions/getPathsFromContext.mdx) +- [getResource](functions/getResource.mdx) +- [getResourceByPath](functions/getResourceByPath.mdx) +- [getResourceCollection](functions/getResourceCollection.mdx) +- [getResourceCollectionFromContext](functions/getResourceCollectionFromContext.mdx) +- [getResourceFromContext](functions/getResourceFromContext.mdx) +- [getResourcePreviewUrl](functions/getResourcePreviewUrl.mdx) +- [getResourceTypeFromContext](functions/getResourceTypeFromContext.mdx) +- [getSearchIndex](functions/getSearchIndex.mdx) +- [getSearchIndexFromContext](functions/getSearchIndexFromContext.mdx) +- [getView](functions/getView.mdx) +- [isAccessTokenAuth](functions/isAccessTokenAuth.mdx) +- [isBasicAuth](functions/isBasicAuth.mdx) +- [isClientIdSecretAuth](functions/isClientIdSecretAuth.mdx) +- [PreviewHandler](functions/PreviewHandler.mdx) +- [syncDrupalPreviewRoutes](functions/syncDrupalPreviewRoutes.mdx) +- [translatePath](functions/translatePath.mdx) +- [translatePathFromContext](functions/translatePathFromContext.mdx) +- [useJsonaDeserialize](functions/useJsonaDeserialize.mdx) diff --git a/www/content/docs/api/interfaces/AccessToken.mdx b/www/content/docs/api/interfaces/AccessToken.mdx new file mode 100644 index 00000000..0e397504 --- /dev/null +++ b/www/content/docs/api/interfaces/AccessToken.mdx @@ -0,0 +1,37 @@ +[next-drupal](../globals.mdx) / AccessToken + +# Interface: AccessToken + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:113](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L113) + +## Properties + +### access_token + +> **access_token**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:115](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L115) + +--- + +### expires_in + +> **expires_in**: `number` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:116](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L116) + +--- + +### refresh_token? + +> `optional` **refresh_token**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:117](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L117) + +--- + +### token_type + +> **token_type**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:114](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L114) diff --git a/www/content/api/interfaces/DataCache.md b/www/content/docs/api/interfaces/DataCache.mdx similarity index 57% rename from www/content/api/interfaces/DataCache.md rename to www/content/docs/api/interfaces/DataCache.mdx index e82eab96..7b618b1f 100644 --- a/www/content/api/interfaces/DataCache.md +++ b/www/content/docs/api/interfaces/DataCache.mdx @@ -1,12 +1,8 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DataCache +[next-drupal](../globals.mdx) / DataCache # Interface: DataCache -Defined in: [packages/next-drupal/src/types/next-drupal.ts:51](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L51) +Defined in: [packages/next-drupal/src/types/next-drupal.ts:51](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal.ts#L51) ## Methods @@ -14,7 +10,7 @@ Defined in: [packages/next-drupal/src/types/next-drupal.ts:51](https://github.co > `optional` **del**(`keys`): `Promise`\<`unknown`\> -Defined in: [packages/next-drupal/src/types/next-drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L56) +Defined in: [packages/next-drupal/src/types/next-drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal.ts#L56) #### Parameters @@ -32,7 +28,7 @@ Defined in: [packages/next-drupal/src/types/next-drupal.ts:56](https://github.co > **get**(`key`): `Promise`\<`unknown`\> -Defined in: [packages/next-drupal/src/types/next-drupal.ts:52](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L52) +Defined in: [packages/next-drupal/src/types/next-drupal.ts:52](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal.ts#L52) #### Parameters @@ -50,7 +46,7 @@ Defined in: [packages/next-drupal/src/types/next-drupal.ts:52](https://github.co > **set**(`key`, `value`, `ttl`?): `Promise`\<`unknown`\> -Defined in: [packages/next-drupal/src/types/next-drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L54) +Defined in: [packages/next-drupal/src/types/next-drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal.ts#L54) #### Parameters diff --git a/www/content/docs/api/interfaces/DrupalBlock.mdx b/www/content/docs/api/interfaces/DrupalBlock.mdx new file mode 100644 index 00000000..32484fc3 --- /dev/null +++ b/www/content/docs/api/interfaces/DrupalBlock.mdx @@ -0,0 +1,69 @@ +[next-drupal](../globals.mdx) / DrupalBlock + +# Interface: DrupalBlock + +Defined in: [packages/next-drupal/src/types/drupal.ts:7](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L7) + +## Extends + +- [`JsonApiResource`](JsonApiResource.mdx) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`id`](JsonApiResource.mdx#id) + +--- + +### info + +> **info**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:8](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L8) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`langcode`](JsonApiResource.mdx#langcode) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`status`](JsonApiResource.mdx#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`type`](JsonApiResource.mdx#type) diff --git a/www/content/docs/api/interfaces/DrupalFile.mdx b/www/content/docs/api/interfaces/DrupalFile.mdx new file mode 100644 index 00000000..5f6fd581 --- /dev/null +++ b/www/content/docs/api/interfaces/DrupalFile.mdx @@ -0,0 +1,133 @@ +[next-drupal](../globals.mdx) / DrupalFile + +# Interface: DrupalFile + +Defined in: [packages/next-drupal/src/types/drupal.ts:11](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L11) + +## Extends + +- [`JsonApiResource`](JsonApiResource.mdx) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### changed + +> **changed**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:13](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L13) + +--- + +### created + +> **created**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:14](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L14) + +--- + +### drupal_internal\_\_fid + +> **drupal_internal\_\_fid**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:12](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L12) + +--- + +### filemime + +> **filemime**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:21](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L21) + +--- + +### filename + +> **filename**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:15](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L15) + +--- + +### filesize + +> **filesize**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:20](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L20) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`id`](JsonApiResource.mdx#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`langcode`](JsonApiResource.mdx#langcode) + +--- + +### resourceIdObjMeta? + +> `optional` **resourceIdObjMeta**: [`DrupalFileMeta`](DrupalFileMeta.mdx) + +Defined in: [packages/next-drupal/src/types/drupal.ts:22](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L22) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`status`](JsonApiResource.mdx#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`type`](JsonApiResource.mdx#type) + +--- + +### uri + +> **uri**: `object` + +Defined in: [packages/next-drupal/src/types/drupal.ts:16](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L16) + +#### url + +> **url**: `string` + +#### value + +> **value**: `string` diff --git a/www/content/docs/api/interfaces/DrupalFileMeta.mdx b/www/content/docs/api/interfaces/DrupalFileMeta.mdx new file mode 100644 index 00000000..aec68e6c --- /dev/null +++ b/www/content/docs/api/interfaces/DrupalFileMeta.mdx @@ -0,0 +1,37 @@ +[next-drupal](../globals.mdx) / DrupalFileMeta + +# Interface: DrupalFileMeta + +Defined in: [packages/next-drupal/src/types/drupal.ts:25](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L25) + +## Properties + +### alt? + +> `optional` **alt**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:26](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L26) + +--- + +### height + +> **height**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:29](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L29) + +--- + +### title? + +> `optional` **title**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:27](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L27) + +--- + +### width + +> **width**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:28](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L28) diff --git a/www/content/docs/api/interfaces/DrupalMedia.mdx b/www/content/docs/api/interfaces/DrupalMedia.mdx new file mode 100644 index 00000000..a75d6ed8 --- /dev/null +++ b/www/content/docs/api/interfaces/DrupalMedia.mdx @@ -0,0 +1,101 @@ +[next-drupal](../globals.mdx) / DrupalMedia + +# Interface: DrupalMedia + +Defined in: [packages/next-drupal/src/types/drupal.ts:32](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L32) + +## Extends + +- [`JsonApiResource`](JsonApiResource.mdx) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### changed + +> **changed**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:35](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L35) + +--- + +### created + +> **created**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:36](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L36) + +--- + +### drupal_internal\_\_mid + +> **drupal_internal\_\_mid**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:33](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L33) + +--- + +### drupal_internal\_\_vid + +> **drupal_internal\_\_vid**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:34](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L34) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`id`](JsonApiResource.mdx#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`langcode`](JsonApiResource.mdx#langcode) + +--- + +### name + +> **name**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:37](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L37) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`status`](JsonApiResource.mdx#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`type`](JsonApiResource.mdx#type) diff --git a/www/content/docs/api/interfaces/DrupalMenuItem.mdx b/www/content/docs/api/interfaces/DrupalMenuItem.mdx new file mode 100644 index 00000000..c1c7c099 --- /dev/null +++ b/www/content/docs/api/interfaces/DrupalMenuItem.mdx @@ -0,0 +1,133 @@ +[next-drupal](../globals.mdx) / DrupalMenuItem + +# Interface: DrupalMenuItem + +Defined in: [packages/next-drupal/src/types/drupal.ts:40](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L40) + +## Properties + +### description + +> **description**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:41](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L41) + +--- + +### enabled + +> **enabled**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:42](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L42) + +--- + +### expanded + +> **expanded**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:43](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L43) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:44](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L44) + +--- + +### items? + +> `optional` **items**: [`DrupalMenuItem`](DrupalMenuItem.mdx)[] + +Defined in: [packages/next-drupal/src/types/drupal.ts:58](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L58) + +--- + +### menu_name + +> **menu_name**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:45](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L45) + +--- + +### meta + +> **meta**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/next-drupal/src/types/drupal.ts:46](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L46) + +--- + +### options + +> **options**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/next-drupal/src/types/drupal.ts:47](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L47) + +--- + +### parent + +> **parent**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:48](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L48) + +--- + +### provider + +> **provider**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:49](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L49) + +--- + +### route + +> **route**: `object` + +Defined in: [packages/next-drupal/src/types/drupal.ts:50](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L50) + +#### name + +> **name**: `string` + +#### parameters + +> **parameters**: `Record`\<`string`, `unknown`\> + +--- + +### title + +> **title**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:54](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L54) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:55](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L55) + +--- + +### url + +> **url**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:56](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L56) + +--- + +### weight + +> **weight**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:57](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L57) diff --git a/www/content/docs/api/interfaces/DrupalNode.mdx b/www/content/docs/api/interfaces/DrupalNode.mdx new file mode 100644 index 00000000..b4bf84bf --- /dev/null +++ b/www/content/docs/api/interfaces/DrupalNode.mdx @@ -0,0 +1,129 @@ +[next-drupal](../globals.mdx) / DrupalNode + +# Interface: DrupalNode + +Defined in: [packages/next-drupal/src/types/drupal.ts:63](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L63) + +## Extends + +- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### changed + +> **changed**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:66](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L66) + +--- + +### created + +> **created**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:67](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L67) + +--- + +### default_langcode + +> **default_langcode**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:69](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L69) + +--- + +### drupal_internal\_\_nid + +> **drupal_internal\_\_nid**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:64](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L64) + +--- + +### drupal_internal\_\_vid + +> **drupal_internal\_\_vid**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:65](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L65) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`id`](JsonApiResourceWithPath.mdx#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`langcode`](JsonApiResourceWithPath.mdx#langcode) + +--- + +### path + +> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.mdx) + +Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L66) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`path`](JsonApiResourceWithPath.mdx#path) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`status`](JsonApiResourceWithPath.mdx#status) + +--- + +### sticky + +> **sticky**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:70](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L70) + +--- + +### title + +> **title**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:68](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L68) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`type`](JsonApiResourceWithPath.mdx#type) diff --git a/www/content/docs/api/interfaces/DrupalParagraph.mdx b/www/content/docs/api/interfaces/DrupalParagraph.mdx new file mode 100644 index 00000000..4d7dc970 --- /dev/null +++ b/www/content/docs/api/interfaces/DrupalParagraph.mdx @@ -0,0 +1,77 @@ +[next-drupal](../globals.mdx) / DrupalParagraph + +# Interface: DrupalParagraph + +Defined in: [packages/next-drupal/src/types/drupal.ts:73](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L73) + +## Extends + +- [`JsonApiResource`](JsonApiResource.mdx) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### drupal_internal\_\_id + +> **drupal_internal\_\_id**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:74](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L74) + +--- + +### drupal_internal\_\_revision_id + +> **drupal_internal\_\_revision_id**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:75](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L75) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`id`](JsonApiResource.mdx#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`langcode`](JsonApiResource.mdx#langcode) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`status`](JsonApiResource.mdx#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`type`](JsonApiResource.mdx#type) diff --git a/www/content/api/interfaces/DrupalSearchApiFacet.md b/www/content/docs/api/interfaces/DrupalSearchApiFacet.mdx similarity index 53% rename from www/content/api/interfaces/DrupalSearchApiFacet.md rename to www/content/docs/api/interfaces/DrupalSearchApiFacet.mdx index 8fd55ddc..97f4cada 100644 --- a/www/content/api/interfaces/DrupalSearchApiFacet.md +++ b/www/content/docs/api/interfaces/DrupalSearchApiFacet.mdx @@ -1,12 +1,8 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalSearchApiFacet +[next-drupal](../globals.mdx) / DrupalSearchApiFacet # Interface: DrupalSearchApiFacet -Defined in: [packages/next-drupal/src/types/drupal.ts:90](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L90) +Defined in: [packages/next-drupal/src/types/drupal.ts:90](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L90) ## Properties @@ -14,7 +10,7 @@ Defined in: [packages/next-drupal/src/types/drupal.ts:90](https://github.com/cha > **id**: `string` -Defined in: [packages/next-drupal/src/types/drupal.ts:91](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L91) +Defined in: [packages/next-drupal/src/types/drupal.ts:91](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L91) --- @@ -22,7 +18,7 @@ Defined in: [packages/next-drupal/src/types/drupal.ts:91](https://github.com/cha > `optional` **label**: `string` -Defined in: [packages/next-drupal/src/types/drupal.ts:92](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L92) +Defined in: [packages/next-drupal/src/types/drupal.ts:92](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L92) --- @@ -30,7 +26,7 @@ Defined in: [packages/next-drupal/src/types/drupal.ts:92](https://github.com/cha > `optional` **path**: `string` -Defined in: [packages/next-drupal/src/types/drupal.ts:93](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L93) +Defined in: [packages/next-drupal/src/types/drupal.ts:93](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L93) --- @@ -38,7 +34,7 @@ Defined in: [packages/next-drupal/src/types/drupal.ts:93](https://github.com/cha > `optional` **terms**: `object`[] -Defined in: [packages/next-drupal/src/types/drupal.ts:94](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L94) +Defined in: [packages/next-drupal/src/types/drupal.ts:94](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L94) #### url diff --git a/www/content/docs/api/interfaces/DrupalSearchApiJsonApiResponse.mdx b/www/content/docs/api/interfaces/DrupalSearchApiJsonApiResponse.mdx new file mode 100644 index 00000000..20ac6c73 --- /dev/null +++ b/www/content/docs/api/interfaces/DrupalSearchApiJsonApiResponse.mdx @@ -0,0 +1,105 @@ +[next-drupal](../globals.mdx) / DrupalSearchApiJsonApiResponse + +# Interface: DrupalSearchApiJsonApiResponse + +Defined in: [packages/next-drupal/src/types/drupal.ts:84](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L84) + +## Extends + +- [`JsonApiResponse`](JsonApiResponse.mdx) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### data + +> **data**: `Record`\<`string`, `any`\>[] + +Defined in: [packages/next-drupal/src/types/resource.ts:12](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L12) + +#### Inherited from + +[`JsonApiResponse`](JsonApiResponse.mdx).[`data`](JsonApiResponse.mdx#data) + +--- + +### errors + +> **errors**: [`JsonApiError`](JsonApiError.mdx)[] + +Defined in: [packages/next-drupal/src/types/resource.ts:13](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L13) + +#### Inherited from + +[`JsonApiResponse`](JsonApiResponse.mdx).[`errors`](JsonApiResponse.mdx#errors) + +--- + +### included? + +> `optional` **included**: `Record`\<`string`, `any`\>[] + +Defined in: [packages/next-drupal/src/types/resource.ts:19](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L19) + +#### Inherited from + +[`JsonApiResponse`](JsonApiResponse.mdx).[`included`](JsonApiResponse.mdx#included) + +--- + +### jsonapi? + +> `optional` **jsonapi**: `object` + +Defined in: [packages/next-drupal/src/types/resource.ts:8](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L8) + +#### meta + +> **meta**: `Record`\<`string`, `any`\>[] + +#### version + +> **version**: `string` + +#### Inherited from + +[`JsonApiResponse`](JsonApiResponse.mdx).[`jsonapi`](JsonApiResponse.mdx#jsonapi) + +--- + +### links? + +> `optional` **links**: [`JsonApiLinks`](JsonApiLinks.mdx) + +Defined in: [packages/next-drupal/src/types/resource.ts:18](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L18) + +#### Inherited from + +[`JsonApiResponse`](JsonApiResponse.mdx).[`links`](JsonApiResponse.mdx#links) + +--- + +### meta + +> **meta**: `object` & `object` + +Defined in: [packages/next-drupal/src/types/drupal.ts:85](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L85) + +#### Type declaration + +##### count + +> **count**: `number` + +#### Type declaration + +##### facets? + +> `optional` **facets**: [`DrupalSearchApiFacet`](DrupalSearchApiFacet.mdx)[] + +#### Overrides + +[`JsonApiResponse`](JsonApiResponse.mdx).[`meta`](JsonApiResponse.mdx#meta) diff --git a/www/content/docs/api/interfaces/DrupalTaxonomyTerm.mdx b/www/content/docs/api/interfaces/DrupalTaxonomyTerm.mdx new file mode 100644 index 00000000..534b76df --- /dev/null +++ b/www/content/docs/api/interfaces/DrupalTaxonomyTerm.mdx @@ -0,0 +1,121 @@ +[next-drupal](../globals.mdx) / DrupalTaxonomyTerm + +# Interface: DrupalTaxonomyTerm + +Defined in: [packages/next-drupal/src/types/drupal.ts:105](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L105) + +## Extends + +- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### changed + +> **changed**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:107](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L107) + +--- + +### default_langcode + +> **default_langcode**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:108](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L108) + +--- + +### description + +> **description**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:110](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L110) + +--- + +### drupal_internal\_\_tid + +> **drupal_internal\_\_tid**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:106](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L106) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`id`](JsonApiResourceWithPath.mdx#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`langcode`](JsonApiResourceWithPath.mdx#langcode) + +--- + +### name + +> **name**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:109](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L109) + +--- + +### path + +> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.mdx) + +Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L66) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`path`](JsonApiResourceWithPath.mdx#path) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`status`](JsonApiResourceWithPath.mdx#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`type`](JsonApiResourceWithPath.mdx#type) + +--- + +### weight + +> **weight**: `number` + +Defined in: [packages/next-drupal/src/types/drupal.ts:111](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L111) diff --git a/www/content/api/interfaces/DrupalTranslatedPath.md b/www/content/docs/api/interfaces/DrupalTranslatedPath.mdx similarity index 58% rename from www/content/api/interfaces/DrupalTranslatedPath.md rename to www/content/docs/api/interfaces/DrupalTranslatedPath.mdx index 0a9bb51d..617e954c 100644 --- a/www/content/api/interfaces/DrupalTranslatedPath.md +++ b/www/content/docs/api/interfaces/DrupalTranslatedPath.mdx @@ -1,12 +1,8 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalTranslatedPath +[next-drupal](../globals.mdx) / DrupalTranslatedPath # Interface: DrupalTranslatedPath -Defined in: [packages/next-drupal/src/types/drupal.ts:114](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L114) +Defined in: [packages/next-drupal/src/types/drupal.ts:114](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L114) ## Properties @@ -14,7 +10,7 @@ Defined in: [packages/next-drupal/src/types/drupal.ts:114](https://github.com/ch > **entity**: `object` -Defined in: [packages/next-drupal/src/types/drupal.ts:117](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L117) +Defined in: [packages/next-drupal/src/types/drupal.ts:117](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L117) #### bundle @@ -50,7 +46,7 @@ Defined in: [packages/next-drupal/src/types/drupal.ts:117](https://github.com/ch > **isHomePath**: `boolean` -Defined in: [packages/next-drupal/src/types/drupal.ts:116](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L116) +Defined in: [packages/next-drupal/src/types/drupal.ts:116](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L116) --- @@ -58,7 +54,7 @@ Defined in: [packages/next-drupal/src/types/drupal.ts:116](https://github.com/ch > `optional` **jsonapi**: `object` -Defined in: [packages/next-drupal/src/types/drupal.ts:127](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L127) +Defined in: [packages/next-drupal/src/types/drupal.ts:127](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L127) #### basePath @@ -86,7 +82,7 @@ Defined in: [packages/next-drupal/src/types/drupal.ts:127](https://github.com/ch > `optional` **label**: `string` -Defined in: [packages/next-drupal/src/types/drupal.ts:126](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L126) +Defined in: [packages/next-drupal/src/types/drupal.ts:126](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L126) --- @@ -94,7 +90,7 @@ Defined in: [packages/next-drupal/src/types/drupal.ts:126](https://github.com/ch > `optional` **meta**: `Record`\<`string`, `unknown`\> -Defined in: [packages/next-drupal/src/types/drupal.ts:134](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L134) +Defined in: [packages/next-drupal/src/types/drupal.ts:134](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L134) --- @@ -102,7 +98,7 @@ Defined in: [packages/next-drupal/src/types/drupal.ts:134](https://github.com/ch > `optional` **redirect**: `object`[] -Defined in: [packages/next-drupal/src/types/drupal.ts:135](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L135) +Defined in: [packages/next-drupal/src/types/drupal.ts:135](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L135) #### from @@ -122,4 +118,4 @@ Defined in: [packages/next-drupal/src/types/drupal.ts:135](https://github.com/ch > **resolved**: `string` -Defined in: [packages/next-drupal/src/types/drupal.ts:115](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L115) +Defined in: [packages/next-drupal/src/types/drupal.ts:115](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L115) diff --git a/www/content/docs/api/interfaces/DrupalUser.mdx b/www/content/docs/api/interfaces/DrupalUser.mdx new file mode 100644 index 00000000..43835270 --- /dev/null +++ b/www/content/docs/api/interfaces/DrupalUser.mdx @@ -0,0 +1,113 @@ +[next-drupal](../globals.mdx) / DrupalUser + +# Interface: DrupalUser + +Defined in: [packages/next-drupal/src/types/drupal.ts:142](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L142) + +## Extends + +- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### changed + +> **changed**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:144](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L144) + +--- + +### created + +> **created**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:145](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L145) + +--- + +### default_langcode + +> **default_langcode**: `boolean` + +Defined in: [packages/next-drupal/src/types/drupal.ts:146](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L146) + +--- + +### drupal_internal\_\_uid + +> **drupal_internal\_\_uid**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:143](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L143) + +--- + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`id`](JsonApiResourceWithPath.mdx#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`langcode`](JsonApiResourceWithPath.mdx#langcode) + +--- + +### name + +> **name**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:147](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L147) + +--- + +### path + +> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.mdx) + +Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L66) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`path`](JsonApiResourceWithPath.mdx#path) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`status`](JsonApiResourceWithPath.mdx#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx).[`type`](JsonApiResourceWithPath.mdx#type) diff --git a/www/content/docs/api/interfaces/DrupalView.mdx b/www/content/docs/api/interfaces/DrupalView.mdx new file mode 100644 index 00000000..25dec530 --- /dev/null +++ b/www/content/docs/api/interfaces/DrupalView.mdx @@ -0,0 +1,49 @@ +[next-drupal](../globals.mdx) / DrupalView + +# Interface: DrupalView\ + +Defined in: [packages/next-drupal/src/types/drupal.ts:151](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L151) + +## Type Parameters + +• **T** = `Record`\<`string`, `any`\>[] + +## Properties + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:152](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L152) + +--- + +### links + +> **links**: [`JsonApiLinks`](JsonApiLinks.mdx) + +Defined in: [packages/next-drupal/src/types/drupal.ts:155](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L155) + +--- + +### meta + +> **meta**: `object` + +Defined in: [packages/next-drupal/src/types/drupal.ts:154](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L154) + +#### Index Signature + +\[`key`: `string`\]: `any` + +#### count + +> **count**: `number` + +--- + +### results + +> **results**: `T` + +Defined in: [packages/next-drupal/src/types/drupal.ts:153](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L153) diff --git a/www/content/api/interfaces/FetchOptions.md b/www/content/docs/api/interfaces/FetchOptions.mdx similarity index 91% rename from www/content/api/interfaces/FetchOptions.md rename to www/content/docs/api/interfaces/FetchOptions.mdx index 4a1bcdfc..16f3b1d8 100644 --- a/www/content/api/interfaces/FetchOptions.md +++ b/www/content/docs/api/interfaces/FetchOptions.mdx @@ -1,12 +1,8 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / FetchOptions +[next-drupal](../globals.mdx) / FetchOptions # Interface: FetchOptions -Defined in: [packages/next-drupal/src/types/options.ts:9](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L9) +Defined in: [packages/next-drupal/src/types/options.ts:9](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/options.ts#L9) ## Extends @@ -222,6 +218,6 @@ Can only be null. Used to disassociate request from any Window. ### withAuth? -> `optional` **withAuth**: `boolean` \| [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.md) +> `optional` **withAuth**: `boolean` \| [`NextDrupalAuth`](../type-aliases/NextDrupalAuth.mdx) -Defined in: [packages/next-drupal/src/types/options.ts:10](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L10) +Defined in: [packages/next-drupal/src/types/options.ts:10](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/options.ts#L10) diff --git a/www/content/api/interfaces/JsonApiCreateFileResourceBody.md b/www/content/docs/api/interfaces/JsonApiCreateFileResourceBody.mdx similarity index 59% rename from www/content/api/interfaces/JsonApiCreateFileResourceBody.md rename to www/content/docs/api/interfaces/JsonApiCreateFileResourceBody.mdx index c8a51d14..735cfe5e 100644 --- a/www/content/api/interfaces/JsonApiCreateFileResourceBody.md +++ b/www/content/docs/api/interfaces/JsonApiCreateFileResourceBody.mdx @@ -1,12 +1,8 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiCreateFileResourceBody +[next-drupal](../globals.mdx) / JsonApiCreateFileResourceBody # Interface: JsonApiCreateFileResourceBody -Defined in: [packages/next-drupal/src/types/resource.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L37) +Defined in: [packages/next-drupal/src/types/resource.ts:37](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L37) ## Properties @@ -14,7 +10,7 @@ Defined in: [packages/next-drupal/src/types/resource.ts:37](https://github.com/c > **data**: `object` -Defined in: [packages/next-drupal/src/types/resource.ts:38](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L38) +Defined in: [packages/next-drupal/src/types/resource.ts:38](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L38) #### attributes diff --git a/www/content/api/interfaces/JsonApiCreateResourceBody.md b/www/content/docs/api/interfaces/JsonApiCreateResourceBody.mdx similarity index 51% rename from www/content/api/interfaces/JsonApiCreateResourceBody.md rename to www/content/docs/api/interfaces/JsonApiCreateResourceBody.mdx index cb570c7b..662a34f5 100644 --- a/www/content/api/interfaces/JsonApiCreateResourceBody.md +++ b/www/content/docs/api/interfaces/JsonApiCreateResourceBody.mdx @@ -1,12 +1,8 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiCreateResourceBody +[next-drupal](../globals.mdx) / JsonApiCreateResourceBody # Interface: JsonApiCreateResourceBody -Defined in: [packages/next-drupal/src/types/resource.ts:29](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L29) +Defined in: [packages/next-drupal/src/types/resource.ts:29](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L29) ## Properties @@ -14,7 +10,7 @@ Defined in: [packages/next-drupal/src/types/resource.ts:29](https://github.com/c > **data**: `object` -Defined in: [packages/next-drupal/src/types/resource.ts:30](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L30) +Defined in: [packages/next-drupal/src/types/resource.ts:30](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L30) #### attributes? @@ -22,7 +18,7 @@ Defined in: [packages/next-drupal/src/types/resource.ts:30](https://github.com/c #### relationships? -> `optional` **relationships**: `Record`\<`string`, [`JsonApiResourceBodyRelationship`](JsonApiResourceBodyRelationship.md)\> +> `optional` **relationships**: `Record`\<`string`, [`JsonApiResourceBodyRelationship`](JsonApiResourceBodyRelationship.mdx)\> #### type? diff --git a/www/content/docs/api/interfaces/JsonApiError.mdx b/www/content/docs/api/interfaces/JsonApiError.mdx new file mode 100644 index 00000000..5e1d23fb --- /dev/null +++ b/www/content/docs/api/interfaces/JsonApiError.mdx @@ -0,0 +1,53 @@ +[next-drupal](../globals.mdx) / JsonApiError + +# Interface: JsonApiError + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:2](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L2) + +## Properties + +### code? + +> `optional` **code**: `string` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:5](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L5) + +--- + +### detail? + +> `optional` **detail**: `string` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:7](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L7) + +--- + +### id? + +> `optional` **id**: `string` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:3](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L3) + +--- + +### links? + +> `optional` **links**: [`JsonApiLinks`](JsonApiLinks.mdx) + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:8](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L8) + +--- + +### status? + +> `optional` **status**: `string` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:4](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L4) + +--- + +### title? + +> `optional` **title**: `string` + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:6](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L6) diff --git a/www/content/docs/api/interfaces/JsonApiLinks.mdx b/www/content/docs/api/interfaces/JsonApiLinks.mdx new file mode 100644 index 00000000..4968ad6e --- /dev/null +++ b/www/content/docs/api/interfaces/JsonApiLinks.mdx @@ -0,0 +1,9 @@ +[next-drupal](../globals.mdx) / JsonApiLinks + +# Interface: JsonApiLinks + +Defined in: [packages/next-drupal/src/jsonapi-errors.ts:12](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/jsonapi-errors.ts#L12) + +## Indexable + +\[`key`: `string`\]: `string` \| `Record`\<`string`, `string`\> diff --git a/www/content/docs/api/interfaces/JsonApiResource.mdx b/www/content/docs/api/interfaces/JsonApiResource.mdx new file mode 100644 index 00000000..07aa776f --- /dev/null +++ b/www/content/docs/api/interfaces/JsonApiResource.mdx @@ -0,0 +1,53 @@ +[next-drupal](../globals.mdx) / JsonApiResource + +# Interface: JsonApiResource + +Defined in: [packages/next-drupal/src/types/resource.ts:58](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L58) + +## Extends + +- `Record`\<`string`, `any`\> + +## Extended by + +- [`DrupalBlock`](DrupalBlock.mdx) +- [`DrupalFile`](DrupalFile.mdx) +- [`DrupalMedia`](DrupalMedia.mdx) +- [`DrupalParagraph`](DrupalParagraph.mdx) +- [`JsonApiResourceWithPath`](JsonApiResourceWithPath.mdx) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L59) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L61) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L62) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L60) diff --git a/www/content/docs/api/interfaces/JsonApiResourceBodyRelationship.mdx b/www/content/docs/api/interfaces/JsonApiResourceBodyRelationship.mdx new file mode 100644 index 00000000..9131be89 --- /dev/null +++ b/www/content/docs/api/interfaces/JsonApiResourceBodyRelationship.mdx @@ -0,0 +1,21 @@ +[next-drupal](../globals.mdx) / JsonApiResourceBodyRelationship + +# Interface: JsonApiResourceBodyRelationship + +Defined in: [packages/next-drupal/src/types/resource.ts:22](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L22) + +## Properties + +### data + +> **data**: `object` + +Defined in: [packages/next-drupal/src/types/resource.ts:23](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L23) + +#### id + +> **id**: `string` + +#### type + +> **type**: `string` diff --git a/www/content/docs/api/interfaces/JsonApiResourceWithPath.mdx b/www/content/docs/api/interfaces/JsonApiResourceWithPath.mdx new file mode 100644 index 00000000..d89c178f --- /dev/null +++ b/www/content/docs/api/interfaces/JsonApiResourceWithPath.mdx @@ -0,0 +1,75 @@ +[next-drupal](../globals.mdx) / JsonApiResourceWithPath + +# Interface: JsonApiResourceWithPath + +Defined in: [packages/next-drupal/src/types/resource.ts:65](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L65) + +## Extends + +- [`JsonApiResource`](JsonApiResource.mdx) + +## Extended by + +- [`DrupalNode`](DrupalNode.mdx) +- [`DrupalTaxonomyTerm`](DrupalTaxonomyTerm.mdx) +- [`DrupalUser`](DrupalUser.mdx) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### id + +> **id**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:59](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L59) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`id`](JsonApiResource.mdx#id) + +--- + +### langcode + +> **langcode**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:61](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L61) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`langcode`](JsonApiResource.mdx#langcode) + +--- + +### path + +> **path**: [`DrupalPathAlias`](../type-aliases/DrupalPathAlias.mdx) + +Defined in: [packages/next-drupal/src/types/resource.ts:66](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L66) + +--- + +### status + +> **status**: `boolean` + +Defined in: [packages/next-drupal/src/types/resource.ts:62](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L62) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`status`](JsonApiResource.mdx#status) + +--- + +### type + +> **type**: `string` + +Defined in: [packages/next-drupal/src/types/resource.ts:60](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L60) + +#### Inherited from + +[`JsonApiResource`](JsonApiResource.mdx).[`type`](JsonApiResource.mdx#type) diff --git a/www/content/api/interfaces/JsonApiResponse.md b/www/content/docs/api/interfaces/JsonApiResponse.mdx similarity index 51% rename from www/content/api/interfaces/JsonApiResponse.md rename to www/content/docs/api/interfaces/JsonApiResponse.mdx index d497a03f..00bdf14f 100644 --- a/www/content/api/interfaces/JsonApiResponse.md +++ b/www/content/docs/api/interfaces/JsonApiResponse.mdx @@ -1,12 +1,8 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiResponse +[next-drupal](../globals.mdx) / JsonApiResponse # Interface: JsonApiResponse -Defined in: [packages/next-drupal/src/types/resource.ts:7](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L7) +Defined in: [packages/next-drupal/src/types/resource.ts:7](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L7) ## Extends @@ -14,7 +10,7 @@ Defined in: [packages/next-drupal/src/types/resource.ts:7](https://github.com/ch ## Extended by -- [`DrupalSearchApiJsonApiResponse`](DrupalSearchApiJsonApiResponse.md) +- [`DrupalSearchApiJsonApiResponse`](DrupalSearchApiJsonApiResponse.mdx) ## Indexable @@ -26,15 +22,15 @@ Defined in: [packages/next-drupal/src/types/resource.ts:7](https://github.com/ch > **data**: `Record`\<`string`, `any`\>[] -Defined in: [packages/next-drupal/src/types/resource.ts:12](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L12) +Defined in: [packages/next-drupal/src/types/resource.ts:12](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L12) --- ### errors -> **errors**: [`JsonApiError`](JsonApiError.md)[] +> **errors**: [`JsonApiError`](JsonApiError.mdx)[] -Defined in: [packages/next-drupal/src/types/resource.ts:13](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L13) +Defined in: [packages/next-drupal/src/types/resource.ts:13](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L13) --- @@ -42,7 +38,7 @@ Defined in: [packages/next-drupal/src/types/resource.ts:13](https://github.com/c > `optional` **included**: `Record`\<`string`, `any`\>[] -Defined in: [packages/next-drupal/src/types/resource.ts:19](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L19) +Defined in: [packages/next-drupal/src/types/resource.ts:19](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L19) --- @@ -50,7 +46,7 @@ Defined in: [packages/next-drupal/src/types/resource.ts:19](https://github.com/c > `optional` **jsonapi**: `object` -Defined in: [packages/next-drupal/src/types/resource.ts:8](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L8) +Defined in: [packages/next-drupal/src/types/resource.ts:8](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L8) #### meta @@ -64,9 +60,9 @@ Defined in: [packages/next-drupal/src/types/resource.ts:8](https://github.com/ch ### links? -> `optional` **links**: [`JsonApiLinks`](JsonApiLinks.md) +> `optional` **links**: [`JsonApiLinks`](JsonApiLinks.mdx) -Defined in: [packages/next-drupal/src/types/resource.ts:18](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L18) +Defined in: [packages/next-drupal/src/types/resource.ts:18](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L18) --- @@ -74,7 +70,7 @@ Defined in: [packages/next-drupal/src/types/resource.ts:18](https://github.com/c > **meta**: `object` -Defined in: [packages/next-drupal/src/types/resource.ts:14](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L14) +Defined in: [packages/next-drupal/src/types/resource.ts:14](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L14) #### Index Signature diff --git a/www/content/api/interfaces/JsonApiUpdateResourceBody.md b/www/content/docs/api/interfaces/JsonApiUpdateResourceBody.mdx similarity index 53% rename from www/content/api/interfaces/JsonApiUpdateResourceBody.md rename to www/content/docs/api/interfaces/JsonApiUpdateResourceBody.mdx index ad4b5342..7f627e64 100644 --- a/www/content/api/interfaces/JsonApiUpdateResourceBody.md +++ b/www/content/docs/api/interfaces/JsonApiUpdateResourceBody.mdx @@ -1,12 +1,8 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiUpdateResourceBody +[next-drupal](../globals.mdx) / JsonApiUpdateResourceBody # Interface: JsonApiUpdateResourceBody -Defined in: [packages/next-drupal/src/types/resource.ts:49](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L49) +Defined in: [packages/next-drupal/src/types/resource.ts:49](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L49) ## Properties @@ -14,7 +10,7 @@ Defined in: [packages/next-drupal/src/types/resource.ts:49](https://github.com/c > **data**: `object` -Defined in: [packages/next-drupal/src/types/resource.ts:50](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/resource.ts#L50) +Defined in: [packages/next-drupal/src/types/resource.ts:50](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/resource.ts#L50) #### attributes? @@ -26,7 +22,7 @@ Defined in: [packages/next-drupal/src/types/resource.ts:50](https://github.com/c #### relationships? -> `optional` **relationships**: `Record`\<`string`, [`JsonApiResourceBodyRelationship`](JsonApiResourceBodyRelationship.md)\> +> `optional` **relationships**: `Record`\<`string`, [`JsonApiResourceBodyRelationship`](JsonApiResourceBodyRelationship.mdx)\> #### type? diff --git a/www/content/api/interfaces/Logger.md b/www/content/docs/api/interfaces/Logger.mdx similarity index 56% rename from www/content/api/interfaces/Logger.md rename to www/content/docs/api/interfaces/Logger.mdx index bd5578e3..38775618 100644 --- a/www/content/api/interfaces/Logger.md +++ b/www/content/docs/api/interfaces/Logger.mdx @@ -1,12 +1,8 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / Logger +[next-drupal](../globals.mdx) / Logger # Interface: Logger -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:124](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L124) +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:124](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L124) ## Methods @@ -14,7 +10,7 @@ Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:124](https://git > **debug**(`message`): `void` -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:127](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L127) +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:127](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L127) #### Parameters @@ -32,7 +28,7 @@ Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:127](https://git > **error**(`message`): `void` -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:131](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L131) +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:131](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L131) #### Parameters @@ -50,7 +46,7 @@ Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:131](https://git > **log**(`message`): `void` -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:125](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L125) +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:125](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L125) #### Parameters @@ -68,7 +64,7 @@ Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:125](https://git > **warn**(`message`): `void` -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:129](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L129) +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:129](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L129) #### Parameters diff --git a/www/content/docs/api/interfaces/NextDrupalAuthClientIdSecret.mdx b/www/content/docs/api/interfaces/NextDrupalAuthClientIdSecret.mdx new file mode 100644 index 00000000..0c936502 --- /dev/null +++ b/www/content/docs/api/interfaces/NextDrupalAuthClientIdSecret.mdx @@ -0,0 +1,37 @@ +[next-drupal](../globals.mdx) / NextDrupalAuthClientIdSecret + +# Interface: NextDrupalAuthClientIdSecret + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:101](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L101) + +## Properties + +### clientId + +> **clientId**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:102](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L102) + +--- + +### clientSecret + +> **clientSecret**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:103](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L103) + +--- + +### scope? + +> `optional` **scope**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:105](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L105) + +--- + +### url? + +> `optional` **url**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:104](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L104) diff --git a/www/content/docs/api/interfaces/NextDrupalAuthUsernamePassword.mdx b/www/content/docs/api/interfaces/NextDrupalAuthUsernamePassword.mdx new file mode 100644 index 00000000..56cd85b2 --- /dev/null +++ b/www/content/docs/api/interfaces/NextDrupalAuthUsernamePassword.mdx @@ -0,0 +1,21 @@ +[next-drupal](../globals.mdx) / NextDrupalAuthUsernamePassword + +# Interface: NextDrupalAuthUsernamePassword + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:108](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L108) + +## Properties + +### password + +> **password**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:110](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L110) + +--- + +### username + +> **username**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:109](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L109) diff --git a/www/content/docs/api/interfaces/Serializer.mdx b/www/content/docs/api/interfaces/Serializer.mdx new file mode 100644 index 00000000..850fbdc1 --- /dev/null +++ b/www/content/docs/api/interfaces/Serializer.mdx @@ -0,0 +1,13 @@ +[next-drupal](../globals.mdx) / Serializer + +# Interface: Serializer + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:39](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-pages.ts#L39) + +## Properties + +### deserialize + +> **deserialize**: [`JsonDeserializer`](../type-aliases/JsonDeserializer.mdx) + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:40](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-pages.ts#L40) diff --git a/www/content/docs/api/type-aliases/AccessTokenScope.mdx b/www/content/docs/api/type-aliases/AccessTokenScope.mdx new file mode 100644 index 00000000..1d9eefa5 --- /dev/null +++ b/www/content/docs/api/type-aliases/AccessTokenScope.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / AccessTokenScope + +# Type Alias: AccessTokenScope + +> **AccessTokenScope**: `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:120](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L120) diff --git a/www/content/docs/api/type-aliases/BaseUrl.mdx b/www/content/docs/api/type-aliases/BaseUrl.mdx new file mode 100644 index 00000000..5f0347ed --- /dev/null +++ b/www/content/docs/api/type-aliases/BaseUrl.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / BaseUrl + +# Type Alias: BaseUrl + +> **BaseUrl**: `string` + +Defined in: [packages/next-drupal/src/types/options.ts:3](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/options.ts#L3) diff --git a/www/content/docs/api/type-aliases/DrupalClientAuth.mdx b/www/content/docs/api/type-aliases/DrupalClientAuth.mdx new file mode 100644 index 00000000..50a4485e --- /dev/null +++ b/www/content/docs/api/type-aliases/DrupalClientAuth.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / DrupalClientAuth + +# Type Alias: DrupalClientAuth + +> **DrupalClientAuth**: [`NextDrupalAuth`](NextDrupalAuth.mdx) + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:31](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-pages.ts#L31) diff --git a/www/content/docs/api/type-aliases/DrupalClientAuthAccessToken.mdx b/www/content/docs/api/type-aliases/DrupalClientAuthAccessToken.mdx new file mode 100644 index 00000000..b30ed940 --- /dev/null +++ b/www/content/docs/api/type-aliases/DrupalClientAuthAccessToken.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / DrupalClientAuthAccessToken + +# Type Alias: DrupalClientAuthAccessToken + +> **DrupalClientAuthAccessToken**: [`NextDrupalAuthAccessToken`](NextDrupalAuthAccessToken.mdx) + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:37](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-pages.ts#L37) diff --git a/www/content/docs/api/type-aliases/DrupalClientAuthClientIdSecret.mdx b/www/content/docs/api/type-aliases/DrupalClientAuthClientIdSecret.mdx new file mode 100644 index 00000000..1cf7ca4f --- /dev/null +++ b/www/content/docs/api/type-aliases/DrupalClientAuthClientIdSecret.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / DrupalClientAuthClientIdSecret + +# Type Alias: DrupalClientAuthClientIdSecret + +> **DrupalClientAuthClientIdSecret**: [`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.mdx) + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:35](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-pages.ts#L35) diff --git a/www/content/docs/api/type-aliases/DrupalClientAuthUsernamePassword.mdx b/www/content/docs/api/type-aliases/DrupalClientAuthUsernamePassword.mdx new file mode 100644 index 00000000..f14937ef --- /dev/null +++ b/www/content/docs/api/type-aliases/DrupalClientAuthUsernamePassword.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / DrupalClientAuthUsernamePassword + +# Type Alias: DrupalClientAuthUsernamePassword + +> **DrupalClientAuthUsernamePassword**: [`NextDrupalAuthUsernamePassword`](../interfaces/NextDrupalAuthUsernamePassword.mdx) + +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:33](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-pages.ts#L33) diff --git a/www/content/api/type-aliases/DrupalClientOptions.md b/www/content/docs/api/type-aliases/DrupalClientOptions.mdx similarity index 78% rename from www/content/api/type-aliases/DrupalClientOptions.md rename to www/content/docs/api/type-aliases/DrupalClientOptions.mdx index 03530f75..afa92fcf 100644 --- a/www/content/api/type-aliases/DrupalClientOptions.md +++ b/www/content/docs/api/type-aliases/DrupalClientOptions.mdx @@ -1,20 +1,16 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalClientOptions +[next-drupal](../globals.mdx) / DrupalClientOptions # Type Alias: DrupalClientOptions -> **DrupalClientOptions**: [`NextDrupalOptions`](NextDrupalOptions.md) & `object` +> **DrupalClientOptions**: [`NextDrupalOptions`](NextDrupalOptions.mdx) & `object` -Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:9](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-pages.ts#L9) +Defined in: [packages/next-drupal/src/types/next-drupal-pages.ts:9](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-pages.ts#L9) ## Type declaration ### serializer? -> `optional` **serializer**: [`Serializer`](../interfaces/Serializer.md) +> `optional` **serializer**: [`Serializer`](../interfaces/Serializer.mdx) Override the default data serializer. You can use this to add your own JSON:API data deserializer. diff --git a/www/content/docs/api/type-aliases/DrupalMenuItemId.mdx b/www/content/docs/api/type-aliases/DrupalMenuItemId.mdx new file mode 100644 index 00000000..a08dd58f --- /dev/null +++ b/www/content/docs/api/type-aliases/DrupalMenuItemId.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / DrupalMenuItemId + +# Type Alias: DrupalMenuItemId + +> **DrupalMenuItemId**: `string` + +Defined in: [packages/next-drupal/src/types/drupal.ts:61](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L61) diff --git a/www/content/docs/api/type-aliases/DrupalMenuLinkContent.mdx b/www/content/docs/api/type-aliases/DrupalMenuLinkContent.mdx new file mode 100644 index 00000000..6772ba1d --- /dev/null +++ b/www/content/docs/api/type-aliases/DrupalMenuLinkContent.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / DrupalMenuLinkContent + +# Type Alias: DrupalMenuLinkContent + +> **DrupalMenuLinkContent**: [`DrupalMenuItem`](../interfaces/DrupalMenuItem.mdx) + +Defined in: [packages/next-drupal/src/types/deprecated.ts:6](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/deprecated.ts#L6) diff --git a/www/content/api/type-aliases/DrupalPathAlias.md b/www/content/docs/api/type-aliases/DrupalPathAlias.mdx similarity index 54% rename from www/content/api/type-aliases/DrupalPathAlias.md rename to www/content/docs/api/type-aliases/DrupalPathAlias.mdx index cc05d14b..8ebeb2ea 100644 --- a/www/content/api/type-aliases/DrupalPathAlias.md +++ b/www/content/docs/api/type-aliases/DrupalPathAlias.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / DrupalPathAlias +[next-drupal](../globals.mdx) / DrupalPathAlias # Type Alias: DrupalPathAlias > **DrupalPathAlias**: `object` -Defined in: [packages/next-drupal/src/types/drupal.ts:78](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/drupal.ts#L78) +Defined in: [packages/next-drupal/src/types/drupal.ts:78](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/drupal.ts#L78) ## Type declaration diff --git a/www/content/api/type-aliases/EndpointSearchParams.md b/www/content/docs/api/type-aliases/EndpointSearchParams.mdx similarity index 53% rename from www/content/api/type-aliases/EndpointSearchParams.md rename to www/content/docs/api/type-aliases/EndpointSearchParams.mdx index 10d9de59..38849b45 100644 --- a/www/content/api/type-aliases/EndpointSearchParams.md +++ b/www/content/docs/api/type-aliases/EndpointSearchParams.mdx @@ -1,11 +1,7 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / EndpointSearchParams +[next-drupal](../globals.mdx) / EndpointSearchParams # Type Alias: EndpointSearchParams -> **EndpointSearchParams**: `string` \| `Record`\<`string`, `string`\> \| `URLSearchParams` \| [`JsonApiParams`](JsonApiParams.md) +> **EndpointSearchParams**: `string` \| `Record`\<`string`, `string`\> \| `URLSearchParams` \| [`JsonApiParams`](JsonApiParams.mdx) -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:134](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L134) +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:134](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L134) diff --git a/www/content/docs/api/type-aliases/Fetcher.mdx b/www/content/docs/api/type-aliases/Fetcher.mdx new file mode 100644 index 00000000..3779c779 --- /dev/null +++ b/www/content/docs/api/type-aliases/Fetcher.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / Fetcher + +# Type Alias: Fetcher + +> **Fetcher**: `WindowOrWorkerGlobalScope`\[`"fetch"`\] + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:122](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L122) diff --git a/www/content/docs/api/type-aliases/JsonApiOptions.mdx b/www/content/docs/api/type-aliases/JsonApiOptions.mdx new file mode 100644 index 00000000..1f1aeee0 --- /dev/null +++ b/www/content/docs/api/type-aliases/JsonApiOptions.mdx @@ -0,0 +1,17 @@ +[next-drupal](../globals.mdx) / JsonApiOptions + +# Type Alias: JsonApiOptions + +> **JsonApiOptions**: `object` & [`JsonApiWithAuthOption`](JsonApiWithAuthOption.mdx) & \{ `defaultLocale`: [`Locale`](Locale.mdx); `locale`: [`Locale`](Locale.mdx); \} \| \{ `defaultLocale`: `never`; `locale`: `undefined`; \} + +Defined in: [packages/next-drupal/src/types/options.ts:13](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/options.ts#L13) + +## Type declaration + +### deserialize? + +> `optional` **deserialize**: `boolean` + +### params? + +> `optional` **params**: [`JsonApiParams`](JsonApiParams.mdx) diff --git a/www/content/docs/api/type-aliases/JsonApiParams.mdx b/www/content/docs/api/type-aliases/JsonApiParams.mdx new file mode 100644 index 00000000..9d491e1c --- /dev/null +++ b/www/content/docs/api/type-aliases/JsonApiParams.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / JsonApiParams + +# Type Alias: JsonApiParams + +> **JsonApiParams**: `Record`\<`string`, `any`\> + +Defined in: [packages/next-drupal/src/types/options.ts:42](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/options.ts#L42) diff --git a/www/content/api/type-aliases/JsonApiWithAuthOption.md b/www/content/docs/api/type-aliases/JsonApiWithAuthOption.mdx similarity index 51% rename from www/content/api/type-aliases/JsonApiWithAuthOption.md rename to www/content/docs/api/type-aliases/JsonApiWithAuthOption.mdx index 18b867d7..675cef62 100644 --- a/www/content/api/type-aliases/JsonApiWithAuthOption.md +++ b/www/content/docs/api/type-aliases/JsonApiWithAuthOption.mdx @@ -1,17 +1,13 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiWithAuthOption +[next-drupal](../globals.mdx) / JsonApiWithAuthOption # Type Alias: JsonApiWithAuthOption > **JsonApiWithAuthOption**: `object` -Defined in: [packages/next-drupal/src/types/options.ts:28](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L28) +Defined in: [packages/next-drupal/src/types/options.ts:28](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/options.ts#L28) ## Type declaration ### withAuth? -> `optional` **withAuth**: `boolean` \| [`NextDrupalAuth`](NextDrupalAuth.md) +> `optional` **withAuth**: `boolean` \| [`NextDrupalAuth`](NextDrupalAuth.mdx) diff --git a/www/content/api/type-aliases/JsonApiWithCacheOptions.md b/www/content/docs/api/type-aliases/JsonApiWithCacheOptions.mdx similarity index 55% rename from www/content/api/type-aliases/JsonApiWithCacheOptions.md rename to www/content/docs/api/type-aliases/JsonApiWithCacheOptions.mdx index 203660be..602092cd 100644 --- a/www/content/api/type-aliases/JsonApiWithCacheOptions.md +++ b/www/content/docs/api/type-aliases/JsonApiWithCacheOptions.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiWithCacheOptions +[next-drupal](../globals.mdx) / JsonApiWithCacheOptions # Type Alias: JsonApiWithCacheOptions > **JsonApiWithCacheOptions**: `object` -Defined in: [packages/next-drupal/src/types/options.ts:32](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L32) +Defined in: [packages/next-drupal/src/types/options.ts:32](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/options.ts#L32) ## Type declaration diff --git a/www/content/docs/api/type-aliases/JsonApiWithLocaleOptions.mdx b/www/content/docs/api/type-aliases/JsonApiWithLocaleOptions.mdx new file mode 100644 index 00000000..8cbb2e6e --- /dev/null +++ b/www/content/docs/api/type-aliases/JsonApiWithLocaleOptions.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / JsonApiWithLocaleOptions + +# Type Alias: JsonApiWithLocaleOptions + +> **JsonApiWithLocaleOptions**: `Omit`\<[`JsonApiOptions`](JsonApiOptions.mdx), `"withAuth"`\> + +Defined in: [packages/next-drupal/src/types/deprecated.ts:4](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/deprecated.ts#L4) diff --git a/www/content/api/type-aliases/JsonApiWithNextFetchOptions.md b/www/content/docs/api/type-aliases/JsonApiWithNextFetchOptions.mdx similarity index 51% rename from www/content/api/type-aliases/JsonApiWithNextFetchOptions.md rename to www/content/docs/api/type-aliases/JsonApiWithNextFetchOptions.mdx index 4670b330..ad685a44 100644 --- a/www/content/api/type-aliases/JsonApiWithNextFetchOptions.md +++ b/www/content/docs/api/type-aliases/JsonApiWithNextFetchOptions.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonApiWithNextFetchOptions +[next-drupal](../globals.mdx) / JsonApiWithNextFetchOptions # Type Alias: JsonApiWithNextFetchOptions > **JsonApiWithNextFetchOptions**: `object` -Defined in: [packages/next-drupal/src/types/options.ts:37](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/options.ts#L37) +Defined in: [packages/next-drupal/src/types/options.ts:37](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/options.ts#L37) ## Type declaration diff --git a/www/content/api/type-aliases/JsonDeserializer.md b/www/content/docs/api/type-aliases/JsonDeserializer.mdx similarity index 61% rename from www/content/api/type-aliases/JsonDeserializer.md rename to www/content/docs/api/type-aliases/JsonDeserializer.mdx index 700f21e6..e861fc0b 100644 --- a/www/content/api/type-aliases/JsonDeserializer.md +++ b/www/content/docs/api/type-aliases/JsonDeserializer.mdx @@ -1,14 +1,10 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / JsonDeserializer +[next-drupal](../globals.mdx) / JsonDeserializer # Type Alias: JsonDeserializer() > **JsonDeserializer**: (`body`, `options`?) => `TJsonaModel` \| `TJsonaModel`[] -Defined in: [packages/next-drupal/src/types/next-drupal.ts:46](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L46) +Defined in: [packages/next-drupal/src/types/next-drupal.ts:46](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal.ts#L46) ## Parameters diff --git a/www/content/docs/api/type-aliases/Locale.mdx b/www/content/docs/api/type-aliases/Locale.mdx new file mode 100644 index 00000000..94c6fd36 --- /dev/null +++ b/www/content/docs/api/type-aliases/Locale.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / Locale + +# Type Alias: Locale + +> **Locale**: `string` + +Defined in: [packages/next-drupal/src/types/options.ts:5](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/options.ts#L5) diff --git a/www/content/docs/api/type-aliases/NextDrupalAuth.mdx b/www/content/docs/api/type-aliases/NextDrupalAuth.mdx new file mode 100644 index 00000000..72c84ad5 --- /dev/null +++ b/www/content/docs/api/type-aliases/NextDrupalAuth.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / NextDrupalAuth + +# Type Alias: NextDrupalAuth + +> **NextDrupalAuth**: [`NextDrupalAuthAccessToken`](NextDrupalAuthAccessToken.mdx) \| [`NextDrupalAuthClientIdSecret`](../interfaces/NextDrupalAuthClientIdSecret.mdx) \| [`NextDrupalAuthUsernamePassword`](../interfaces/NextDrupalAuthUsernamePassword.mdx) \| () => `string` \| `string` + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:92](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L92) diff --git a/www/content/docs/api/type-aliases/NextDrupalAuthAccessToken.mdx b/www/content/docs/api/type-aliases/NextDrupalAuthAccessToken.mdx new file mode 100644 index 00000000..2e964f9d --- /dev/null +++ b/www/content/docs/api/type-aliases/NextDrupalAuthAccessToken.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / NextDrupalAuthAccessToken + +# Type Alias: NextDrupalAuthAccessToken + +> **NextDrupalAuthAccessToken**: [`AccessToken`](../interfaces/AccessToken.mdx) + +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:99](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L99) diff --git a/www/content/api/type-aliases/NextDrupalBaseOptions.md b/www/content/docs/api/type-aliases/NextDrupalBaseOptions.mdx similarity index 84% rename from www/content/api/type-aliases/NextDrupalBaseOptions.md rename to www/content/docs/api/type-aliases/NextDrupalBaseOptions.mdx index 0d41a092..a22ce3de 100644 --- a/www/content/api/type-aliases/NextDrupalBaseOptions.md +++ b/www/content/docs/api/type-aliases/NextDrupalBaseOptions.mdx @@ -1,20 +1,16 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / NextDrupalBaseOptions +[next-drupal](../globals.mdx) / NextDrupalBaseOptions # Type Alias: NextDrupalBaseOptions > **NextDrupalBaseOptions**: `object` -Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:3](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal-base.ts#L3) +Defined in: [packages/next-drupal/src/types/next-drupal-base.ts:3](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal-base.ts#L3) ## Type declaration ### accessToken? -> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.md) +> `optional` **accessToken**: [`AccessToken`](../interfaces/AccessToken.mdx) A long-lived access token you can set for the client. @@ -36,7 +32,7 @@ Set the JSON:API prefix. ### auth? -> `optional` **auth**: [`NextDrupalAuth`](NextDrupalAuth.md) +> `optional` **auth**: [`NextDrupalAuth`](NextDrupalAuth.mdx) Override the default auth. You can use this to implement your own authentication mechanism. @@ -55,7 +51,7 @@ Set debug to true to enable debug messages. ### fetcher? -> `optional` **fetcher**: [`Fetcher`](Fetcher.md) +> `optional` **fetcher**: [`Fetcher`](Fetcher.mdx) Override the default fetcher. Use this to add your own fetcher ex. axios. @@ -88,7 +84,7 @@ Set custom headers for the fetcher. ### logger? -> `optional` **logger**: [`Logger`](../interfaces/Logger.md) +> `optional` **logger**: [`Logger`](../interfaces/Logger.mdx) Override the default logger. You can use this to send logs to a third-party service. diff --git a/www/content/api/type-aliases/NextDrupalOptions.md b/www/content/docs/api/type-aliases/NextDrupalOptions.mdx similarity index 85% rename from www/content/api/type-aliases/NextDrupalOptions.md rename to www/content/docs/api/type-aliases/NextDrupalOptions.mdx index 50f1be9d..a9cfe116 100644 --- a/www/content/api/type-aliases/NextDrupalOptions.md +++ b/www/content/docs/api/type-aliases/NextDrupalOptions.mdx @@ -1,20 +1,16 @@ -[**next-drupal**](../README.md) - ---- - -[next-drupal](../globals.md) / NextDrupalOptions +[next-drupal](../globals.mdx) / NextDrupalOptions # Type Alias: NextDrupalOptions -> **NextDrupalOptions**: [`NextDrupalBaseOptions`](NextDrupalBaseOptions.md) & `object` +> **NextDrupalOptions**: [`NextDrupalBaseOptions`](NextDrupalBaseOptions.mdx) & `object` -Defined in: [packages/next-drupal/src/types/next-drupal.ts:4](https://github.com/chapter-three/next-drupal/blob/e9ce3be1c38aebdcd2cc8c7ae8d8fa2dab7f46bf/packages/next-drupal/src/types/next-drupal.ts#L4) +Defined in: [packages/next-drupal/src/types/next-drupal.ts:4](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/next-drupal.ts#L4) ## Type declaration ### cache? -> `optional` **cache**: [`DataCache`](../interfaces/DataCache.md) +> `optional` **cache**: [`DataCache`](../interfaces/DataCache.mdx) Override the default cache. @@ -25,7 +21,7 @@ Override the default cache. ### deserializer? -> `optional` **deserializer**: [`JsonDeserializer`](JsonDeserializer.md) +> `optional` **deserializer**: [`JsonDeserializer`](JsonDeserializer.mdx) Override the default data deserializer. You can use this to add your own JSON:API data deserializer. diff --git a/www/content/docs/api/type-aliases/PathPrefix.mdx b/www/content/docs/api/type-aliases/PathPrefix.mdx new file mode 100644 index 00000000..e359d3c8 --- /dev/null +++ b/www/content/docs/api/type-aliases/PathPrefix.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / PathPrefix + +# Type Alias: PathPrefix + +> **PathPrefix**: `string` + +Defined in: [packages/next-drupal/src/types/options.ts:7](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/types/options.ts#L7) diff --git a/www/content/docs/api/variables/DRAFT_DATA_COOKIE_NAME.mdx b/www/content/docs/api/variables/DRAFT_DATA_COOKIE_NAME.mdx new file mode 100644 index 00000000..ce4061bd --- /dev/null +++ b/www/content/docs/api/variables/DRAFT_DATA_COOKIE_NAME.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / DRAFT_DATA_COOKIE_NAME + +# Variable: DRAFT_DATA_COOKIE_NAME + +> `const` **DRAFT_DATA_COOKIE_NAME**: `"next_drupal_draft_data"` = `"next_drupal_draft_data"` + +Defined in: [packages/next-drupal/src/draft-constants.ts:1](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/draft-constants.ts#L1) diff --git a/www/content/docs/api/variables/DRAFT_MODE_COOKIE_NAME.mdx b/www/content/docs/api/variables/DRAFT_MODE_COOKIE_NAME.mdx new file mode 100644 index 00000000..4e0f3595 --- /dev/null +++ b/www/content/docs/api/variables/DRAFT_MODE_COOKIE_NAME.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / DRAFT_MODE_COOKIE_NAME + +# Variable: DRAFT_MODE_COOKIE_NAME + +> `const` **DRAFT_MODE_COOKIE_NAME**: `"__prerender_bypass"` = `"__prerender_bypass"` + +Defined in: [packages/next-drupal/src/draft-constants.ts:4](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/draft-constants.ts#L4) diff --git a/www/content/docs/api/variables/DrupalClient.mdx b/www/content/docs/api/variables/DrupalClient.mdx new file mode 100644 index 00000000..2a048e89 --- /dev/null +++ b/www/content/docs/api/variables/DrupalClient.mdx @@ -0,0 +1,7 @@ +[next-drupal](../globals.mdx) / DrupalClient + +# Variable: DrupalClient + +> `const` **DrupalClient**: _typeof_ [`NextDrupalPages`](../classes/NextDrupalPages.mdx) = `NextDrupalPages` + +Defined in: [packages/next-drupal/src/deprecated.ts:2](https://github.com/chapter-three/next-drupal/blob/b814feb907442ea504825c35810c973aeb865442/packages/next-drupal/src/deprecated.ts#L2) diff --git a/www/next.config.js b/www/next.config.js index 47b3c7b7..3d9e3363 100644 --- a/www/next.config.js +++ b/www/next.config.js @@ -102,6 +102,11 @@ module.exports = { destination: "/learn/on-demand-revalidation", permanent: true, }, + { + source: "/docs/api/:path*.mdx", + destination: "/docs/api/:path*", + permanent: true, + }, ] }, } diff --git a/www/package.json b/www/package.json index 73db9260..1b11886a 100644 --- a/www/package.json +++ b/www/package.json @@ -6,10 +6,10 @@ "main": "index.js", "license": "MIT", "scripts": { - "dev": "next dev -p 4444", - "build": "next build", - "preview": "next build && next start -p 4444", - "generate:docs": "typedoc --tsconfig tsconfig.docs.json" + "dev": "typedoc --tsconfig tsconfig.docs.json && next dev -p 4444", + "build": "typedoc --tsconfig tsconfig.docs.json && next build", + "preview": "typedoc --tsconfig tsconfig.docs.json && next build && next start -p 4444", + "generate:api-docs": "typedoc --tsconfig tsconfig.docs.json" }, "dependencies": { "@docsearch/react": "^3.6.0", @@ -42,4 +42,4 @@ "tailwindcss": "^3.4.3", "typescript": "^5.4.5" } -} +} \ No newline at end of file diff --git a/www/typedoc.json b/www/typedoc.json index 12226f58..05db124c 100644 --- a/www/typedoc.json +++ b/www/typedoc.json @@ -1,5 +1,7 @@ { "plugin": ["typedoc-plugin-markdown"], "entryPoints": ["../packages/next-drupal/src/index.ts"], - "out": "content/api" + "out": "content/docs/api", + "fileExtension": ".mdx", + "hidePageHeader": true }