diff --git a/boom/boom.d.ts b/boom/boom.d.ts
index d0f05065c..e1539d21b 100644
--- a/boom/boom.d.ts
+++ b/boom/boom.d.ts
@@ -6,7 +6,8 @@
///
declare module Boom {
- interface BoomError {
+
+ export interface BoomError {
data: any;
reformat: () => void;
isBoom: boolean;
diff --git a/joi/joi.d.ts b/joi/joi.d.ts
index 5e4bfc37b..3df8ada9e 100644
--- a/joi/joi.d.ts
+++ b/joi/joi.d.ts
@@ -47,11 +47,16 @@ declare module 'joi' {
contextPrefix?: string;
}
+ export interface IPOptions {
+ version?: Array;
+ cidr?: string
+ }
+
export interface ValidationError {
message: string;
details: ValidationErrorItem[];
- simple (): string;
- annotated (): string;
+ simple(): string;
+ annotated(): string;
}
export interface ValidationErrorItem {
@@ -82,19 +87,19 @@ declare module 'joi' {
/**
* Whitelists a value
*/
- allow(value: any, ...values : any[]): T;
+ allow(value: any, ...values: any[]): T;
allow(values: any[]): T;
/**
* Adds the provided values into the allowed whitelist and marks them as the only valid values allowed.
*/
- valid(value: any, ...values : any[]): T;
+ valid(value: any, ...values: any[]): T;
valid(values: any[]): T;
/**
* Blacklists a value
*/
- invalid(value: any, ...values : any[]): T;
+ invalid(value: any, ...values: any[]): T;
invalid(values: any[]): T;
/**
@@ -257,6 +262,16 @@ declare module 'joi' {
* Requires the string value to contain no whitespace before or after. If the validation convert option is on (enabled by default), the string will be trimmed.
*/
trim(): StringSchema;
+
+ /**
+ * Requires the string value be a valid hostname.
+ */
+ hostname(): StringSchema;
+
+ /**
+ * Requires the string value to be a valid IP address.
+ */
+ ip(options: IPOptions): StringSchema;
/**
* Requires the string value to be a valid uri with the passed scheme.
@@ -364,7 +379,7 @@ declare module 'joi' {
/**
* Overrides the handling of unknown keys for the scope of the current object only (does not apply to children).
*/
- unknown(allow?:boolean): ObjectSchema;
+ unknown(allow?: boolean): ObjectSchema;
}
export interface BinarySchema extends AnySchema {
@@ -486,5 +501,5 @@ declare module 'joi' {
/**
* Generates a reference to the value of the named key.
*/
- export function ref(key:string, options?: ReferenceOptions): Reference;
+ export function ref(key: string, options?: ReferenceOptions): Reference;
}