URLSHORTENER

urlshortener.url.get

enum_ProjectionParameter := [ "ANALYTICS_CLICKS", "ANALYTICS_TOP_STRINGS", "FULL" ]

valid {
    input.Qs.projection == enum_ProjectionParameter[_]
    input.Qs.shortUrl == STRING
    input.ProviderMetadata.Region == STRING
}

urlshortener.url.insert

valid {
    input.Body.analytics.allTime.browsers[_].count == STRING
    input.Body.analytics.allTime.browsers[_].id == STRING
    input.Body.analytics.allTime.countries[_].count == STRING
    input.Body.analytics.allTime.countries[_].id == STRING
    input.Body.analytics.allTime.longUrlClicks == STRING
    input.Body.analytics.allTime.platforms[_].count == STRING
    input.Body.analytics.allTime.platforms[_].id == STRING
    input.Body.analytics.allTime.referrers[_].count == STRING
    input.Body.analytics.allTime.referrers[_].id == STRING
    input.Body.analytics.allTime.shortUrlClicks == STRING
    input.Body.analytics.day.browsers[_].count == STRING
    input.Body.analytics.day.browsers[_].id == STRING
    input.Body.analytics.day.countries[_].count == STRING
    input.Body.analytics.day.countries[_].id == STRING
    input.Body.analytics.day.longUrlClicks == STRING
    input.Body.analytics.day.platforms[_].count == STRING
    input.Body.analytics.day.platforms[_].id == STRING
    input.Body.analytics.day.referrers[_].count == STRING
    input.Body.analytics.day.referrers[_].id == STRING
    input.Body.analytics.day.shortUrlClicks == STRING
    input.Body.analytics.month.browsers[_].count == STRING
    input.Body.analytics.month.browsers[_].id == STRING
    input.Body.analytics.month.countries[_].count == STRING
    input.Body.analytics.month.countries[_].id == STRING
    input.Body.analytics.month.longUrlClicks == STRING
    input.Body.analytics.month.platforms[_].count == STRING
    input.Body.analytics.month.platforms[_].id == STRING
    input.Body.analytics.month.referrers[_].count == STRING
    input.Body.analytics.month.referrers[_].id == STRING
    input.Body.analytics.month.shortUrlClicks == STRING
    input.Body.analytics.twoHours.browsers[_].count == STRING
    input.Body.analytics.twoHours.browsers[_].id == STRING
    input.Body.analytics.twoHours.countries[_].count == STRING
    input.Body.analytics.twoHours.countries[_].id == STRING
    input.Body.analytics.twoHours.longUrlClicks == STRING
    input.Body.analytics.twoHours.platforms[_].count == STRING
    input.Body.analytics.twoHours.platforms[_].id == STRING
    input.Body.analytics.twoHours.referrers[_].count == STRING
    input.Body.analytics.twoHours.referrers[_].id == STRING
    input.Body.analytics.twoHours.shortUrlClicks == STRING
    input.Body.analytics.week.browsers[_].count == STRING
    input.Body.analytics.week.browsers[_].id == STRING
    input.Body.analytics.week.countries[_].count == STRING
    input.Body.analytics.week.countries[_].id == STRING
    input.Body.analytics.week.longUrlClicks == STRING
    input.Body.analytics.week.platforms[_].count == STRING
    input.Body.analytics.week.platforms[_].id == STRING
    input.Body.analytics.week.referrers[_].count == STRING
    input.Body.analytics.week.referrers[_].id == STRING
    input.Body.analytics.week.shortUrlClicks == STRING
    input.Body.created == STRING
    input.Body.id == STRING
    input.Body.kind == STRING
    input.Body.longUrl == STRING
    input.Body.status == STRING
    input.ProviderMetadata.Region == STRING
}

urlshortener.url.list

enum_ProjectionParameter := [ "ANALYTICS_CLICKS", "FULL" ]

valid {
    input.Qs.projection == enum_ProjectionParameter[_]
    input.Qs.start-token == STRING
    input.ProviderMetadata.Region == STRING
}