Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Context

import type { Context } from "https://googleapis.deno.dev/v1/cloudsearch:v1.ts";
interface Context {
app?: "UNKNOWN_APP" | "TOPAZ" | "MOMA"[];
dayOfWeek?: number[];
endDateSec?: bigint;
endDayOffsetSec?: bigint;
locale?: string[];
location?: string[];
query?: string[];
startDateSec?: bigint;
startDayOffsetSec?: bigint;
surface?:
| "UNKNOWN_SURFACE"
| "DESKTOP"
| "ANDROID"
| "IOS"
| "MOBILE"
| "ANY"[];
type?:
| "UNKNOWN_CARD_TYPE"
| "HOMEPAGE_CARD"
| "ANSWER_CARD"
| "RHS_CARD"[];
}

§Properties

§
app?: "UNKNOWN_APP" | "TOPAZ" | "MOMA"[]
[src]

[Optional] App where the card should be shown. If missing, the card will be shown in TOPAZ.

§
dayOfWeek?: number[]
[src]

[Optional] Day of week when the card should be shown, where 0 is Monday.

§
endDateSec?: bigint
[src]

[Optional] Date (in seconds since epoch) when the card should stop being shown. If missing, end_date_sec will be set to Jan 1st, 2100.

§
endDayOffsetSec?: bigint
[src]

[Optional] End time in seconds, within a day, when the card should stop being shown if it's within [start_date_sec, end_date_sec]. If missing, this is set to 86400 (24 hours x 3600 sec/hour), i.e., midnight next day.

§
locale?: string[]
[src]

[Optional] The locales for which the card should be triggered (e.g., en_US and en_CA). If missing, the card is going to show to clients regardless of their locale.

§
location?: string[]
[src]

[Optional] Text-free locations where the card should be shown. This is expected to match the user's location in focus. If no location is specified, the card will be shown for any location.

§
query?: string[]
[src]

[Required only for Answer and RHS cards - will be ignored for Homepage] cards. It's the exact case-insensitive queries that will trigger the Answer or RHS card.

§
startDateSec?: bigint
[src]

[Optional] Date (in seconds since epoch) when the card should start being shown. If missing, start_date_sec will be Jan 1st, 1970 UTC.

§
startDayOffsetSec?: bigint
[src]

[Optional] Start time in seconds, within a day, when the card should be shown if it's within [start_date_sec, end_date_sec]. If 0, the card will be shown from 12:00am on.

§
surface?: "UNKNOWN_SURFACE" | "DESKTOP" | "ANDROID" | "IOS" | "MOBILE" | "ANY"[]
[src]

[Optional] Surface where the card should be shown in. If missing, the card will be shown in any surface.

§
type?: "UNKNOWN_CARD_TYPE" | "HOMEPAGE_CARD" | "ANSWER_CARD" | "RHS_CARD"[]
[src]

[Required] Type of the card (homepage, Answer or RHS).