Pular para o conteúdo

Site

sitenamespace

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

7métodos
sitenamespace

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

POST/user/site/blocks/conditions/evaluate

Assinatura:

evaluateBlocksConditions(body?: EvaluateBlocksConditionsBody, settings?: SdkSettings): Promise<EvaluateBlocksConditionsResponse>
Nome Tipo Obrigatório
conditions Array<{ "id": string; "params"?: Record<string, unknown>; }> sim
type EvaluateBlocksConditionsBody = { "conditions": Array<{ "id": string; "params"?: Record<string, unknown>; }>; };
type EvaluateBlocksConditionsResponse = { "results": Array<boolean>; };
const response = await sdk.site.evaluateBlocksConditions({ "conditions": [] });

Testar esta função no playground

GET/site/blocks/:id

Assinatura:

getBlock(id: string, settings?: SdkSettings): Promise<GetBlockResponse>
Nome Tipo
id string
type GetBlockParams = { "id": string; };
type GetBlockResponse = unknown;
const response = await sdk.site.getBlock("string");

Testar esta função no playground

GET/site/faq

Assinatura:

getFaq(settings?: SdkSettings): Promise<GetFaqResponse>
type GetFaqResponse = { "articles": Array<{ "title": string; "body": string | { "type": "document" | "doc"; "content": Array<unknown> | Record<string, unknown>; }; }>; };
const response = await sdk.site.getFaq();

Testar esta função no playground

GET/site/views/homepage

Assinatura:

getHomepage(settings?: SdkSettings): Promise<GetHomepageResponse>
type GetHomepageResponse = unknown;
const response = await sdk.site.getHomepage();

Testar esta função no playground

GET/site/plugins/:context

Assinatura:

getPlugin(context: "frontend" | "admin" | "reseller", settings?: SdkSettings): Promise<GetPluginResponse>
Nome Tipo
context "frontend" | "admin" | "reseller"
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; }; }>;
const response = await sdk.site.getPlugin("frontend");

Testar esta função no playground

GET/site/blocks

Assinatura:

listBlocks(settings?: SdkSettings): Promise<ListBlocksResponse>
type ListBlocksResponse = Array<{ "id": unknown; "title"?: string; "type": string; "slug"?: string; "status"?: string; "publishAt"?: unknown; [key: string]: unknown; }>;
const response = await sdk.site.listBlocks();

Testar esta função no playground

GET/site/search

Assinatura:

search(query?: SearchQuery, settings?: SdkSettings): Promise<SearchResponse>
Nome Tipo Obrigatório
q string não
types string não
limit number não
type SearchQuery = { "q"?: string; "types"?: string; "limit"?: number; };
type SearchResponse = unknown;
const response = await sdk.site.search();

Testar esta função no playground