Show only the last of each event type in RDAP domain response

We also ignore events that happened before the domain was created (for example, in a previous incarnation of the same domain name) and we set the last changed event to be the later of the last EPP change and any other event that happened before "now".

From RDAP response profile
2.3.2 The domain object in the RDAP response MAY contain the following events:
2.3.2.3 An event of *eventAction* type *transfer*, with the last date and time that the
domain was transferred. The event of *eventAction* type *transfer* MUST be omitted if
the domain name has not been transferred since it was created.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242461310
This commit is contained in:
guyben 2019-04-08 07:46:01 -07:00 committed by jianglai
parent 72b9ca6894
commit 15e54f2803
13 changed files with 126 additions and 54 deletions

View file

@ -23,6 +23,10 @@
"eventActor": "foo",
"eventDate": "1999-07-01T00:00:00.000Z"
},
{
"eventAction": "last changed",
"eventDate": "1999-07-01T00:00:00.000Z"
},
{
"eventAction": "last update of RDAP database",
"eventDate": "2000-01-01T00:00:00.000Z"

View file

@ -24,10 +24,6 @@
"eventAction": "expiration",
"eventDate": "2110-10-08T00:44:59.000Z"
},
{
"eventAction": "last changed",
"eventDate": "2009-05-29T20:13:00.000Z"
},
{
"eventAction": "last update of RDAP database",
"eventDate": "2000-01-01T00:00:00.000Z"

View file

@ -24,10 +24,6 @@
"eventAction": "expiration",
"eventDate": "2110-10-08T00:44:59.000Z"
},
{
"eventAction": "last changed",
"eventDate": "2009-05-29T20:13:00.000Z"
},
{
"eventAction": "last update of RDAP database",
"eventDate": "2000-01-01T00:00:00.000Z"

View file

@ -32,7 +32,7 @@
},
{
"eventAction": "last changed",
"eventDate": "2009-05-29T20:13:00.000Z"
"eventDate": "1999-07-01T00:00:00.000Z"
},
{
"eventAction": "last update of RDAP database",

View file

@ -26,10 +26,6 @@
"eventAction": "expiration",
"eventDate": "2110-10-08T00:44:59.000Z"
},
{
"eventAction": "last changed",
"eventDate": "2009-05-29T20:13:00.000Z"
},
{
"eventAction": "last update of RDAP database",
"eventDate": "2000-01-01T00:00:00.000Z"

View file

@ -26,10 +26,6 @@
"eventAction": "expiration",
"eventDate": "2110-10-08T00:44:59.000Z"
},
{
"eventAction": "last changed",
"eventDate": "2009-05-29T20:13:00.000Z"
},
{
"eventAction": "last update of RDAP database",
"eventDate": "2000-01-01T00:00:00.000Z"

View file

@ -25,10 +25,6 @@
"eventAction": "expiration",
"eventDate": "2110-10-08T00:44:59.000Z"
},
{
"eventAction": "last changed",
"eventDate": "2009-05-29T20:13:00.000Z"
},
{
"eventAction": "last update of RDAP database",
"eventDate": "2000-01-01T00:00:00.000Z"

View file

@ -27,10 +27,6 @@
"eventAction": "expiration",
"eventDate": "2110-10-08T00:44:59.000Z"
},
{
"eventAction": "last changed",
"eventDate": "2009-05-29T20:13:00.000Z"
},
{
"eventAction": "last update of RDAP database",
"eventDate": "2000-01-01T00:00:00.000Z"

View file

@ -23,7 +23,12 @@
{
"eventAction": "registration",
"eventActor": "foo",
"eventDate": "2000-01-01T00:00:00.000Z"
"eventDate": "1999-09-01T00:00:00.000Z"
},
{
"eventAction": "transfer",
"eventActor": "foo",
"eventDate": "1999-12-01T00:00:00.000Z"
},
{
"eventAction": "expiration",
@ -31,7 +36,7 @@
},
{
"eventAction": "last changed",
"eventDate": "2009-05-29T20:13:00.000Z"
"eventDate": "1999-12-01T00:00:00.000Z"
},
{
"eventAction": "last update of RDAP database",

View file

@ -23,7 +23,12 @@
{
"eventAction": "registration",
"eventActor": "foo",
"eventDate": "2000-01-01T00:00:00.000Z"
"eventDate": "1999-09-01T00:00:00.000Z"
},
{
"eventAction": "transfer",
"eventActor": "foo",
"eventDate": "1999-12-01T00:00:00.000Z"
},
{
"eventAction": "expiration",
@ -31,7 +36,7 @@
},
{
"eventAction": "last changed",
"eventDate": "2009-05-29T20:13:00.000Z"
"eventDate": "1999-12-01T00:00:00.000Z"
},
{
"eventAction": "last update of RDAP database",

View file

@ -30,10 +30,6 @@
"eventAction": "expiration",
"eventDate": "2110-10-08T00:44:59.000Z"
},
{
"eventAction": "last changed",
"eventDate": "2009-05-29T20:13:00.000Z"
},
{
"eventAction": "last update of RDAP database",
"eventDate": "2000-01-01T00:00:00.000Z"