···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.moderation.listScheduledActions
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/lex/util"
1111+)
1212+1313+// ModerationListScheduledActions_Input is the input argument to a tools.ozone.moderation.listScheduledActions call.
1414+type ModerationListScheduledActions_Input struct {
1515+ // cursor: Cursor for pagination
1616+ Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
1717+ // endsBefore: Filter actions scheduled to execute before this time
1818+ EndsBefore *string `json:"endsBefore,omitempty" cborgen:"endsBefore,omitempty"`
1919+ // limit: Maximum number of results to return
2020+ Limit *int64 `json:"limit,omitempty" cborgen:"limit,omitempty"`
2121+ // startsAfter: Filter actions scheduled to execute after this time
2222+ StartsAfter *string `json:"startsAfter,omitempty" cborgen:"startsAfter,omitempty"`
2323+ // statuses: Filter actions by status
2424+ Statuses []string `json:"statuses" cborgen:"statuses"`
2525+ // subjects: Filter actions for specific DID subjects
2626+ Subjects []string `json:"subjects,omitempty" cborgen:"subjects,omitempty"`
2727+}
2828+2929+// ModerationListScheduledActions_Output is the output of a tools.ozone.moderation.listScheduledActions call.
3030+type ModerationListScheduledActions_Output struct {
3131+ Actions []*ModerationDefs_ScheduledActionView `json:"actions" cborgen:"actions"`
3232+ // cursor: Cursor for next page of results
3333+ Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
3434+}
3535+3636+// ModerationListScheduledActions calls the XRPC method "tools.ozone.moderation.listScheduledActions".
3737+func ModerationListScheduledActions(ctx context.Context, c util.LexClient, input *ModerationListScheduledActions_Input) (*ModerationListScheduledActions_Output, error) {
3838+ var out ModerationListScheduledActions_Output
3939+ if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.moderation.listScheduledActions", nil, input, &out); err != nil {
4040+ return nil, err
4141+ }
4242+4343+ return &out, nil
4444+}
+5-1
api/ozone/moderationqueryEvents.go
···2121// addedLabels: If specified, only events where all of these labels were added are returned
2222// addedTags: If specified, only events where all of these tags were added are returned
2323// ageAssuranceState: If specified, only events where the age assurance state matches the given value are returned
2424+// batchId: If specified, only events where the batchId matches the given value are returned
2425// collections: If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.
2526// comment: If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition.
2627// createdAfter: Retrieve events created after a given timestamp
···3334// sortDirection: Sort direction for the events. Defaults to descending order of created at timestamp.
3435// subjectType: If specified, only events where the subject is 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.
3536// types: The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent<name>) to filter by. If not specified, all events are returned.
3636-func ModerationQueryEvents(ctx context.Context, c util.LexClient, addedLabels []string, addedTags []string, ageAssuranceState string, collections []string, comment string, createdAfter string, createdBefore string, createdBy string, cursor string, hasComment bool, includeAllUserRecords bool, limit int64, modTool []string, policies []string, removedLabels []string, removedTags []string, reportTypes []string, sortDirection string, subject string, subjectType string, types []string) (*ModerationQueryEvents_Output, error) {
3737+func ModerationQueryEvents(ctx context.Context, c util.LexClient, addedLabels []string, addedTags []string, ageAssuranceState string, batchId string, collections []string, comment string, createdAfter string, createdBefore string, createdBy string, cursor string, hasComment bool, includeAllUserRecords bool, limit int64, modTool []string, policies []string, removedLabels []string, removedTags []string, reportTypes []string, sortDirection string, subject string, subjectType string, types []string) (*ModerationQueryEvents_Output, error) {
3738 var out ModerationQueryEvents_Output
38393940 params := map[string]interface{}{}
···4546 }
4647 if ageAssuranceState != "" {
4748 params["ageAssuranceState"] = ageAssuranceState
4949+ }
5050+ if batchId != "" {
5151+ params["batchId"] = batchId
4852 }
4953 if len(collections) != 0 {
5054 params["collections"] = collections
+102
api/ozone/moderationscheduleAction.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.moderation.scheduleAction
66+77+import (
88+ "context"
99+ "encoding/json"
1010+ "fmt"
1111+1212+ "github.com/bluesky-social/indigo/lex/util"
1313+)
1414+1515+// ModerationScheduleAction_FailedScheduling is a "failedScheduling" in the tools.ozone.moderation.scheduleAction schema.
1616+type ModerationScheduleAction_FailedScheduling struct {
1717+ Error string `json:"error" cborgen:"error"`
1818+ ErrorCode *string `json:"errorCode,omitempty" cborgen:"errorCode,omitempty"`
1919+ Subject string `json:"subject" cborgen:"subject"`
2020+}
2121+2222+// ModerationScheduleAction_Input is the input argument to a tools.ozone.moderation.scheduleAction call.
2323+type ModerationScheduleAction_Input struct {
2424+ Action *ModerationScheduleAction_Input_Action `json:"action" cborgen:"action"`
2525+ CreatedBy string `json:"createdBy" cborgen:"createdBy"`
2626+ // modTool: This will be propagated to the moderation event when it is applied
2727+ ModTool *ModerationDefs_ModTool `json:"modTool,omitempty" cborgen:"modTool,omitempty"`
2828+ Scheduling *ModerationScheduleAction_SchedulingConfig `json:"scheduling" cborgen:"scheduling"`
2929+ // subjects: Array of DID subjects to schedule the action for
3030+ Subjects []string `json:"subjects" cborgen:"subjects"`
3131+}
3232+3333+type ModerationScheduleAction_Input_Action struct {
3434+ ModerationScheduleAction_Takedown *ModerationScheduleAction_Takedown
3535+}
3636+3737+func (t *ModerationScheduleAction_Input_Action) MarshalJSON() ([]byte, error) {
3838+ if t.ModerationScheduleAction_Takedown != nil {
3939+ t.ModerationScheduleAction_Takedown.LexiconTypeID = "tools.ozone.moderation.scheduleAction#takedown"
4040+ return json.Marshal(t.ModerationScheduleAction_Takedown)
4141+ }
4242+ return nil, fmt.Errorf("cannot marshal empty enum")
4343+}
4444+func (t *ModerationScheduleAction_Input_Action) UnmarshalJSON(b []byte) error {
4545+ typ, err := util.TypeExtract(b)
4646+ if err != nil {
4747+ return err
4848+ }
4949+5050+ switch typ {
5151+ case "tools.ozone.moderation.scheduleAction#takedown":
5252+ t.ModerationScheduleAction_Takedown = new(ModerationScheduleAction_Takedown)
5353+ return json.Unmarshal(b, t.ModerationScheduleAction_Takedown)
5454+5555+ default:
5656+ return nil
5757+ }
5858+}
5959+6060+// ModerationScheduleAction_ScheduledActionResults is a "scheduledActionResults" in the tools.ozone.moderation.scheduleAction schema.
6161+type ModerationScheduleAction_ScheduledActionResults struct {
6262+ Failed []*ModerationScheduleAction_FailedScheduling `json:"failed" cborgen:"failed"`
6363+ Succeeded []string `json:"succeeded" cborgen:"succeeded"`
6464+}
6565+6666+// ModerationScheduleAction_SchedulingConfig is a "schedulingConfig" in the tools.ozone.moderation.scheduleAction schema.
6767+//
6868+// Configuration for when the action should be executed
6969+type ModerationScheduleAction_SchedulingConfig struct {
7070+ // executeAfter: Earliest time to execute the action (for randomized scheduling)
7171+ ExecuteAfter *string `json:"executeAfter,omitempty" cborgen:"executeAfter,omitempty"`
7272+ // executeAt: Exact time to execute the action
7373+ ExecuteAt *string `json:"executeAt,omitempty" cborgen:"executeAt,omitempty"`
7474+ // executeUntil: Latest time to execute the action (for randomized scheduling)
7575+ ExecuteUntil *string `json:"executeUntil,omitempty" cborgen:"executeUntil,omitempty"`
7676+}
7777+7878+// ModerationScheduleAction_Takedown is a "takedown" in the tools.ozone.moderation.scheduleAction schema.
7979+//
8080+// # Schedule a takedown action
8181+//
8282+// RECORDTYPE: ModerationScheduleAction_Takedown
8383+type ModerationScheduleAction_Takedown struct {
8484+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.scheduleAction#takedown" cborgen:"$type,const=tools.ozone.moderation.scheduleAction#takedown"`
8585+ // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged).
8686+ AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"`
8787+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
8888+ // durationInHours: Indicates how long the takedown should be in effect before automatically expiring.
8989+ DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"`
9090+ // policies: Names/Keywords of the policies that drove the decision.
9191+ Policies []string `json:"policies,omitempty" cborgen:"policies,omitempty"`
9292+}
9393+9494+// ModerationScheduleAction calls the XRPC method "tools.ozone.moderation.scheduleAction".
9595+func ModerationScheduleAction(ctx context.Context, c util.LexClient, input *ModerationScheduleAction_Input) (*ModerationScheduleAction_ScheduledActionResults, error) {
9696+ var out ModerationScheduleAction_ScheduledActionResults
9797+ if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.moderation.scheduleAction", nil, input, &out); err != nil {
9898+ return nil, err
9999+ }
100100+101101+ return &out, nil
102102+}
+5
api/ozone/reportdefs.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.report.defs