porting all github actions from bluesky-social/indigo to tangled CI

update lexgen with new ozone stuff (#949)

authored by Whyrusleeping and committed by GitHub affa75c9 73435524

+50
api/ozone/moderationdefs.go
··· 217 217 DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 218 218 } 219 219 220 + // ModerationDefs_ModEventPriorityScore is a "modEventPriorityScore" in the tools.ozone.moderation.defs schema. 221 + // 222 + // Set priority score of the subject. Higher score means higher priority. 223 + // 224 + // RECORDTYPE: ModerationDefs_ModEventPriorityScore 225 + type ModerationDefs_ModEventPriorityScore struct { 226 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventPriorityScore" cborgen:"$type,const=tools.ozone.moderation.defs#modEventPriorityScore"` 227 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 228 + Score int64 `json:"score" cborgen:"score"` 229 + } 230 + 220 231 // ModerationDefs_ModEventReport is a "modEventReport" in the tools.ozone.moderation.defs schema. 221 232 // 222 233 // # Report a subject ··· 346 357 ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 347 358 ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 348 359 ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 360 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 349 361 } 350 362 351 363 func (t *ModerationDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) { ··· 421 433 t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" 422 434 return json.Marshal(t.ModerationDefs_RecordEvent) 423 435 } 436 + if t.ModerationDefs_ModEventPriorityScore != nil { 437 + t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 438 + return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 439 + } 424 440 return nil, fmt.Errorf("cannot marshal empty enum") 425 441 } 426 442 func (t *ModerationDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error { ··· 484 500 case "tools.ozone.moderation.defs#recordEvent": 485 501 t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) 486 502 return json.Unmarshal(b, t.ModerationDefs_RecordEvent) 503 + case "tools.ozone.moderation.defs#modEventPriorityScore": 504 + t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 505 + return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 487 506 488 507 default: 489 508 return nil ··· 560 579 ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 561 580 ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 562 581 ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 582 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 563 583 } 564 584 565 585 func (t *ModerationDefs_ModEventView_Event) MarshalJSON() ([]byte, error) { ··· 635 655 t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" 636 656 return json.Marshal(t.ModerationDefs_RecordEvent) 637 657 } 658 + if t.ModerationDefs_ModEventPriorityScore != nil { 659 + t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 660 + return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 661 + } 638 662 return nil, fmt.Errorf("cannot marshal empty enum") 639 663 } 640 664 func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { ··· 698 722 case "tools.ozone.moderation.defs#recordEvent": 699 723 t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) 700 724 return json.Unmarshal(b, t.ModerationDefs_RecordEvent) 725 + case "tools.ozone.moderation.defs#modEventPriorityScore": 726 + t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 727 + return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 701 728 702 729 default: 703 730 return nil ··· 887 914 Did string `json:"did" cborgen:"did"` 888 915 } 889 916 917 + // ModerationDefs_ReporterStats is a "reporterStats" in the tools.ozone.moderation.defs schema. 918 + type ModerationDefs_ReporterStats struct { 919 + // accountReportCount: The total number of reports made by the user on accounts. 920 + AccountReportCount int64 `json:"accountReportCount" cborgen:"accountReportCount"` 921 + Did string `json:"did" cborgen:"did"` 922 + // labeledAccountCount: The total number of accounts labeled as a result of the user's reports. 923 + LabeledAccountCount int64 `json:"labeledAccountCount" cborgen:"labeledAccountCount"` 924 + // labeledRecordCount: The total number of records labeled as a result of the user's reports. 925 + LabeledRecordCount int64 `json:"labeledRecordCount" cborgen:"labeledRecordCount"` 926 + // recordReportCount: The total number of reports made by the user on records. 927 + RecordReportCount int64 `json:"recordReportCount" cborgen:"recordReportCount"` 928 + // reportedAccountCount: The total number of accounts reported by the user. 929 + ReportedAccountCount int64 `json:"reportedAccountCount" cborgen:"reportedAccountCount"` 930 + // reportedRecordCount: The total number of records reported by the user. 931 + ReportedRecordCount int64 `json:"reportedRecordCount" cborgen:"reportedRecordCount"` 932 + // takendownAccountCount: The total number of accounts taken down as a result of the user's reports. 933 + TakendownAccountCount int64 `json:"takendownAccountCount" cborgen:"takendownAccountCount"` 934 + // takendownRecordCount: The total number of records taken down as a result of the user's reports. 935 + TakendownRecordCount int64 `json:"takendownRecordCount" cborgen:"takendownRecordCount"` 936 + } 937 + 890 938 // ModerationDefs_SubjectStatusView is a "subjectStatusView" in the tools.ozone.moderation.defs schema. 891 939 type ModerationDefs_SubjectStatusView struct { 892 940 // accountStats: Statistics related to the account subject ··· 906 954 LastReviewedBy *string `json:"lastReviewedBy,omitempty" cborgen:"lastReviewedBy,omitempty"` 907 955 MuteReportingUntil *string `json:"muteReportingUntil,omitempty" cborgen:"muteReportingUntil,omitempty"` 908 956 MuteUntil *string `json:"muteUntil,omitempty" cborgen:"muteUntil,omitempty"` 957 + // priorityScore: Numeric value representing the level of priority. Higher score means higher priority. 958 + PriorityScore *int64 `json:"priorityScore,omitempty" cborgen:"priorityScore,omitempty"` 909 959 // recordsStats: Statistics related to the record subjects authored by the subject's account 910 960 RecordsStats *ModerationDefs_RecordsStats `json:"recordsStats,omitempty" cborgen:"recordsStats,omitempty"` 911 961 ReviewState *string `json:"reviewState" cborgen:"reviewState"`
+8
api/ozone/moderationemitEvent.go
··· 40 40 ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 41 41 ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 42 42 ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 43 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 43 44 } 44 45 45 46 func (t *ModerationEmitEvent_Input_Event) MarshalJSON() ([]byte, error) { ··· 111 112 t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" 112 113 return json.Marshal(t.ModerationDefs_RecordEvent) 113 114 } 115 + if t.ModerationDefs_ModEventPriorityScore != nil { 116 + t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 117 + return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 118 + } 114 119 return nil, fmt.Errorf("cannot marshal empty enum") 115 120 } 116 121 func (t *ModerationEmitEvent_Input_Event) UnmarshalJSON(b []byte) error { ··· 171 176 case "tools.ozone.moderation.defs#recordEvent": 172 177 t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) 173 178 return json.Unmarshal(b, t.ModerationDefs_RecordEvent) 179 + case "tools.ozone.moderation.defs#modEventPriorityScore": 180 + t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 181 + return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 174 182 175 183 default: 176 184 return nil
+30
api/ozone/moderationgetReporterStats.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getReporterStats 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationGetReporterStats_Output is the output of a tools.ozone.moderation.getReporterStats call. 14 + type ModerationGetReporterStats_Output struct { 15 + Stats []*ModerationDefs_ReporterStats `json:"stats" cborgen:"stats"` 16 + } 17 + 18 + // ModerationGetReporterStats calls the XRPC method "tools.ozone.moderation.getReporterStats". 19 + func ModerationGetReporterStats(ctx context.Context, c *xrpc.Client, dids []string) (*ModerationGetReporterStats_Output, error) { 20 + var out ModerationGetReporterStats_Output 21 + 22 + params := map[string]interface{}{ 23 + "dids": dids, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getReporterStats", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+3 -1
api/ozone/moderationqueryStatuses.go
··· 30 30 // includeMuted: By default, we don't include muted subjects in the results. Set this to true to include them. 31 31 // lastReviewedBy: Get all subject statuses that were reviewed by a specific moderator 32 32 // minAccountSuspendCount: If specified, only subjects that belong to an account that has at least this many suspensions will be returned. 33 + // minPriorityScore: If specified, only subjects that have priority score value above the given value will be returned. 33 34 // minReportedRecordsCount: If specified, only subjects that belong to an account that has at least this many reported records will be returned. 34 35 // minTakendownRecordsCount: If specified, only subjects that belong to an account that has at least this many taken down records will be returned. 35 36 // onlyMuted: When set to true, only muted subjects and reporters will be returned. ··· 44 45 // subject: The subject to get the status for. 45 46 // subjectType: If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. 46 47 // takendown: Get subjects that were taken down 47 - func ModerationQueryStatuses(ctx context.Context, c *xrpc.Client, appealed bool, collections []string, comment string, cursor string, excludeTags []string, hostingDeletedAfter string, hostingDeletedBefore string, hostingStatuses []string, hostingUpdatedAfter string, hostingUpdatedBefore string, ignoreSubjects []string, includeAllUserRecords bool, includeMuted bool, lastReviewedBy string, limit int64, minAccountSuspendCount int64, minReportedRecordsCount int64, minTakendownRecordsCount int64, onlyMuted bool, queueCount int64, queueIndex int64, queueSeed string, reportedAfter string, reportedBefore string, reviewState string, reviewedAfter string, reviewedBefore string, sortDirection string, sortField string, subject string, subjectType string, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) { 48 + func ModerationQueryStatuses(ctx context.Context, c *xrpc.Client, appealed bool, collections []string, comment string, cursor string, excludeTags []string, hostingDeletedAfter string, hostingDeletedBefore string, hostingStatuses []string, hostingUpdatedAfter string, hostingUpdatedBefore string, ignoreSubjects []string, includeAllUserRecords bool, includeMuted bool, lastReviewedBy string, limit int64, minAccountSuspendCount int64, minPriorityScore int64, minReportedRecordsCount int64, minTakendownRecordsCount int64, onlyMuted bool, queueCount int64, queueIndex int64, queueSeed string, reportedAfter string, reportedBefore string, reviewState string, reviewedAfter string, reviewedBefore string, sortDirection string, sortField string, subject string, subjectType string, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) { 48 49 var out ModerationQueryStatuses_Output 49 50 50 51 params := map[string]interface{}{ ··· 64 65 "lastReviewedBy": lastReviewedBy, 65 66 "limit": limit, 66 67 "minAccountSuspendCount": minAccountSuspendCount, 68 + "minPriorityScore": minPriorityScore, 67 69 "minReportedRecordsCount": minReportedRecordsCount, 68 70 "minTakendownRecordsCount": minTakendownRecordsCount, 69 71 "onlyMuted": onlyMuted,
+5 -3
api/ozone/teamlistMembers.go
··· 17 17 } 18 18 19 19 // TeamListMembers calls the XRPC method "tools.ozone.team.listMembers". 20 - func TeamListMembers(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*TeamListMembers_Output, error) { 20 + func TeamListMembers(ctx context.Context, c *xrpc.Client, cursor string, disabled bool, limit int64, roles []string) (*TeamListMembers_Output, error) { 21 21 var out TeamListMembers_Output 22 22 23 23 params := map[string]interface{}{ 24 - "cursor": cursor, 25 - "limit": limit, 24 + "cursor": cursor, 25 + "disabled": disabled, 26 + "limit": limit, 27 + "roles": roles, 26 28 } 27 29 if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.team.listMembers", params, nil, &out); err != nil { 28 30 return nil, err