fork of indigo with slightly nicer lexgen
0
fork

Configure Feed

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

lexgen against atproto 7049117ea28105666b762a7a0ca7c1246ad8b98b (#1069)

Just keeping things in sync. Ozone types only.

authored by bnewbold.net and committed by

GitHub 9d849ab2 9c19d0c4

+405 -1
+143
api/ozone/hostinggetAccountHistory.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.hosting.getAccountHistory 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // HostingGetAccountHistory_AccountCreated is a "accountCreated" in the tools.ozone.hosting.getAccountHistory schema. 17 + // 18 + // RECORDTYPE: HostingGetAccountHistory_AccountCreated 19 + type HostingGetAccountHistory_AccountCreated struct { 20 + LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#accountCreated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#accountCreated"` 21 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 22 + Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"` 23 + } 24 + 25 + // HostingGetAccountHistory_EmailConfirmed is a "emailConfirmed" in the tools.ozone.hosting.getAccountHistory schema. 26 + // 27 + // RECORDTYPE: HostingGetAccountHistory_EmailConfirmed 28 + type HostingGetAccountHistory_EmailConfirmed struct { 29 + LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#emailConfirmed" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#emailConfirmed"` 30 + Email string `json:"email" cborgen:"email"` 31 + } 32 + 33 + // HostingGetAccountHistory_EmailUpdated is a "emailUpdated" in the tools.ozone.hosting.getAccountHistory schema. 34 + // 35 + // RECORDTYPE: HostingGetAccountHistory_EmailUpdated 36 + type HostingGetAccountHistory_EmailUpdated struct { 37 + LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#emailUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#emailUpdated"` 38 + Email string `json:"email" cborgen:"email"` 39 + } 40 + 41 + // HostingGetAccountHistory_Event is a "event" in the tools.ozone.hosting.getAccountHistory schema. 42 + type HostingGetAccountHistory_Event struct { 43 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 44 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 45 + Details *HostingGetAccountHistory_Event_Details `json:"details" cborgen:"details"` 46 + } 47 + 48 + type HostingGetAccountHistory_Event_Details struct { 49 + HostingGetAccountHistory_AccountCreated *HostingGetAccountHistory_AccountCreated 50 + HostingGetAccountHistory_EmailUpdated *HostingGetAccountHistory_EmailUpdated 51 + HostingGetAccountHistory_EmailConfirmed *HostingGetAccountHistory_EmailConfirmed 52 + HostingGetAccountHistory_PasswordUpdated *HostingGetAccountHistory_PasswordUpdated 53 + HostingGetAccountHistory_HandleUpdated *HostingGetAccountHistory_HandleUpdated 54 + } 55 + 56 + func (t *HostingGetAccountHistory_Event_Details) MarshalJSON() ([]byte, error) { 57 + if t.HostingGetAccountHistory_AccountCreated != nil { 58 + t.HostingGetAccountHistory_AccountCreated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#accountCreated" 59 + return json.Marshal(t.HostingGetAccountHistory_AccountCreated) 60 + } 61 + if t.HostingGetAccountHistory_EmailUpdated != nil { 62 + t.HostingGetAccountHistory_EmailUpdated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#emailUpdated" 63 + return json.Marshal(t.HostingGetAccountHistory_EmailUpdated) 64 + } 65 + if t.HostingGetAccountHistory_EmailConfirmed != nil { 66 + t.HostingGetAccountHistory_EmailConfirmed.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#emailConfirmed" 67 + return json.Marshal(t.HostingGetAccountHistory_EmailConfirmed) 68 + } 69 + if t.HostingGetAccountHistory_PasswordUpdated != nil { 70 + t.HostingGetAccountHistory_PasswordUpdated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#passwordUpdated" 71 + return json.Marshal(t.HostingGetAccountHistory_PasswordUpdated) 72 + } 73 + if t.HostingGetAccountHistory_HandleUpdated != nil { 74 + t.HostingGetAccountHistory_HandleUpdated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#handleUpdated" 75 + return json.Marshal(t.HostingGetAccountHistory_HandleUpdated) 76 + } 77 + return nil, fmt.Errorf("cannot marshal empty enum") 78 + } 79 + func (t *HostingGetAccountHistory_Event_Details) UnmarshalJSON(b []byte) error { 80 + typ, err := util.TypeExtract(b) 81 + if err != nil { 82 + return err 83 + } 84 + 85 + switch typ { 86 + case "tools.ozone.hosting.getAccountHistory#accountCreated": 87 + t.HostingGetAccountHistory_AccountCreated = new(HostingGetAccountHistory_AccountCreated) 88 + return json.Unmarshal(b, t.HostingGetAccountHistory_AccountCreated) 89 + case "tools.ozone.hosting.getAccountHistory#emailUpdated": 90 + t.HostingGetAccountHistory_EmailUpdated = new(HostingGetAccountHistory_EmailUpdated) 91 + return json.Unmarshal(b, t.HostingGetAccountHistory_EmailUpdated) 92 + case "tools.ozone.hosting.getAccountHistory#emailConfirmed": 93 + t.HostingGetAccountHistory_EmailConfirmed = new(HostingGetAccountHistory_EmailConfirmed) 94 + return json.Unmarshal(b, t.HostingGetAccountHistory_EmailConfirmed) 95 + case "tools.ozone.hosting.getAccountHistory#passwordUpdated": 96 + t.HostingGetAccountHistory_PasswordUpdated = new(HostingGetAccountHistory_PasswordUpdated) 97 + return json.Unmarshal(b, t.HostingGetAccountHistory_PasswordUpdated) 98 + case "tools.ozone.hosting.getAccountHistory#handleUpdated": 99 + t.HostingGetAccountHistory_HandleUpdated = new(HostingGetAccountHistory_HandleUpdated) 100 + return json.Unmarshal(b, t.HostingGetAccountHistory_HandleUpdated) 101 + 102 + default: 103 + return nil 104 + } 105 + } 106 + 107 + // HostingGetAccountHistory_HandleUpdated is a "handleUpdated" in the tools.ozone.hosting.getAccountHistory schema. 108 + // 109 + // RECORDTYPE: HostingGetAccountHistory_HandleUpdated 110 + type HostingGetAccountHistory_HandleUpdated struct { 111 + LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#handleUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#handleUpdated"` 112 + Handle string `json:"handle" cborgen:"handle"` 113 + } 114 + 115 + // HostingGetAccountHistory_Output is the output of a tools.ozone.hosting.getAccountHistory call. 116 + type HostingGetAccountHistory_Output struct { 117 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 118 + Events []*HostingGetAccountHistory_Event `json:"events" cborgen:"events"` 119 + } 120 + 121 + // HostingGetAccountHistory_PasswordUpdated is a "passwordUpdated" in the tools.ozone.hosting.getAccountHistory schema. 122 + // 123 + // RECORDTYPE: HostingGetAccountHistory_PasswordUpdated 124 + type HostingGetAccountHistory_PasswordUpdated struct { 125 + LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#passwordUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#passwordUpdated"` 126 + } 127 + 128 + // HostingGetAccountHistory calls the XRPC method "tools.ozone.hosting.getAccountHistory". 129 + func HostingGetAccountHistory(ctx context.Context, c *xrpc.Client, cursor string, did string, events []string, limit int64) (*HostingGetAccountHistory_Output, error) { 130 + var out HostingGetAccountHistory_Output 131 + 132 + params := map[string]interface{}{ 133 + "cursor": cursor, 134 + "did": did, 135 + "events": events, 136 + "limit": limit, 137 + } 138 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.hosting.getAccountHistory", params, nil, &out); err != nil { 139 + return nil, err 140 + } 141 + 142 + return &out, nil 143 + }
+3 -1
api/ozone/servergetConfig.go
··· 16 16 BlobDivert *ServerGetConfig_ServiceConfig `json:"blobDivert,omitempty" cborgen:"blobDivert,omitempty"` 17 17 Chat *ServerGetConfig_ServiceConfig `json:"chat,omitempty" cborgen:"chat,omitempty"` 18 18 Pds *ServerGetConfig_ServiceConfig `json:"pds,omitempty" cborgen:"pds,omitempty"` 19 - Viewer *ServerGetConfig_ViewerConfig `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 19 + // verifierDid: The did of the verifier used for verification. 20 + VerifierDid *string `json:"verifierDid,omitempty" cborgen:"verifierDid,omitempty"` 21 + Viewer *ServerGetConfig_ViewerConfig `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 20 22 } 21 23 22 24 // ServerGetConfig_ServiceConfig is a "serviceConfig" in the tools.ozone.server.getConfig schema.
+110
api/ozone/verificationdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.verification.defs 6 + 7 + import ( 8 + "encoding/json" 9 + "fmt" 10 + 11 + "github.com/bluesky-social/indigo/lex/util" 12 + ) 13 + 14 + // VerificationDefs_VerificationView is a "verificationView" in the tools.ozone.verification.defs schema. 15 + // 16 + // Verification data for the associated subject. 17 + type VerificationDefs_VerificationView struct { 18 + // createdAt: Timestamp when the verification was created. 19 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 20 + // displayName: Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. 21 + DisplayName string `json:"displayName" cborgen:"displayName"` 22 + // handle: Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. 23 + Handle string `json:"handle" cborgen:"handle"` 24 + // issuer: The user who issued this verification. 25 + Issuer string `json:"issuer" cborgen:"issuer"` 26 + //IssuerProfile *VerificationDefs_VerificationView_IssuerProfile `json:"issuerProfile,omitempty" cborgen:"issuerProfile,omitempty"` 27 + //IssuerRepo *VerificationDefs_VerificationView_IssuerRepo `json:"issuerRepo,omitempty" cborgen:"issuerRepo,omitempty"` 28 + // revokeReason: Describes the reason for revocation, also indicating that the verification is no longer valid. 29 + RevokeReason *string `json:"revokeReason,omitempty" cborgen:"revokeReason,omitempty"` 30 + // revokedAt: Timestamp when the verification was revoked. 31 + RevokedAt *string `json:"revokedAt,omitempty" cborgen:"revokedAt,omitempty"` 32 + // revokedBy: The user who revoked this verification. 33 + RevokedBy *string `json:"revokedBy,omitempty" cborgen:"revokedBy,omitempty"` 34 + // subject: The subject of the verification. 35 + Subject string `json:"subject" cborgen:"subject"` 36 + //SubjectProfile *VerificationDefs_VerificationView_SubjectProfile `json:"subjectProfile,omitempty" cborgen:"subjectProfile,omitempty"` 37 + SubjectRepo *VerificationDefs_VerificationView_SubjectRepo `json:"subjectRepo,omitempty" cborgen:"subjectRepo,omitempty"` 38 + // uri: The AT-URI of the verification record. 39 + Uri string `json:"uri" cborgen:"uri"` 40 + } 41 + 42 + type VerificationDefs_VerificationView_IssuerRepo struct { 43 + ModerationDefs_RepoViewDetail *ModerationDefs_RepoViewDetail 44 + ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound 45 + } 46 + 47 + func (t *VerificationDefs_VerificationView_IssuerRepo) MarshalJSON() ([]byte, error) { 48 + if t.ModerationDefs_RepoViewDetail != nil { 49 + t.ModerationDefs_RepoViewDetail.LexiconTypeID = "tools.ozone.moderation.defs#repoViewDetail" 50 + return json.Marshal(t.ModerationDefs_RepoViewDetail) 51 + } 52 + if t.ModerationDefs_RepoViewNotFound != nil { 53 + t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" 54 + return json.Marshal(t.ModerationDefs_RepoViewNotFound) 55 + } 56 + return nil, fmt.Errorf("cannot marshal empty enum") 57 + } 58 + func (t *VerificationDefs_VerificationView_IssuerRepo) UnmarshalJSON(b []byte) error { 59 + typ, err := util.TypeExtract(b) 60 + if err != nil { 61 + return err 62 + } 63 + 64 + switch typ { 65 + case "tools.ozone.moderation.defs#repoViewDetail": 66 + t.ModerationDefs_RepoViewDetail = new(ModerationDefs_RepoViewDetail) 67 + return json.Unmarshal(b, t.ModerationDefs_RepoViewDetail) 68 + case "tools.ozone.moderation.defs#repoViewNotFound": 69 + t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) 70 + return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) 71 + 72 + default: 73 + return nil 74 + } 75 + } 76 + 77 + type VerificationDefs_VerificationView_SubjectRepo struct { 78 + ModerationDefs_RepoViewDetail *ModerationDefs_RepoViewDetail 79 + ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound 80 + } 81 + 82 + func (t *VerificationDefs_VerificationView_SubjectRepo) MarshalJSON() ([]byte, error) { 83 + if t.ModerationDefs_RepoViewDetail != nil { 84 + t.ModerationDefs_RepoViewDetail.LexiconTypeID = "tools.ozone.moderation.defs#repoViewDetail" 85 + return json.Marshal(t.ModerationDefs_RepoViewDetail) 86 + } 87 + if t.ModerationDefs_RepoViewNotFound != nil { 88 + t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" 89 + return json.Marshal(t.ModerationDefs_RepoViewNotFound) 90 + } 91 + return nil, fmt.Errorf("cannot marshal empty enum") 92 + } 93 + func (t *VerificationDefs_VerificationView_SubjectRepo) UnmarshalJSON(b []byte) error { 94 + typ, err := util.TypeExtract(b) 95 + if err != nil { 96 + return err 97 + } 98 + 99 + switch typ { 100 + case "tools.ozone.moderation.defs#repoViewDetail": 101 + t.ModerationDefs_RepoViewDetail = new(ModerationDefs_RepoViewDetail) 102 + return json.Unmarshal(b, t.ModerationDefs_RepoViewDetail) 103 + case "tools.ozone.moderation.defs#repoViewNotFound": 104 + t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) 105 + return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) 106 + 107 + default: 108 + return nil 109 + } 110 + }
+55
api/ozone/verificationgrantVerifications.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.verification.grantVerifications 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // VerificationGrantVerifications_GrantError is a "grantError" in the tools.ozone.verification.grantVerifications schema. 14 + // 15 + // Error object for failed verifications. 16 + type VerificationGrantVerifications_GrantError struct { 17 + // error: Error message describing the reason for failure. 18 + Error string `json:"error" cborgen:"error"` 19 + // subject: The did of the subject being verified 20 + Subject string `json:"subject" cborgen:"subject"` 21 + } 22 + 23 + // VerificationGrantVerifications_Input is the input argument to a tools.ozone.verification.grantVerifications call. 24 + type VerificationGrantVerifications_Input struct { 25 + // verifications: Array of verification requests to process 26 + Verifications []*VerificationGrantVerifications_VerificationInput `json:"verifications" cborgen:"verifications"` 27 + } 28 + 29 + // VerificationGrantVerifications_Output is the output of a tools.ozone.verification.grantVerifications call. 30 + type VerificationGrantVerifications_Output struct { 31 + FailedVerifications []*VerificationGrantVerifications_GrantError `json:"failedVerifications" cborgen:"failedVerifications"` 32 + Verifications []*VerificationDefs_VerificationView `json:"verifications" cborgen:"verifications"` 33 + } 34 + 35 + // VerificationGrantVerifications_VerificationInput is the input argument to a tools.ozone.verification.grantVerifications call. 36 + type VerificationGrantVerifications_VerificationInput struct { 37 + // createdAt: Timestamp for verification record. Defaults to current time when not specified. 38 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 39 + // displayName: Display name of the subject the verification applies to at the moment of verifying. 40 + DisplayName string `json:"displayName" cborgen:"displayName"` 41 + // handle: Handle of the subject the verification applies to at the moment of verifying. 42 + Handle string `json:"handle" cborgen:"handle"` 43 + // subject: The did of the subject being verified 44 + Subject string `json:"subject" cborgen:"subject"` 45 + } 46 + 47 + // VerificationGrantVerifications calls the XRPC method "tools.ozone.verification.grantVerifications". 48 + func VerificationGrantVerifications(ctx context.Context, c *xrpc.Client, input *VerificationGrantVerifications_Input) (*VerificationGrantVerifications_Output, error) { 49 + var out VerificationGrantVerifications_Output 50 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.verification.grantVerifications", nil, input, &out); err != nil { 51 + return nil, err 52 + } 53 + 54 + return &out, nil 55 + }
+47
api/ozone/verificationlistVerifications.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.verification.listVerifications 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // VerificationListVerifications_Output is the output of a tools.ozone.verification.listVerifications call. 14 + type VerificationListVerifications_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Verifications []*VerificationDefs_VerificationView `json:"verifications" cborgen:"verifications"` 17 + } 18 + 19 + // VerificationListVerifications calls the XRPC method "tools.ozone.verification.listVerifications". 20 + // 21 + // createdAfter: Filter to verifications created after this timestamp 22 + // createdBefore: Filter to verifications created before this timestamp 23 + // cursor: Pagination cursor 24 + // isRevoked: Filter to verifications that are revoked or not. By default, includes both. 25 + // issuers: Filter to verifications from specific issuers 26 + // limit: Maximum number of results to return 27 + // sortDirection: Sort direction for creation date 28 + // subjects: Filter to specific verified DIDs 29 + func VerificationListVerifications(ctx context.Context, c *xrpc.Client, createdAfter string, createdBefore string, cursor string, isRevoked bool, issuers []string, limit int64, sortDirection string, subjects []string) (*VerificationListVerifications_Output, error) { 30 + var out VerificationListVerifications_Output 31 + 32 + params := map[string]interface{}{ 33 + "createdAfter": createdAfter, 34 + "createdBefore": createdBefore, 35 + "cursor": cursor, 36 + "isRevoked": isRevoked, 37 + "issuers": issuers, 38 + "limit": limit, 39 + "sortDirection": sortDirection, 40 + "subjects": subjects, 41 + } 42 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.verification.listVerifications", params, nil, &out); err != nil { 43 + return nil, err 44 + } 45 + 46 + return &out, nil 47 + }
+47
api/ozone/verificationrevokeVerifications.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.verification.revokeVerifications 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // VerificationRevokeVerifications_Input is the input argument to a tools.ozone.verification.revokeVerifications call. 14 + type VerificationRevokeVerifications_Input struct { 15 + // revokeReason: Reason for revoking the verification. This is optional and can be omitted if not needed. 16 + RevokeReason *string `json:"revokeReason,omitempty" cborgen:"revokeReason,omitempty"` 17 + // uris: Array of verification record uris to revoke 18 + Uris []string `json:"uris" cborgen:"uris"` 19 + } 20 + 21 + // VerificationRevokeVerifications_Output is the output of a tools.ozone.verification.revokeVerifications call. 22 + type VerificationRevokeVerifications_Output struct { 23 + // failedRevocations: List of verification uris that couldn't be revoked, including failure reasons 24 + FailedRevocations []*VerificationRevokeVerifications_RevokeError `json:"failedRevocations" cborgen:"failedRevocations"` 25 + // revokedVerifications: List of verification uris successfully revoked 26 + RevokedVerifications []string `json:"revokedVerifications" cborgen:"revokedVerifications"` 27 + } 28 + 29 + // VerificationRevokeVerifications_RevokeError is a "revokeError" in the tools.ozone.verification.revokeVerifications schema. 30 + // 31 + // Error object for failed revocations 32 + type VerificationRevokeVerifications_RevokeError struct { 33 + // error: Description of the error that occurred during revocation. 34 + Error string `json:"error" cborgen:"error"` 35 + // uri: The AT-URI of the verification record that failed to revoke. 36 + Uri string `json:"uri" cborgen:"uri"` 37 + } 38 + 39 + // VerificationRevokeVerifications calls the XRPC method "tools.ozone.verification.revokeVerifications". 40 + func VerificationRevokeVerifications(ctx context.Context, c *xrpc.Client, input *VerificationRevokeVerifications_Input) (*VerificationRevokeVerifications_Output, error) { 41 + var out VerificationRevokeVerifications_Output 42 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.verification.revokeVerifications", nil, input, &out); err != nil { 43 + return nil, err 44 + } 45 + 46 + return &out, nil 47 + }