@@ -8,7 +8,7 @@ export const zone = Joi.string().min(3).max(255)
88// .domain({ allowFullyQualified: true, allowUnderscore: true, tlds: false })
99
1010export const v3 = Joi . object ( {
11- id : id ,
11+ id,
1212
1313 gid : shared . uint32 . required ( ) ,
1414
@@ -41,6 +41,7 @@ export const v3 = Joi.object({
4141
4242export const GET_req = Joi . object ( {
4343 id : id ,
44+ gid : shared . uint32 ,
4445 zone : zone ,
4546 search : Joi . string ( ) . max ( 255 ) . allow ( '' ) ,
4647 zone_like : Joi . string ( ) . max ( 255 ) . allow ( '' ) ,
@@ -50,16 +51,38 @@ export const GET_req = Joi.object({
5051 sort_by : Joi . string ( ) . valid ( 'id' , 'zone' , 'description' , 'last_modified' ) ,
5152 sort_dir : Joi . string ( ) . lowercase ( ) . valid ( 'asc' , 'desc' ) ,
5253 deleted : Joi . boolean ( ) ,
54+ } ) . options ( { allowUnknown : true } )
55+
56+ export const GET_ns_res = Joi . object ( {
57+ ns : Joi . array ( ) . items (
58+ Joi . object ( {
59+ owner : Joi . string ( ) . required ( ) ,
60+ ttl : shared . ttl . required ( ) ,
61+ dname : Joi . string ( ) . required ( ) ,
62+ } ) ,
63+ ) ,
64+ meta : shared . meta ,
5365} )
5466
5567export const GET_res = Joi . object ( {
5668 zone : Joi . array ( ) . items ( v3 ) ,
5769 meta : shared . meta ,
70+ deleted : Joi . boolean ( ) ,
5871} )
5972
6073export const POST = v3
6174
62- export const DELETE = Joi . object ( {
63- id : id ,
75+ export const PUT = Joi . object ( {
76+ description : Joi . string ( ) . empty ( '' ) . allow ( null ) ,
77+ mailaddr : Joi . string ( ) . empty ( '' ) . allow ( null ) ,
78+ ttl : shared . ttl ,
79+ refresh : shared . int32 ,
80+ retry : shared . int32 ,
81+ expire : shared . int32 ,
82+ minimum : shared . int32 ,
6483 deleted : Joi . boolean ( ) ,
6584} )
85+
86+ export const DELETE = Joi . object ( {
87+ id,
88+ } )
0 commit comments