Shared
ModelsExpand Collapse
BasicVal { id, author, code, 9 more }
A Val
id: string
This val's id
author: Author | null
The user who created this val
code: string | null
TypeScript code associated with this val
links: Links { module, self, versions, endpoint }
module: string
The URL of this Val's source code as a module
self: string
The URL of this val on this API
versions: string
The endpoint to retrieve this val's versions
endpoint?: string
This val's web endpoint, where it serves a website or API
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.
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
url: string
The URL of this resource on the Val Town website
version: number
The version of this val, starting at zero
ExtendedVal { id, author, code, 13 more }
A Legacy Val
id: string
This val's id
author: Author | null
The user who created this val
code: string | null
TypeScript code associated with this val
likeCount: number
How many likes this val has received
links: Links { module, self, versions, endpoint }
module: string
The URL of this Val's source code as a module
self: string
The URL of this val on this API
versions: string
The endpoint to retrieve this val's versions
endpoint?: string
This val's web endpoint, where it serves a website or API
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.
public: boolean
Whether this val is available publicly on Val Town
readme: string | null
This val's readme, as Markdown
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
url: string
The URL of this resource on the Val Town website
version: number
The version of this val, starting at zero
PaginationLinks { self, next, prev }
Links to use for pagination
self: string
URL of this page
next?: string
URL of the next page, if any
prev?: string
URL of the previous page, if any
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.
User { id, bio, links, 4 more }
User object
id: string
The ID of this user
bio: string | null
The user’s biography, if they have provided one
links: Links { self }
self: string
URL of this user on this API
profileImageUrl: string | null
URL that points to the user’s profile image, if one exists
type: "user" | "org"
Whether this is a user or an organization
url: string
URL of this user’s profile on Val Town’s website
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
author: Author { id, type, username }
type: "user" | "org"
imageUrl: string | null
The URL of this val's image
links: Links { html, self }
html: string
The URL of this resource on Val Town
self: string
The URL of this resource on this API
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.