Skip to content

Commit

Permalink
Auto generated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 6, 2024
1 parent af3d26f commit 8eb2038
Show file tree
Hide file tree
Showing 16 changed files with 232 additions and 3 deletions.
15 changes: 15 additions & 0 deletions packages/pages/docs/api/pages.getdestination.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [GetDestination](./pages.getdestination.md)

## GetDestination type

The type definition for the redirect's getDestination function.

**Signature:**

```typescript
export type GetDestination<T extends TemplateProps> = (props: T) => string;
```

**References:** [TemplateProps](./pages.templateprops.md)
2 changes: 1 addition & 1 deletion packages/pages/docs/api/pages.getredirects.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export type GetRedirects<T extends TemplateProps> = (
) => (RedirectSource | string)[];
```

**References:** [TemplateProps](./pages.templateprops.md)
**References:** [TemplateProps](./pages.templateprops.md)<!-- -->, [RedirectSource](./pages.redirectsource.md)
17 changes: 17 additions & 0 deletions packages/pages/docs/api/pages.getsources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [GetSources](./pages.getsources.md)

## GetSources type

The type definiton for the redirect's getSources function.

**Signature:**

```typescript
export type GetSources<T extends TemplateProps> = (
props: T
) => RedirectSource[];
```

**References:** [TemplateProps](./pages.templateprops.md)<!-- -->, [RedirectSource](./pages.redirectsource.md)
5 changes: 5 additions & 0 deletions packages/pages/docs/api/pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
| [PagesHttpRequest](./pages.pageshttprequest.md) | The argument passed to a http/api type function. |
| [PagesHttpResponse](./pages.pageshttpresponse.md) | The return value for a http/api serverless function. |
| [PagesOnUrlChangeRequest](./pages.pagesonurlchangerequest.md) | The argument passed to an onUrlChange type plugin. |
| [RedirectConfig](./pages.redirectconfig.md) | The exported <code>config</code> function's definition. |
| [RedirectModule](./pages.redirectmodule.md) | The type to include in any redirect file. It defines the available functions and fields that are available to the redirect. |
| [RedirectSource](./pages.redirectsource.md) | The type of a RedirectSource. It defines the source and statusCode for a redirect. |
| [Site](./pages.site.md) | The site information passed to a serverless function by the Yext system. |
| [StaticTemplateConfig](./pages.statictemplateconfig.md) | Shape of TemplateConfig for Static Pages |
| [Stream](./pages.stream.md) | The stream config defined in [TemplateConfig.stream](./pages.templateconfig.stream.md)<!-- -->. |
Expand All @@ -40,9 +43,11 @@
| [Attributes](./pages.attributes.md) | Custom type for specifying HTML element attributes in the [Tag](./pages.tag.md) interface. |
| [FunctionType](./pages.functiontype.md) | The valid Serverless Function types; |
| [GetAuthScope](./pages.getauthscope.md) | The type definition for the template's GetAuthScope function. |
| [GetDestination](./pages.getdestination.md) | The type definition for the redirect's getDestination function. |
| [GetHeadConfig](./pages.getheadconfig.md) | The type definition for the template's getHeadConfig function. getHeadConfig takes in the provided data and will output a HeadConfig object which will be used to generate the tags inside the head tag of the generated HTML document. |
| [GetPath](./pages.getpath.md) | The type definition for the template's getPath function. |
| [GetRedirects](./pages.getredirects.md) | The type definiton for the template's getRedirects function. |
| [GetSources](./pages.getsources.md) | The type definiton for the redirect's getSources function. |
| [HttpFunction](./pages.httpfunction.md) | A function that runs when a specific path is visited on the site. |
| [Manifest](./pages.manifest.md) | A manifest of bundled files present during a production build. |
| [Module](./pages.module.md) | The type definition for the module's default function. |
Expand Down
21 changes: 21 additions & 0 deletions packages/pages/docs/api/pages.redirectconfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [RedirectConfig](./pages.redirectconfig.md)

## RedirectConfig interface

The exported `config` function's definition.

**Signature:**

```typescript
export interface RedirectConfig
```

## Properties

| Property | Modifiers | Type | Description |
| ----------------------------------------------- | --------- | --------------------------- | ----------------------------------------------------------------------------------------------------- |
| [name?](./pages.redirectconfig.name.md) | | string | _(Optional)_ The name of the redirect. If not defined uses the redirect filename (without extension) |
| [stream?](./pages.redirectconfig.stream.md) | | [Stream](./pages.stream.md) | _(Optional)_ The stream configuration used by the redirect |
| [streamId?](./pages.redirectconfig.streamid.md) | | string | _(Optional)_ The stream that this redirect uses. If a stream is defined the streamId is not required. |
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.redirectconfig.name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [RedirectConfig](./pages.redirectconfig.md) &gt; [name](./pages.redirectconfig.name.md)

## RedirectConfig.name property

The name of the redirect. If not defined uses the redirect filename (without extension)

**Signature:**

```typescript
name?: string;
```
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.redirectconfig.stream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [RedirectConfig](./pages.redirectconfig.md) &gt; [stream](./pages.redirectconfig.stream.md)

## RedirectConfig.stream property

The stream configuration used by the redirect

**Signature:**

```typescript
stream?: Stream;
```
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.redirectconfig.streamid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [RedirectConfig](./pages.redirectconfig.md) &gt; [streamId](./pages.redirectconfig.streamid.md)

## RedirectConfig.streamId property

The stream that this redirect uses. If a stream is defined the streamId is not required.

**Signature:**

```typescript
streamId?: string;
```
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.redirectmodule.config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [RedirectModule](./pages.redirectmodule.md) &gt; [config](./pages.redirectmodule.config.md)

## RedirectModule.config property

The exported config function

**Signature:**

```typescript
config?: RedirectConfig;
```
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.redirectmodule.getdestination.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [RedirectModule](./pages.redirectmodule.md) &gt; [getDestination](./pages.redirectmodule.getdestination.md)

## RedirectModule.getDestination property

The exported GetDestination function

**Signature:**

```typescript
getDestination: GetDestination<T>;
```
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.redirectmodule.getsources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [RedirectModule](./pages.redirectmodule.md) &gt; [getSources](./pages.redirectmodule.getsources.md)

## RedirectModule.getSources property

The exported GetSources function

**Signature:**

```typescript
getSources: GetSources<T>;
```
21 changes: 21 additions & 0 deletions packages/pages/docs/api/pages.redirectmodule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [RedirectModule](./pages.redirectmodule.md)

## RedirectModule interface

The type to include in any redirect file. It defines the available functions and fields that are available to the redirect.

**Signature:**

```typescript
export interface RedirectModule<T extends TemplateProps>
```

## Properties

| Property | Modifiers | Type | Description |
| ---------------------------------------------------------- | --------- | ------------------------------------------------------------ | ----------------------------------------- |
| [config?](./pages.redirectmodule.config.md) | | [RedirectConfig](./pages.redirectconfig.md) | _(Optional)_ The exported config function |
| [getDestination](./pages.redirectmodule.getdestination.md) | | [GetDestination](./pages.getdestination.md)<!-- -->&lt;T&gt; | The exported GetDestination function |
| [getSources](./pages.redirectmodule.getsources.md) | | [GetSources](./pages.getsources.md)<!-- -->&lt;T&gt; | The exported GetSources function |
20 changes: 20 additions & 0 deletions packages/pages/docs/api/pages.redirectsource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [RedirectSource](./pages.redirectsource.md)

## RedirectSource interface

The type of a RedirectSource. It defines the source and statusCode for a redirect.

**Signature:**

```typescript
export interface RedirectSource
```

## Properties

| Property | Modifiers | Type | Description |
| -------------------------------------------------- | --------- | ------ | ------------------------------- |
| [source](./pages.redirectsource.source.md) | | string | The source to redirect from |
| [statusCode](./pages.redirectsource.statuscode.md) | | number | The status code of the redirect |
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.redirectsource.source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [RedirectSource](./pages.redirectsource.md) &gt; [source](./pages.redirectsource.source.md)

## RedirectSource.source property

The source to redirect from

**Signature:**

```typescript
source: string;
```
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.redirectsource.statuscode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [RedirectSource](./pages.redirectsource.md) &gt; [statusCode](./pages.redirectsource.statuscode.md)

## RedirectSource.statusCode property

The status code of the redirect

**Signature:**

```typescript
statusCode: number;
```
30 changes: 28 additions & 2 deletions packages/pages/etc/pages.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export type FunctionType = HttpFunction | OnUrlChangeFunction;
// @public
export type GetAuthScope<T extends TemplateProps> = (props: T) => string;

// @public
export type GetDestination<T extends TemplateProps> = (props: T) => string;

// @public
export type GetHeadConfig<T extends TemplateRenderProps> = (
props: T
Expand All @@ -67,8 +70,6 @@ export const getLang: <T extends TemplateRenderProps<any>>(
// @public
export type GetPath<T extends TemplateProps> = (props: T) => string;

// Warning: (ae-forgotten-export) The symbol "RedirectSource" needs to be exported by the entry point index.d.ts
//
// @public
export type GetRedirects<T extends TemplateProps> = (
props: T
Expand All @@ -77,6 +78,11 @@ export type GetRedirects<T extends TemplateProps> = (
// @public
export const getRelativePrefixToRootFromPath: (path: string) => string;

// @public
export type GetSources<T extends TemplateProps> = (
props: T
) => RedirectSource[];

// @public
export interface HeadConfig {
charset?: string;
Expand Down Expand Up @@ -201,6 +207,26 @@ export interface PagesOnUrlChangeRequest {
// @public
export type PagesOnUrlChangeResponse = void;

// @public
export interface RedirectConfig {
name?: string;
stream?: Stream;
streamId?: string;
}

// @public
export interface RedirectModule<T extends TemplateProps> {
config?: RedirectConfig;
getDestination: GetDestination<T>;
getSources: GetSources<T>;
}

// @public
export interface RedirectSource {
source: string;
statusCode: number;
}

// @public
export type Render<T extends TemplateRenderProps<T>> = (props: T) => string;

Expand Down

0 comments on commit 8eb2038

Please sign in to comment.