···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.hosting.getAccountHistory
66+77+import (
88+ "context"
99+ "encoding/json"
1010+ "fmt"
1111+1212+ "github.com/bluesky-social/indigo/lex/util"
1313+ "github.com/bluesky-social/indigo/xrpc"
1414+)
1515+1616+// HostingGetAccountHistory_AccountCreated is a "accountCreated" in the tools.ozone.hosting.getAccountHistory schema.
1717+//
1818+// RECORDTYPE: HostingGetAccountHistory_AccountCreated
1919+type HostingGetAccountHistory_AccountCreated struct {
2020+ LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#accountCreated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#accountCreated"`
2121+ Email *string `json:"email,omitempty" cborgen:"email,omitempty"`
2222+ Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"`
2323+}
2424+2525+// HostingGetAccountHistory_EmailConfirmed is a "emailConfirmed" in the tools.ozone.hosting.getAccountHistory schema.
2626+//
2727+// RECORDTYPE: HostingGetAccountHistory_EmailConfirmed
2828+type HostingGetAccountHistory_EmailConfirmed struct {
2929+ LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#emailConfirmed" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#emailConfirmed"`
3030+ Email string `json:"email" cborgen:"email"`
3131+}
3232+3333+// HostingGetAccountHistory_EmailUpdated is a "emailUpdated" in the tools.ozone.hosting.getAccountHistory schema.
3434+//
3535+// RECORDTYPE: HostingGetAccountHistory_EmailUpdated
3636+type HostingGetAccountHistory_EmailUpdated struct {
3737+ LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#emailUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#emailUpdated"`
3838+ Email string `json:"email" cborgen:"email"`
3939+}
4040+4141+// HostingGetAccountHistory_Event is a "event" in the tools.ozone.hosting.getAccountHistory schema.
4242+type HostingGetAccountHistory_Event struct {
4343+ CreatedAt string `json:"createdAt" cborgen:"createdAt"`
4444+ CreatedBy string `json:"createdBy" cborgen:"createdBy"`
4545+ Details *HostingGetAccountHistory_Event_Details `json:"details" cborgen:"details"`
4646+}
4747+4848+type HostingGetAccountHistory_Event_Details struct {
4949+ HostingGetAccountHistory_AccountCreated *HostingGetAccountHistory_AccountCreated
5050+ HostingGetAccountHistory_EmailUpdated *HostingGetAccountHistory_EmailUpdated
5151+ HostingGetAccountHistory_EmailConfirmed *HostingGetAccountHistory_EmailConfirmed
5252+ HostingGetAccountHistory_PasswordUpdated *HostingGetAccountHistory_PasswordUpdated
5353+ HostingGetAccountHistory_HandleUpdated *HostingGetAccountHistory_HandleUpdated
5454+}
5555+5656+func (t *HostingGetAccountHistory_Event_Details) MarshalJSON() ([]byte, error) {
5757+ if t.HostingGetAccountHistory_AccountCreated != nil {
5858+ t.HostingGetAccountHistory_AccountCreated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#accountCreated"
5959+ return json.Marshal(t.HostingGetAccountHistory_AccountCreated)
6060+ }
6161+ if t.HostingGetAccountHistory_EmailUpdated != nil {
6262+ t.HostingGetAccountHistory_EmailUpdated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#emailUpdated"
6363+ return json.Marshal(t.HostingGetAccountHistory_EmailUpdated)
6464+ }
6565+ if t.HostingGetAccountHistory_EmailConfirmed != nil {
6666+ t.HostingGetAccountHistory_EmailConfirmed.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#emailConfirmed"
6767+ return json.Marshal(t.HostingGetAccountHistory_EmailConfirmed)
6868+ }
6969+ if t.HostingGetAccountHistory_PasswordUpdated != nil {
7070+ t.HostingGetAccountHistory_PasswordUpdated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#passwordUpdated"
7171+ return json.Marshal(t.HostingGetAccountHistory_PasswordUpdated)
7272+ }
7373+ if t.HostingGetAccountHistory_HandleUpdated != nil {
7474+ t.HostingGetAccountHistory_HandleUpdated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#handleUpdated"
7575+ return json.Marshal(t.HostingGetAccountHistory_HandleUpdated)
7676+ }
7777+ return nil, fmt.Errorf("cannot marshal empty enum")
7878+}
7979+func (t *HostingGetAccountHistory_Event_Details) UnmarshalJSON(b []byte) error {
8080+ typ, err := util.TypeExtract(b)
8181+ if err != nil {
8282+ return err
8383+ }
8484+8585+ switch typ {
8686+ case "tools.ozone.hosting.getAccountHistory#accountCreated":
8787+ t.HostingGetAccountHistory_AccountCreated = new(HostingGetAccountHistory_AccountCreated)
8888+ return json.Unmarshal(b, t.HostingGetAccountHistory_AccountCreated)
8989+ case "tools.ozone.hosting.getAccountHistory#emailUpdated":
9090+ t.HostingGetAccountHistory_EmailUpdated = new(HostingGetAccountHistory_EmailUpdated)
9191+ return json.Unmarshal(b, t.HostingGetAccountHistory_EmailUpdated)
9292+ case "tools.ozone.hosting.getAccountHistory#emailConfirmed":
9393+ t.HostingGetAccountHistory_EmailConfirmed = new(HostingGetAccountHistory_EmailConfirmed)
9494+ return json.Unmarshal(b, t.HostingGetAccountHistory_EmailConfirmed)
9595+ case "tools.ozone.hosting.getAccountHistory#passwordUpdated":
9696+ t.HostingGetAccountHistory_PasswordUpdated = new(HostingGetAccountHistory_PasswordUpdated)
9797+ return json.Unmarshal(b, t.HostingGetAccountHistory_PasswordUpdated)
9898+ case "tools.ozone.hosting.getAccountHistory#handleUpdated":
9999+ t.HostingGetAccountHistory_HandleUpdated = new(HostingGetAccountHistory_HandleUpdated)
100100+ return json.Unmarshal(b, t.HostingGetAccountHistory_HandleUpdated)
101101+102102+ default:
103103+ return nil
104104+ }
105105+}
106106+107107+// HostingGetAccountHistory_HandleUpdated is a "handleUpdated" in the tools.ozone.hosting.getAccountHistory schema.
108108+//
109109+// RECORDTYPE: HostingGetAccountHistory_HandleUpdated
110110+type HostingGetAccountHistory_HandleUpdated struct {
111111+ LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#handleUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#handleUpdated"`
112112+ Handle string `json:"handle" cborgen:"handle"`
113113+}
114114+115115+// HostingGetAccountHistory_Output is the output of a tools.ozone.hosting.getAccountHistory call.
116116+type HostingGetAccountHistory_Output struct {
117117+ Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
118118+ Events []*HostingGetAccountHistory_Event `json:"events" cborgen:"events"`
119119+}
120120+121121+// HostingGetAccountHistory_PasswordUpdated is a "passwordUpdated" in the tools.ozone.hosting.getAccountHistory schema.
122122+//
123123+// RECORDTYPE: HostingGetAccountHistory_PasswordUpdated
124124+type HostingGetAccountHistory_PasswordUpdated struct {
125125+ LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#passwordUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#passwordUpdated"`
126126+}
127127+128128+// HostingGetAccountHistory calls the XRPC method "tools.ozone.hosting.getAccountHistory".
129129+func HostingGetAccountHistory(ctx context.Context, c *xrpc.Client, cursor string, did string, events []string, limit int64) (*HostingGetAccountHistory_Output, error) {
130130+ var out HostingGetAccountHistory_Output
131131+132132+ params := map[string]interface{}{
133133+ "cursor": cursor,
134134+ "did": did,
135135+ "events": events,
136136+ "limit": limit,
137137+ }
138138+ if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.hosting.getAccountHistory", params, nil, &out); err != nil {
139139+ return nil, err
140140+ }
141141+142142+ return &out, nil
143143+}
+3-1
api/ozone/servergetConfig.go
···1616 BlobDivert *ServerGetConfig_ServiceConfig `json:"blobDivert,omitempty" cborgen:"blobDivert,omitempty"`
1717 Chat *ServerGetConfig_ServiceConfig `json:"chat,omitempty" cborgen:"chat,omitempty"`
1818 Pds *ServerGetConfig_ServiceConfig `json:"pds,omitempty" cborgen:"pds,omitempty"`
1919- Viewer *ServerGetConfig_ViewerConfig `json:"viewer,omitempty" cborgen:"viewer,omitempty"`
1919+ // verifierDid: The did of the verifier used for verification.
2020+ VerifierDid *string `json:"verifierDid,omitempty" cborgen:"verifierDid,omitempty"`
2121+ Viewer *ServerGetConfig_ViewerConfig `json:"viewer,omitempty" cborgen:"viewer,omitempty"`
2022}
21232224// ServerGetConfig_ServiceConfig is a "serviceConfig" in the tools.ozone.server.getConfig schema.
+110
api/ozone/verificationdefs.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.verification.defs
66+77+import (
88+ "encoding/json"
99+ "fmt"
1010+1111+ "github.com/bluesky-social/indigo/lex/util"
1212+)
1313+1414+// VerificationDefs_VerificationView is a "verificationView" in the tools.ozone.verification.defs schema.
1515+//
1616+// Verification data for the associated subject.
1717+type VerificationDefs_VerificationView struct {
1818+ // createdAt: Timestamp when the verification was created.
1919+ CreatedAt string `json:"createdAt" cborgen:"createdAt"`
2020+ // 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.
2121+ DisplayName string `json:"displayName" cborgen:"displayName"`
2222+ // 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.
2323+ Handle string `json:"handle" cborgen:"handle"`
2424+ // issuer: The user who issued this verification.
2525+ Issuer string `json:"issuer" cborgen:"issuer"`
2626+ //IssuerProfile *VerificationDefs_VerificationView_IssuerProfile `json:"issuerProfile,omitempty" cborgen:"issuerProfile,omitempty"`
2727+ //IssuerRepo *VerificationDefs_VerificationView_IssuerRepo `json:"issuerRepo,omitempty" cborgen:"issuerRepo,omitempty"`
2828+ // revokeReason: Describes the reason for revocation, also indicating that the verification is no longer valid.
2929+ RevokeReason *string `json:"revokeReason,omitempty" cborgen:"revokeReason,omitempty"`
3030+ // revokedAt: Timestamp when the verification was revoked.
3131+ RevokedAt *string `json:"revokedAt,omitempty" cborgen:"revokedAt,omitempty"`
3232+ // revokedBy: The user who revoked this verification.
3333+ RevokedBy *string `json:"revokedBy,omitempty" cborgen:"revokedBy,omitempty"`
3434+ // subject: The subject of the verification.
3535+ Subject string `json:"subject" cborgen:"subject"`
3636+ //SubjectProfile *VerificationDefs_VerificationView_SubjectProfile `json:"subjectProfile,omitempty" cborgen:"subjectProfile,omitempty"`
3737+ SubjectRepo *VerificationDefs_VerificationView_SubjectRepo `json:"subjectRepo,omitempty" cborgen:"subjectRepo,omitempty"`
3838+ // uri: The AT-URI of the verification record.
3939+ Uri string `json:"uri" cborgen:"uri"`
4040+}
4141+4242+type VerificationDefs_VerificationView_IssuerRepo struct {
4343+ ModerationDefs_RepoViewDetail *ModerationDefs_RepoViewDetail
4444+ ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound
4545+}
4646+4747+func (t *VerificationDefs_VerificationView_IssuerRepo) MarshalJSON() ([]byte, error) {
4848+ if t.ModerationDefs_RepoViewDetail != nil {
4949+ t.ModerationDefs_RepoViewDetail.LexiconTypeID = "tools.ozone.moderation.defs#repoViewDetail"
5050+ return json.Marshal(t.ModerationDefs_RepoViewDetail)
5151+ }
5252+ if t.ModerationDefs_RepoViewNotFound != nil {
5353+ t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound"
5454+ return json.Marshal(t.ModerationDefs_RepoViewNotFound)
5555+ }
5656+ return nil, fmt.Errorf("cannot marshal empty enum")
5757+}
5858+func (t *VerificationDefs_VerificationView_IssuerRepo) UnmarshalJSON(b []byte) error {
5959+ typ, err := util.TypeExtract(b)
6060+ if err != nil {
6161+ return err
6262+ }
6363+6464+ switch typ {
6565+ case "tools.ozone.moderation.defs#repoViewDetail":
6666+ t.ModerationDefs_RepoViewDetail = new(ModerationDefs_RepoViewDetail)
6767+ return json.Unmarshal(b, t.ModerationDefs_RepoViewDetail)
6868+ case "tools.ozone.moderation.defs#repoViewNotFound":
6969+ t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound)
7070+ return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound)
7171+7272+ default:
7373+ return nil
7474+ }
7575+}
7676+7777+type VerificationDefs_VerificationView_SubjectRepo struct {
7878+ ModerationDefs_RepoViewDetail *ModerationDefs_RepoViewDetail
7979+ ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound
8080+}
8181+8282+func (t *VerificationDefs_VerificationView_SubjectRepo) MarshalJSON() ([]byte, error) {
8383+ if t.ModerationDefs_RepoViewDetail != nil {
8484+ t.ModerationDefs_RepoViewDetail.LexiconTypeID = "tools.ozone.moderation.defs#repoViewDetail"
8585+ return json.Marshal(t.ModerationDefs_RepoViewDetail)
8686+ }
8787+ if t.ModerationDefs_RepoViewNotFound != nil {
8888+ t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound"
8989+ return json.Marshal(t.ModerationDefs_RepoViewNotFound)
9090+ }
9191+ return nil, fmt.Errorf("cannot marshal empty enum")
9292+}
9393+func (t *VerificationDefs_VerificationView_SubjectRepo) UnmarshalJSON(b []byte) error {
9494+ typ, err := util.TypeExtract(b)
9595+ if err != nil {
9696+ return err
9797+ }
9898+9999+ switch typ {
100100+ case "tools.ozone.moderation.defs#repoViewDetail":
101101+ t.ModerationDefs_RepoViewDetail = new(ModerationDefs_RepoViewDetail)
102102+ return json.Unmarshal(b, t.ModerationDefs_RepoViewDetail)
103103+ case "tools.ozone.moderation.defs#repoViewNotFound":
104104+ t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound)
105105+ return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound)
106106+107107+ default:
108108+ return nil
109109+ }
110110+}
+55
api/ozone/verificationgrantVerifications.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.verification.grantVerifications
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// VerificationGrantVerifications_GrantError is a "grantError" in the tools.ozone.verification.grantVerifications schema.
1414+//
1515+// Error object for failed verifications.
1616+type VerificationGrantVerifications_GrantError struct {
1717+ // error: Error message describing the reason for failure.
1818+ Error string `json:"error" cborgen:"error"`
1919+ // subject: The did of the subject being verified
2020+ Subject string `json:"subject" cborgen:"subject"`
2121+}
2222+2323+// VerificationGrantVerifications_Input is the input argument to a tools.ozone.verification.grantVerifications call.
2424+type VerificationGrantVerifications_Input struct {
2525+ // verifications: Array of verification requests to process
2626+ Verifications []*VerificationGrantVerifications_VerificationInput `json:"verifications" cborgen:"verifications"`
2727+}
2828+2929+// VerificationGrantVerifications_Output is the output of a tools.ozone.verification.grantVerifications call.
3030+type VerificationGrantVerifications_Output struct {
3131+ FailedVerifications []*VerificationGrantVerifications_GrantError `json:"failedVerifications" cborgen:"failedVerifications"`
3232+ Verifications []*VerificationDefs_VerificationView `json:"verifications" cborgen:"verifications"`
3333+}
3434+3535+// VerificationGrantVerifications_VerificationInput is the input argument to a tools.ozone.verification.grantVerifications call.
3636+type VerificationGrantVerifications_VerificationInput struct {
3737+ // createdAt: Timestamp for verification record. Defaults to current time when not specified.
3838+ CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"`
3939+ // displayName: Display name of the subject the verification applies to at the moment of verifying.
4040+ DisplayName string `json:"displayName" cborgen:"displayName"`
4141+ // handle: Handle of the subject the verification applies to at the moment of verifying.
4242+ Handle string `json:"handle" cborgen:"handle"`
4343+ // subject: The did of the subject being verified
4444+ Subject string `json:"subject" cborgen:"subject"`
4545+}
4646+4747+// VerificationGrantVerifications calls the XRPC method "tools.ozone.verification.grantVerifications".
4848+func VerificationGrantVerifications(ctx context.Context, c *xrpc.Client, input *VerificationGrantVerifications_Input) (*VerificationGrantVerifications_Output, error) {
4949+ var out VerificationGrantVerifications_Output
5050+ if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.verification.grantVerifications", nil, input, &out); err != nil {
5151+ return nil, err
5252+ }
5353+5454+ return &out, nil
5555+}
+47
api/ozone/verificationlistVerifications.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.verification.listVerifications
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// VerificationListVerifications_Output is the output of a tools.ozone.verification.listVerifications call.
1414+type VerificationListVerifications_Output struct {
1515+ Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
1616+ Verifications []*VerificationDefs_VerificationView `json:"verifications" cborgen:"verifications"`
1717+}
1818+1919+// VerificationListVerifications calls the XRPC method "tools.ozone.verification.listVerifications".
2020+//
2121+// createdAfter: Filter to verifications created after this timestamp
2222+// createdBefore: Filter to verifications created before this timestamp
2323+// cursor: Pagination cursor
2424+// isRevoked: Filter to verifications that are revoked or not. By default, includes both.
2525+// issuers: Filter to verifications from specific issuers
2626+// limit: Maximum number of results to return
2727+// sortDirection: Sort direction for creation date
2828+// subjects: Filter to specific verified DIDs
2929+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) {
3030+ var out VerificationListVerifications_Output
3131+3232+ params := map[string]interface{}{
3333+ "createdAfter": createdAfter,
3434+ "createdBefore": createdBefore,
3535+ "cursor": cursor,
3636+ "isRevoked": isRevoked,
3737+ "issuers": issuers,
3838+ "limit": limit,
3939+ "sortDirection": sortDirection,
4040+ "subjects": subjects,
4141+ }
4242+ if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.verification.listVerifications", params, nil, &out); err != nil {
4343+ return nil, err
4444+ }
4545+4646+ return &out, nil
4747+}
+47
api/ozone/verificationrevokeVerifications.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.verification.revokeVerifications
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// VerificationRevokeVerifications_Input is the input argument to a tools.ozone.verification.revokeVerifications call.
1414+type VerificationRevokeVerifications_Input struct {
1515+ // revokeReason: Reason for revoking the verification. This is optional and can be omitted if not needed.
1616+ RevokeReason *string `json:"revokeReason,omitempty" cborgen:"revokeReason,omitempty"`
1717+ // uris: Array of verification record uris to revoke
1818+ Uris []string `json:"uris" cborgen:"uris"`
1919+}
2020+2121+// VerificationRevokeVerifications_Output is the output of a tools.ozone.verification.revokeVerifications call.
2222+type VerificationRevokeVerifications_Output struct {
2323+ // failedRevocations: List of verification uris that couldn't be revoked, including failure reasons
2424+ FailedRevocations []*VerificationRevokeVerifications_RevokeError `json:"failedRevocations" cborgen:"failedRevocations"`
2525+ // revokedVerifications: List of verification uris successfully revoked
2626+ RevokedVerifications []string `json:"revokedVerifications" cborgen:"revokedVerifications"`
2727+}
2828+2929+// VerificationRevokeVerifications_RevokeError is a "revokeError" in the tools.ozone.verification.revokeVerifications schema.
3030+//
3131+// Error object for failed revocations
3232+type VerificationRevokeVerifications_RevokeError struct {
3333+ // error: Description of the error that occurred during revocation.
3434+ Error string `json:"error" cborgen:"error"`
3535+ // uri: The AT-URI of the verification record that failed to revoke.
3636+ Uri string `json:"uri" cborgen:"uri"`
3737+}
3838+3939+// VerificationRevokeVerifications calls the XRPC method "tools.ozone.verification.revokeVerifications".
4040+func VerificationRevokeVerifications(ctx context.Context, c *xrpc.Client, input *VerificationRevokeVerifications_Input) (*VerificationRevokeVerifications_Output, error) {
4141+ var out VerificationRevokeVerifications_Output
4242+ if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.verification.revokeVerifications", nil, input, &out); err != nil {
4343+ return nil, err
4444+ }
4545+4646+ return &out, nil
4747+}