This repository has no description
0

Configure Feed

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

core / api / tangled / notificationlistNotifications.go
3.2 kB 71 lines
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package tangled 4 5// schema: org.tangled.temp.notification.listNotifications 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13const ( 14 TempNotificationListNotificationsNSID = "org.tangled.temp.notification.listNotifications" 15) 16 17// TempNotificationListNotifications_Notification is a "notification" in the org.tangled.temp.notification.listNotifications schema. 18type TempNotificationListNotifications_Notification struct { 19 // actorDid: DID of the user who triggered this notification. 20 ActorDid string `json:"actorDid" cborgen:"actorDid"` 21 // category: Broad category: 'social' or 'work'. 22 Category string `json:"category" cborgen:"category"` 23 CreatedAt string `json:"createdAt" cborgen:"createdAt"` 24 // id: Stable numeric ID for this notification. 25 Id int64 `json:"id" cborgen:"id"` 26 // issueAt: AT-URI of the related org.tangled.issue.issue record, if applicable. 27 IssueAt *string `json:"issueAt,omitempty" cborgen:"issueAt,omitempty"` 28 // pullAt: AT-URI of the related org.tangled.pulls.pull record, if applicable. 29 PullAt *string `json:"pullAt,omitempty" cborgen:"pullAt,omitempty"` 30 Read bool `json:"read" cborgen:"read"` 31 // repoDid: DID of the related repository, if applicable. 32 RepoDid *string `json:"repoDid,omitempty" cborgen:"repoDid,omitempty"` 33 // type: Notification type: repo_starred, issue_created, issue_commented, issue_closed, issue_reopen, issue_assigned, issue_unassigned, pull_created, pull_commented, pull_merged, pull_closed, pull_reopen, pull_assigned, pull_unassigned, followed, user_mentioned. 34 Type string `json:"type" cborgen:"type"` 35} 36 37// TempNotificationListNotifications_Output is the output of a org.tangled.temp.notification.listNotifications call. 38type TempNotificationListNotifications_Output struct { 39 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 40 Notifications []*TempNotificationListNotifications_Notification `json:"notifications" cborgen:"notifications"` 41 SocialUnreadCount int64 `json:"socialUnreadCount" cborgen:"socialUnreadCount"` 42 WorkUnreadCount int64 `json:"workUnreadCount" cborgen:"workUnreadCount"` 43} 44 45// TempNotificationListNotifications calls the XRPC method "org.tangled.temp.notification.listNotifications". 46// 47// category: Filter by category: 'all', 'social', or 'work'. 48// limit: Max notifications per category to return. 49// read: Filter by read state: 'all' or 'unread'. 50func TempNotificationListNotifications(ctx context.Context, c util.LexClient, category string, cursor string, limit int64, read string) (*TempNotificationListNotifications_Output, error) { 51 var out TempNotificationListNotifications_Output 52 53 params := map[string]interface{}{} 54 if category != "" { 55 params["category"] = category 56 } 57 if cursor != "" { 58 params["cursor"] = cursor 59 } 60 if limit != 0 { 61 params["limit"] = limit 62 } 63 if read != "" { 64 params["read"] = read 65 } 66 if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.notification.listNotifications", params, nil, &out); err != nil { 67 return nil, err 68 } 69 70 return &out, nil 71}