This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

chore: format code

+48 -45
+1
package.json
··· 1 1 { 2 + "type": "module", 2 3 "devDependencies": { 3 4 "nats": "^2.28.2", 4 5 "prisma": "^5.20.0",
+2
scripts/mocksender.ts
··· 1 + //@ts-nocheck 2 + 1 3 import { connect, JetStreamManager, NatsConnection, StringCodec } from 'nats'; 2 4 import { STREAM_NAME, SUBJECT_NAME } from '../constants.js'; 3 5 import { Message } from '../types.js';
+45 -45
types.d.ts
··· 1 1 export interface Message { 2 - /** 3 - * URL to go to when the action button is clicked 4 - */ 5 - action: string; 6 - /** 7 - * Additional action buttons 8 - */ 9 - actions: Action[]; 10 - /** 11 - * Notification body 12 - */ 13 - body: string; 14 - /** 15 - * Type of event that triggered the notification 16 - */ 17 - event: Event; 18 - /** 19 - * Unique ID for the notification scheduling request. 20 - */ 21 - id: string; 22 - /** 23 - * URL to an image to display in the notification 24 - */ 25 - image: string; 26 - /** 27 - * Churros ID of the ressource (the ticket, the post, the comment, etc) 28 - * Used to determine to whom the notification should be sent 29 - * For godchild_request, this is not a user id, but a godparent request id. 30 - */ 31 - object_id: string; 32 - /** 33 - * When to push the notification 34 - */ 35 - send_at: Date; 36 - /** 37 - * Notification title 38 - */ 39 - title: string; 2 + /** 3 + * URL to go to when the action button is clicked 4 + */ 5 + action: string; 6 + /** 7 + * Additional action buttons 8 + */ 9 + actions: Action[]; 10 + /** 11 + * Notification body 12 + */ 13 + body: string; 14 + /** 15 + * Type of event that triggered the notification 16 + */ 17 + event: Event; 18 + /** 19 + * Unique ID for the notification scheduling request. 20 + */ 21 + id: string; 22 + /** 23 + * URL to an image to display in the notification 24 + */ 25 + image: string; 26 + /** 27 + * Churros ID of the ressource (the ticket, the post, the comment, etc) 28 + * Used to determine to whom the notification should be sent 29 + * For godchild_request, this is not a user id, but a godparent request id. 30 + */ 31 + object_id: string; 32 + /** 33 + * When to push the notification 34 + */ 35 + send_at: Date; 36 + /** 37 + * Notification title 38 + */ 39 + title: string; 40 40 } 41 41 42 42 export interface Action { 43 - action: string; 44 - label: string; 43 + action: string; 44 + label: string; 45 45 } 46 46 47 47 /** 48 48 * Type of event that triggered the notification 49 49 */ 50 50 export enum Event { 51 - CommentReply = "comment_reply", 52 - GodchildRequest = "godchild_request", 53 - NewComment = "new_comment", 54 - NewPost = "new_post", 55 - NewTicket = "new_ticket", 51 + CommentReply = 'comment_reply', 52 + GodchildRequest = 'godchild_request', 53 + NewComment = 'new_comment', 54 + NewPost = 'new_post', 55 + NewTicket = 'new_ticket', 56 56 }