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

Watch

import type { Watch } from "https://googleapis.deno.dev/v1/forms:v1.ts";

A watch for events for a form. When the designated event happens, a notification will be published to the specified target. The notification's attributes will include a formId key that has the ID of the watched form and an eventType key that has the string of the type. Messages are sent with at-least-once delivery and are only dropped in extraordinary circumstances. Typically all notifications should be reliably delivered within a few seconds; however, in some situations notifications may be delayed. A watch expires seven days after it is created unless it is renewed with watches.renew

interface Watch {
readonly createTime?: Date;
readonly errorType?:
| "ERROR_TYPE_UNSPECIFIED"
| "PROJECT_NOT_AUTHORIZED"
| "NO_USER_ACCESS"
| "OTHER_ERRORS";
eventType?: "EVENT_TYPE_UNSPECIFIED" | "SCHEMA" | "RESPONSES";
readonly expireTime?: Date;
readonly id?: string;
readonly state?: "STATE_UNSPECIFIED" | "ACTIVE" | "SUSPENDED";
target?: WatchTarget;
}

§Properties

§
readonly createTime?: Date
[src]

Output only. Timestamp of when this was created.

§
readonly errorType?: "ERROR_TYPE_UNSPECIFIED" | "PROJECT_NOT_AUTHORIZED" | "NO_USER_ACCESS" | "OTHER_ERRORS"
[src]

Output only. The most recent error type for an attempted delivery. To begin watching the form again a call can be made to watches.renew which also clears this error information.

§
eventType?: "EVENT_TYPE_UNSPECIFIED" | "SCHEMA" | "RESPONSES"
[src]

Required. Which event type to watch for.

§
readonly expireTime?: Date
[src]

Output only. Timestamp for when this will expire. Each watches.renew call resets this to seven days in the future.

§
readonly id?: string
[src]

Output only. The ID of this watch. See notes on CreateWatchRequest.watch_id.

§
readonly state?: "STATE_UNSPECIFIED" | "ACTIVE" | "SUSPENDED"
[src]

Output only. The current state of the watch. Additional details about suspended watches can be found by checking the error_type.

§

Required. Where to send the notification.