GoDoxy/schemas/types.d.ts
Yuzerion 57292f0fe8
feat: proxmox idlewatcher (#88)
* feat: idle sleep for proxmox LXCs

* refactor: replace deprecated docker api types

* chore(api): remove debug task list endpoint

* refactor: move servemux to gphttp/servemux; favicon.go to v1/favicon

* refactor: introduce Pool interface, move agent_pool to agent module

* refactor: simplify api code

* feat: introduce debug api

* refactor: remove net.URL and net.CIDR types, improved unmarshal handling

* chore: update Makefile for debug build tag, update README

* chore: add gperr.Unwrap method

* feat: relative time and duration formatting

* chore: add ROOT_DIR environment variable, refactor

* migration: move homepage override and icon cache to $BASE_DIR/data, add migration code

* fix: nil dereference on marshalling service health

* fix: wait for route deletion

* chore: enhance tasks debuggability

* feat: stdout access logger and MultiWriter

* fix(agent): remove agent properly on verify error

* fix(metrics): disk exclusion logic and added corresponding tests

* chore: update schema and prettify, fix package.json and Makefile

* fix: I/O buffer not being shrunk before putting back to pool

* feat: enhanced error handling module

* chore: deps upgrade

* feat: better value formatting and handling

---------

Co-authored-by: yusing <yusing@6uo.me>
2025-04-16 14:52:33 +08:00

109 lines
2.2 KiB
TypeScript

/**
* @type "null"
*/
export type Null = null;
export type Nullable<T> = T | Null;
export type NullOrEmptyMap = {} | Null;
export declare const HTTP_METHODS: readonly [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE",
"CONNECT",
"HEAD",
"OPTIONS",
"TRACE",
];
export type HTTPMethod = (typeof HTTP_METHODS)[number];
/**
* HTTP Header
* @pattern ^[a-zA-Z0-9\-]+$
* @type string
*/
export type HTTPHeader = string & {};
/**
* HTTP Query
* @pattern ^[a-zA-Z0-9\-_]+$
* @type string
*/
export type HTTPQuery = string & {};
/**
* HTTP Cookie
* @pattern ^[a-zA-Z0-9\-_]+$
* @type string
*/
export type HTTPCookie = string & {};
export type StatusCode = number | `${number}`;
export type StatusCodeRange = number | `${number}` | `${number}-${number}`;
/**
* @pattern ^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
*/
export type DomainName = string & {};
/**
* @pattern ^(\*\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
*/
export type DomainOrWildcard = string & {};
/**
* @format hostname
* @type string
*/
export type Hostname = string & {};
/**
* @format ipv4
* @type string
*/
export type IPv4 = string & {};
/**
* @format ipv6
* @type string
*/
export type IPv6 = string & {};
export type CIDR =
| `${number}.${number}.${number}.${number}`
| `${string}:${string}:${string}:${string}:${string}:${string}:${string}:${string}`
| `${number}.${number}.${number}.${number}/${number}`
| `::${number}`
| `${string}::/${number}`
| `${string}:${string}::/${number}`;
/**
* @type integer
* @minimum 0
* @maximum 65535
*/
export type Port = number | `${number}`;
/**
* @pattern ^\d+:\d+$
* @type string
*/
export type StreamPort = string & {};
/**
* @format email
* @type string
*/
export type Email = string & {};
/**
* @format uri
* @type string
*/
export type URL = string & {};
/**
* @format uri-reference
* @type string
*/
export type URI = string & {};
/**
* @pattern ^(?:([A-Z]+) )?(?:([a-zA-Z0-9.-]+)\\/)?(\\/[^\\s]*)$
* @type string
*/
export type PathPattern = string & {};
/**
* @pattern ^([0-9]+(ms|s|m|h))+$
* @type string
*/
export type Duration = string & {};
/**
* @format date-time
* @type string
*/
export type DateTime = string & {};