zod#literal TypeScript Examples

The following examples show how to use zod#literal. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClientConnectionSettings.ts    From flood with GNU General Public License v3.0 6 votes vote down vote up
delugeConnectionSettingsSchema = strictObject({
  client: literal('Deluge'),
  type: literal('rpc'),
  version: literal(1),
  host: string(),
  port: number(),
  username: string(),
  password: string(),
})
Example #2
Source File: Auth.ts    From flood with GNU General Public License v3.0 5 votes vote down vote up
authMethodSchema = union([literal('default'), literal('none')])
Example #3
Source File: ClientConnectionSettings.ts    From flood with GNU General Public License v3.0 5 votes vote down vote up
qBittorrentConnectionSettingsSchema = strictObject({
  client: literal('qBittorrent'),
  type: literal('web'),
  version: literal(1),
  url: string().url(),
  username: string(),
  password: string(),
})
Example #4
Source File: ClientConnectionSettings.ts    From flood with GNU General Public License v3.0 5 votes vote down vote up
rTorrentTCPConnectionSettingsSchema = strictObject({
  client: literal('rTorrent'),
  type: literal('tcp'),
  version: literal(1),
  host: string(),
  port: number(),
})
Example #5
Source File: ClientConnectionSettings.ts    From flood with GNU General Public License v3.0 5 votes vote down vote up
rTorrentSocketConnectionSettingsSchema = strictObject({
  client: literal('rTorrent'),
  type: literal('socket'),
  version: literal(1),
  socket: string(),
})
Example #6
Source File: ClientConnectionSettings.ts    From flood with GNU General Public License v3.0 5 votes vote down vote up
transmissionConnectionSettingsSchema = strictObject({
  client: literal('Transmission'),
  type: literal('rpc'),
  version: literal(1),
  url: string().url(),
  username: string(),
  password: string(),
})