Skip to content
  • Auto
  • Light
  • Dark
Get Started
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Shared

ModelsExpand Collapse
BasicVal { id, author, code, 9 more }

A Val

id: string

This val's id

formatuuid
author: Author | null

The user who created this val

id: string
username: string | null
code: string | null

TypeScript code associated with this val

createdAt: string

The URL of this Val's source code as a module

formaturi

The URL of this val on this API

formaturi

The endpoint to retrieve this val's versions

formaturi

This val's web endpoint, where it serves a website or API

formaturi
name: string

The name of this val

privacy: "public" | "unlisted" | "private"

This resource's privacy setting. Unlisted resources do not appear on profile pages or elsewhere, but you can link to them.

Accepts one of the following:
"public"
"unlisted"
"private"
public: boolean

Whether this val is available publicly on Val Town

type: "interval" | "http" | "express" | 4 more

The type of a val. HTTP can receive web requests, Email can receive emails, Cron runs periodically, and Script can be used for libraries or one-off calculations

Accepts one of the following:
"interval"
"http"
"express"
"email"
"script"
"rpc"
"httpnext"
updatedAt: string
url: string

The URL of this resource on the Val Town website

formaturi
version: number

The version of this val, starting at zero

minimum0
ExtendedVal { id, author, code, 13 more }

A Legacy Val

id: string

This val's id

formatuuid
author: Author | null

The user who created this val

id: string
username: string | null
code: string | null

TypeScript code associated with this val

createdAt: string
likeCount: number

How many likes this val has received

minimum0

The URL of this Val's source code as a module

formaturi

The URL of this val on this API

formaturi

The endpoint to retrieve this val's versions

formaturi

This val's web endpoint, where it serves a website or API

formaturi
name: string

The name of this val

privacy: "public" | "unlisted" | "private"

This resource's privacy setting. Unlisted resources do not appear on profile pages or elsewhere, but you can link to them.

Accepts one of the following:
"public"
"unlisted"
"private"
public: boolean

Whether this val is available publicly on Val Town

readme: string | null

This val's readme, as Markdown

referenceCount: number
type: "interval" | "http" | "express" | 4 more

The type of a val. HTTP can receive web requests, Email can receive emails, Cron runs periodically, and Script can be used for libraries or one-off calculations

Accepts one of the following:
"interval"
"http"
"express"
"email"
"script"
"rpc"
"httpnext"
updatedAt: string
url: string

The URL of this resource on the Val Town website

formaturi
version: number

The version of this val, starting at zero

minimum0
versionCreatedAt?: string

Links to use for pagination

URL of this page

formaturi

URL of the next page, if any

formaturi

URL of the previous page, if any

formaturi
ResultSet { columns, columnTypes, rows, 2 more }

Result of executing an SQL statement.

columns: Array<string>

Names of columns.

Names of columns can be defined using the AS keyword in SQL:

SELECT author AS author, COUNT(*) AS count FROM books GROUP BY author
columnTypes: Array<string>

Types of columns.

The types are currently shown for types declared in a SQL table. For column types of function calls, for example, an empty string is returned.

rows: Array<Array<unknown>>

Rows produced by the statement.

rowsAffected: number

Number of rows that were affected by an UPDATE, INSERT or DELETE operation.

This value is not specified for other SQL statements.

lastInsertRowid?: string | number | null

ROWID of the last inserted row.

This value is not specified if the SQL statement was not an INSERT or if the table was not a ROWID table.

Accepts one of the following:
string
number
User { id, bio, links, 4 more }

User object

id: string

The ID of this user

formatuuid
bio: string | null

The user’s biography, if they have provided one

URL of this user on this API

formaturi
profileImageUrl: string | null

URL that points to the user’s profile image, if one exists

formaturi
type: "user" | "org"

Whether this is a user or an organization

Accepts one of the following:
"user"
"org"
url: string

URL of this user’s profile on Val Town’s website

formaturi
username: string | null

The user’s handle that they chose for themselves. Does not include the @ symbol

Val { id, author, createdAt, 5 more }

A Val

id: string

The id of the val

formatuuid
author: Author { id, type, username }
id: string
type: "user" | "org"
Accepts one of the following:
"user"
"org"
username: string | null
createdAt: string
description: string | null
imageUrl: string | null

The URL of this val's image

The URL of this resource on Val Town

formaturi

The URL of this resource on this API

formaturi
name: string
privacy: "public" | "unlisted" | "private"

This resource's privacy setting. Unlisted resources do not appear on profile pages or elsewhere, but you can link to them.

Accepts one of the following:
"public"
"unlisted"
"private"