From f21dd86c755814b8c8a4d01e9d1f9cfbf5a4ba9e Mon Sep 17 00:00:00 2001 From: jen Date: Tue, 26 Sep 2023 16:45:56 +0000 Subject: [PATCH] docs, tidy --- src/server/models/types.ts | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/server/models/types.ts b/src/server/models/types.ts index fa8279f69..f76a5a722 100644 --- a/src/server/models/types.ts +++ b/src/server/models/types.ts @@ -18,7 +18,12 @@ export type CountryName = typeof countriesList[number]["value"]; export type Point = number[]; export type Address = PrismaClient.Address; export type Country = PrismaClient.Country; -// List + +/** + * Describes dates relative to the startDate. e.g. ONE_MONTH BEFORE the start date. + * POST refers to consular posts (e.g. embassies or consulates). + * "POST_ONE_MONTH" should be read as "On this date, send an email to post, one month before the start date). + */ export interface AnnualReviewKeyDates extends JsonObject { POST_ONE_MONTH: string; POST_ONE_WEEK: string; @@ -26,18 +31,27 @@ export interface AnnualReviewKeyDates extends JsonObject { START: string; } +/** + * Describes dates relative to the unpublish date. e.g. ONE_WEEK BEFORE the unpublish date. + */ export interface UnpublishedKeyDates extends JsonObject { - PROVIDER_FIVE_WEEKS?: string; - PROVIDER_FOUR_WEEKS?: string; - PROVIDER_THREE_WEEKS?: string; - PROVIDER_TWO_WEEKS?: string; + /** + * one week BEFORE the unpublish date + */ ONE_WEEK: string; ONE_DAY: string; UNPUBLISH: string; } export interface ScheduledProcessKeyDates extends JsonObject { + /** + * annualReview describes events leading up to the nextAnnualReviewStartDate. + */ annualReview: AnnualReviewKeyDates; + + /** + * unpublished describes events after the annualReviewStartDate, where eventually providers will be unpublished. + */ unpublished: UnpublishedKeyDates; }