---
title: "Site"
description: "Blocos, FAQ, busca e conteúdo do site."
---
<div class="lm-ref-kicker"><code>site</code><span>namespace</span></div>

Blocos, FAQ, busca e conteúdo do site.

<div class="lm-ref-stats lm-ref-stats--compact">
  <div class="lm-ref-stat"><strong>7</strong><span>métodos</span></div>
  <div class="lm-ref-stat"><code>site</code><span>namespace</span></div>
</div>

> Esta página é gerada automaticamente pelo `@luckymaker/sdk-generator`. Não edite manualmente.

## `evaluateBlocksConditions`

<div class="lm-endpoint"><span class="lm-http lm-http--post">POST</span><code>/user/site/blocks/conditions/evaluate</code></div>

Assinatura:

```ts
evaluateBlocksConditions(body?: EvaluateBlocksConditionsBody, settings?: SdkSettings): Promise<EvaluateBlocksConditionsResponse>
```

### Body

| Nome | Tipo | Obrigatório |
|---|---|---|
| `conditions` | `Array<{ "id": string; "params"?: Record<string, unknown>; }>` | sim |

### Tipos

```ts
type EvaluateBlocksConditionsBody = { "conditions": Array<{ "id": string; "params"?: Record<string, unknown>; }>; };
type EvaluateBlocksConditionsResponse = { "results": Array<boolean>; };
```

### Exemplo

```ts
const response = await sdk.site.evaluateBlocksConditions({ "conditions": [] });
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=site&method=evaluateBlocksConditions">Testar esta função no playground <svg class="lm-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></a>

## `getBlock`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/site/blocks/:id</code></div>

Assinatura:

```ts
getBlock(id: string, settings?: SdkSettings): Promise<GetBlockResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `id` | `string` |

### Tipos

```ts
type GetBlockParams = { "id": string; };
type GetBlockResponse = unknown;
```

### Exemplo

```ts
const response = await sdk.site.getBlock("string");
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=site&method=getBlock">Testar esta função no playground <svg class="lm-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></a>

## `getFaq`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/site/faq</code></div>

Assinatura:

```ts
getFaq(settings?: SdkSettings): Promise<GetFaqResponse>
```

### Tipos

```ts
type GetFaqResponse = { "articles": Array<{ "title": string; "body": string | { "type": "document" | "doc"; "content": Array<unknown> | Record<string, unknown>; }; }>; };
```

### Exemplo

```ts
const response = await sdk.site.getFaq();
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=site&method=getFaq">Testar esta função no playground <svg class="lm-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></a>

## `getHomepage`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/site/views/homepage</code></div>

Assinatura:

```ts
getHomepage(settings?: SdkSettings): Promise<GetHomepageResponse>
```

### Tipos

```ts
type GetHomepageResponse = unknown;
```

### Exemplo

```ts
const response = await sdk.site.getHomepage();
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=site&method=getHomepage">Testar esta função no playground <svg class="lm-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></a>

## `getPlugin`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/site/plugins/:context</code></div>

Assinatura:

```ts
getPlugin(context: "frontend" | "admin" | "reseller", settings?: SdkSettings): Promise<GetPluginResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `context` | `"frontend" \| "admin" \| "reseller"` |

### Tipos

```ts
type GetPluginParams = { "context": "frontend" | "admin" | "reseller"; };
type GetPluginResponse = Array<{ "id": string; "name": string; "version"?: string; "contexts": Array<string>; "assets": { "frontend"?: string; "admin"?: string; "reseller"?: string; "watchUrl"?: string; }; }>;
```

### Exemplo

```ts
const response = await sdk.site.getPlugin("frontend");
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=site&method=getPlugin">Testar esta função no playground <svg class="lm-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></a>

## `listBlocks`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/site/blocks</code></div>

Assinatura:

```ts
listBlocks(settings?: SdkSettings): Promise<ListBlocksResponse>
```

### Tipos

```ts
type ListBlocksResponse = Array<{ "id": unknown; "title"?: string; "type": string; "slug"?: string; "status"?: string; "publishAt"?: unknown; [key: string]: unknown; }>;
```

### Exemplo

```ts
const response = await sdk.site.listBlocks();
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=site&method=listBlocks">Testar esta função no playground <svg class="lm-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></a>

## `search`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/site/search</code></div>

Assinatura:

```ts
search(query?: SearchQuery, settings?: SdkSettings): Promise<SearchResponse>
```

### Query

| Nome | Tipo | Obrigatório |
|---|---|---|
| `q` | `string` | não |
| `types` | `string` | não |
| `limit` | `number` | não |

### Tipos

```ts
type SearchQuery = { "q"?: string; "types"?: string; "limit"?: number; };
type SearchResponse = unknown;
```

### Exemplo

```ts
const response = await sdk.site.search();
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=site&method=search">Testar esta função no playground <svg class="lm-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></a>