Created
April 12, 2017 00:59
-
-
Save aselbie/515deebb8d0f0dab9c5c5f194f0738b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Status = 'fetching' | 'init' | 'failure' | 'success'; | |
type CustomMessageSource = { | |
language: string, // the language from the custom message where this message spec is translated from | |
version: number, // the version from the custom message where this message spec is translated from | |
message: string, // the message from the custom message where this message spec is translated from. Not used for now | |
} | |
type Promo = { | |
// Raw values for a restaurant-promo | |
message: string, | |
isActive: boolean, | |
isLunch: boolean, | |
isDinner: boolean, | |
shortDescription: string, | |
rank: number, | |
language: string, | |
updatedBy: string, | |
updatedOn: string, | |
// Raw values for a promo | |
Active: boolean, | |
DisplayLinkStartDate: string, // "2009-01-01T00:00:00" | |
DisplayLinkEndDate: string, // "2019-12-31T00:00:00" | |
EventStartDate: string, // "2009-01-01T00:00:00" | |
EventEndDate: string, // "2019-01-01T00:00:00" | |
Language:string, // "en-US" | |
MetroId: 23, | |
PageReferrerCode: 2771, | |
PromoId: 212, | |
PromoName: "Sunday Brunch - Corpus Christi / McAllen Restaurants", | |
PromoType: 10, | |
SelectionDate: "2016-10-15T11:00:00", | |
ShortTitle: "Sunday Brunch", | |
ShowOnStartPage: true, | |
SortOrder: 3, | |
// creditCardDays info | |
effectiveDate: Date, // The Date Blocked in ISO 8601 Date format (YYYY-MM-DD). Part of the primary key | |
partySize: number, // The party size. Part of the primary key | |
startTime: string, // Optional part of the primary key. In ISO 8601 24 Hr Time format (HH:mm:ss.sss) | |
endTime: string, // ISO 8601 24 Hr Time format (HH:mm:ss.sss) | |
createDateTime: string, // Yes UTC creation time | |
createdBy: String, // the person who created this date. Usually the email address | |
Version: number, | |
Specification: Object, // The JSON representation of the specification. The specification will be passed as is to the message generation API | |
CustomMessageSource: CustomMessageSource, // the simplified custom message structure to denote from which custom message this message specification is translated from | |
// Calculated | |
joined: boolean, | |
} | |
export type PromosState = { | |
status: Status, | |
promos: Array<Promo>, | |
metroId: string, | |
primaryLanguage: string, | |
currentPromoId: number, | |
creditCardEnabled: boolean, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment