···55type Event string
6677const (
88- // EventClearScheduledJobs is used to clear all future scheduled jobs for a given churros object
99- // For example, when adding a new ticket to an event, we want to unschedule all future notifications for the event since the shotgun date may have changed
1010- EventClearScheduledJobs Event = "clear_scheduled_jobs"
118 EventClearStoredSchedule Event = "clear_stored_schedule"
129 EventShowScheduledJobs Event = "show_scheduled_jobs"
1310 EventSaveSchedule Event = "save_schedule"
···3431 Id string `json:"id"`
3532 // When to push the notification
3633 SendAt time.Time `json:"send_at"`
3434+ // Clear scheduled jobs for the object_id before scheduling notifications
3535+ ClearSchedule bool `json:"clear_schedule"`
3736 // Type of event that triggered the notification
3837 // next-line-generate event-enum-jsonschema-values
3939- Event Event `json:"event" jsonschema:"enum=clear_scheduled_jobs,enum=clear_stored_schedule,enum=show_scheduled_jobs,enum=save_schedule,enum=restore_schedule,enum=restore_schedule_eager,enum=clear_schedule,enum=new_post,enum=godchild_request,enum=custom,enum=test,enum=godchild_accepted,enum=godchild_rejected,enum=pending_signup,enum=login_stuck,enum=booking_paid,enum=contribution_paid,enum=shotgun_opens_soon,enum=shotgun_closes_soon"`
3838+ Event Event `json:"event" jsonschema:"enum=clear_stored_schedule,enum=show_scheduled_jobs,enum=save_schedule,enum=restore_schedule,enum=restore_schedule_eager,enum=clear_schedule,enum=new_post,enum=godchild_request,enum=custom,enum=test,enum=godchild_accepted,enum=godchild_rejected,enum=pending_signup,enum=login_stuck,enum=booking_paid,enum=contribution_paid,enum=shotgun_opens_soon,enum=shotgun_closes_soon"`
4039 // Churros ID of the ressource (the ticket, the post, the comment, etc)
4140 // Used to determine to whom the notification should be sent
4241 // For godchild_request, this is not a user id, but a godparent request id.
···11{
22 "version": 3,
33 "sources": ["../typescript/message.ts", "../typescript/constants.ts"],
44- "sourcesContent": ["export interface Message {\n /**\n * URL to go to when the action button is clicked\n */\n action: string;\n /**\n * Additional action buttons\n */\n actions?: Action[];\n /**\n * Notification body\n */\n body: string;\n /**\n * Type of event that triggered the notification\n * next-line-generate event-enum-jsonschema-values\n */\n event: Event;\n /**\n * Unique ID for the notification scheduling request.\n */\n id: string;\n /**\n * URL to an image to display in the notification\n */\n image?: string;\n /**\n * Churros ID of the ressource (the ticket, the post, the comment, etc)\n * Used to determine to whom the notification should be sent\n * For godchild_request, this is not a user id, but a godparent request id.\n */\n object_id: string;\n /**\n * When to push the notification\n */\n send_at: Date;\n /**\n * Notification title\n */\n title: string;\n}\n\nexport interface Action {\n action: string;\n label: string;\n}\n\n/**\n * Type of event that triggered the notification\n * next-line-generate event-enum-jsonschema-values\n */\nexport enum Event {\n BookingPaid = \"booking_paid\",\n ClearSchedule = \"clear_schedule\",\n ClearScheduledJobs = \"clear_scheduled_jobs\",\n ClearStoredSchedule = \"clear_stored_schedule\",\n ContributionPaid = \"contribution_paid\",\n Custom = \"custom\",\n GodchildAccepted = \"godchild_accepted\",\n GodchildRejected = \"godchild_rejected\",\n GodchildRequest = \"godchild_request\",\n LoginStuck = \"login_stuck\",\n NewPost = \"new_post\",\n PendingSignup = \"pending_signup\",\n RestoreSchedule = \"restore_schedule\",\n RestoreScheduleEager = \"restore_schedule_eager\",\n SaveSchedule = \"save_schedule\",\n ShotgunClosesSoon = \"shotgun_closes_soon\",\n ShotgunOpensSoon = \"shotgun_opens_soon\",\n ShowScheduledJobs = \"show_scheduled_jobs\",\n Test = \"test\",\n}\n", "export const STREAM_NAME = 'notella:stream';\nexport const SUBJECT_NAME = 'notella:notification';\nexport const CONSUMER_NAME = 'NotellaConsumer';"],
55- "mappings": ";AAmDO,IAAK,QAAL,kBAAKA,WAAL;AACH,EAAAA,OAAA,iBAAc;AACd,EAAAA,OAAA,mBAAgB;AAChB,EAAAA,OAAA,wBAAqB;AACrB,EAAAA,OAAA,yBAAsB;AACtB,EAAAA,OAAA,sBAAmB;AACnB,EAAAA,OAAA,YAAS;AACT,EAAAA,OAAA,sBAAmB;AACnB,EAAAA,OAAA,sBAAmB;AACnB,EAAAA,OAAA,qBAAkB;AAClB,EAAAA,OAAA,gBAAa;AACb,EAAAA,OAAA,aAAU;AACV,EAAAA,OAAA,mBAAgB;AAChB,EAAAA,OAAA,qBAAkB;AAClB,EAAAA,OAAA,0BAAuB;AACvB,EAAAA,OAAA,kBAAe;AACf,EAAAA,OAAA,uBAAoB;AACpB,EAAAA,OAAA,sBAAmB;AACnB,EAAAA,OAAA,uBAAoB;AACpB,EAAAA,OAAA,UAAO;AAnBC,SAAAA;AAAA,GAAA;;;ACnDL,IAAM,cAAc;AACpB,IAAM,eAAe;AACrB,IAAM,gBAAgB;",
44+ "sourcesContent": ["export interface Message {\n /**\n * URL to go to when the action button is clicked\n */\n action: string;\n /**\n * Additional action buttons\n */\n actions?: Action[];\n /**\n * Notification body\n */\n body: string;\n /**\n * Clear scheduled jobs for the object_id before scheduling notifications\n */\n clear_schedule: boolean;\n /**\n * Type of event that triggered the notification\n * next-line-generate event-enum-jsonschema-values\n */\n event: Event;\n /**\n * Unique ID for the notification scheduling request.\n */\n id: string;\n /**\n * URL to an image to display in the notification\n */\n image?: string;\n /**\n * Churros ID of the ressource (the ticket, the post, the comment, etc)\n * Used to determine to whom the notification should be sent\n * For godchild_request, this is not a user id, but a godparent request id.\n */\n object_id: string;\n /**\n * When to push the notification\n */\n send_at: Date;\n /**\n * Notification title\n */\n title: string;\n}\n\nexport interface Action {\n action: string;\n label: string;\n}\n\n/**\n * Type of event that triggered the notification\n * next-line-generate event-enum-jsonschema-values\n */\nexport enum Event {\n BookingPaid = \"booking_paid\",\n ClearSchedule = \"clear_schedule\",\n ClearStoredSchedule = \"clear_stored_schedule\",\n ContributionPaid = \"contribution_paid\",\n Custom = \"custom\",\n GodchildAccepted = \"godchild_accepted\",\n GodchildRejected = \"godchild_rejected\",\n GodchildRequest = \"godchild_request\",\n LoginStuck = \"login_stuck\",\n NewPost = \"new_post\",\n PendingSignup = \"pending_signup\",\n RestoreSchedule = \"restore_schedule\",\n RestoreScheduleEager = \"restore_schedule_eager\",\n SaveSchedule = \"save_schedule\",\n ShotgunClosesSoon = \"shotgun_closes_soon\",\n ShotgunOpensSoon = \"shotgun_opens_soon\",\n ShowScheduledJobs = \"show_scheduled_jobs\",\n Test = \"test\",\n}\n", "export const STREAM_NAME = 'notella:stream';\nexport const SUBJECT_NAME = 'notella:notification';\nexport const CONSUMER_NAME = 'NotellaConsumer';"],
55+ "mappings": ";AAuDO,IAAK,QAAL,kBAAKA,WAAL;AACH,EAAAA,OAAA,iBAAc;AACd,EAAAA,OAAA,mBAAgB;AAChB,EAAAA,OAAA,yBAAsB;AACtB,EAAAA,OAAA,sBAAmB;AACnB,EAAAA,OAAA,YAAS;AACT,EAAAA,OAAA,sBAAmB;AACnB,EAAAA,OAAA,sBAAmB;AACnB,EAAAA,OAAA,qBAAkB;AAClB,EAAAA,OAAA,gBAAa;AACb,EAAAA,OAAA,aAAU;AACV,EAAAA,OAAA,mBAAgB;AAChB,EAAAA,OAAA,qBAAkB;AAClB,EAAAA,OAAA,0BAAuB;AACvB,EAAAA,OAAA,kBAAe;AACf,EAAAA,OAAA,uBAAoB;AACpB,EAAAA,OAAA,sBAAmB;AACnB,EAAAA,OAAA,uBAAoB;AACpB,EAAAA,OAAA,UAAO;AAlBC,SAAAA;AAAA,GAAA;;;ACvDL,IAAM,cAAc;AACpB,IAAM,eAAe;AACrB,IAAM,gBAAgB;",
66 "names": ["Event"]
77}