diff --git a/api/atproto/admindefs.go b/api/atproto/admindefs.go --- a/api/atproto/admindefs.go +++ b/api/atproto/admindefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.defs -// schema: com.atproto.admin.defs +package atproto import ( "github.com/bluesky-social/indigo/lex/util" @@ -25,20 +25,16 @@ } // AdminDefs_RepoBlobRef is a "repoBlobRef" in the com.atproto.admin.defs schema. -// -// RECORDTYPE: AdminDefs_RepoBlobRef type AdminDefs_RepoBlobRef struct { - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#repoBlobRef" cborgen:"$type,const=com.atproto.admin.defs#repoBlobRef"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.admin.defs#repoBlobRef"` Cid string `json:"cid" cborgen:"cid"` Did string `json:"did" cborgen:"did"` RecordUri *string `json:"recordUri,omitempty" cborgen:"recordUri,omitempty"` } // AdminDefs_RepoRef is a "repoRef" in the com.atproto.admin.defs schema. -// -// RECORDTYPE: AdminDefs_RepoRef type AdminDefs_RepoRef struct { - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#repoRef" cborgen:"$type,const=com.atproto.admin.defs#repoRef"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.admin.defs#repoRef"` Did string `json:"did" cborgen:"did"` } diff --git a/api/atproto/admindeleteAccount.go b/api/atproto/admindeleteAccount.go --- a/api/atproto/admindeleteAccount.go +++ b/api/atproto/admindeleteAccount.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.deleteAccount -// schema: com.atproto.admin.deleteAccount +package atproto import ( "context" diff --git a/api/atproto/admindisableAccountInvites.go b/api/atproto/admindisableAccountInvites.go --- a/api/atproto/admindisableAccountInvites.go +++ b/api/atproto/admindisableAccountInvites.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.disableAccountInvites -// schema: com.atproto.admin.disableAccountInvites +package atproto import ( "context" diff --git a/api/atproto/admindisableInviteCodes.go b/api/atproto/admindisableInviteCodes.go --- a/api/atproto/admindisableInviteCodes.go +++ b/api/atproto/admindisableInviteCodes.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.disableInviteCodes -// schema: com.atproto.admin.disableInviteCodes +package atproto import ( "context" diff --git a/api/atproto/adminenableAccountInvites.go b/api/atproto/adminenableAccountInvites.go --- a/api/atproto/adminenableAccountInvites.go +++ b/api/atproto/adminenableAccountInvites.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.enableAccountInvites -// schema: com.atproto.admin.enableAccountInvites +package atproto import ( "context" diff --git a/api/atproto/admingetAccountInfo.go b/api/atproto/admingetAccountInfo.go --- a/api/atproto/admingetAccountInfo.go +++ b/api/atproto/admingetAccountInfo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.getAccountInfo -// schema: com.atproto.admin.getAccountInfo +package atproto import ( "context" diff --git a/api/atproto/admingetAccountInfos.go b/api/atproto/admingetAccountInfos.go --- a/api/atproto/admingetAccountInfos.go +++ b/api/atproto/admingetAccountInfos.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.getAccountInfos -// schema: com.atproto.admin.getAccountInfos +package atproto import ( "context" diff --git a/api/atproto/admingetInviteCodes.go b/api/atproto/admingetInviteCodes.go --- a/api/atproto/admingetInviteCodes.go +++ b/api/atproto/admingetInviteCodes.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.getInviteCodes -// schema: com.atproto.admin.getInviteCodes +package atproto import ( "context" diff --git a/api/atproto/admingetSubjectStatus.go b/api/atproto/admingetSubjectStatus.go --- a/api/atproto/admingetSubjectStatus.go +++ b/api/atproto/admingetSubjectStatus.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.getSubjectStatus -// schema: com.atproto.admin.getSubjectStatus +package atproto import ( "context" @@ -38,8 +38,9 @@ t.AdminDefs_RepoBlobRef.LexiconTypeID = "com.atproto.admin.defs#repoBlobRef" return json.Marshal(t.AdminDefs_RepoBlobRef) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *AdminGetSubjectStatus_Output_Subject) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/atproto/adminsearchAccounts.go b/api/atproto/adminsearchAccounts.go --- a/api/atproto/adminsearchAccounts.go +++ b/api/atproto/adminsearchAccounts.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.searchAccounts -// schema: com.atproto.admin.searchAccounts +package atproto import ( "context" diff --git a/api/atproto/adminsendEmail.go b/api/atproto/adminsendEmail.go --- a/api/atproto/adminsendEmail.go +++ b/api/atproto/adminsendEmail.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.sendEmail -// schema: com.atproto.admin.sendEmail +package atproto import ( "context" diff --git a/api/atproto/adminupdateAccountEmail.go b/api/atproto/adminupdateAccountEmail.go --- a/api/atproto/adminupdateAccountEmail.go +++ b/api/atproto/adminupdateAccountEmail.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.updateAccountEmail -// schema: com.atproto.admin.updateAccountEmail +package atproto import ( "context" diff --git a/api/atproto/adminupdateAccountHandle.go b/api/atproto/adminupdateAccountHandle.go --- a/api/atproto/adminupdateAccountHandle.go +++ b/api/atproto/adminupdateAccountHandle.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.updateAccountHandle -// schema: com.atproto.admin.updateAccountHandle +package atproto import ( "context" diff --git a/api/atproto/adminupdateAccountPassword.go b/api/atproto/adminupdateAccountPassword.go --- a/api/atproto/adminupdateAccountPassword.go +++ b/api/atproto/adminupdateAccountPassword.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.updateAccountPassword -// schema: com.atproto.admin.updateAccountPassword +package atproto import ( "context" diff --git a/api/atproto/adminupdateAccountSigningKey.go b/api/atproto/adminupdateAccountSigningKey.go --- a/api/atproto/adminupdateAccountSigningKey.go +++ b/api/atproto/adminupdateAccountSigningKey.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.updateAccountSigningKey -// schema: com.atproto.admin.updateAccountSigningKey +package atproto import ( "context" diff --git a/api/atproto/adminupdateSubjectStatus.go b/api/atproto/adminupdateSubjectStatus.go --- a/api/atproto/adminupdateSubjectStatus.go +++ b/api/atproto/adminupdateSubjectStatus.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.admin.updateSubjectStatus -// schema: com.atproto.admin.updateSubjectStatus +package atproto import ( "context" @@ -38,8 +38,9 @@ t.AdminDefs_RepoBlobRef.LexiconTypeID = "com.atproto.admin.defs#repoBlobRef" return json.Marshal(t.AdminDefs_RepoBlobRef) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *AdminUpdateSubjectStatus_Input_Subject) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -87,8 +88,9 @@ t.AdminDefs_RepoBlobRef.LexiconTypeID = "com.atproto.admin.defs#repoBlobRef" return json.Marshal(t.AdminDefs_RepoBlobRef) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *AdminUpdateSubjectStatus_Output_Subject) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/atproto/identitydefs.go b/api/atproto/identitydefs.go --- a/api/atproto/identitydefs.go +++ b/api/atproto/identitydefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.identity.defs -// schema: com.atproto.identity.defs +package atproto // IdentityDefs_IdentityInfo is a "identityInfo" in the com.atproto.identity.defs schema. type IdentityDefs_IdentityInfo struct { diff --git a/api/atproto/identitygetRecommendedDidCredentials.go b/api/atproto/identitygetRecommendedDidCredentials.go --- a/api/atproto/identitygetRecommendedDidCredentials.go +++ b/api/atproto/identitygetRecommendedDidCredentials.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.identity.getRecommendedDidCredentials -// schema: com.atproto.identity.getRecommendedDidCredentials +package atproto import ( "context" diff --git a/api/atproto/identityrefreshIdentity.go b/api/atproto/identityrefreshIdentity.go --- a/api/atproto/identityrefreshIdentity.go +++ b/api/atproto/identityrefreshIdentity.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.identity.refreshIdentity -// schema: com.atproto.identity.refreshIdentity +package atproto import ( "context" diff --git a/api/atproto/identityrequestPlcOperationSignature.go b/api/atproto/identityrequestPlcOperationSignature.go --- a/api/atproto/identityrequestPlcOperationSignature.go +++ b/api/atproto/identityrequestPlcOperationSignature.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.identity.requestPlcOperationSignature -// schema: com.atproto.identity.requestPlcOperationSignature +package atproto import ( "context" diff --git a/api/atproto/identityresolveDid.go b/api/atproto/identityresolveDid.go --- a/api/atproto/identityresolveDid.go +++ b/api/atproto/identityresolveDid.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.identity.resolveDid -// schema: com.atproto.identity.resolveDid +package atproto import ( "context" diff --git a/api/atproto/identityresolveHandle.go b/api/atproto/identityresolveHandle.go --- a/api/atproto/identityresolveHandle.go +++ b/api/atproto/identityresolveHandle.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.identity.resolveHandle -// schema: com.atproto.identity.resolveHandle +package atproto import ( "context" diff --git a/api/atproto/identityresolveIdentity.go b/api/atproto/identityresolveIdentity.go --- a/api/atproto/identityresolveIdentity.go +++ b/api/atproto/identityresolveIdentity.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.identity.resolveIdentity -// schema: com.atproto.identity.resolveIdentity +package atproto import ( "context" diff --git a/api/atproto/identitysignPlcOperation.go b/api/atproto/identitysignPlcOperation.go --- a/api/atproto/identitysignPlcOperation.go +++ b/api/atproto/identitysignPlcOperation.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.identity.signPlcOperation -// schema: com.atproto.identity.signPlcOperation +package atproto import ( "context" diff --git a/api/atproto/identitysubmitPlcOperation.go b/api/atproto/identitysubmitPlcOperation.go --- a/api/atproto/identitysubmitPlcOperation.go +++ b/api/atproto/identitysubmitPlcOperation.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.identity.submitPlcOperation -// schema: com.atproto.identity.submitPlcOperation +package atproto import ( "context" diff --git a/api/atproto/identityupdateHandle.go b/api/atproto/identityupdateHandle.go --- a/api/atproto/identityupdateHandle.go +++ b/api/atproto/identityupdateHandle.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.identity.updateHandle -// schema: com.atproto.identity.updateHandle +package atproto import ( "context" diff --git a/api/atproto/labeldefs.go b/api/atproto/labeldefs.go --- a/api/atproto/labeldefs.go +++ b/api/atproto/labeldefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.label.defs -// schema: com.atproto.label.defs +package atproto import ( "github.com/bluesky-social/indigo/lex/util" @@ -72,9 +72,7 @@ // LabelDefs_SelfLabels is a "selfLabels" in the com.atproto.label.defs schema. // // Metadata tags on an atproto record, published by the author within the record. -// -// RECORDTYPE: LabelDefs_SelfLabels type LabelDefs_SelfLabels struct { - LexiconTypeID string `json:"$type,const=com.atproto.label.defs#selfLabels" cborgen:"$type,const=com.atproto.label.defs#selfLabels"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.label.defs#selfLabels"` Values []*LabelDefs_SelfLabel `json:"values" cborgen:"values,preservenil"` } diff --git a/api/atproto/labelqueryLabels.go b/api/atproto/labelqueryLabels.go --- a/api/atproto/labelqueryLabels.go +++ b/api/atproto/labelqueryLabels.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.label.queryLabels -// schema: com.atproto.label.queryLabels +package atproto import ( "context" diff --git a/api/atproto/labelsubscribeLabels.go b/api/atproto/labelsubscribeLabels.go --- a/api/atproto/labelsubscribeLabels.go +++ b/api/atproto/labelsubscribeLabels.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.label.subscribeLabels -// schema: com.atproto.label.subscribeLabels +package atproto // LabelSubscribeLabels_Info is a "info" in the com.atproto.label.subscribeLabels schema. type LabelSubscribeLabels_Info struct { diff --git a/api/atproto/lexiconschema.go b/api/atproto/lexiconschema.go --- a/api/atproto/lexiconschema.go +++ b/api/atproto/lexiconschema.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.lexicon.schema -// schema: com.atproto.lexicon.schema +package atproto import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,10 +10,10 @@ func init() { util.RegisterType("com.atproto.lexicon.schema", &LexiconSchema{}) -} // -// RECORDTYPE: LexiconSchema +} + type LexiconSchema struct { - LexiconTypeID string `json:"$type,const=com.atproto.lexicon.schema" cborgen:"$type,const=com.atproto.lexicon.schema"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.lexicon.schema"` // lexicon: Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system. Lexicon int64 `json:"lexicon" cborgen:"lexicon"` } diff --git a/api/atproto/moderationcreateReport.go b/api/atproto/moderationcreateReport.go --- a/api/atproto/moderationcreateReport.go +++ b/api/atproto/moderationcreateReport.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.moderation.createReport -// schema: com.atproto.moderation.createReport +package atproto import ( "context" @@ -36,8 +36,9 @@ t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" return json.Marshal(t.RepoStrongRef) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationCreateReport_Input_Subject) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -91,8 +92,9 @@ t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" return json.Marshal(t.RepoStrongRef) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationCreateReport_Output_Subject) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/atproto/moderationdefs.go b/api/atproto/moderationdefs.go --- a/api/atproto/moderationdefs.go +++ b/api/atproto/moderationdefs.go @@ -1,5 +1,5 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.moderation.defs -// schema: com.atproto.moderation.defs +package atproto diff --git a/api/atproto/repoapplyWrites.go b/api/atproto/repoapplyWrites.go --- a/api/atproto/repoapplyWrites.go +++ b/api/atproto/repoapplyWrites.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.applyWrites -// schema: com.atproto.repo.applyWrites +package atproto import ( "context" @@ -15,10 +15,8 @@ // RepoApplyWrites_Create is a "create" in the com.atproto.repo.applyWrites schema. // // Operation which creates a new record. -// -// RECORDTYPE: RepoApplyWrites_Create type RepoApplyWrites_Create struct { - LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#create" cborgen:"$type,const=com.atproto.repo.applyWrites#create"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.repo.applyWrites#create"` Collection string `json:"collection" cborgen:"collection"` // rkey: NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. Rkey *string `json:"rkey,omitempty" cborgen:"rkey,omitempty"` @@ -26,10 +24,8 @@ } // RepoApplyWrites_CreateResult is a "createResult" in the com.atproto.repo.applyWrites schema. -// -// RECORDTYPE: RepoApplyWrites_CreateResult type RepoApplyWrites_CreateResult struct { - LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#createResult" cborgen:"$type,const=com.atproto.repo.applyWrites#createResult"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.repo.applyWrites#createResult"` Cid string `json:"cid" cborgen:"cid"` Uri string `json:"uri" cborgen:"uri"` ValidationStatus *string `json:"validationStatus,omitempty" cborgen:"validationStatus,omitempty"` @@ -38,19 +34,15 @@ // RepoApplyWrites_Delete is a "delete" in the com.atproto.repo.applyWrites schema. // // Operation which deletes an existing record. -// -// RECORDTYPE: RepoApplyWrites_Delete type RepoApplyWrites_Delete struct { - LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#delete" cborgen:"$type,const=com.atproto.repo.applyWrites#delete"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.repo.applyWrites#delete"` Collection string `json:"collection" cborgen:"collection"` Rkey string `json:"rkey" cborgen:"rkey"` } // RepoApplyWrites_DeleteResult is a "deleteResult" in the com.atproto.repo.applyWrites schema. -// -// RECORDTYPE: RepoApplyWrites_DeleteResult type RepoApplyWrites_DeleteResult struct { - LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#deleteResult" cborgen:"$type,const=com.atproto.repo.applyWrites#deleteResult"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.repo.applyWrites#deleteResult"` } // RepoApplyWrites_Input is the input argument to a com.atproto.repo.applyWrites call. @@ -83,8 +75,9 @@ t.RepoApplyWrites_Delete.LexiconTypeID = "com.atproto.repo.applyWrites#delete" return json.Marshal(t.RepoApplyWrites_Delete) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *RepoApplyWrites_Input_Writes_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -103,7 +96,7 @@ return json.Unmarshal(b, t.RepoApplyWrites_Delete) default: - return fmt.Errorf("closed enums must have a matching value") + return fmt.Errorf("closed unions must match a listed schema") } } @@ -132,8 +125,9 @@ t.RepoApplyWrites_DeleteResult.LexiconTypeID = "com.atproto.repo.applyWrites#deleteResult" return json.Marshal(t.RepoApplyWrites_DeleteResult) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *RepoApplyWrites_Output_Results_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -152,27 +146,23 @@ return json.Unmarshal(b, t.RepoApplyWrites_DeleteResult) default: - return fmt.Errorf("closed enums must have a matching value") + return fmt.Errorf("closed unions must match a listed schema") } } // RepoApplyWrites_Update is a "update" in the com.atproto.repo.applyWrites schema. // // Operation which updates an existing record. -// -// RECORDTYPE: RepoApplyWrites_Update type RepoApplyWrites_Update struct { - LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#update" cborgen:"$type,const=com.atproto.repo.applyWrites#update"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.repo.applyWrites#update"` Collection string `json:"collection" cborgen:"collection"` Rkey string `json:"rkey" cborgen:"rkey"` Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` } // RepoApplyWrites_UpdateResult is a "updateResult" in the com.atproto.repo.applyWrites schema. -// -// RECORDTYPE: RepoApplyWrites_UpdateResult type RepoApplyWrites_UpdateResult struct { - LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#updateResult" cborgen:"$type,const=com.atproto.repo.applyWrites#updateResult"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.repo.applyWrites#updateResult"` Cid string `json:"cid" cborgen:"cid"` Uri string `json:"uri" cborgen:"uri"` ValidationStatus *string `json:"validationStatus,omitempty" cborgen:"validationStatus,omitempty"` diff --git a/api/atproto/repocreateRecord.go b/api/atproto/repocreateRecord.go --- a/api/atproto/repocreateRecord.go +++ b/api/atproto/repocreateRecord.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.createRecord -// schema: com.atproto.repo.createRecord +package atproto import ( "context" diff --git a/api/atproto/repodefs.go b/api/atproto/repodefs.go --- a/api/atproto/repodefs.go +++ b/api/atproto/repodefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.defs -// schema: com.atproto.repo.defs +package atproto // RepoDefs_CommitMeta is a "commitMeta" in the com.atproto.repo.defs schema. type RepoDefs_CommitMeta struct { diff --git a/api/atproto/repodeleteRecord.go b/api/atproto/repodeleteRecord.go --- a/api/atproto/repodeleteRecord.go +++ b/api/atproto/repodeleteRecord.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.deleteRecord -// schema: com.atproto.repo.deleteRecord +package atproto import ( "context" diff --git a/api/atproto/repodescribeRepo.go b/api/atproto/repodescribeRepo.go --- a/api/atproto/repodescribeRepo.go +++ b/api/atproto/repodescribeRepo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.describeRepo -// schema: com.atproto.repo.describeRepo +package atproto import ( "context" diff --git a/api/atproto/repogetRecord.go b/api/atproto/repogetRecord.go --- a/api/atproto/repogetRecord.go +++ b/api/atproto/repogetRecord.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.getRecord -// schema: com.atproto.repo.getRecord +package atproto import ( "context" diff --git a/api/atproto/repoimportRepo.go b/api/atproto/repoimportRepo.go --- a/api/atproto/repoimportRepo.go +++ b/api/atproto/repoimportRepo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.importRepo -// schema: com.atproto.repo.importRepo +package atproto import ( "context" diff --git a/api/atproto/repolistMissingBlobs.go b/api/atproto/repolistMissingBlobs.go --- a/api/atproto/repolistMissingBlobs.go +++ b/api/atproto/repolistMissingBlobs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.listMissingBlobs -// schema: com.atproto.repo.listMissingBlobs +package atproto import ( "context" diff --git a/api/atproto/repolistRecords.go b/api/atproto/repolistRecords.go --- a/api/atproto/repolistRecords.go +++ b/api/atproto/repolistRecords.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.listRecords -// schema: com.atproto.repo.listRecords +package atproto import ( "context" diff --git a/api/atproto/repoputRecord.go b/api/atproto/repoputRecord.go --- a/api/atproto/repoputRecord.go +++ b/api/atproto/repoputRecord.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.putRecord -// schema: com.atproto.repo.putRecord +package atproto import ( "context" diff --git a/api/atproto/repostrongRef.go b/api/atproto/repostrongRef.go --- a/api/atproto/repostrongRef.go +++ b/api/atproto/repostrongRef.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.strongRef -// schema: com.atproto.repo.strongRef +package atproto import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,10 +10,11 @@ func init() { util.RegisterType("com.atproto.repo.strongRef#main", &RepoStrongRef{}) -} // RepoStrongRef is a "main" in the com.atproto.repo.strongRef schema. -// RECORDTYPE: RepoStrongRef +} + +// RepoStrongRef is a "main" in the com.atproto.repo.strongRef schema. type RepoStrongRef struct { - LexiconTypeID string `json:"$type,const=com.atproto.repo.strongRef,omitempty" cborgen:"$type,const=com.atproto.repo.strongRef,omitempty"` + LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=com.atproto.repo.strongRef,omitempty"` Cid string `json:"cid" cborgen:"cid"` Uri string `json:"uri" cborgen:"uri"` } diff --git a/api/atproto/repouploadBlob.go b/api/atproto/repouploadBlob.go --- a/api/atproto/repouploadBlob.go +++ b/api/atproto/repouploadBlob.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.repo.uploadBlob -// schema: com.atproto.repo.uploadBlob +package atproto import ( "context" diff --git a/api/atproto/serveractivateAccount.go b/api/atproto/serveractivateAccount.go --- a/api/atproto/serveractivateAccount.go +++ b/api/atproto/serveractivateAccount.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.activateAccount -// schema: com.atproto.server.activateAccount +package atproto import ( "context" diff --git a/api/atproto/servercheckAccountStatus.go b/api/atproto/servercheckAccountStatus.go --- a/api/atproto/servercheckAccountStatus.go +++ b/api/atproto/servercheckAccountStatus.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.checkAccountStatus -// schema: com.atproto.server.checkAccountStatus +package atproto import ( "context" diff --git a/api/atproto/serverconfirmEmail.go b/api/atproto/serverconfirmEmail.go --- a/api/atproto/serverconfirmEmail.go +++ b/api/atproto/serverconfirmEmail.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.confirmEmail -// schema: com.atproto.server.confirmEmail +package atproto import ( "context" diff --git a/api/atproto/servercreateAccount.go b/api/atproto/servercreateAccount.go --- a/api/atproto/servercreateAccount.go +++ b/api/atproto/servercreateAccount.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.createAccount -// schema: com.atproto.server.createAccount +package atproto import ( "context" diff --git a/api/atproto/servercreateAppPassword.go b/api/atproto/servercreateAppPassword.go --- a/api/atproto/servercreateAppPassword.go +++ b/api/atproto/servercreateAppPassword.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.createAppPassword -// schema: com.atproto.server.createAppPassword +package atproto import ( "context" diff --git a/api/atproto/servercreateInviteCode.go b/api/atproto/servercreateInviteCode.go --- a/api/atproto/servercreateInviteCode.go +++ b/api/atproto/servercreateInviteCode.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.createInviteCode -// schema: com.atproto.server.createInviteCode +package atproto import ( "context" diff --git a/api/atproto/servercreateInviteCodes.go b/api/atproto/servercreateInviteCodes.go --- a/api/atproto/servercreateInviteCodes.go +++ b/api/atproto/servercreateInviteCodes.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.createInviteCodes -// schema: com.atproto.server.createInviteCodes +package atproto import ( "context" diff --git a/api/atproto/servercreateSession.go b/api/atproto/servercreateSession.go --- a/api/atproto/servercreateSession.go +++ b/api/atproto/servercreateSession.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.createSession -// schema: com.atproto.server.createSession +package atproto import ( "context" diff --git a/api/atproto/serverdeactivateAccount.go b/api/atproto/serverdeactivateAccount.go --- a/api/atproto/serverdeactivateAccount.go +++ b/api/atproto/serverdeactivateAccount.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.deactivateAccount -// schema: com.atproto.server.deactivateAccount +package atproto import ( "context" diff --git a/api/atproto/serverdefs.go b/api/atproto/serverdefs.go --- a/api/atproto/serverdefs.go +++ b/api/atproto/serverdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.defs -// schema: com.atproto.server.defs +package atproto // ServerDefs_InviteCode is a "inviteCode" in the com.atproto.server.defs schema. type ServerDefs_InviteCode struct { diff --git a/api/atproto/serverdeleteAccount.go b/api/atproto/serverdeleteAccount.go --- a/api/atproto/serverdeleteAccount.go +++ b/api/atproto/serverdeleteAccount.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.deleteAccount -// schema: com.atproto.server.deleteAccount +package atproto import ( "context" diff --git a/api/atproto/serverdeleteSession.go b/api/atproto/serverdeleteSession.go --- a/api/atproto/serverdeleteSession.go +++ b/api/atproto/serverdeleteSession.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.deleteSession -// schema: com.atproto.server.deleteSession +package atproto import ( "context" diff --git a/api/atproto/serverdescribeServer.go b/api/atproto/serverdescribeServer.go --- a/api/atproto/serverdescribeServer.go +++ b/api/atproto/serverdescribeServer.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.describeServer -// schema: com.atproto.server.describeServer +package atproto import ( "context" diff --git a/api/atproto/servergetAccountInviteCodes.go b/api/atproto/servergetAccountInviteCodes.go --- a/api/atproto/servergetAccountInviteCodes.go +++ b/api/atproto/servergetAccountInviteCodes.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.getAccountInviteCodes -// schema: com.atproto.server.getAccountInviteCodes +package atproto import ( "context" diff --git a/api/atproto/servergetServiceAuth.go b/api/atproto/servergetServiceAuth.go --- a/api/atproto/servergetServiceAuth.go +++ b/api/atproto/servergetServiceAuth.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.getServiceAuth -// schema: com.atproto.server.getServiceAuth +package atproto import ( "context" diff --git a/api/atproto/servergetSession.go b/api/atproto/servergetSession.go --- a/api/atproto/servergetSession.go +++ b/api/atproto/servergetSession.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.getSession -// schema: com.atproto.server.getSession +package atproto import ( "context" diff --git a/api/atproto/serverlistAppPasswords.go b/api/atproto/serverlistAppPasswords.go --- a/api/atproto/serverlistAppPasswords.go +++ b/api/atproto/serverlistAppPasswords.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.listAppPasswords -// schema: com.atproto.server.listAppPasswords +package atproto import ( "context" diff --git a/api/atproto/serverrefreshSession.go b/api/atproto/serverrefreshSession.go --- a/api/atproto/serverrefreshSession.go +++ b/api/atproto/serverrefreshSession.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.refreshSession -// schema: com.atproto.server.refreshSession +package atproto import ( "context" diff --git a/api/atproto/serverrequestAccountDelete.go b/api/atproto/serverrequestAccountDelete.go --- a/api/atproto/serverrequestAccountDelete.go +++ b/api/atproto/serverrequestAccountDelete.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.requestAccountDelete -// schema: com.atproto.server.requestAccountDelete +package atproto import ( "context" diff --git a/api/atproto/serverrequestEmailConfirmation.go b/api/atproto/serverrequestEmailConfirmation.go --- a/api/atproto/serverrequestEmailConfirmation.go +++ b/api/atproto/serverrequestEmailConfirmation.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.requestEmailConfirmation -// schema: com.atproto.server.requestEmailConfirmation +package atproto import ( "context" diff --git a/api/atproto/serverrequestEmailUpdate.go b/api/atproto/serverrequestEmailUpdate.go --- a/api/atproto/serverrequestEmailUpdate.go +++ b/api/atproto/serverrequestEmailUpdate.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.requestEmailUpdate -// schema: com.atproto.server.requestEmailUpdate +package atproto import ( "context" diff --git a/api/atproto/serverrequestPasswordReset.go b/api/atproto/serverrequestPasswordReset.go --- a/api/atproto/serverrequestPasswordReset.go +++ b/api/atproto/serverrequestPasswordReset.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.requestPasswordReset -// schema: com.atproto.server.requestPasswordReset +package atproto import ( "context" diff --git a/api/atproto/serverreserveSigningKey.go b/api/atproto/serverreserveSigningKey.go --- a/api/atproto/serverreserveSigningKey.go +++ b/api/atproto/serverreserveSigningKey.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.reserveSigningKey -// schema: com.atproto.server.reserveSigningKey +package atproto import ( "context" diff --git a/api/atproto/serverresetPassword.go b/api/atproto/serverresetPassword.go --- a/api/atproto/serverresetPassword.go +++ b/api/atproto/serverresetPassword.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.resetPassword -// schema: com.atproto.server.resetPassword +package atproto import ( "context" diff --git a/api/atproto/serverrevokeAppPassword.go b/api/atproto/serverrevokeAppPassword.go --- a/api/atproto/serverrevokeAppPassword.go +++ b/api/atproto/serverrevokeAppPassword.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.revokeAppPassword -// schema: com.atproto.server.revokeAppPassword +package atproto import ( "context" diff --git a/api/atproto/serverupdateEmail.go b/api/atproto/serverupdateEmail.go --- a/api/atproto/serverupdateEmail.go +++ b/api/atproto/serverupdateEmail.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.server.updateEmail -// schema: com.atproto.server.updateEmail +package atproto import ( "context" diff --git a/api/atproto/syncdefs.go b/api/atproto/syncdefs.go --- a/api/atproto/syncdefs.go +++ b/api/atproto/syncdefs.go @@ -1,5 +1,5 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.defs -// schema: com.atproto.sync.defs +package atproto diff --git a/api/atproto/syncgetBlob.go b/api/atproto/syncgetBlob.go --- a/api/atproto/syncgetBlob.go +++ b/api/atproto/syncgetBlob.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.getBlob -// schema: com.atproto.sync.getBlob +package atproto import ( "bytes" diff --git a/api/atproto/syncgetBlocks.go b/api/atproto/syncgetBlocks.go --- a/api/atproto/syncgetBlocks.go +++ b/api/atproto/syncgetBlocks.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.getBlocks -// schema: com.atproto.sync.getBlocks +package atproto import ( "bytes" diff --git a/api/atproto/syncgetCheckout.go b/api/atproto/syncgetCheckout.go --- a/api/atproto/syncgetCheckout.go +++ b/api/atproto/syncgetCheckout.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.getCheckout -// schema: com.atproto.sync.getCheckout +package atproto import ( "bytes" diff --git a/api/atproto/syncgetHead.go b/api/atproto/syncgetHead.go --- a/api/atproto/syncgetHead.go +++ b/api/atproto/syncgetHead.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.getHead -// schema: com.atproto.sync.getHead +package atproto import ( "context" diff --git a/api/atproto/syncgetHostStatus.go b/api/atproto/syncgetHostStatus.go --- a/api/atproto/syncgetHostStatus.go +++ b/api/atproto/syncgetHostStatus.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.getHostStatus -// schema: com.atproto.sync.getHostStatus +package atproto import ( "context" diff --git a/api/atproto/syncgetLatestCommit.go b/api/atproto/syncgetLatestCommit.go --- a/api/atproto/syncgetLatestCommit.go +++ b/api/atproto/syncgetLatestCommit.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.getLatestCommit -// schema: com.atproto.sync.getLatestCommit +package atproto import ( "context" diff --git a/api/atproto/syncgetRecord.go b/api/atproto/syncgetRecord.go --- a/api/atproto/syncgetRecord.go +++ b/api/atproto/syncgetRecord.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.getRecord -// schema: com.atproto.sync.getRecord +package atproto import ( "bytes" diff --git a/api/atproto/syncgetRepo.go b/api/atproto/syncgetRepo.go --- a/api/atproto/syncgetRepo.go +++ b/api/atproto/syncgetRepo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.getRepo -// schema: com.atproto.sync.getRepo +package atproto import ( "bytes" diff --git a/api/atproto/syncgetRepoStatus.go b/api/atproto/syncgetRepoStatus.go --- a/api/atproto/syncgetRepoStatus.go +++ b/api/atproto/syncgetRepoStatus.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.getRepoStatus -// schema: com.atproto.sync.getRepoStatus +package atproto import ( "context" diff --git a/api/atproto/synclistBlobs.go b/api/atproto/synclistBlobs.go --- a/api/atproto/synclistBlobs.go +++ b/api/atproto/synclistBlobs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.listBlobs -// schema: com.atproto.sync.listBlobs +package atproto import ( "context" diff --git a/api/atproto/synclistHosts.go b/api/atproto/synclistHosts.go --- a/api/atproto/synclistHosts.go +++ b/api/atproto/synclistHosts.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.listHosts -// schema: com.atproto.sync.listHosts +package atproto import ( "context" diff --git a/api/atproto/synclistRepos.go b/api/atproto/synclistRepos.go --- a/api/atproto/synclistRepos.go +++ b/api/atproto/synclistRepos.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.listRepos -// schema: com.atproto.sync.listRepos +package atproto import ( "context" diff --git a/api/atproto/synclistReposByCollection.go b/api/atproto/synclistReposByCollection.go --- a/api/atproto/synclistReposByCollection.go +++ b/api/atproto/synclistReposByCollection.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.listReposByCollection -// schema: com.atproto.sync.listReposByCollection +package atproto import ( "context" diff --git a/api/atproto/syncnotifyOfUpdate.go b/api/atproto/syncnotifyOfUpdate.go --- a/api/atproto/syncnotifyOfUpdate.go +++ b/api/atproto/syncnotifyOfUpdate.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.notifyOfUpdate -// schema: com.atproto.sync.notifyOfUpdate +package atproto import ( "context" diff --git a/api/atproto/syncrequestCrawl.go b/api/atproto/syncrequestCrawl.go --- a/api/atproto/syncrequestCrawl.go +++ b/api/atproto/syncrequestCrawl.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.requestCrawl -// schema: com.atproto.sync.requestCrawl +package atproto import ( "context" diff --git a/api/atproto/syncsubscribeRepos.go b/api/atproto/syncsubscribeRepos.go --- a/api/atproto/syncsubscribeRepos.go +++ b/api/atproto/syncsubscribeRepos.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.sync.subscribeRepos -// schema: com.atproto.sync.subscribeRepos +package atproto import ( "github.com/bluesky-social/indigo/lex/util" diff --git a/api/atproto/tempaddReservedHandle.go b/api/atproto/tempaddReservedHandle.go --- a/api/atproto/tempaddReservedHandle.go +++ b/api/atproto/tempaddReservedHandle.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.temp.addReservedHandle -// schema: com.atproto.temp.addReservedHandle +package atproto import ( "context" diff --git a/api/atproto/tempcheckHandleAvailability.go b/api/atproto/tempcheckHandleAvailability.go --- a/api/atproto/tempcheckHandleAvailability.go +++ b/api/atproto/tempcheckHandleAvailability.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.temp.checkHandleAvailability -// schema: com.atproto.temp.checkHandleAvailability +package atproto import ( "context" @@ -33,8 +33,9 @@ t.TempCheckHandleAvailability_ResultUnavailable.LexiconTypeID = "com.atproto.temp.checkHandleAvailability#resultUnavailable" return json.Marshal(t.TempCheckHandleAvailability_ResultUnavailable) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *TempCheckHandleAvailability_Output_Result) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -57,19 +58,15 @@ // TempCheckHandleAvailability_ResultAvailable is a "resultAvailable" in the com.atproto.temp.checkHandleAvailability schema. // // Indicates the provided handle is available. -// -// RECORDTYPE: TempCheckHandleAvailability_ResultAvailable type TempCheckHandleAvailability_ResultAvailable struct { - LexiconTypeID string `json:"$type,const=com.atproto.temp.checkHandleAvailability#resultAvailable" cborgen:"$type,const=com.atproto.temp.checkHandleAvailability#resultAvailable"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.temp.checkHandleAvailability#resultAvailable"` } // TempCheckHandleAvailability_ResultUnavailable is a "resultUnavailable" in the com.atproto.temp.checkHandleAvailability schema. // // Indicates the provided handle is unavailable and gives suggestions of available handles. -// -// RECORDTYPE: TempCheckHandleAvailability_ResultUnavailable type TempCheckHandleAvailability_ResultUnavailable struct { - LexiconTypeID string `json:"$type,const=com.atproto.temp.checkHandleAvailability#resultUnavailable" cborgen:"$type,const=com.atproto.temp.checkHandleAvailability#resultUnavailable"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.temp.checkHandleAvailability#resultUnavailable"` // suggestions: List of suggested handles based on the provided inputs. Suggestions []*TempCheckHandleAvailability_Suggestion `json:"suggestions" cborgen:"suggestions"` } diff --git a/api/atproto/tempcheckSignupQueue.go b/api/atproto/tempcheckSignupQueue.go --- a/api/atproto/tempcheckSignupQueue.go +++ b/api/atproto/tempcheckSignupQueue.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.temp.checkSignupQueue -// schema: com.atproto.temp.checkSignupQueue +package atproto import ( "context" diff --git a/api/atproto/tempdereferenceScope.go b/api/atproto/tempdereferenceScope.go --- a/api/atproto/tempdereferenceScope.go +++ b/api/atproto/tempdereferenceScope.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.temp.dereferenceScope -// schema: com.atproto.temp.dereferenceScope +package atproto import ( "context" diff --git a/api/atproto/tempfetchLabels.go b/api/atproto/tempfetchLabels.go --- a/api/atproto/tempfetchLabels.go +++ b/api/atproto/tempfetchLabels.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.temp.fetchLabels -// schema: com.atproto.temp.fetchLabels +package atproto import ( "context" diff --git a/api/atproto/temprequestPhoneVerification.go b/api/atproto/temprequestPhoneVerification.go --- a/api/atproto/temprequestPhoneVerification.go +++ b/api/atproto/temprequestPhoneVerification.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.temp.requestPhoneVerification -// schema: com.atproto.temp.requestPhoneVerification +package atproto import ( "context" diff --git a/api/atproto/temprevokeAccountCredentials.go b/api/atproto/temprevokeAccountCredentials.go --- a/api/atproto/temprevokeAccountCredentials.go +++ b/api/atproto/temprevokeAccountCredentials.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package atproto +// Lexicon schema: com.atproto.temp.revokeAccountCredentials -// schema: com.atproto.temp.revokeAccountCredentials +package atproto import ( "context" diff --git a/api/bsky/actordefs.go b/api/bsky/actordefs.go --- a/api/bsky/actordefs.go +++ b/api/bsky/actordefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.actor.defs -// schema: app.bsky.actor.defs +package bsky import ( "encoding/json" @@ -13,10 +13,8 @@ ) // ActorDefs_AdultContentPref is a "adultContentPref" in the app.bsky.actor.defs schema. -// -// RECORDTYPE: ActorDefs_AdultContentPref type ActorDefs_AdultContentPref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#adultContentPref" cborgen:"$type,const=app.bsky.actor.defs#adultContentPref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#adultContentPref"` Enabled bool `json:"enabled" cborgen:"enabled"` } @@ -30,10 +28,8 @@ // ActorDefs_BskyAppStatePref is a "bskyAppStatePref" in the app.bsky.actor.defs schema. // // A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. -// -// RECORDTYPE: ActorDefs_BskyAppStatePref type ActorDefs_BskyAppStatePref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#bskyAppStatePref" cborgen:"$type,const=app.bsky.actor.defs#bskyAppStatePref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#bskyAppStatePref"` ActiveProgressGuide *ActorDefs_BskyAppProgressGuide `json:"activeProgressGuide,omitempty" cborgen:"activeProgressGuide,omitempty"` // nuxs: Storage for NUXs the user has encountered. Nuxs []*ActorDefs_Nux `json:"nuxs,omitempty" cborgen:"nuxs,omitempty"` @@ -42,10 +38,8 @@ } // ActorDefs_ContentLabelPref is a "contentLabelPref" in the app.bsky.actor.defs schema. -// -// RECORDTYPE: ActorDefs_ContentLabelPref type ActorDefs_ContentLabelPref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#contentLabelPref" cborgen:"$type,const=app.bsky.actor.defs#contentLabelPref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#contentLabelPref"` Label string `json:"label" cborgen:"label"` // labelerDid: Which labeler does this preference apply to? If undefined, applies globally. LabelerDid *string `json:"labelerDid,omitempty" cborgen:"labelerDid,omitempty"` @@ -53,10 +47,8 @@ } // ActorDefs_FeedViewPref is a "feedViewPref" in the app.bsky.actor.defs schema. -// -// RECORDTYPE: ActorDefs_FeedViewPref type ActorDefs_FeedViewPref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#feedViewPref" cborgen:"$type,const=app.bsky.actor.defs#feedViewPref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#feedViewPref"` // feed: The URI of the feed, or an identifier which describes the feed. Feed string `json:"feed" cborgen:"feed"` // hideQuotePosts: Hide quote posts in the feed. @@ -72,19 +64,15 @@ } // ActorDefs_HiddenPostsPref is a "hiddenPostsPref" in the app.bsky.actor.defs schema. -// -// RECORDTYPE: ActorDefs_HiddenPostsPref type ActorDefs_HiddenPostsPref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#hiddenPostsPref" cborgen:"$type,const=app.bsky.actor.defs#hiddenPostsPref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#hiddenPostsPref"` // items: A list of URIs of posts the account owner has hidden. Items []string `json:"items" cborgen:"items"` } // ActorDefs_InterestsPref is a "interestsPref" in the app.bsky.actor.defs schema. -// -// RECORDTYPE: ActorDefs_InterestsPref type ActorDefs_InterestsPref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#interestsPref" cborgen:"$type,const=app.bsky.actor.defs#interestsPref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#interestsPref"` // tags: A list of tags which describe the account owner's interests gathered during onboarding. Tags []string `json:"tags" cborgen:"tags"` } @@ -103,10 +91,8 @@ } // ActorDefs_LabelersPref is a "labelersPref" in the app.bsky.actor.defs schema. -// -// RECORDTYPE: ActorDefs_LabelersPref type ActorDefs_LabelersPref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#labelersPref" cborgen:"$type,const=app.bsky.actor.defs#labelersPref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#labelersPref"` Labelers []*ActorDefs_LabelerPrefItem `json:"labelers" cborgen:"labelers"` } @@ -126,10 +112,8 @@ } // ActorDefs_MutedWordsPref is a "mutedWordsPref" in the app.bsky.actor.defs schema. -// -// RECORDTYPE: ActorDefs_MutedWordsPref type ActorDefs_MutedWordsPref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#mutedWordsPref" cborgen:"$type,const=app.bsky.actor.defs#mutedWordsPref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#mutedWordsPref"` // items: A list of words the account owner has muted. Items []*ActorDefs_MutedWord `json:"items" cborgen:"items"` } @@ -147,10 +131,8 @@ } // ActorDefs_PersonalDetailsPref is a "personalDetailsPref" in the app.bsky.actor.defs schema. -// -// RECORDTYPE: ActorDefs_PersonalDetailsPref type ActorDefs_PersonalDetailsPref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#personalDetailsPref" cborgen:"$type,const=app.bsky.actor.defs#personalDetailsPref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#personalDetailsPref"` // birthDate: The birth date of account owner. BirthDate *string `json:"birthDate,omitempty" cborgen:"birthDate,omitempty"` } @@ -158,10 +140,8 @@ // ActorDefs_PostInteractionSettingsPref is a "postInteractionSettingsPref" in the app.bsky.actor.defs schema. // // Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. -// -// RECORDTYPE: ActorDefs_PostInteractionSettingsPref type ActorDefs_PostInteractionSettingsPref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#postInteractionSettingsPref" cborgen:"$type,const=app.bsky.actor.defs#postInteractionSettingsPref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#postInteractionSettingsPref"` // postgateEmbeddingRules: Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. PostgateEmbeddingRules []*ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem `json:"postgateEmbeddingRules,omitempty" cborgen:"postgateEmbeddingRules,omitempty"` // threadgateAllowRules: Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. @@ -177,8 +157,9 @@ t.FeedPostgate_DisableRule.LexiconTypeID = "app.bsky.feed.postgate#disableRule" return json.Marshal(t.FeedPostgate_DisableRule) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -219,8 +200,9 @@ t.FeedThreadgate_ListRule.LexiconTypeID = "app.bsky.feed.threadgate#listRule" return json.Marshal(t.FeedThreadgate_ListRule) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -320,8 +302,9 @@ t.ActorDefs_VerificationPrefs.LexiconTypeID = "app.bsky.actor.defs#verificationPrefs" return json.Marshal(t.ActorDefs_VerificationPrefs) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ActorDefs_Preferences_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -462,20 +445,16 @@ } // ActorDefs_SavedFeedsPref is a "savedFeedsPref" in the app.bsky.actor.defs schema. -// -// RECORDTYPE: ActorDefs_SavedFeedsPref type ActorDefs_SavedFeedsPref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#savedFeedsPref" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPref"` Pinned []string `json:"pinned" cborgen:"pinned"` Saved []string `json:"saved" cborgen:"saved"` TimelineIndex *int64 `json:"timelineIndex,omitempty" cborgen:"timelineIndex,omitempty"` } // ActorDefs_SavedFeedsPrefV2 is a "savedFeedsPrefV2" in the app.bsky.actor.defs schema. -// -// RECORDTYPE: ActorDefs_SavedFeedsPrefV2 type ActorDefs_SavedFeedsPrefV2 struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#savedFeedsPrefV2" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPrefV2"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPrefV2"` Items []*ActorDefs_SavedFeed `json:"items" cborgen:"items"` } @@ -502,8 +481,9 @@ t.EmbedExternal_View.LexiconTypeID = "app.bsky.embed.external#view" return json.Marshal(t.EmbedExternal_View) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ActorDefs_StatusView_Embed) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -521,10 +501,8 @@ } // ActorDefs_ThreadViewPref is a "threadViewPref" in the app.bsky.actor.defs schema. -// -// RECORDTYPE: ActorDefs_ThreadViewPref type ActorDefs_ThreadViewPref struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#threadViewPref" cborgen:"$type,const=app.bsky.actor.defs#threadViewPref"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#threadViewPref"` // prioritizeFollowedUsers: Show followed users at the top of all replies. PrioritizeFollowedUsers *bool `json:"prioritizeFollowedUsers,omitempty" cborgen:"prioritizeFollowedUsers,omitempty"` // sort: Sorting mode for threads. @@ -534,10 +512,8 @@ // ActorDefs_VerificationPrefs is a "verificationPrefs" in the app.bsky.actor.defs schema. // // Preferences for how verified accounts appear in the app. -// -// RECORDTYPE: ActorDefs_VerificationPrefs type ActorDefs_VerificationPrefs struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#verificationPrefs" cborgen:"$type,const=app.bsky.actor.defs#verificationPrefs"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.defs#verificationPrefs"` // hideBadges: Hide the blue check badges for verified accounts and trusted verifiers. HideBadges *bool `json:"hideBadges,omitempty" cborgen:"hideBadges,omitempty"` } diff --git a/api/bsky/actorgetPreferences.go b/api/bsky/actorgetPreferences.go --- a/api/bsky/actorgetPreferences.go +++ b/api/bsky/actorgetPreferences.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.actor.getPreferences -// schema: app.bsky.actor.getPreferences +package bsky import ( "context" diff --git a/api/bsky/actorgetProfile.go b/api/bsky/actorgetProfile.go --- a/api/bsky/actorgetProfile.go +++ b/api/bsky/actorgetProfile.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.actor.getProfile -// schema: app.bsky.actor.getProfile +package bsky import ( "context" diff --git a/api/bsky/actorgetProfiles.go b/api/bsky/actorgetProfiles.go --- a/api/bsky/actorgetProfiles.go +++ b/api/bsky/actorgetProfiles.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.actor.getProfiles -// schema: app.bsky.actor.getProfiles +package bsky import ( "context" diff --git a/api/bsky/actorgetSuggestions.go b/api/bsky/actorgetSuggestions.go --- a/api/bsky/actorgetSuggestions.go +++ b/api/bsky/actorgetSuggestions.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.actor.getSuggestions -// schema: app.bsky.actor.getSuggestions +package bsky import ( "context" diff --git a/api/bsky/actorprofile.go b/api/bsky/actorprofile.go --- a/api/bsky/actorprofile.go +++ b/api/bsky/actorprofile.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.actor.profile -// schema: app.bsky.actor.profile +package bsky import ( "bytes" @@ -17,10 +17,10 @@ func init() { util.RegisterType("app.bsky.actor.profile", &ActorProfile{}) -} // -// RECORDTYPE: ActorProfile +} + type ActorProfile struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.profile" cborgen:"$type,const=app.bsky.actor.profile"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.profile"` // avatar: Small image to be displayed next to posts from account. AKA, 'profile picture' Avatar *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` // banner: Larger horizontal image to display behind profile view. @@ -48,8 +48,9 @@ t.LabelDefs_SelfLabels.LexiconTypeID = "com.atproto.label.defs#selfLabels" return json.Marshal(t.LabelDefs_SelfLabels) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ActorProfile_Labels) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -75,7 +76,7 @@ if t.LabelDefs_SelfLabels != nil { return t.LabelDefs_SelfLabels.MarshalCBOR(w) } - return fmt.Errorf("cannot cbor marshal empty enum") + return fmt.Errorf("can not marshal empty union as CBOR") } func (t *ActorProfile_Labels) UnmarshalCBOR(r io.Reader) error { typ, b, err := util.CborTypeExtractReader(r) diff --git a/api/bsky/actorputPreferences.go b/api/bsky/actorputPreferences.go --- a/api/bsky/actorputPreferences.go +++ b/api/bsky/actorputPreferences.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.actor.putPreferences -// schema: app.bsky.actor.putPreferences +package bsky import ( "context" diff --git a/api/bsky/actorsearchActors.go b/api/bsky/actorsearchActors.go --- a/api/bsky/actorsearchActors.go +++ b/api/bsky/actorsearchActors.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.actor.searchActors -// schema: app.bsky.actor.searchActors +package bsky import ( "context" diff --git a/api/bsky/actorsearchActorsTypeahead.go b/api/bsky/actorsearchActorsTypeahead.go --- a/api/bsky/actorsearchActorsTypeahead.go +++ b/api/bsky/actorsearchActorsTypeahead.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.actor.searchActorsTypeahead -// schema: app.bsky.actor.searchActorsTypeahead +package bsky import ( "context" diff --git a/api/bsky/actorstatus.go b/api/bsky/actorstatus.go --- a/api/bsky/actorstatus.go +++ b/api/bsky/actorstatus.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.actor.status -// schema: app.bsky.actor.status +package bsky import ( "bytes" @@ -16,10 +16,10 @@ func init() { util.RegisterType("app.bsky.actor.status", &ActorStatus{}) -} // -// RECORDTYPE: ActorStatus +} + type ActorStatus struct { - LexiconTypeID string `json:"$type,const=app.bsky.actor.status" cborgen:"$type,const=app.bsky.actor.status"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.status"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` // durationMinutes: The duration of the status in minutes. Applications can choose to impose minimum and maximum limits. DurationMinutes *int64 `json:"durationMinutes,omitempty" cborgen:"durationMinutes,omitempty"` @@ -39,8 +39,9 @@ t.EmbedExternal.LexiconTypeID = "app.bsky.embed.external" return json.Marshal(t.EmbedExternal) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ActorStatus_Embed) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -66,7 +67,7 @@ if t.EmbedExternal != nil { return t.EmbedExternal.MarshalCBOR(w) } - return fmt.Errorf("cannot cbor marshal empty enum") + return fmt.Errorf("can not marshal empty union as CBOR") } func (t *ActorStatus_Embed) UnmarshalCBOR(r io.Reader) error { typ, b, err := util.CborTypeExtractReader(r) diff --git a/api/bsky/bookmarkcreateBookmark.go b/api/bsky/bookmarkcreateBookmark.go --- a/api/bsky/bookmarkcreateBookmark.go +++ b/api/bsky/bookmarkcreateBookmark.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.bookmark.createBookmark -// schema: app.bsky.bookmark.createBookmark +package bsky import ( "context" diff --git a/api/bsky/bookmarkdefs.go b/api/bsky/bookmarkdefs.go --- a/api/bsky/bookmarkdefs.go +++ b/api/bsky/bookmarkdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.bookmark.defs -// schema: app.bsky.bookmark.defs +package bsky import ( "encoding/json" @@ -47,8 +47,9 @@ t.FeedDefs_PostView.LexiconTypeID = "app.bsky.feed.defs#postView" return json.Marshal(t.FeedDefs_PostView) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *BookmarkDefs_BookmarkView_Item) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/bsky/bookmarkdeleteBookmark.go b/api/bsky/bookmarkdeleteBookmark.go --- a/api/bsky/bookmarkdeleteBookmark.go +++ b/api/bsky/bookmarkdeleteBookmark.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.bookmark.deleteBookmark -// schema: app.bsky.bookmark.deleteBookmark +package bsky import ( "context" diff --git a/api/bsky/bookmarkgetBookmarks.go b/api/bsky/bookmarkgetBookmarks.go --- a/api/bsky/bookmarkgetBookmarks.go +++ b/api/bsky/bookmarkgetBookmarks.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.bookmark.getBookmarks -// schema: app.bsky.bookmark.getBookmarks +package bsky import ( "context" diff --git a/api/bsky/embeddefs.go b/api/bsky/embeddefs.go --- a/api/bsky/embeddefs.go +++ b/api/bsky/embeddefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.embed.defs -// schema: app.bsky.embed.defs +package bsky // EmbedDefs_AspectRatio is a "aspectRatio" in the app.bsky.embed.defs schema. // diff --git a/api/bsky/embedexternal.go b/api/bsky/embedexternal.go --- a/api/bsky/embedexternal.go +++ b/api/bsky/embedexternal.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.embed.external -// schema: app.bsky.embed.external +package bsky import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,12 +10,13 @@ func init() { util.RegisterType("app.bsky.embed.external#main", &EmbedExternal{}) -} // EmbedExternal is a "main" in the app.bsky.embed.external schema. -// A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). +} + +// EmbedExternal is a "main" in the app.bsky.embed.external schema. // -// RECORDTYPE: EmbedExternal +// A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). type EmbedExternal struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.external" cborgen:"$type,const=app.bsky.embed.external"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.external"` External *EmbedExternal_External `json:"external" cborgen:"external"` } @@ -28,10 +29,8 @@ } // EmbedExternal_View is a "view" in the app.bsky.embed.external schema. -// -// RECORDTYPE: EmbedExternal_View type EmbedExternal_View struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.external#view" cborgen:"$type,const=app.bsky.embed.external#view"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.external#view"` External *EmbedExternal_ViewExternal `json:"external" cborgen:"external"` } diff --git a/api/bsky/embedimages.go b/api/bsky/embedimages.go --- a/api/bsky/embedimages.go +++ b/api/bsky/embedimages.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.embed.images -// schema: app.bsky.embed.images +package bsky import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,10 +10,11 @@ func init() { util.RegisterType("app.bsky.embed.images#main", &EmbedImages{}) -} // EmbedImages is a "main" in the app.bsky.embed.images schema. -// RECORDTYPE: EmbedImages +} + +// EmbedImages is a "main" in the app.bsky.embed.images schema. type EmbedImages struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.images" cborgen:"$type,const=app.bsky.embed.images"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.images"` Images []*EmbedImages_Image `json:"images" cborgen:"images"` } @@ -26,10 +27,8 @@ } // EmbedImages_View is a "view" in the app.bsky.embed.images schema. -// -// RECORDTYPE: EmbedImages_View type EmbedImages_View struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.images#view" cborgen:"$type,const=app.bsky.embed.images#view"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.images#view"` Images []*EmbedImages_ViewImage `json:"images" cborgen:"images"` } diff --git a/api/bsky/embedrecord.go b/api/bsky/embedrecord.go --- a/api/bsky/embedrecord.go +++ b/api/bsky/embedrecord.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.embed.record -// schema: app.bsky.embed.record +package bsky import ( "encoding/json" @@ -14,54 +14,45 @@ func init() { util.RegisterType("app.bsky.embed.record#main", &EmbedRecord{}) -} // EmbedRecord is a "main" in the app.bsky.embed.record schema. -// RECORDTYPE: EmbedRecord +} + +// EmbedRecord is a "main" in the app.bsky.embed.record schema. type EmbedRecord struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.record" cborgen:"$type,const=app.bsky.embed.record"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.record"` Record *comatprototypes.RepoStrongRef `json:"record" cborgen:"record"` } // EmbedRecord_View is a "view" in the app.bsky.embed.record schema. -// -// RECORDTYPE: EmbedRecord_View type EmbedRecord_View struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.record#view" cborgen:"$type,const=app.bsky.embed.record#view"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.record#view"` Record *EmbedRecord_View_Record `json:"record" cborgen:"record"` } // EmbedRecord_ViewBlocked is a "viewBlocked" in the app.bsky.embed.record schema. -// -// RECORDTYPE: EmbedRecord_ViewBlocked type EmbedRecord_ViewBlocked struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.record#viewBlocked" cborgen:"$type,const=app.bsky.embed.record#viewBlocked"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.record#viewBlocked"` Author *FeedDefs_BlockedAuthor `json:"author" cborgen:"author"` Blocked bool `json:"blocked" cborgen:"blocked"` Uri string `json:"uri" cborgen:"uri"` } // EmbedRecord_ViewDetached is a "viewDetached" in the app.bsky.embed.record schema. -// -// RECORDTYPE: EmbedRecord_ViewDetached type EmbedRecord_ViewDetached struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.record#viewDetached" cborgen:"$type,const=app.bsky.embed.record#viewDetached"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.record#viewDetached"` Detached bool `json:"detached" cborgen:"detached"` Uri string `json:"uri" cborgen:"uri"` } // EmbedRecord_ViewNotFound is a "viewNotFound" in the app.bsky.embed.record schema. -// -// RECORDTYPE: EmbedRecord_ViewNotFound type EmbedRecord_ViewNotFound struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.record#viewNotFound" cborgen:"$type,const=app.bsky.embed.record#viewNotFound"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.record#viewNotFound"` NotFound bool `json:"notFound" cborgen:"notFound"` Uri string `json:"uri" cborgen:"uri"` } // EmbedRecord_ViewRecord is a "viewRecord" in the app.bsky.embed.record schema. -// -// RECORDTYPE: EmbedRecord_ViewRecord type EmbedRecord_ViewRecord struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.record#viewRecord" cborgen:"$type,const=app.bsky.embed.record#viewRecord"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.record#viewRecord"` Author *ActorDefs_ProfileViewBasic `json:"author" cborgen:"author"` Cid string `json:"cid" cborgen:"cid"` Embeds []*EmbedRecord_ViewRecord_Embeds_Elem `json:"embeds,omitempty" cborgen:"embeds,omitempty"` @@ -105,8 +96,9 @@ t.EmbedRecordWithMedia_View.LexiconTypeID = "app.bsky.embed.recordWithMedia#view" return json.Marshal(t.EmbedRecordWithMedia_View) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *EmbedRecord_ViewRecord_Embeds_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -179,8 +171,9 @@ t.GraphDefs_StarterPackViewBasic.LexiconTypeID = "app.bsky.graph.defs#starterPackViewBasic" return json.Marshal(t.GraphDefs_StarterPackViewBasic) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *EmbedRecord_View_Record) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/bsky/embedrecordWithMedia.go b/api/bsky/embedrecordWithMedia.go --- a/api/bsky/embedrecordWithMedia.go +++ b/api/bsky/embedrecordWithMedia.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.embed.recordWithMedia -// schema: app.bsky.embed.recordWithMedia +package bsky import ( "bytes" @@ -16,10 +16,11 @@ func init() { util.RegisterType("app.bsky.embed.recordWithMedia#main", &EmbedRecordWithMedia{}) -} // EmbedRecordWithMedia is a "main" in the app.bsky.embed.recordWithMedia schema. -// RECORDTYPE: EmbedRecordWithMedia +} + +// EmbedRecordWithMedia is a "main" in the app.bsky.embed.recordWithMedia schema. type EmbedRecordWithMedia struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.recordWithMedia" cborgen:"$type,const=app.bsky.embed.recordWithMedia"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.recordWithMedia"` Media *EmbedRecordWithMedia_Media `json:"media" cborgen:"media"` Record *EmbedRecord `json:"record" cborgen:"record"` } @@ -43,8 +44,9 @@ t.EmbedExternal.LexiconTypeID = "app.bsky.embed.external" return json.Marshal(t.EmbedExternal) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *EmbedRecordWithMedia_Media) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -82,7 +84,7 @@ if t.EmbedExternal != nil { return t.EmbedExternal.MarshalCBOR(w) } - return fmt.Errorf("cannot cbor marshal empty enum") + return fmt.Errorf("can not marshal empty union as CBOR") } func (t *EmbedRecordWithMedia_Media) UnmarshalCBOR(r io.Reader) error { typ, b, err := util.CborTypeExtractReader(r) @@ -107,10 +109,8 @@ } // EmbedRecordWithMedia_View is a "view" in the app.bsky.embed.recordWithMedia schema. -// -// RECORDTYPE: EmbedRecordWithMedia_View type EmbedRecordWithMedia_View struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.recordWithMedia#view" cborgen:"$type,const=app.bsky.embed.recordWithMedia#view"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.recordWithMedia#view"` Media *EmbedRecordWithMedia_View_Media `json:"media" cborgen:"media"` Record *EmbedRecord_View `json:"record" cborgen:"record"` } @@ -134,8 +134,9 @@ t.EmbedExternal_View.LexiconTypeID = "app.bsky.embed.external#view" return json.Marshal(t.EmbedExternal_View) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *EmbedRecordWithMedia_View_Media) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/bsky/embedvideo.go b/api/bsky/embedvideo.go --- a/api/bsky/embedvideo.go +++ b/api/bsky/embedvideo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.embed.video -// schema: app.bsky.embed.video +package bsky import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,10 +10,11 @@ func init() { util.RegisterType("app.bsky.embed.video#main", &EmbedVideo{}) -} // EmbedVideo is a "main" in the app.bsky.embed.video schema. -// RECORDTYPE: EmbedVideo +} + +// EmbedVideo is a "main" in the app.bsky.embed.video schema. type EmbedVideo struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.video" cborgen:"$type,const=app.bsky.embed.video"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.video"` // alt: Alt text description of the video, for accessibility. Alt *string `json:"alt,omitempty" cborgen:"alt,omitempty"` AspectRatio *EmbedDefs_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"` @@ -29,10 +30,8 @@ } // EmbedVideo_View is a "view" in the app.bsky.embed.video schema. -// -// RECORDTYPE: EmbedVideo_View type EmbedVideo_View struct { - LexiconTypeID string `json:"$type,const=app.bsky.embed.video#view" cborgen:"$type,const=app.bsky.embed.video#view"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.video#view"` Alt *string `json:"alt,omitempty" cborgen:"alt,omitempty"` AspectRatio *EmbedDefs_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"` Cid string `json:"cid" cborgen:"cid"` diff --git a/api/bsky/feeddefs.go b/api/bsky/feeddefs.go --- a/api/bsky/feeddefs.go +++ b/api/bsky/feeddefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.defs -// schema: app.bsky.feed.defs +package bsky import ( "encoding/json" @@ -19,10 +19,8 @@ } // FeedDefs_BlockedPost is a "blockedPost" in the app.bsky.feed.defs schema. -// -// RECORDTYPE: FeedDefs_BlockedPost type FeedDefs_BlockedPost struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#blockedPost" cborgen:"$type,const=app.bsky.feed.defs#blockedPost"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#blockedPost"` Author *FeedDefs_BlockedAuthor `json:"author" cborgen:"author"` Blocked bool `json:"blocked" cborgen:"blocked"` Uri string `json:"uri" cborgen:"uri"` @@ -53,8 +51,9 @@ t.FeedDefs_ReasonPin.LexiconTypeID = "app.bsky.feed.defs#reasonPin" return json.Marshal(t.FeedDefs_ReasonPin) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedDefs_FeedViewPost_Reason) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -75,10 +74,8 @@ } // FeedDefs_GeneratorView is a "generatorView" in the app.bsky.feed.defs schema. -// -// RECORDTYPE: FeedDefs_GeneratorView type FeedDefs_GeneratorView struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#generatorView" cborgen:"$type,const=app.bsky.feed.defs#generatorView"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#generatorView"` AcceptsInteractions *bool `json:"acceptsInteractions,omitempty" cborgen:"acceptsInteractions,omitempty"` Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` Cid string `json:"cid" cborgen:"cid"` @@ -111,19 +108,15 @@ } // FeedDefs_NotFoundPost is a "notFoundPost" in the app.bsky.feed.defs schema. -// -// RECORDTYPE: FeedDefs_NotFoundPost type FeedDefs_NotFoundPost struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#notFoundPost" cborgen:"$type,const=app.bsky.feed.defs#notFoundPost"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#notFoundPost"` NotFound bool `json:"notFound" cborgen:"notFound"` Uri string `json:"uri" cborgen:"uri"` } // FeedDefs_PostView is a "postView" in the app.bsky.feed.defs schema. -// -// RECORDTYPE: FeedDefs_PostView type FeedDefs_PostView struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#postView" cborgen:"$type,const=app.bsky.feed.defs#postView"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#postView"` Author *ActorDefs_ProfileViewBasic `json:"author" cborgen:"author"` BookmarkCount *int64 `json:"bookmarkCount,omitempty" cborgen:"bookmarkCount,omitempty"` Cid string `json:"cid" cborgen:"cid"` @@ -169,8 +162,9 @@ t.EmbedRecordWithMedia_View.LexiconTypeID = "app.bsky.embed.recordWithMedia#view" return json.Marshal(t.EmbedRecordWithMedia_View) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedDefs_PostView_Embed) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -200,17 +194,13 @@ } // FeedDefs_ReasonPin is a "reasonPin" in the app.bsky.feed.defs schema. -// -// RECORDTYPE: FeedDefs_ReasonPin type FeedDefs_ReasonPin struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#reasonPin" cborgen:"$type,const=app.bsky.feed.defs#reasonPin"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#reasonPin"` } // FeedDefs_ReasonRepost is a "reasonRepost" in the app.bsky.feed.defs schema. -// -// RECORDTYPE: FeedDefs_ReasonRepost type FeedDefs_ReasonRepost struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#reasonRepost" cborgen:"$type,const=app.bsky.feed.defs#reasonRepost"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#reasonRepost"` By *ActorDefs_ProfileViewBasic `json:"by" cborgen:"by"` Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` @@ -244,8 +234,9 @@ t.FeedDefs_BlockedPost.LexiconTypeID = "app.bsky.feed.defs#blockedPost" return json.Marshal(t.FeedDefs_BlockedPost) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedDefs_ReplyRef_Parent) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -287,8 +278,9 @@ t.FeedDefs_BlockedPost.LexiconTypeID = "app.bsky.feed.defs#blockedPost" return json.Marshal(t.FeedDefs_BlockedPost) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedDefs_ReplyRef_Root) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -333,8 +325,9 @@ t.FeedDefs_SkeletonReasonPin.LexiconTypeID = "app.bsky.feed.defs#skeletonReasonPin" return json.Marshal(t.FeedDefs_SkeletonReasonPin) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedDefs_SkeletonFeedPost_Reason) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -355,17 +348,13 @@ } // FeedDefs_SkeletonReasonPin is a "skeletonReasonPin" in the app.bsky.feed.defs schema. -// -// RECORDTYPE: FeedDefs_SkeletonReasonPin type FeedDefs_SkeletonReasonPin struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#skeletonReasonPin" cborgen:"$type,const=app.bsky.feed.defs#skeletonReasonPin"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#skeletonReasonPin"` } // FeedDefs_SkeletonReasonRepost is a "skeletonReasonRepost" in the app.bsky.feed.defs schema. -// -// RECORDTYPE: FeedDefs_SkeletonReasonRepost type FeedDefs_SkeletonReasonRepost struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#skeletonReasonRepost" cborgen:"$type,const=app.bsky.feed.defs#skeletonReasonRepost"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#skeletonReasonRepost"` Repost string `json:"repost" cborgen:"repost"` } @@ -377,10 +366,8 @@ } // FeedDefs_ThreadViewPost is a "threadViewPost" in the app.bsky.feed.defs schema. -// -// RECORDTYPE: FeedDefs_ThreadViewPost type FeedDefs_ThreadViewPost struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#threadViewPost" cborgen:"$type,const=app.bsky.feed.defs#threadViewPost"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#threadViewPost"` Parent *FeedDefs_ThreadViewPost_Parent `json:"parent,omitempty" cborgen:"parent,omitempty"` Post *FeedDefs_PostView `json:"post" cborgen:"post"` Replies []*FeedDefs_ThreadViewPost_Replies_Elem `json:"replies,omitempty" cborgen:"replies,omitempty"` @@ -406,8 +393,9 @@ t.FeedDefs_BlockedPost.LexiconTypeID = "app.bsky.feed.defs#blockedPost" return json.Marshal(t.FeedDefs_BlockedPost) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedDefs_ThreadViewPost_Parent) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -449,8 +437,9 @@ t.FeedDefs_BlockedPost.LexiconTypeID = "app.bsky.feed.defs#blockedPost" return json.Marshal(t.FeedDefs_BlockedPost) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedDefs_ThreadViewPost_Replies_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/bsky/feeddescribeFeedGenerator.go b/api/bsky/feeddescribeFeedGenerator.go --- a/api/bsky/feeddescribeFeedGenerator.go +++ b/api/bsky/feeddescribeFeedGenerator.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.describeFeedGenerator -// schema: app.bsky.feed.describeFeedGenerator +package bsky import ( "context" diff --git a/api/bsky/feedgenerator.go b/api/bsky/feedgenerator.go --- a/api/bsky/feedgenerator.go +++ b/api/bsky/feedgenerator.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.generator -// schema: app.bsky.feed.generator +package bsky import ( "bytes" @@ -17,10 +17,10 @@ func init() { util.RegisterType("app.bsky.feed.generator", &FeedGenerator{}) -} // -// RECORDTYPE: FeedGenerator +} + type FeedGenerator struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.generator" cborgen:"$type,const=app.bsky.feed.generator"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.generator"` // acceptsInteractions: Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions AcceptsInteractions *bool `json:"acceptsInteractions,omitempty" cborgen:"acceptsInteractions,omitempty"` Avatar *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` @@ -44,8 +44,9 @@ t.LabelDefs_SelfLabels.LexiconTypeID = "com.atproto.label.defs#selfLabels" return json.Marshal(t.LabelDefs_SelfLabels) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedGenerator_Labels) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -71,7 +72,7 @@ if t.LabelDefs_SelfLabels != nil { return t.LabelDefs_SelfLabels.MarshalCBOR(w) } - return fmt.Errorf("cannot cbor marshal empty enum") + return fmt.Errorf("can not marshal empty union as CBOR") } func (t *FeedGenerator_Labels) UnmarshalCBOR(r io.Reader) error { typ, b, err := util.CborTypeExtractReader(r) diff --git a/api/bsky/feedgetActorFeeds.go b/api/bsky/feedgetActorFeeds.go --- a/api/bsky/feedgetActorFeeds.go +++ b/api/bsky/feedgetActorFeeds.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getActorFeeds -// schema: app.bsky.feed.getActorFeeds +package bsky import ( "context" diff --git a/api/bsky/feedgetActorLikes.go b/api/bsky/feedgetActorLikes.go --- a/api/bsky/feedgetActorLikes.go +++ b/api/bsky/feedgetActorLikes.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getActorLikes -// schema: app.bsky.feed.getActorLikes +package bsky import ( "context" diff --git a/api/bsky/feedgetAuthorFeed.go b/api/bsky/feedgetAuthorFeed.go --- a/api/bsky/feedgetAuthorFeed.go +++ b/api/bsky/feedgetAuthorFeed.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getAuthorFeed -// schema: app.bsky.feed.getAuthorFeed +package bsky import ( "context" diff --git a/api/bsky/feedgetFeed.go b/api/bsky/feedgetFeed.go --- a/api/bsky/feedgetFeed.go +++ b/api/bsky/feedgetFeed.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getFeed -// schema: app.bsky.feed.getFeed +package bsky import ( "context" diff --git a/api/bsky/feedgetFeedGenerator.go b/api/bsky/feedgetFeedGenerator.go --- a/api/bsky/feedgetFeedGenerator.go +++ b/api/bsky/feedgetFeedGenerator.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getFeedGenerator -// schema: app.bsky.feed.getFeedGenerator +package bsky import ( "context" diff --git a/api/bsky/feedgetFeedGenerators.go b/api/bsky/feedgetFeedGenerators.go --- a/api/bsky/feedgetFeedGenerators.go +++ b/api/bsky/feedgetFeedGenerators.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getFeedGenerators -// schema: app.bsky.feed.getFeedGenerators +package bsky import ( "context" diff --git a/api/bsky/feedgetFeedSkeleton.go b/api/bsky/feedgetFeedSkeleton.go --- a/api/bsky/feedgetFeedSkeleton.go +++ b/api/bsky/feedgetFeedSkeleton.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getFeedSkeleton -// schema: app.bsky.feed.getFeedSkeleton +package bsky import ( "context" diff --git a/api/bsky/feedgetLikes.go b/api/bsky/feedgetLikes.go --- a/api/bsky/feedgetLikes.go +++ b/api/bsky/feedgetLikes.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getLikes -// schema: app.bsky.feed.getLikes +package bsky import ( "context" diff --git a/api/bsky/feedgetListFeed.go b/api/bsky/feedgetListFeed.go --- a/api/bsky/feedgetListFeed.go +++ b/api/bsky/feedgetListFeed.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getListFeed -// schema: app.bsky.feed.getListFeed +package bsky import ( "context" diff --git a/api/bsky/feedgetPostThread.go b/api/bsky/feedgetPostThread.go --- a/api/bsky/feedgetPostThread.go +++ b/api/bsky/feedgetPostThread.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getPostThread -// schema: app.bsky.feed.getPostThread +package bsky import ( "context" @@ -37,8 +37,9 @@ t.FeedDefs_BlockedPost.LexiconTypeID = "app.bsky.feed.defs#blockedPost" return json.Marshal(t.FeedDefs_BlockedPost) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedGetPostThread_Output_Thread) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/bsky/feedgetPosts.go b/api/bsky/feedgetPosts.go --- a/api/bsky/feedgetPosts.go +++ b/api/bsky/feedgetPosts.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getPosts -// schema: app.bsky.feed.getPosts +package bsky import ( "context" diff --git a/api/bsky/feedgetQuotes.go b/api/bsky/feedgetQuotes.go --- a/api/bsky/feedgetQuotes.go +++ b/api/bsky/feedgetQuotes.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getQuotes -// schema: app.bsky.feed.getQuotes +package bsky import ( "context" diff --git a/api/bsky/feedgetRepostedBy.go b/api/bsky/feedgetRepostedBy.go --- a/api/bsky/feedgetRepostedBy.go +++ b/api/bsky/feedgetRepostedBy.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getRepostedBy -// schema: app.bsky.feed.getRepostedBy +package bsky import ( "context" diff --git a/api/bsky/feedgetSuggestedFeeds.go b/api/bsky/feedgetSuggestedFeeds.go --- a/api/bsky/feedgetSuggestedFeeds.go +++ b/api/bsky/feedgetSuggestedFeeds.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getSuggestedFeeds -// schema: app.bsky.feed.getSuggestedFeeds +package bsky import ( "context" diff --git a/api/bsky/feedgetTimeline.go b/api/bsky/feedgetTimeline.go --- a/api/bsky/feedgetTimeline.go +++ b/api/bsky/feedgetTimeline.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.getTimeline -// schema: app.bsky.feed.getTimeline +package bsky import ( "context" diff --git a/api/bsky/feedlike.go b/api/bsky/feedlike.go --- a/api/bsky/feedlike.go +++ b/api/bsky/feedlike.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.like -// schema: app.bsky.feed.like +package bsky import ( comatprototypes "github.com/bluesky-social/indigo/api/atproto" @@ -11,10 +11,10 @@ func init() { util.RegisterType("app.bsky.feed.like", &FeedLike{}) -} // -// RECORDTYPE: FeedLike +} + type FeedLike struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.like" cborgen:"$type,const=app.bsky.feed.like"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.like"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` Subject *comatprototypes.RepoStrongRef `json:"subject" cborgen:"subject"` Via *comatprototypes.RepoStrongRef `json:"via,omitempty" cborgen:"via,omitempty"` diff --git a/api/bsky/feedpost.go b/api/bsky/feedpost.go --- a/api/bsky/feedpost.go +++ b/api/bsky/feedpost.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.post -// schema: app.bsky.feed.post +package bsky import ( "bytes" @@ -17,10 +17,10 @@ func init() { util.RegisterType("app.bsky.feed.post", &FeedPost{}) -} // -// RECORDTYPE: FeedPost +} + type FeedPost struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.post" cborgen:"$type,const=app.bsky.feed.post"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.post"` // createdAt: Client-declared timestamp when this post was originally created. CreatedAt string `json:"createdAt" cborgen:"createdAt"` Embed *FeedPost_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` @@ -68,8 +68,9 @@ t.EmbedRecordWithMedia.LexiconTypeID = "app.bsky.embed.recordWithMedia" return json.Marshal(t.EmbedRecordWithMedia) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedPost_Embed) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -119,7 +120,7 @@ if t.EmbedRecordWithMedia != nil { return t.EmbedRecordWithMedia.MarshalCBOR(w) } - return fmt.Errorf("cannot cbor marshal empty enum") + return fmt.Errorf("can not marshal empty union as CBOR") } func (t *FeedPost_Embed) UnmarshalCBOR(r io.Reader) error { typ, b, err := util.CborTypeExtractReader(r) @@ -169,8 +170,9 @@ t.LabelDefs_SelfLabels.LexiconTypeID = "com.atproto.label.defs#selfLabels" return json.Marshal(t.LabelDefs_SelfLabels) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedPost_Labels) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -196,7 +198,7 @@ if t.LabelDefs_SelfLabels != nil { return t.LabelDefs_SelfLabels.MarshalCBOR(w) } - return fmt.Errorf("cannot cbor marshal empty enum") + return fmt.Errorf("can not marshal empty union as CBOR") } func (t *FeedPost_Labels) UnmarshalCBOR(r io.Reader) error { typ, b, err := util.CborTypeExtractReader(r) diff --git a/api/bsky/feedpostgate.go b/api/bsky/feedpostgate.go --- a/api/bsky/feedpostgate.go +++ b/api/bsky/feedpostgate.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.postgate -// schema: app.bsky.feed.postgate +package bsky import ( "bytes" @@ -16,10 +16,10 @@ func init() { util.RegisterType("app.bsky.feed.postgate", &FeedPostgate{}) -} // -// RECORDTYPE: FeedPostgate +} + type FeedPostgate struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.postgate" cborgen:"$type,const=app.bsky.feed.postgate"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.postgate"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` // detachedEmbeddingUris: List of AT-URIs embedding this post that the author has detached from. DetachedEmbeddingUris []string `json:"detachedEmbeddingUris,omitempty" cborgen:"detachedEmbeddingUris,omitempty"` @@ -32,10 +32,8 @@ // FeedPostgate_DisableRule is a "disableRule" in the app.bsky.feed.postgate schema. // // Disables embedding of this post. -// -// RECORDTYPE: FeedPostgate_DisableRule type FeedPostgate_DisableRule struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.postgate#disableRule" cborgen:"$type,const=app.bsky.feed.postgate#disableRule"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.postgate#disableRule"` } type FeedPostgate_EmbeddingRules_Elem struct { @@ -47,8 +45,9 @@ t.FeedPostgate_DisableRule.LexiconTypeID = "app.bsky.feed.postgate#disableRule" return json.Marshal(t.FeedPostgate_DisableRule) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedPostgate_EmbeddingRules_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -74,7 +73,7 @@ if t.FeedPostgate_DisableRule != nil { return t.FeedPostgate_DisableRule.MarshalCBOR(w) } - return fmt.Errorf("cannot cbor marshal empty enum") + return fmt.Errorf("can not marshal empty union as CBOR") } func (t *FeedPostgate_EmbeddingRules_Elem) UnmarshalCBOR(r io.Reader) error { typ, b, err := util.CborTypeExtractReader(r) diff --git a/api/bsky/feedrepost.go b/api/bsky/feedrepost.go --- a/api/bsky/feedrepost.go +++ b/api/bsky/feedrepost.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.repost -// schema: app.bsky.feed.repost +package bsky import ( comatprototypes "github.com/bluesky-social/indigo/api/atproto" @@ -11,10 +11,10 @@ func init() { util.RegisterType("app.bsky.feed.repost", &FeedRepost{}) -} // -// RECORDTYPE: FeedRepost +} + type FeedRepost struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.repost" cborgen:"$type,const=app.bsky.feed.repost"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.repost"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` Subject *comatprototypes.RepoStrongRef `json:"subject" cborgen:"subject"` Via *comatprototypes.RepoStrongRef `json:"via,omitempty" cborgen:"via,omitempty"` diff --git a/api/bsky/feedsearchPosts.go b/api/bsky/feedsearchPosts.go --- a/api/bsky/feedsearchPosts.go +++ b/api/bsky/feedsearchPosts.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.searchPosts -// schema: app.bsky.feed.searchPosts +package bsky import ( "context" diff --git a/api/bsky/feedsendInteractions.go b/api/bsky/feedsendInteractions.go --- a/api/bsky/feedsendInteractions.go +++ b/api/bsky/feedsendInteractions.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.sendInteractions -// schema: app.bsky.feed.sendInteractions +package bsky import ( "context" diff --git a/api/bsky/feedthreadgate.go b/api/bsky/feedthreadgate.go --- a/api/bsky/feedthreadgate.go +++ b/api/bsky/feedthreadgate.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.feed.threadgate -// schema: app.bsky.feed.threadgate +package bsky import ( "bytes" @@ -16,10 +16,10 @@ func init() { util.RegisterType("app.bsky.feed.threadgate", &FeedThreadgate{}) -} // -// RECORDTYPE: FeedThreadgate +} + type FeedThreadgate struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate" cborgen:"$type,const=app.bsky.feed.threadgate"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.threadgate"` // allow: List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. Allow []*FeedThreadgate_Allow_Elem `json:"allow,omitempty" cborgen:"allow,omitempty"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` @@ -53,8 +53,9 @@ t.FeedThreadgate_ListRule.LexiconTypeID = "app.bsky.feed.threadgate#listRule" return json.Marshal(t.FeedThreadgate_ListRule) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *FeedThreadgate_Allow_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -98,7 +99,7 @@ if t.FeedThreadgate_ListRule != nil { return t.FeedThreadgate_ListRule.MarshalCBOR(w) } - return fmt.Errorf("cannot cbor marshal empty enum") + return fmt.Errorf("can not marshal empty union as CBOR") } func (t *FeedThreadgate_Allow_Elem) UnmarshalCBOR(r io.Reader) error { typ, b, err := util.CborTypeExtractReader(r) @@ -128,36 +129,28 @@ // FeedThreadgate_FollowerRule is a "followerRule" in the app.bsky.feed.threadgate schema. // // Allow replies from actors who follow you. -// -// RECORDTYPE: FeedThreadgate_FollowerRule type FeedThreadgate_FollowerRule struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate#followerRule" cborgen:"$type,const=app.bsky.feed.threadgate#followerRule"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.threadgate#followerRule"` } // FeedThreadgate_FollowingRule is a "followingRule" in the app.bsky.feed.threadgate schema. // // Allow replies from actors you follow. -// -// RECORDTYPE: FeedThreadgate_FollowingRule type FeedThreadgate_FollowingRule struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate#followingRule" cborgen:"$type,const=app.bsky.feed.threadgate#followingRule"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.threadgate#followingRule"` } // FeedThreadgate_ListRule is a "listRule" in the app.bsky.feed.threadgate schema. // // Allow replies from actors on a list. -// -// RECORDTYPE: FeedThreadgate_ListRule type FeedThreadgate_ListRule struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate#listRule" cborgen:"$type,const=app.bsky.feed.threadgate#listRule"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.threadgate#listRule"` List string `json:"list" cborgen:"list"` } // FeedThreadgate_MentionRule is a "mentionRule" in the app.bsky.feed.threadgate schema. // // Allow replies from actors mentioned in your post. -// -// RECORDTYPE: FeedThreadgate_MentionRule type FeedThreadgate_MentionRule struct { - LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate#mentionRule" cborgen:"$type,const=app.bsky.feed.threadgate#mentionRule"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.threadgate#mentionRule"` } diff --git a/api/bsky/graphblock.go b/api/bsky/graphblock.go --- a/api/bsky/graphblock.go +++ b/api/bsky/graphblock.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.block -// schema: app.bsky.graph.block +package bsky import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,10 +10,10 @@ func init() { util.RegisterType("app.bsky.graph.block", &GraphBlock{}) -} // -// RECORDTYPE: GraphBlock +} + type GraphBlock struct { - LexiconTypeID string `json:"$type,const=app.bsky.graph.block" cborgen:"$type,const=app.bsky.graph.block"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.block"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` // subject: DID of the account to be blocked. Subject string `json:"subject" cborgen:"subject"` diff --git a/api/bsky/graphdefs.go b/api/bsky/graphdefs.go --- a/api/bsky/graphdefs.go +++ b/api/bsky/graphdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.defs -// schema: app.bsky.graph.defs +package bsky import ( comatprototypes "github.com/bluesky-social/indigo/api/atproto" @@ -16,10 +16,8 @@ } // GraphDefs_ListView is a "listView" in the app.bsky.graph.defs schema. -// -// RECORDTYPE: GraphDefs_ListView type GraphDefs_ListView struct { - LexiconTypeID string `json:"$type,const=app.bsky.graph.defs#listView" cborgen:"$type,const=app.bsky.graph.defs#listView"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.defs#listView"` Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` Cid string `json:"cid" cborgen:"cid"` Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` @@ -56,10 +54,8 @@ // GraphDefs_NotFoundActor is a "notFoundActor" in the app.bsky.graph.defs schema. // // indicates that a handle or DID could not be resolved -// -// RECORDTYPE: GraphDefs_NotFoundActor type GraphDefs_NotFoundActor struct { - LexiconTypeID string `json:"$type,const=app.bsky.graph.defs#notFoundActor" cborgen:"$type,const=app.bsky.graph.defs#notFoundActor"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.defs#notFoundActor"` Actor string `json:"actor" cborgen:"actor"` NotFound bool `json:"notFound" cborgen:"notFound"` } @@ -67,10 +63,8 @@ // GraphDefs_Relationship is a "relationship" in the app.bsky.graph.defs schema. // // lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) -// -// RECORDTYPE: GraphDefs_Relationship type GraphDefs_Relationship struct { - LexiconTypeID string `json:"$type,const=app.bsky.graph.defs#relationship" cborgen:"$type,const=app.bsky.graph.defs#relationship"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.defs#relationship"` Did string `json:"did" cborgen:"did"` // followedBy: if the actor is followed by this DID, contains the AT-URI of the follow record FollowedBy *string `json:"followedBy,omitempty" cborgen:"followedBy,omitempty"` @@ -94,10 +88,8 @@ } // GraphDefs_StarterPackViewBasic is a "starterPackViewBasic" in the app.bsky.graph.defs schema. -// -// RECORDTYPE: GraphDefs_StarterPackViewBasic type GraphDefs_StarterPackViewBasic struct { - LexiconTypeID string `json:"$type,const=app.bsky.graph.defs#starterPackViewBasic" cborgen:"$type,const=app.bsky.graph.defs#starterPackViewBasic"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.defs#starterPackViewBasic"` Cid string `json:"cid" cborgen:"cid"` Creator *ActorDefs_ProfileViewBasic `json:"creator" cborgen:"creator"` IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` diff --git a/api/bsky/graphfollow.go b/api/bsky/graphfollow.go --- a/api/bsky/graphfollow.go +++ b/api/bsky/graphfollow.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.follow -// schema: app.bsky.graph.follow +package bsky import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,10 +10,10 @@ func init() { util.RegisterType("app.bsky.graph.follow", &GraphFollow{}) -} // -// RECORDTYPE: GraphFollow +} + type GraphFollow struct { - LexiconTypeID string `json:"$type,const=app.bsky.graph.follow" cborgen:"$type,const=app.bsky.graph.follow"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.follow"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` Subject string `json:"subject" cborgen:"subject"` } diff --git a/api/bsky/graphgetActorStarterPacks.go b/api/bsky/graphgetActorStarterPacks.go --- a/api/bsky/graphgetActorStarterPacks.go +++ b/api/bsky/graphgetActorStarterPacks.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getActorStarterPacks -// schema: app.bsky.graph.getActorStarterPacks +package bsky import ( "context" diff --git a/api/bsky/graphgetBlocks.go b/api/bsky/graphgetBlocks.go --- a/api/bsky/graphgetBlocks.go +++ b/api/bsky/graphgetBlocks.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getBlocks -// schema: app.bsky.graph.getBlocks +package bsky import ( "context" diff --git a/api/bsky/graphgetFollowers.go b/api/bsky/graphgetFollowers.go --- a/api/bsky/graphgetFollowers.go +++ b/api/bsky/graphgetFollowers.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getFollowers -// schema: app.bsky.graph.getFollowers +package bsky import ( "context" diff --git a/api/bsky/graphgetFollows.go b/api/bsky/graphgetFollows.go --- a/api/bsky/graphgetFollows.go +++ b/api/bsky/graphgetFollows.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getFollows -// schema: app.bsky.graph.getFollows +package bsky import ( "context" diff --git a/api/bsky/graphgetKnownFollowers.go b/api/bsky/graphgetKnownFollowers.go --- a/api/bsky/graphgetKnownFollowers.go +++ b/api/bsky/graphgetKnownFollowers.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getKnownFollowers -// schema: app.bsky.graph.getKnownFollowers +package bsky import ( "context" diff --git a/api/bsky/graphgetList.go b/api/bsky/graphgetList.go --- a/api/bsky/graphgetList.go +++ b/api/bsky/graphgetList.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getList -// schema: app.bsky.graph.getList +package bsky import ( "context" diff --git a/api/bsky/graphgetListBlocks.go b/api/bsky/graphgetListBlocks.go --- a/api/bsky/graphgetListBlocks.go +++ b/api/bsky/graphgetListBlocks.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getListBlocks -// schema: app.bsky.graph.getListBlocks +package bsky import ( "context" diff --git a/api/bsky/graphgetListMutes.go b/api/bsky/graphgetListMutes.go --- a/api/bsky/graphgetListMutes.go +++ b/api/bsky/graphgetListMutes.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getListMutes -// schema: app.bsky.graph.getListMutes +package bsky import ( "context" diff --git a/api/bsky/graphgetLists.go b/api/bsky/graphgetLists.go --- a/api/bsky/graphgetLists.go +++ b/api/bsky/graphgetLists.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getLists -// schema: app.bsky.graph.getLists +package bsky import ( "context" diff --git a/api/bsky/graphgetListsWithMembership.go b/api/bsky/graphgetListsWithMembership.go --- a/api/bsky/graphgetListsWithMembership.go +++ b/api/bsky/graphgetListsWithMembership.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getListsWithMembership -// schema: app.bsky.graph.getListsWithMembership +package bsky import ( "context" diff --git a/api/bsky/graphgetMutes.go b/api/bsky/graphgetMutes.go --- a/api/bsky/graphgetMutes.go +++ b/api/bsky/graphgetMutes.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getMutes -// schema: app.bsky.graph.getMutes +package bsky import ( "context" diff --git a/api/bsky/graphgetRelationships.go b/api/bsky/graphgetRelationships.go --- a/api/bsky/graphgetRelationships.go +++ b/api/bsky/graphgetRelationships.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getRelationships -// schema: app.bsky.graph.getRelationships +package bsky import ( "context" @@ -32,8 +32,9 @@ t.GraphDefs_NotFoundActor.LexiconTypeID = "app.bsky.graph.defs#notFoundActor" return json.Marshal(t.GraphDefs_NotFoundActor) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *GraphGetRelationships_Output_Relationships_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/bsky/graphgetStarterPack.go b/api/bsky/graphgetStarterPack.go --- a/api/bsky/graphgetStarterPack.go +++ b/api/bsky/graphgetStarterPack.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getStarterPack -// schema: app.bsky.graph.getStarterPack +package bsky import ( "context" diff --git a/api/bsky/graphgetStarterPacks.go b/api/bsky/graphgetStarterPacks.go --- a/api/bsky/graphgetStarterPacks.go +++ b/api/bsky/graphgetStarterPacks.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getStarterPacks -// schema: app.bsky.graph.getStarterPacks +package bsky import ( "context" diff --git a/api/bsky/graphgetStarterPacksWithMembership.go b/api/bsky/graphgetStarterPacksWithMembership.go --- a/api/bsky/graphgetStarterPacksWithMembership.go +++ b/api/bsky/graphgetStarterPacksWithMembership.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getStarterPacksWithMembership -// schema: app.bsky.graph.getStarterPacksWithMembership +package bsky import ( "context" diff --git a/api/bsky/graphgetSuggestedFollowsByActor.go b/api/bsky/graphgetSuggestedFollowsByActor.go --- a/api/bsky/graphgetSuggestedFollowsByActor.go +++ b/api/bsky/graphgetSuggestedFollowsByActor.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.getSuggestedFollowsByActor -// schema: app.bsky.graph.getSuggestedFollowsByActor +package bsky import ( "context" diff --git a/api/bsky/graphlist.go b/api/bsky/graphlist.go --- a/api/bsky/graphlist.go +++ b/api/bsky/graphlist.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.list -// schema: app.bsky.graph.list +package bsky import ( "bytes" @@ -17,10 +17,10 @@ func init() { util.RegisterType("app.bsky.graph.list", &GraphList{}) -} // -// RECORDTYPE: GraphList +} + type GraphList struct { - LexiconTypeID string `json:"$type,const=app.bsky.graph.list" cborgen:"$type,const=app.bsky.graph.list"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.list"` Avatar *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` Description *string `json:"description,omitempty" cborgen:"description,omitempty"` @@ -41,8 +41,9 @@ t.LabelDefs_SelfLabels.LexiconTypeID = "com.atproto.label.defs#selfLabels" return json.Marshal(t.LabelDefs_SelfLabels) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *GraphList_Labels) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -68,7 +69,7 @@ if t.LabelDefs_SelfLabels != nil { return t.LabelDefs_SelfLabels.MarshalCBOR(w) } - return fmt.Errorf("cannot cbor marshal empty enum") + return fmt.Errorf("can not marshal empty union as CBOR") } func (t *GraphList_Labels) UnmarshalCBOR(r io.Reader) error { typ, b, err := util.CborTypeExtractReader(r) diff --git a/api/bsky/graphlistblock.go b/api/bsky/graphlistblock.go --- a/api/bsky/graphlistblock.go +++ b/api/bsky/graphlistblock.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.listblock -// schema: app.bsky.graph.listblock +package bsky import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,10 +10,10 @@ func init() { util.RegisterType("app.bsky.graph.listblock", &GraphListblock{}) -} // -// RECORDTYPE: GraphListblock +} + type GraphListblock struct { - LexiconTypeID string `json:"$type,const=app.bsky.graph.listblock" cborgen:"$type,const=app.bsky.graph.listblock"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.listblock"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` // subject: Reference (AT-URI) to the mod list record. Subject string `json:"subject" cborgen:"subject"` diff --git a/api/bsky/graphlistitem.go b/api/bsky/graphlistitem.go --- a/api/bsky/graphlistitem.go +++ b/api/bsky/graphlistitem.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.listitem -// schema: app.bsky.graph.listitem +package bsky import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,10 +10,10 @@ func init() { util.RegisterType("app.bsky.graph.listitem", &GraphListitem{}) -} // -// RECORDTYPE: GraphListitem +} + type GraphListitem struct { - LexiconTypeID string `json:"$type,const=app.bsky.graph.listitem" cborgen:"$type,const=app.bsky.graph.listitem"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.listitem"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` // list: Reference (AT-URI) to the list record (app.bsky.graph.list). List string `json:"list" cborgen:"list"` diff --git a/api/bsky/graphmuteActor.go b/api/bsky/graphmuteActor.go --- a/api/bsky/graphmuteActor.go +++ b/api/bsky/graphmuteActor.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.muteActor -// schema: app.bsky.graph.muteActor +package bsky import ( "context" diff --git a/api/bsky/graphmuteActorList.go b/api/bsky/graphmuteActorList.go --- a/api/bsky/graphmuteActorList.go +++ b/api/bsky/graphmuteActorList.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.muteActorList -// schema: app.bsky.graph.muteActorList +package bsky import ( "context" diff --git a/api/bsky/graphmuteThread.go b/api/bsky/graphmuteThread.go --- a/api/bsky/graphmuteThread.go +++ b/api/bsky/graphmuteThread.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.muteThread -// schema: app.bsky.graph.muteThread +package bsky import ( "context" diff --git a/api/bsky/graphsearchStarterPacks.go b/api/bsky/graphsearchStarterPacks.go --- a/api/bsky/graphsearchStarterPacks.go +++ b/api/bsky/graphsearchStarterPacks.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.searchStarterPacks -// schema: app.bsky.graph.searchStarterPacks +package bsky import ( "context" diff --git a/api/bsky/graphstarterpack.go b/api/bsky/graphstarterpack.go --- a/api/bsky/graphstarterpack.go +++ b/api/bsky/graphstarterpack.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.starterpack -// schema: app.bsky.graph.starterpack +package bsky import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,10 +10,10 @@ func init() { util.RegisterType("app.bsky.graph.starterpack", &GraphStarterpack{}) -} // -// RECORDTYPE: GraphStarterpack +} + type GraphStarterpack struct { - LexiconTypeID string `json:"$type,const=app.bsky.graph.starterpack" cborgen:"$type,const=app.bsky.graph.starterpack"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.starterpack"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` Description *string `json:"description,omitempty" cborgen:"description,omitempty"` DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` diff --git a/api/bsky/graphunmuteActor.go b/api/bsky/graphunmuteActor.go --- a/api/bsky/graphunmuteActor.go +++ b/api/bsky/graphunmuteActor.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.unmuteActor -// schema: app.bsky.graph.unmuteActor +package bsky import ( "context" diff --git a/api/bsky/graphunmuteActorList.go b/api/bsky/graphunmuteActorList.go --- a/api/bsky/graphunmuteActorList.go +++ b/api/bsky/graphunmuteActorList.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.unmuteActorList -// schema: app.bsky.graph.unmuteActorList +package bsky import ( "context" diff --git a/api/bsky/graphunmuteThread.go b/api/bsky/graphunmuteThread.go --- a/api/bsky/graphunmuteThread.go +++ b/api/bsky/graphunmuteThread.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.unmuteThread -// schema: app.bsky.graph.unmuteThread +package bsky import ( "context" diff --git a/api/bsky/graphverification.go b/api/bsky/graphverification.go --- a/api/bsky/graphverification.go +++ b/api/bsky/graphverification.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.graph.verification -// schema: app.bsky.graph.verification +package bsky import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,10 +10,10 @@ func init() { util.RegisterType("app.bsky.graph.verification", &GraphVerification{}) -} // -// RECORDTYPE: GraphVerification +} + type GraphVerification struct { - LexiconTypeID string `json:"$type,const=app.bsky.graph.verification" cborgen:"$type,const=app.bsky.graph.verification"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.verification"` // createdAt: Date of when the verification was created. CreatedAt string `json:"createdAt" cborgen:"createdAt"` // 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. diff --git a/api/bsky/labelerdefs.go b/api/bsky/labelerdefs.go --- a/api/bsky/labelerdefs.go +++ b/api/bsky/labelerdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.labeler.defs -// schema: app.bsky.labeler.defs +package bsky import ( comatprototypes "github.com/bluesky-social/indigo/api/atproto" @@ -17,10 +17,8 @@ } // LabelerDefs_LabelerView is a "labelerView" in the app.bsky.labeler.defs schema. -// -// RECORDTYPE: LabelerDefs_LabelerView type LabelerDefs_LabelerView struct { - LexiconTypeID string `json:"$type,const=app.bsky.labeler.defs#labelerView" cborgen:"$type,const=app.bsky.labeler.defs#labelerView"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.labeler.defs#labelerView"` Cid string `json:"cid" cborgen:"cid"` Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` @@ -31,10 +29,8 @@ } // LabelerDefs_LabelerViewDetailed is a "labelerViewDetailed" in the app.bsky.labeler.defs schema. -// -// RECORDTYPE: LabelerDefs_LabelerViewDetailed type LabelerDefs_LabelerViewDetailed struct { - LexiconTypeID string `json:"$type,const=app.bsky.labeler.defs#labelerViewDetailed" cborgen:"$type,const=app.bsky.labeler.defs#labelerViewDetailed"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.labeler.defs#labelerViewDetailed"` Cid string `json:"cid" cborgen:"cid"` Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` diff --git a/api/bsky/labelergetServices.go b/api/bsky/labelergetServices.go --- a/api/bsky/labelergetServices.go +++ b/api/bsky/labelergetServices.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.labeler.getServices -// schema: app.bsky.labeler.getServices +package bsky import ( "context" @@ -31,8 +31,9 @@ t.LabelerDefs_LabelerViewDetailed.LexiconTypeID = "app.bsky.labeler.defs#labelerViewDetailed" return json.Marshal(t.LabelerDefs_LabelerViewDetailed) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *LabelerGetServices_Output_Views_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/bsky/labelerservice.go b/api/bsky/labelerservice.go --- a/api/bsky/labelerservice.go +++ b/api/bsky/labelerservice.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.labeler.service -// schema: app.bsky.labeler.service +package bsky import ( "bytes" @@ -17,10 +17,10 @@ func init() { util.RegisterType("app.bsky.labeler.service", &LabelerService{}) -} // -// RECORDTYPE: LabelerService +} + type LabelerService struct { - LexiconTypeID string `json:"$type,const=app.bsky.labeler.service" cborgen:"$type,const=app.bsky.labeler.service"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.labeler.service"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` Labels *LabelerService_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"` Policies *LabelerDefs_LabelerPolicies `json:"policies" cborgen:"policies"` @@ -41,8 +41,9 @@ t.LabelDefs_SelfLabels.LexiconTypeID = "com.atproto.label.defs#selfLabels" return json.Marshal(t.LabelDefs_SelfLabels) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *LabelerService_Labels) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -68,7 +69,7 @@ if t.LabelDefs_SelfLabels != nil { return t.LabelDefs_SelfLabels.MarshalCBOR(w) } - return fmt.Errorf("cannot cbor marshal empty enum") + return fmt.Errorf("can not marshal empty union as CBOR") } func (t *LabelerService_Labels) UnmarshalCBOR(r io.Reader) error { typ, b, err := util.CborTypeExtractReader(r) diff --git a/api/bsky/notificationdeclaration.go b/api/bsky/notificationdeclaration.go --- a/api/bsky/notificationdeclaration.go +++ b/api/bsky/notificationdeclaration.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.declaration -// schema: app.bsky.notification.declaration +package bsky import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,10 +10,10 @@ func init() { util.RegisterType("app.bsky.notification.declaration", &NotificationDeclaration{}) -} // -// RECORDTYPE: NotificationDeclaration +} + type NotificationDeclaration struct { - LexiconTypeID string `json:"$type,const=app.bsky.notification.declaration" cborgen:"$type,const=app.bsky.notification.declaration"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.notification.declaration"` // allowSubscriptions: A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'. AllowSubscriptions string `json:"allowSubscriptions" cborgen:"allowSubscriptions"` } diff --git a/api/bsky/notificationdefs.go b/api/bsky/notificationdefs.go --- a/api/bsky/notificationdefs.go +++ b/api/bsky/notificationdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.defs -// schema: app.bsky.notification.defs +package bsky // NotificationDefs_ActivitySubscription is a "activitySubscription" in the app.bsky.notification.defs schema. type NotificationDefs_ActivitySubscription struct { diff --git a/api/bsky/notificationgetPreferences.go b/api/bsky/notificationgetPreferences.go --- a/api/bsky/notificationgetPreferences.go +++ b/api/bsky/notificationgetPreferences.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.getPreferences -// schema: app.bsky.notification.getPreferences +package bsky import ( "context" diff --git a/api/bsky/notificationgetUnreadCount.go b/api/bsky/notificationgetUnreadCount.go --- a/api/bsky/notificationgetUnreadCount.go +++ b/api/bsky/notificationgetUnreadCount.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.getUnreadCount -// schema: app.bsky.notification.getUnreadCount +package bsky import ( "context" diff --git a/api/bsky/notificationlistActivitySubscriptions.go b/api/bsky/notificationlistActivitySubscriptions.go --- a/api/bsky/notificationlistActivitySubscriptions.go +++ b/api/bsky/notificationlistActivitySubscriptions.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.listActivitySubscriptions -// schema: app.bsky.notification.listActivitySubscriptions +package bsky import ( "context" diff --git a/api/bsky/notificationlistNotifications.go b/api/bsky/notificationlistNotifications.go --- a/api/bsky/notificationlistNotifications.go +++ b/api/bsky/notificationlistNotifications.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.listNotifications -// schema: app.bsky.notification.listNotifications +package bsky import ( "context" diff --git a/api/bsky/notificationputActivitySubscription.go b/api/bsky/notificationputActivitySubscription.go --- a/api/bsky/notificationputActivitySubscription.go +++ b/api/bsky/notificationputActivitySubscription.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.putActivitySubscription -// schema: app.bsky.notification.putActivitySubscription +package bsky import ( "context" diff --git a/api/bsky/notificationputPreferences.go b/api/bsky/notificationputPreferences.go --- a/api/bsky/notificationputPreferences.go +++ b/api/bsky/notificationputPreferences.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.putPreferences -// schema: app.bsky.notification.putPreferences +package bsky import ( "context" diff --git a/api/bsky/notificationputPreferencesV2.go b/api/bsky/notificationputPreferencesV2.go --- a/api/bsky/notificationputPreferencesV2.go +++ b/api/bsky/notificationputPreferencesV2.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.putPreferencesV2 -// schema: app.bsky.notification.putPreferencesV2 +package bsky import ( "context" diff --git a/api/bsky/notificationregisterPush.go b/api/bsky/notificationregisterPush.go --- a/api/bsky/notificationregisterPush.go +++ b/api/bsky/notificationregisterPush.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.registerPush -// schema: app.bsky.notification.registerPush +package bsky import ( "context" diff --git a/api/bsky/notificationunregisterPush.go b/api/bsky/notificationunregisterPush.go --- a/api/bsky/notificationunregisterPush.go +++ b/api/bsky/notificationunregisterPush.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.unregisterPush -// schema: app.bsky.notification.unregisterPush +package bsky import ( "context" diff --git a/api/bsky/notificationupdateSeen.go b/api/bsky/notificationupdateSeen.go --- a/api/bsky/notificationupdateSeen.go +++ b/api/bsky/notificationupdateSeen.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.notification.updateSeen -// schema: app.bsky.notification.updateSeen +package bsky import ( "context" diff --git a/api/bsky/richtextfacet.go b/api/bsky/richtextfacet.go --- a/api/bsky/richtextfacet.go +++ b/api/bsky/richtextfacet.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.richtext.facet -// schema: app.bsky.richtext.facet +package bsky import ( "bytes" @@ -49,8 +49,9 @@ t.RichtextFacet_Tag.LexiconTypeID = "app.bsky.richtext.facet#tag" return json.Marshal(t.RichtextFacet_Tag) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *RichtextFacet_Features_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -88,7 +89,7 @@ if t.RichtextFacet_Tag != nil { return t.RichtextFacet_Tag.MarshalCBOR(w) } - return fmt.Errorf("cannot cbor marshal empty enum") + return fmt.Errorf("can not marshal empty union as CBOR") } func (t *RichtextFacet_Features_Elem) UnmarshalCBOR(r io.Reader) error { typ, b, err := util.CborTypeExtractReader(r) @@ -115,29 +116,23 @@ // RichtextFacet_Link is a "link" in the app.bsky.richtext.facet schema. // // Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. -// -// RECORDTYPE: RichtextFacet_Link type RichtextFacet_Link struct { - LexiconTypeID string `json:"$type,const=app.bsky.richtext.facet#link" cborgen:"$type,const=app.bsky.richtext.facet#link"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.richtext.facet#link"` Uri string `json:"uri" cborgen:"uri"` } // RichtextFacet_Mention is a "mention" in the app.bsky.richtext.facet schema. // // Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID. -// -// RECORDTYPE: RichtextFacet_Mention type RichtextFacet_Mention struct { - LexiconTypeID string `json:"$type,const=app.bsky.richtext.facet#mention" cborgen:"$type,const=app.bsky.richtext.facet#mention"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.richtext.facet#mention"` Did string `json:"did" cborgen:"did"` } // RichtextFacet_Tag is a "tag" in the app.bsky.richtext.facet schema. // // Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). -// -// RECORDTYPE: RichtextFacet_Tag type RichtextFacet_Tag struct { - LexiconTypeID string `json:"$type,const=app.bsky.richtext.facet#tag" cborgen:"$type,const=app.bsky.richtext.facet#tag"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.richtext.facet#tag"` Tag string `json:"tag" cborgen:"tag"` } diff --git a/api/bsky/unspecceddefs.go b/api/bsky/unspecceddefs.go --- a/api/bsky/unspecceddefs.go +++ b/api/bsky/unspecceddefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.defs -// schema: app.bsky.unspecced.defs +package bsky // UnspeccedDefs_AgeAssuranceEvent is a "ageAssuranceEvent" in the app.bsky.unspecced.defs schema. // @@ -64,32 +64,24 @@ } // UnspeccedDefs_ThreadItemBlocked is a "threadItemBlocked" in the app.bsky.unspecced.defs schema. -// -// RECORDTYPE: UnspeccedDefs_ThreadItemBlocked type UnspeccedDefs_ThreadItemBlocked struct { - LexiconTypeID string `json:"$type,const=app.bsky.unspecced.defs#threadItemBlocked" cborgen:"$type,const=app.bsky.unspecced.defs#threadItemBlocked"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.unspecced.defs#threadItemBlocked"` Author *FeedDefs_BlockedAuthor `json:"author" cborgen:"author"` } // UnspeccedDefs_ThreadItemNoUnauthenticated is a "threadItemNoUnauthenticated" in the app.bsky.unspecced.defs schema. -// -// RECORDTYPE: UnspeccedDefs_ThreadItemNoUnauthenticated type UnspeccedDefs_ThreadItemNoUnauthenticated struct { - LexiconTypeID string `json:"$type,const=app.bsky.unspecced.defs#threadItemNoUnauthenticated" cborgen:"$type,const=app.bsky.unspecced.defs#threadItemNoUnauthenticated"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.unspecced.defs#threadItemNoUnauthenticated"` } // UnspeccedDefs_ThreadItemNotFound is a "threadItemNotFound" in the app.bsky.unspecced.defs schema. -// -// RECORDTYPE: UnspeccedDefs_ThreadItemNotFound type UnspeccedDefs_ThreadItemNotFound struct { - LexiconTypeID string `json:"$type,const=app.bsky.unspecced.defs#threadItemNotFound" cborgen:"$type,const=app.bsky.unspecced.defs#threadItemNotFound"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.unspecced.defs#threadItemNotFound"` } // UnspeccedDefs_ThreadItemPost is a "threadItemPost" in the app.bsky.unspecced.defs schema. -// -// RECORDTYPE: UnspeccedDefs_ThreadItemPost type UnspeccedDefs_ThreadItemPost struct { - LexiconTypeID string `json:"$type,const=app.bsky.unspecced.defs#threadItemPost" cborgen:"$type,const=app.bsky.unspecced.defs#threadItemPost"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.unspecced.defs#threadItemPost"` // hiddenByThreadgate: The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread. HiddenByThreadgate bool `json:"hiddenByThreadgate" cborgen:"hiddenByThreadgate"` // moreParents: This post has more parents that were not present in the response. This is just a boolean, without the number of parents. diff --git a/api/bsky/unspeccedgetAgeAssuranceState.go b/api/bsky/unspeccedgetAgeAssuranceState.go --- a/api/bsky/unspeccedgetAgeAssuranceState.go +++ b/api/bsky/unspeccedgetAgeAssuranceState.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getAgeAssuranceState -// schema: app.bsky.unspecced.getAgeAssuranceState +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetConfig.go b/api/bsky/unspeccedgetConfig.go --- a/api/bsky/unspeccedgetConfig.go +++ b/api/bsky/unspeccedgetConfig.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getConfig -// schema: app.bsky.unspecced.getConfig +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetOnboardingSuggestedStarterPacks.go b/api/bsky/unspeccedgetOnboardingSuggestedStarterPacks.go --- a/api/bsky/unspeccedgetOnboardingSuggestedStarterPacks.go +++ b/api/bsky/unspeccedgetOnboardingSuggestedStarterPacks.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getOnboardingSuggestedStarterPacks -// schema: app.bsky.unspecced.getOnboardingSuggestedStarterPacks +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetOnboardingSuggestedStarterPacksSkeleton.go b/api/bsky/unspeccedgetOnboardingSuggestedStarterPacksSkeleton.go --- a/api/bsky/unspeccedgetOnboardingSuggestedStarterPacksSkeleton.go +++ b/api/bsky/unspeccedgetOnboardingSuggestedStarterPacksSkeleton.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton -// schema: app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetPopularFeedGenerators.go b/api/bsky/unspeccedgetPopularFeedGenerators.go --- a/api/bsky/unspeccedgetPopularFeedGenerators.go +++ b/api/bsky/unspeccedgetPopularFeedGenerators.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getPopularFeedGenerators -// schema: app.bsky.unspecced.getPopularFeedGenerators +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetPostThreadOtherV2.go b/api/bsky/unspeccedgetPostThreadOtherV2.go --- a/api/bsky/unspeccedgetPostThreadOtherV2.go +++ b/api/bsky/unspeccedgetPostThreadOtherV2.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getPostThreadOtherV2 -// schema: app.bsky.unspecced.getPostThreadOtherV2 +package bsky import ( "context" @@ -35,8 +35,9 @@ t.UnspeccedDefs_ThreadItemPost.LexiconTypeID = "app.bsky.unspecced.defs#threadItemPost" return json.Marshal(t.UnspeccedDefs_ThreadItemPost) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *UnspeccedGetPostThreadOtherV2_ThreadItem_Value) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/bsky/unspeccedgetPostThreadV2.go b/api/bsky/unspeccedgetPostThreadV2.go --- a/api/bsky/unspeccedgetPostThreadV2.go +++ b/api/bsky/unspeccedgetPostThreadV2.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getPostThreadV2 -// schema: app.bsky.unspecced.getPostThreadV2 +package bsky import ( "context" @@ -53,8 +53,9 @@ t.UnspeccedDefs_ThreadItemBlocked.LexiconTypeID = "app.bsky.unspecced.defs#threadItemBlocked" return json.Marshal(t.UnspeccedDefs_ThreadItemBlocked) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *UnspeccedGetPostThreadV2_ThreadItem_Value) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/bsky/unspeccedgetSuggestedFeeds.go b/api/bsky/unspeccedgetSuggestedFeeds.go --- a/api/bsky/unspeccedgetSuggestedFeeds.go +++ b/api/bsky/unspeccedgetSuggestedFeeds.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getSuggestedFeeds -// schema: app.bsky.unspecced.getSuggestedFeeds +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetSuggestedFeedsSkeleton.go b/api/bsky/unspeccedgetSuggestedFeedsSkeleton.go --- a/api/bsky/unspeccedgetSuggestedFeedsSkeleton.go +++ b/api/bsky/unspeccedgetSuggestedFeedsSkeleton.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getSuggestedFeedsSkeleton -// schema: app.bsky.unspecced.getSuggestedFeedsSkeleton +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetSuggestedStarterPacks.go b/api/bsky/unspeccedgetSuggestedStarterPacks.go --- a/api/bsky/unspeccedgetSuggestedStarterPacks.go +++ b/api/bsky/unspeccedgetSuggestedStarterPacks.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getSuggestedStarterPacks -// schema: app.bsky.unspecced.getSuggestedStarterPacks +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go b/api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go --- a/api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go +++ b/api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getSuggestedStarterPacksSkeleton -// schema: app.bsky.unspecced.getSuggestedStarterPacksSkeleton +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetSuggestedUsers.go b/api/bsky/unspeccedgetSuggestedUsers.go --- a/api/bsky/unspeccedgetSuggestedUsers.go +++ b/api/bsky/unspeccedgetSuggestedUsers.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getSuggestedUsers -// schema: app.bsky.unspecced.getSuggestedUsers +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetSuggestedUsersSkeleton.go b/api/bsky/unspeccedgetSuggestedUsersSkeleton.go --- a/api/bsky/unspeccedgetSuggestedUsersSkeleton.go +++ b/api/bsky/unspeccedgetSuggestedUsersSkeleton.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getSuggestedUsersSkeleton -// schema: app.bsky.unspecced.getSuggestedUsersSkeleton +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetSuggestionsSkeleton.go b/api/bsky/unspeccedgetSuggestionsSkeleton.go --- a/api/bsky/unspeccedgetSuggestionsSkeleton.go +++ b/api/bsky/unspeccedgetSuggestionsSkeleton.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getSuggestionsSkeleton -// schema: app.bsky.unspecced.getSuggestionsSkeleton +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetTaggedSuggestions.go b/api/bsky/unspeccedgetTaggedSuggestions.go --- a/api/bsky/unspeccedgetTaggedSuggestions.go +++ b/api/bsky/unspeccedgetTaggedSuggestions.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getTaggedSuggestions -// schema: app.bsky.unspecced.getTaggedSuggestions +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetTrendingTopics.go b/api/bsky/unspeccedgetTrendingTopics.go --- a/api/bsky/unspeccedgetTrendingTopics.go +++ b/api/bsky/unspeccedgetTrendingTopics.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getTrendingTopics -// schema: app.bsky.unspecced.getTrendingTopics +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetTrends.go b/api/bsky/unspeccedgetTrends.go --- a/api/bsky/unspeccedgetTrends.go +++ b/api/bsky/unspeccedgetTrends.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getTrends -// schema: app.bsky.unspecced.getTrends +package bsky import ( "context" diff --git a/api/bsky/unspeccedgetTrendsSkeleton.go b/api/bsky/unspeccedgetTrendsSkeleton.go --- a/api/bsky/unspeccedgetTrendsSkeleton.go +++ b/api/bsky/unspeccedgetTrendsSkeleton.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.getTrendsSkeleton -// schema: app.bsky.unspecced.getTrendsSkeleton +package bsky import ( "context" diff --git a/api/bsky/unspeccedinitAgeAssurance.go b/api/bsky/unspeccedinitAgeAssurance.go --- a/api/bsky/unspeccedinitAgeAssurance.go +++ b/api/bsky/unspeccedinitAgeAssurance.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.initAgeAssurance -// schema: app.bsky.unspecced.initAgeAssurance +package bsky import ( "context" diff --git a/api/bsky/unspeccedsearchActorsSkeleton.go b/api/bsky/unspeccedsearchActorsSkeleton.go --- a/api/bsky/unspeccedsearchActorsSkeleton.go +++ b/api/bsky/unspeccedsearchActorsSkeleton.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.searchActorsSkeleton -// schema: app.bsky.unspecced.searchActorsSkeleton +package bsky import ( "context" diff --git a/api/bsky/unspeccedsearchPostsSkeleton.go b/api/bsky/unspeccedsearchPostsSkeleton.go --- a/api/bsky/unspeccedsearchPostsSkeleton.go +++ b/api/bsky/unspeccedsearchPostsSkeleton.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.searchPostsSkeleton -// schema: app.bsky.unspecced.searchPostsSkeleton +package bsky import ( "context" diff --git a/api/bsky/unspeccedsearchStarterPacksSkeleton.go b/api/bsky/unspeccedsearchStarterPacksSkeleton.go --- a/api/bsky/unspeccedsearchStarterPacksSkeleton.go +++ b/api/bsky/unspeccedsearchStarterPacksSkeleton.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.unspecced.searchStarterPacksSkeleton -// schema: app.bsky.unspecced.searchStarterPacksSkeleton +package bsky import ( "context" diff --git a/api/bsky/videodefs.go b/api/bsky/videodefs.go --- a/api/bsky/videodefs.go +++ b/api/bsky/videodefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.video.defs -// schema: app.bsky.video.defs +package bsky import ( "github.com/bluesky-social/indigo/lex/util" diff --git a/api/bsky/videogetJobStatus.go b/api/bsky/videogetJobStatus.go --- a/api/bsky/videogetJobStatus.go +++ b/api/bsky/videogetJobStatus.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.video.getJobStatus -// schema: app.bsky.video.getJobStatus +package bsky import ( "context" diff --git a/api/bsky/videogetUploadLimits.go b/api/bsky/videogetUploadLimits.go --- a/api/bsky/videogetUploadLimits.go +++ b/api/bsky/videogetUploadLimits.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.video.getUploadLimits -// schema: app.bsky.video.getUploadLimits +package bsky import ( "context" diff --git a/api/bsky/videouploadVideo.go b/api/bsky/videouploadVideo.go --- a/api/bsky/videouploadVideo.go +++ b/api/bsky/videouploadVideo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package bsky +// Lexicon schema: app.bsky.video.uploadVideo -// schema: app.bsky.video.uploadVideo +package bsky import ( "context" diff --git a/api/chat/actordeclaration.go b/api/chat/actordeclaration.go --- a/api/chat/actordeclaration.go +++ b/api/chat/actordeclaration.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.actor.declaration -// schema: chat.bsky.actor.declaration +package chat import ( "github.com/bluesky-social/indigo/lex/util" @@ -10,9 +10,9 @@ func init() { util.RegisterType("chat.bsky.actor.declaration", &ActorDeclaration{}) -} // -// RECORDTYPE: ActorDeclaration +} + type ActorDeclaration struct { - LexiconTypeID string `json:"$type,const=chat.bsky.actor.declaration" cborgen:"$type,const=chat.bsky.actor.declaration"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.actor.declaration"` AllowIncoming string `json:"allowIncoming" cborgen:"allowIncoming"` } diff --git a/api/chat/actordefs.go b/api/chat/actordefs.go --- a/api/chat/actordefs.go +++ b/api/chat/actordefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.actor.defs -// schema: chat.bsky.actor.defs +package chat import ( comatprototypes "github.com/bluesky-social/indigo/api/atproto" diff --git a/api/chat/actordeleteAccount.go b/api/chat/actordeleteAccount.go --- a/api/chat/actordeleteAccount.go +++ b/api/chat/actordeleteAccount.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.actor.deleteAccount -// schema: chat.bsky.actor.deleteAccount +package chat import ( "context" diff --git a/api/chat/actorexportAccountData.go b/api/chat/actorexportAccountData.go --- a/api/chat/actorexportAccountData.go +++ b/api/chat/actorexportAccountData.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.actor.exportAccountData -// schema: chat.bsky.actor.exportAccountData +package chat import ( "bytes" diff --git a/api/chat/convoacceptConvo.go b/api/chat/convoacceptConvo.go --- a/api/chat/convoacceptConvo.go +++ b/api/chat/convoacceptConvo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.acceptConvo -// schema: chat.bsky.convo.acceptConvo +package chat import ( "context" diff --git a/api/chat/convoaddReaction.go b/api/chat/convoaddReaction.go --- a/api/chat/convoaddReaction.go +++ b/api/chat/convoaddReaction.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.addReaction -// schema: chat.bsky.convo.addReaction +package chat import ( "context" diff --git a/api/chat/convodefs.go b/api/chat/convodefs.go --- a/api/chat/convodefs.go +++ b/api/chat/convodefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.defs -// schema: chat.bsky.convo.defs +package chat import ( "encoding/json" @@ -38,8 +38,9 @@ t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" return json.Marshal(t.ConvoDefs_DeletedMessageView) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ConvoDefs_ConvoView_LastMessage) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -68,8 +69,9 @@ t.ConvoDefs_MessageAndReactionView.LexiconTypeID = "chat.bsky.convo.defs#messageAndReactionView" return json.Marshal(t.ConvoDefs_MessageAndReactionView) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ConvoDefs_ConvoView_LastReaction) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -87,10 +89,8 @@ } // ConvoDefs_DeletedMessageView is a "deletedMessageView" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_DeletedMessageView type ConvoDefs_DeletedMessageView struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#deletedMessageView" cborgen:"$type,const=chat.bsky.convo.defs#deletedMessageView"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#deletedMessageView"` Id string `json:"id" cborgen:"id"` Rev string `json:"rev" cborgen:"rev"` Sender *ConvoDefs_MessageViewSender `json:"sender" cborgen:"sender"` @@ -98,19 +98,15 @@ } // ConvoDefs_LogAcceptConvo is a "logAcceptConvo" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_LogAcceptConvo type ConvoDefs_LogAcceptConvo struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logAcceptConvo" cborgen:"$type,const=chat.bsky.convo.defs#logAcceptConvo"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logAcceptConvo"` ConvoId string `json:"convoId" cborgen:"convoId"` Rev string `json:"rev" cborgen:"rev"` } // ConvoDefs_LogAddReaction is a "logAddReaction" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_LogAddReaction type ConvoDefs_LogAddReaction struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logAddReaction" cborgen:"$type,const=chat.bsky.convo.defs#logAddReaction"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logAddReaction"` ConvoId string `json:"convoId" cborgen:"convoId"` Message *ConvoDefs_LogAddReaction_Message `json:"message" cborgen:"message"` Reaction *ConvoDefs_ReactionView `json:"reaction" cborgen:"reaction"` @@ -131,8 +127,9 @@ t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" return json.Marshal(t.ConvoDefs_DeletedMessageView) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ConvoDefs_LogAddReaction_Message) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -153,19 +150,15 @@ } // ConvoDefs_LogBeginConvo is a "logBeginConvo" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_LogBeginConvo type ConvoDefs_LogBeginConvo struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logBeginConvo" cborgen:"$type,const=chat.bsky.convo.defs#logBeginConvo"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logBeginConvo"` ConvoId string `json:"convoId" cborgen:"convoId"` Rev string `json:"rev" cborgen:"rev"` } // ConvoDefs_LogCreateMessage is a "logCreateMessage" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_LogCreateMessage type ConvoDefs_LogCreateMessage struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logCreateMessage" cborgen:"$type,const=chat.bsky.convo.defs#logCreateMessage"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logCreateMessage"` ConvoId string `json:"convoId" cborgen:"convoId"` Message *ConvoDefs_LogCreateMessage_Message `json:"message" cborgen:"message"` Rev string `json:"rev" cborgen:"rev"` @@ -185,8 +178,9 @@ t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" return json.Marshal(t.ConvoDefs_DeletedMessageView) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ConvoDefs_LogCreateMessage_Message) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -207,10 +201,8 @@ } // ConvoDefs_LogDeleteMessage is a "logDeleteMessage" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_LogDeleteMessage type ConvoDefs_LogDeleteMessage struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logDeleteMessage" cborgen:"$type,const=chat.bsky.convo.defs#logDeleteMessage"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logDeleteMessage"` ConvoId string `json:"convoId" cborgen:"convoId"` Message *ConvoDefs_LogDeleteMessage_Message `json:"message" cborgen:"message"` Rev string `json:"rev" cborgen:"rev"` @@ -230,8 +222,9 @@ t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" return json.Marshal(t.ConvoDefs_DeletedMessageView) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ConvoDefs_LogDeleteMessage_Message) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -252,28 +245,22 @@ } // ConvoDefs_LogLeaveConvo is a "logLeaveConvo" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_LogLeaveConvo type ConvoDefs_LogLeaveConvo struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logLeaveConvo" cborgen:"$type,const=chat.bsky.convo.defs#logLeaveConvo"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logLeaveConvo"` ConvoId string `json:"convoId" cborgen:"convoId"` Rev string `json:"rev" cborgen:"rev"` } // ConvoDefs_LogMuteConvo is a "logMuteConvo" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_LogMuteConvo type ConvoDefs_LogMuteConvo struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logMuteConvo" cborgen:"$type,const=chat.bsky.convo.defs#logMuteConvo"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logMuteConvo"` ConvoId string `json:"convoId" cborgen:"convoId"` Rev string `json:"rev" cborgen:"rev"` } // ConvoDefs_LogReadMessage is a "logReadMessage" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_LogReadMessage type ConvoDefs_LogReadMessage struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logReadMessage" cborgen:"$type,const=chat.bsky.convo.defs#logReadMessage"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logReadMessage"` ConvoId string `json:"convoId" cborgen:"convoId"` Message *ConvoDefs_LogReadMessage_Message `json:"message" cborgen:"message"` Rev string `json:"rev" cborgen:"rev"` @@ -293,8 +280,9 @@ t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" return json.Marshal(t.ConvoDefs_DeletedMessageView) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ConvoDefs_LogReadMessage_Message) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -315,10 +303,8 @@ } // ConvoDefs_LogRemoveReaction is a "logRemoveReaction" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_LogRemoveReaction type ConvoDefs_LogRemoveReaction struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logRemoveReaction" cborgen:"$type,const=chat.bsky.convo.defs#logRemoveReaction"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logRemoveReaction"` ConvoId string `json:"convoId" cborgen:"convoId"` Message *ConvoDefs_LogRemoveReaction_Message `json:"message" cborgen:"message"` Reaction *ConvoDefs_ReactionView `json:"reaction" cborgen:"reaction"` @@ -339,8 +325,9 @@ t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" return json.Marshal(t.ConvoDefs_DeletedMessageView) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ConvoDefs_LogRemoveReaction_Message) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -361,19 +348,15 @@ } // ConvoDefs_LogUnmuteConvo is a "logUnmuteConvo" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_LogUnmuteConvo type ConvoDefs_LogUnmuteConvo struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logUnmuteConvo" cborgen:"$type,const=chat.bsky.convo.defs#logUnmuteConvo"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logUnmuteConvo"` ConvoId string `json:"convoId" cborgen:"convoId"` Rev string `json:"rev" cborgen:"rev"` } // ConvoDefs_MessageAndReactionView is a "messageAndReactionView" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_MessageAndReactionView type ConvoDefs_MessageAndReactionView struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#messageAndReactionView" cborgen:"$type,const=chat.bsky.convo.defs#messageAndReactionView"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#messageAndReactionView"` Message *ConvoDefs_MessageView `json:"message" cborgen:"message"` Reaction *ConvoDefs_ReactionView `json:"reaction" cborgen:"reaction"` } @@ -395,8 +378,9 @@ t.EmbedRecord.LexiconTypeID = "app.bsky.embed.record" return json.Marshal(t.EmbedRecord) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ConvoDefs_MessageInput_Embed) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -414,20 +398,16 @@ } // ConvoDefs_MessageRef is a "messageRef" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_MessageRef type ConvoDefs_MessageRef struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#messageRef" cborgen:"$type,const=chat.bsky.convo.defs#messageRef"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#messageRef"` ConvoId string `json:"convoId" cborgen:"convoId"` Did string `json:"did" cborgen:"did"` MessageId string `json:"messageId" cborgen:"messageId"` } // ConvoDefs_MessageView is a "messageView" in the chat.bsky.convo.defs schema. -// -// RECORDTYPE: ConvoDefs_MessageView type ConvoDefs_MessageView struct { - LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#messageView" cborgen:"$type,const=chat.bsky.convo.defs#messageView"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#messageView"` Embed *ConvoDefs_MessageView_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` // facets: Annotations of text (mentions, URLs, hashtags, etc) Facets []*appbskytypes.RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"` @@ -454,8 +434,9 @@ t.EmbedRecord_View.LexiconTypeID = "app.bsky.embed.record#view" return json.Marshal(t.EmbedRecord_View) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ConvoDefs_MessageView_Embed) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/chat/convodeleteMessageForSelf.go b/api/chat/convodeleteMessageForSelf.go --- a/api/chat/convodeleteMessageForSelf.go +++ b/api/chat/convodeleteMessageForSelf.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.deleteMessageForSelf -// schema: chat.bsky.convo.deleteMessageForSelf +package chat import ( "context" diff --git a/api/chat/convogetConvo.go b/api/chat/convogetConvo.go --- a/api/chat/convogetConvo.go +++ b/api/chat/convogetConvo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.getConvo -// schema: chat.bsky.convo.getConvo +package chat import ( "context" diff --git a/api/chat/convogetConvoAvailability.go b/api/chat/convogetConvoAvailability.go --- a/api/chat/convogetConvoAvailability.go +++ b/api/chat/convogetConvoAvailability.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.getConvoAvailability -// schema: chat.bsky.convo.getConvoAvailability +package chat import ( "context" diff --git a/api/chat/convogetConvoForMembers.go b/api/chat/convogetConvoForMembers.go --- a/api/chat/convogetConvoForMembers.go +++ b/api/chat/convogetConvoForMembers.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.getConvoForMembers -// schema: chat.bsky.convo.getConvoForMembers +package chat import ( "context" diff --git a/api/chat/convogetLog.go b/api/chat/convogetLog.go --- a/api/chat/convogetLog.go +++ b/api/chat/convogetLog.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.getLog -// schema: chat.bsky.convo.getLog +package chat import ( "context" @@ -72,8 +72,9 @@ t.ConvoDefs_LogRemoveReaction.LexiconTypeID = "chat.bsky.convo.defs#logRemoveReaction" return json.Marshal(t.ConvoDefs_LogRemoveReaction) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ConvoGetLog_Output_Logs_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/chat/convogetMessages.go b/api/chat/convogetMessages.go --- a/api/chat/convogetMessages.go +++ b/api/chat/convogetMessages.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.getMessages -// schema: chat.bsky.convo.getMessages +package chat import ( "context" @@ -32,8 +32,9 @@ t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" return json.Marshal(t.ConvoDefs_DeletedMessageView) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ConvoGetMessages_Output_Messages_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/chat/convoleaveConvo.go b/api/chat/convoleaveConvo.go --- a/api/chat/convoleaveConvo.go +++ b/api/chat/convoleaveConvo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.leaveConvo -// schema: chat.bsky.convo.leaveConvo +package chat import ( "context" diff --git a/api/chat/convolistConvos.go b/api/chat/convolistConvos.go --- a/api/chat/convolistConvos.go +++ b/api/chat/convolistConvos.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.listConvos -// schema: chat.bsky.convo.listConvos +package chat import ( "context" diff --git a/api/chat/convomuteConvo.go b/api/chat/convomuteConvo.go --- a/api/chat/convomuteConvo.go +++ b/api/chat/convomuteConvo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.muteConvo -// schema: chat.bsky.convo.muteConvo +package chat import ( "context" diff --git a/api/chat/convoremoveReaction.go b/api/chat/convoremoveReaction.go --- a/api/chat/convoremoveReaction.go +++ b/api/chat/convoremoveReaction.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.removeReaction -// schema: chat.bsky.convo.removeReaction +package chat import ( "context" diff --git a/api/chat/convosendMessage.go b/api/chat/convosendMessage.go --- a/api/chat/convosendMessage.go +++ b/api/chat/convosendMessage.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.sendMessage -// schema: chat.bsky.convo.sendMessage +package chat import ( "context" diff --git a/api/chat/convosendMessageBatch.go b/api/chat/convosendMessageBatch.go --- a/api/chat/convosendMessageBatch.go +++ b/api/chat/convosendMessageBatch.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.sendMessageBatch -// schema: chat.bsky.convo.sendMessageBatch +package chat import ( "context" diff --git a/api/chat/convounmuteConvo.go b/api/chat/convounmuteConvo.go --- a/api/chat/convounmuteConvo.go +++ b/api/chat/convounmuteConvo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.unmuteConvo -// schema: chat.bsky.convo.unmuteConvo +package chat import ( "context" diff --git a/api/chat/convoupdateAllRead.go b/api/chat/convoupdateAllRead.go --- a/api/chat/convoupdateAllRead.go +++ b/api/chat/convoupdateAllRead.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.updateAllRead -// schema: chat.bsky.convo.updateAllRead +package chat import ( "context" diff --git a/api/chat/convoupdateRead.go b/api/chat/convoupdateRead.go --- a/api/chat/convoupdateRead.go +++ b/api/chat/convoupdateRead.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.convo.updateRead -// schema: chat.bsky.convo.updateRead +package chat import ( "context" diff --git a/api/chat/moderationgetActorMetadata.go b/api/chat/moderationgetActorMetadata.go --- a/api/chat/moderationgetActorMetadata.go +++ b/api/chat/moderationgetActorMetadata.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.moderation.getActorMetadata -// schema: chat.bsky.moderation.getActorMetadata +package chat import ( "context" diff --git a/api/chat/moderationgetMessageContext.go b/api/chat/moderationgetMessageContext.go --- a/api/chat/moderationgetMessageContext.go +++ b/api/chat/moderationgetMessageContext.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.moderation.getMessageContext -// schema: chat.bsky.moderation.getMessageContext +package chat import ( "context" @@ -31,8 +31,9 @@ t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" return json.Marshal(t.ConvoDefs_DeletedMessageView) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationGetMessageContext_Output_Messages_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/chat/moderationupdateActorAccess.go b/api/chat/moderationupdateActorAccess.go --- a/api/chat/moderationupdateActorAccess.go +++ b/api/chat/moderationupdateActorAccess.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package chat +// Lexicon schema: chat.bsky.moderation.updateActorAccess -// schema: chat.bsky.moderation.updateActorAccess +package chat import ( "context" diff --git a/api/ozone/communicationcreateTemplate.go b/api/ozone/communicationcreateTemplate.go --- a/api/ozone/communicationcreateTemplate.go +++ b/api/ozone/communicationcreateTemplate.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.communication.createTemplate -// schema: tools.ozone.communication.createTemplate +package ozone import ( "context" diff --git a/api/ozone/communicationdefs.go b/api/ozone/communicationdefs.go --- a/api/ozone/communicationdefs.go +++ b/api/ozone/communicationdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.communication.defs -// schema: tools.ozone.communication.defs +package ozone // CommunicationDefs_TemplateView is a "templateView" in the tools.ozone.communication.defs schema. type CommunicationDefs_TemplateView struct { diff --git a/api/ozone/communicationdeleteTemplate.go b/api/ozone/communicationdeleteTemplate.go --- a/api/ozone/communicationdeleteTemplate.go +++ b/api/ozone/communicationdeleteTemplate.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.communication.deleteTemplate -// schema: tools.ozone.communication.deleteTemplate +package ozone import ( "context" diff --git a/api/ozone/communicationlistTemplates.go b/api/ozone/communicationlistTemplates.go --- a/api/ozone/communicationlistTemplates.go +++ b/api/ozone/communicationlistTemplates.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.communication.listTemplates -// schema: tools.ozone.communication.listTemplates +package ozone import ( "context" diff --git a/api/ozone/communicationupdateTemplate.go b/api/ozone/communicationupdateTemplate.go --- a/api/ozone/communicationupdateTemplate.go +++ b/api/ozone/communicationupdateTemplate.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.communication.updateTemplate -// schema: tools.ozone.communication.updateTemplate +package ozone import ( "context" diff --git a/api/ozone/hostinggetAccountHistory.go b/api/ozone/hostinggetAccountHistory.go --- a/api/ozone/hostinggetAccountHistory.go +++ b/api/ozone/hostinggetAccountHistory.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.hosting.getAccountHistory -// schema: tools.ozone.hosting.getAccountHistory +package ozone import ( "context" @@ -13,27 +13,21 @@ ) // HostingGetAccountHistory_AccountCreated is a "accountCreated" in the tools.ozone.hosting.getAccountHistory schema. -// -// RECORDTYPE: HostingGetAccountHistory_AccountCreated type HostingGetAccountHistory_AccountCreated struct { - LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#accountCreated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#accountCreated"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#accountCreated"` Email *string `json:"email,omitempty" cborgen:"email,omitempty"` Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"` } // HostingGetAccountHistory_EmailConfirmed is a "emailConfirmed" in the tools.ozone.hosting.getAccountHistory schema. -// -// RECORDTYPE: HostingGetAccountHistory_EmailConfirmed type HostingGetAccountHistory_EmailConfirmed struct { - LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#emailConfirmed" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#emailConfirmed"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#emailConfirmed"` Email string `json:"email" cborgen:"email"` } // HostingGetAccountHistory_EmailUpdated is a "emailUpdated" in the tools.ozone.hosting.getAccountHistory schema. -// -// RECORDTYPE: HostingGetAccountHistory_EmailUpdated type HostingGetAccountHistory_EmailUpdated struct { - LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#emailUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#emailUpdated"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#emailUpdated"` Email string `json:"email" cborgen:"email"` } @@ -73,8 +67,9 @@ t.HostingGetAccountHistory_HandleUpdated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#handleUpdated" return json.Marshal(t.HostingGetAccountHistory_HandleUpdated) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *HostingGetAccountHistory_Event_Details) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -104,10 +99,8 @@ } // HostingGetAccountHistory_HandleUpdated is a "handleUpdated" in the tools.ozone.hosting.getAccountHistory schema. -// -// RECORDTYPE: HostingGetAccountHistory_HandleUpdated type HostingGetAccountHistory_HandleUpdated struct { - LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#handleUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#handleUpdated"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#handleUpdated"` Handle string `json:"handle" cborgen:"handle"` } @@ -118,10 +111,8 @@ } // HostingGetAccountHistory_PasswordUpdated is a "passwordUpdated" in the tools.ozone.hosting.getAccountHistory schema. -// -// RECORDTYPE: HostingGetAccountHistory_PasswordUpdated type HostingGetAccountHistory_PasswordUpdated struct { - LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#passwordUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#passwordUpdated"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#passwordUpdated"` } // HostingGetAccountHistory calls the XRPC method "tools.ozone.hosting.getAccountHistory". diff --git a/api/ozone/moderationcancelScheduledActions.go b/api/ozone/moderationcancelScheduledActions.go --- a/api/ozone/moderationcancelScheduledActions.go +++ b/api/ozone/moderationcancelScheduledActions.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.cancelScheduledActions -// schema: tools.ozone.moderation.cancelScheduledActions +package ozone import ( "context" diff --git a/api/ozone/moderationdefs.go b/api/ozone/moderationdefs.go --- a/api/ozone/moderationdefs.go +++ b/api/ozone/moderationdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.defs -// schema: tools.ozone.moderation.defs +package ozone import ( "encoding/json" @@ -16,10 +16,8 @@ // ModerationDefs_AccountEvent is a "accountEvent" in the tools.ozone.moderation.defs schema. // // Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. -// -// RECORDTYPE: ModerationDefs_AccountEvent type ModerationDefs_AccountEvent struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#accountEvent" cborgen:"$type,const=tools.ozone.moderation.defs#accountEvent"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#accountEvent"` // active: Indicates that the account has a repository which can be fetched from the host that emitted this event. Active bool `json:"active" cborgen:"active"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` @@ -28,10 +26,8 @@ } // ModerationDefs_AccountHosting is a "accountHosting" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_AccountHosting type ModerationDefs_AccountHosting struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#accountHosting" cborgen:"$type,const=tools.ozone.moderation.defs#accountHosting"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#accountHosting"` CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` DeletedAt *string `json:"deletedAt,omitempty" cborgen:"deletedAt,omitempty"` @@ -59,10 +55,8 @@ // ModerationDefs_AgeAssuranceEvent is a "ageAssuranceEvent" in the tools.ozone.moderation.defs schema. // // Age assurance info coming directly from users. Only works on DID subjects. -// -// RECORDTYPE: ModerationDefs_AgeAssuranceEvent type ModerationDefs_AgeAssuranceEvent struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#ageAssuranceEvent" cborgen:"$type,const=tools.ozone.moderation.defs#ageAssuranceEvent"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#ageAssuranceEvent"` // attemptId: The unique identifier for this instance of the age assurance flow, in UUID format. AttemptId string `json:"attemptId" cborgen:"attemptId"` // completeIp: The IP address used when completing the AA flow. @@ -82,10 +76,8 @@ // ModerationDefs_AgeAssuranceOverrideEvent is a "ageAssuranceOverrideEvent" in the tools.ozone.moderation.defs schema. // // Age assurance status override by moderators. Only works on DID subjects. -// -// RECORDTYPE: ModerationDefs_AgeAssuranceOverrideEvent type ModerationDefs_AgeAssuranceOverrideEvent struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#ageAssuranceOverrideEvent" cborgen:"$type,const=tools.ozone.moderation.defs#ageAssuranceOverrideEvent"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#ageAssuranceOverrideEvent"` // comment: Comment describing the reason for the override. Comment string `json:"comment" cborgen:"comment"` // status: The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state. @@ -116,8 +108,9 @@ t.ModerationDefs_VideoDetails.LexiconTypeID = "tools.ozone.moderation.defs#videoDetails" return json.Marshal(t.ModerationDefs_VideoDetails) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationDefs_BlobView_Details) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -140,20 +133,16 @@ // ModerationDefs_CancelScheduledTakedownEvent is a "cancelScheduledTakedownEvent" in the tools.ozone.moderation.defs schema. // // Logs cancellation of a scheduled takedown action for an account. -// -// RECORDTYPE: ModerationDefs_CancelScheduledTakedownEvent type ModerationDefs_CancelScheduledTakedownEvent struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#cancelScheduledTakedownEvent" cborgen:"$type,const=tools.ozone.moderation.defs#cancelScheduledTakedownEvent"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#cancelScheduledTakedownEvent"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_IdentityEvent is a "identityEvent" in the tools.ozone.moderation.defs schema. // // Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. -// -// RECORDTYPE: ModerationDefs_IdentityEvent type ModerationDefs_IdentityEvent struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#identityEvent" cborgen:"$type,const=tools.ozone.moderation.defs#identityEvent"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#identityEvent"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"` PdsHost *string `json:"pdsHost,omitempty" cborgen:"pdsHost,omitempty"` @@ -162,19 +151,15 @@ } // ModerationDefs_ImageDetails is a "imageDetails" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_ImageDetails type ModerationDefs_ImageDetails struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#imageDetails" cborgen:"$type,const=tools.ozone.moderation.defs#imageDetails"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#imageDetails"` Height int64 `json:"height" cborgen:"height"` Width int64 `json:"width" cborgen:"width"` } // ModerationDefs_ModEventAcknowledge is a "modEventAcknowledge" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_ModEventAcknowledge type ModerationDefs_ModEventAcknowledge struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge" cborgen:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge"` // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged). AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` @@ -183,10 +168,8 @@ // ModerationDefs_ModEventComment is a "modEventComment" in the tools.ozone.moderation.defs schema. // // Add a comment to a subject. An empty comment will clear any previously set sticky comment. -// -// RECORDTYPE: ModerationDefs_ModEventComment type ModerationDefs_ModEventComment struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventComment" cborgen:"$type,const=tools.ozone.moderation.defs#modEventComment"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventComment"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // sticky: Make the comment persistent on the subject Sticky *bool `json:"sticky,omitempty" cborgen:"sticky,omitempty"` @@ -195,20 +178,16 @@ // ModerationDefs_ModEventDivert is a "modEventDivert" in the tools.ozone.moderation.defs schema. // // Divert a record's blobs to a 3rd party service for further scanning/tagging -// -// RECORDTYPE: ModerationDefs_ModEventDivert type ModerationDefs_ModEventDivert struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventDivert" cborgen:"$type,const=tools.ozone.moderation.defs#modEventDivert"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventDivert"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_ModEventEmail is a "modEventEmail" in the tools.ozone.moderation.defs schema. // -// # Keep a log of outgoing email to a user -// -// RECORDTYPE: ModerationDefs_ModEventEmail +// Keep a log of outgoing email to a user type ModerationDefs_ModEventEmail struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventEmail" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEmail"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEmail"` // comment: Additional comment about the outgoing comm. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // content: The content of the email sent to the user. @@ -218,20 +197,16 @@ } // ModerationDefs_ModEventEscalate is a "modEventEscalate" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_ModEventEscalate type ModerationDefs_ModEventEscalate struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventEscalate" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEscalate"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEscalate"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_ModEventLabel is a "modEventLabel" in the tools.ozone.moderation.defs schema. // // Apply/Negate labels on a subject -// -// RECORDTYPE: ModerationDefs_ModEventLabel type ModerationDefs_ModEventLabel struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventLabel" cborgen:"$type,const=tools.ozone.moderation.defs#modEventLabel"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventLabel"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` CreateLabelVals []string `json:"createLabelVals" cborgen:"createLabelVals"` // durationInHours: Indicates how long the label will remain on the subject. Only applies on labels that are being added. @@ -241,11 +216,9 @@ // ModerationDefs_ModEventMute is a "modEventMute" in the tools.ozone.moderation.defs schema. // -// # Mute incoming reports on a subject -// -// RECORDTYPE: ModerationDefs_ModEventMute +// Mute incoming reports on a subject type ModerationDefs_ModEventMute struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventMute" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMute"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMute"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // durationInHours: Indicates how long the subject should remain muted. DurationInHours int64 `json:"durationInHours" cborgen:"durationInHours"` @@ -253,11 +226,9 @@ // ModerationDefs_ModEventMuteReporter is a "modEventMuteReporter" in the tools.ozone.moderation.defs schema. // -// # Mute incoming reports from an account -// -// RECORDTYPE: ModerationDefs_ModEventMuteReporter +// Mute incoming reports from an account type ModerationDefs_ModEventMuteReporter struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventMuteReporter" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMuteReporter"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMuteReporter"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // durationInHours: Indicates how long the account should remain muted. Falsy value here means a permanent mute. DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` @@ -266,21 +237,17 @@ // ModerationDefs_ModEventPriorityScore is a "modEventPriorityScore" in the tools.ozone.moderation.defs schema. // // Set priority score of the subject. Higher score means higher priority. -// -// RECORDTYPE: ModerationDefs_ModEventPriorityScore type ModerationDefs_ModEventPriorityScore struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventPriorityScore" cborgen:"$type,const=tools.ozone.moderation.defs#modEventPriorityScore"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventPriorityScore"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` Score int64 `json:"score" cborgen:"score"` } // ModerationDefs_ModEventReport is a "modEventReport" in the tools.ozone.moderation.defs schema. // -// # Report a subject -// -// RECORDTYPE: ModerationDefs_ModEventReport +// Report a subject type ModerationDefs_ModEventReport struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventReport" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReport"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReport"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // isReporterMuted: Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject. IsReporterMuted *bool `json:"isReporterMuted,omitempty" cborgen:"isReporterMuted,omitempty"` @@ -289,22 +256,18 @@ // ModerationDefs_ModEventResolveAppeal is a "modEventResolveAppeal" in the tools.ozone.moderation.defs schema. // -// # Resolve appeal on a subject -// -// RECORDTYPE: ModerationDefs_ModEventResolveAppeal +// Resolve appeal on a subject type ModerationDefs_ModEventResolveAppeal struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal" cborgen:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal"` // comment: Describe resolution. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_ModEventReverseTakedown is a "modEventReverseTakedown" in the tools.ozone.moderation.defs schema. // -// # Revert take down action on a subject -// -// RECORDTYPE: ModerationDefs_ModEventReverseTakedown +// Revert take down action on a subject type ModerationDefs_ModEventReverseTakedown struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown"` // comment: Describe reasoning behind the reversal. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } @@ -312,10 +275,8 @@ // ModerationDefs_ModEventTag is a "modEventTag" in the tools.ozone.moderation.defs schema. // // Add/Remove a tag on a subject -// -// RECORDTYPE: ModerationDefs_ModEventTag type ModerationDefs_ModEventTag struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventTag" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTag"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTag"` // add: Tags to be added to the subject. If already exists, won't be duplicated. Add []string `json:"add" cborgen:"add"` // comment: Additional comment about added/removed tags. @@ -326,11 +287,9 @@ // ModerationDefs_ModEventTakedown is a "modEventTakedown" in the tools.ozone.moderation.defs schema. // -// # Take down a subject permanently or temporarily -// -// RECORDTYPE: ModerationDefs_ModEventTakedown +// Take down a subject permanently or temporarily type ModerationDefs_ModEventTakedown struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventTakedown" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTakedown"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTakedown"` // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged). AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` @@ -342,22 +301,18 @@ // ModerationDefs_ModEventUnmute is a "modEventUnmute" in the tools.ozone.moderation.defs schema. // -// # Unmute action on a subject -// -// RECORDTYPE: ModerationDefs_ModEventUnmute +// Unmute action on a subject type ModerationDefs_ModEventUnmute struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventUnmute" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmute"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmute"` // comment: Describe reasoning behind the reversal. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_ModEventUnmuteReporter is a "modEventUnmuteReporter" in the tools.ozone.moderation.defs schema. // -// # Unmute incoming reports from an account -// -// RECORDTYPE: ModerationDefs_ModEventUnmuteReporter +// Unmute incoming reports from an account type ModerationDefs_ModEventUnmuteReporter struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventUnmuteReporter" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmuteReporter"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmuteReporter"` // comment: Describe reasoning behind the reversal. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } @@ -510,8 +465,9 @@ t.ModerationDefs_CancelScheduledTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#cancelScheduledTakedownEvent" return json.Marshal(t.ModerationDefs_CancelScheduledTakedownEvent) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -621,8 +577,9 @@ t.ModerationDefs_RecordViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#recordViewNotFound" return json.Marshal(t.ModerationDefs_RecordViewNotFound) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationDefs_ModEventViewDetail_Subject) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -772,8 +729,9 @@ t.ModerationDefs_CancelScheduledTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#cancelScheduledTakedownEvent" return json.Marshal(t.ModerationDefs_CancelScheduledTakedownEvent) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -878,8 +836,9 @@ t.ConvoDefs_MessageRef.LexiconTypeID = "chat.bsky.convo.defs#messageRef" return json.Marshal(t.ConvoDefs_MessageRef) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationDefs_ModEventView_Subject) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -925,10 +884,8 @@ // ModerationDefs_RecordEvent is a "recordEvent" in the tools.ozone.moderation.defs schema. // // Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. -// -// RECORDTYPE: ModerationDefs_RecordEvent type ModerationDefs_RecordEvent struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordEvent" cborgen:"$type,const=tools.ozone.moderation.defs#recordEvent"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordEvent"` Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` Op string `json:"op" cborgen:"op"` @@ -936,10 +893,8 @@ } // ModerationDefs_RecordHosting is a "recordHosting" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_RecordHosting type ModerationDefs_RecordHosting struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordHosting" cborgen:"$type,const=tools.ozone.moderation.defs#recordHosting"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordHosting"` CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` DeletedAt *string `json:"deletedAt,omitempty" cborgen:"deletedAt,omitempty"` Status string `json:"status" cborgen:"status"` @@ -947,10 +902,8 @@ } // ModerationDefs_RecordView is a "recordView" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_RecordView type ModerationDefs_RecordView struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordView" cborgen:"$type,const=tools.ozone.moderation.defs#recordView"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordView"` BlobCids []string `json:"blobCids" cborgen:"blobCids"` Cid string `json:"cid" cborgen:"cid"` IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` @@ -961,10 +914,8 @@ } // ModerationDefs_RecordViewDetail is a "recordViewDetail" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_RecordViewDetail type ModerationDefs_RecordViewDetail struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordViewDetail" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewDetail"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewDetail"` Blobs []*ModerationDefs_BlobView `json:"blobs" cborgen:"blobs"` Cid string `json:"cid" cborgen:"cid"` IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` @@ -976,10 +927,8 @@ } // ModerationDefs_RecordViewNotFound is a "recordViewNotFound" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_RecordViewNotFound type ModerationDefs_RecordViewNotFound struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordViewNotFound" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewNotFound"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewNotFound"` Uri string `json:"uri" cborgen:"uri"` } @@ -1006,10 +955,8 @@ } // ModerationDefs_RepoView is a "repoView" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_RepoView type ModerationDefs_RepoView struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoView" cborgen:"$type,const=tools.ozone.moderation.defs#repoView"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#repoView"` DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` Did string `json:"did" cborgen:"did"` Email *string `json:"email,omitempty" cborgen:"email,omitempty"` @@ -1024,10 +971,8 @@ } // ModerationDefs_RepoViewDetail is a "repoViewDetail" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_RepoViewDetail type ModerationDefs_RepoViewDetail struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoViewDetail" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewDetail"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewDetail"` DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` Did string `json:"did" cborgen:"did"` Email *string `json:"email,omitempty" cborgen:"email,omitempty"` @@ -1045,10 +990,8 @@ } // ModerationDefs_RepoViewNotFound is a "repoViewNotFound" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_RepoViewNotFound type ModerationDefs_RepoViewNotFound struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoViewNotFound" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewNotFound"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewNotFound"` Did string `json:"did" cborgen:"did"` } @@ -1076,10 +1019,8 @@ // ModerationDefs_RevokeAccountCredentialsEvent is a "revokeAccountCredentialsEvent" in the tools.ozone.moderation.defs schema. // // Account credentials revocation by moderators. Only works on DID subjects. -// -// RECORDTYPE: ModerationDefs_RevokeAccountCredentialsEvent type ModerationDefs_RevokeAccountCredentialsEvent struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#revokeAccountCredentialsEvent" cborgen:"$type,const=tools.ozone.moderation.defs#revokeAccountCredentialsEvent"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#revokeAccountCredentialsEvent"` // comment: Comment describing the reason for the revocation. Comment string `json:"comment" cborgen:"comment"` } @@ -1087,10 +1028,8 @@ // ModerationDefs_ScheduleTakedownEvent is a "scheduleTakedownEvent" in the tools.ozone.moderation.defs schema. // // Logs a scheduled takedown action for an account. -// -// RECORDTYPE: ModerationDefs_ScheduleTakedownEvent type ModerationDefs_ScheduleTakedownEvent struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#scheduleTakedownEvent" cborgen:"$type,const=tools.ozone.moderation.defs#scheduleTakedownEvent"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#scheduleTakedownEvent"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` ExecuteAfter *string `json:"executeAfter,omitempty" cborgen:"executeAfter,omitempty"` ExecuteAt *string `json:"executeAt,omitempty" cborgen:"executeAt,omitempty"` @@ -1185,8 +1124,9 @@ t.ModerationDefs_RecordHosting.LexiconTypeID = "tools.ozone.moderation.defs#recordHosting" return json.Marshal(t.ModerationDefs_RecordHosting) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationDefs_SubjectStatusView_Hosting) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -1225,8 +1165,9 @@ t.ConvoDefs_MessageRef.LexiconTypeID = "chat.bsky.convo.defs#messageRef" return json.Marshal(t.ConvoDefs_MessageRef) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationDefs_SubjectStatusView_Subject) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -1262,10 +1203,8 @@ } // ModerationDefs_VideoDetails is a "videoDetails" in the tools.ozone.moderation.defs schema. -// -// RECORDTYPE: ModerationDefs_VideoDetails type ModerationDefs_VideoDetails struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#videoDetails" cborgen:"$type,const=tools.ozone.moderation.defs#videoDetails"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#videoDetails"` Height int64 `json:"height" cborgen:"height"` Length int64 `json:"length" cborgen:"length"` Width int64 `json:"width" cborgen:"width"` diff --git a/api/ozone/moderationemitEvent.go b/api/ozone/moderationemitEvent.go --- a/api/ozone/moderationemitEvent.go +++ b/api/ozone/moderationemitEvent.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.emitEvent -// schema: tools.ozone.moderation.emitEvent +package ozone import ( "context" @@ -148,8 +148,9 @@ t.ModerationDefs_CancelScheduledTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#cancelScheduledTakedownEvent" return json.Marshal(t.ModerationDefs_CancelScheduledTakedownEvent) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationEmitEvent_Input_Event) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -249,8 +250,9 @@ t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" return json.Marshal(t.RepoStrongRef) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationEmitEvent_Input_Subject) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/ozone/moderationgetAccountTimeline.go b/api/ozone/moderationgetAccountTimeline.go --- a/api/ozone/moderationgetAccountTimeline.go +++ b/api/ozone/moderationgetAccountTimeline.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.getAccountTimeline -// schema: tools.ozone.moderation.getAccountTimeline +package ozone import ( "context" diff --git a/api/ozone/moderationgetEvent.go b/api/ozone/moderationgetEvent.go --- a/api/ozone/moderationgetEvent.go +++ b/api/ozone/moderationgetEvent.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.getEvent -// schema: tools.ozone.moderation.getEvent +package ozone import ( "context" diff --git a/api/ozone/moderationgetRecord.go b/api/ozone/moderationgetRecord.go --- a/api/ozone/moderationgetRecord.go +++ b/api/ozone/moderationgetRecord.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.getRecord -// schema: tools.ozone.moderation.getRecord +package ozone import ( "context" diff --git a/api/ozone/moderationgetRecords.go b/api/ozone/moderationgetRecords.go --- a/api/ozone/moderationgetRecords.go +++ b/api/ozone/moderationgetRecords.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.getRecords -// schema: tools.ozone.moderation.getRecords +package ozone import ( "context" @@ -31,8 +31,9 @@ t.ModerationDefs_RecordViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#recordViewNotFound" return json.Marshal(t.ModerationDefs_RecordViewNotFound) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationGetRecords_Output_Records_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/ozone/moderationgetRepo.go b/api/ozone/moderationgetRepo.go --- a/api/ozone/moderationgetRepo.go +++ b/api/ozone/moderationgetRepo.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.getRepo -// schema: tools.ozone.moderation.getRepo +package ozone import ( "context" diff --git a/api/ozone/moderationgetReporterStats.go b/api/ozone/moderationgetReporterStats.go --- a/api/ozone/moderationgetReporterStats.go +++ b/api/ozone/moderationgetReporterStats.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.getReporterStats -// schema: tools.ozone.moderation.getReporterStats +package ozone import ( "context" diff --git a/api/ozone/moderationgetRepos.go b/api/ozone/moderationgetRepos.go --- a/api/ozone/moderationgetRepos.go +++ b/api/ozone/moderationgetRepos.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.getRepos -// schema: tools.ozone.moderation.getRepos +package ozone import ( "context" @@ -31,8 +31,9 @@ t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" return json.Marshal(t.ModerationDefs_RepoViewNotFound) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationGetRepos_Output_Repos_Elem) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/ozone/moderationgetSubjects.go b/api/ozone/moderationgetSubjects.go --- a/api/ozone/moderationgetSubjects.go +++ b/api/ozone/moderationgetSubjects.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.getSubjects -// schema: tools.ozone.moderation.getSubjects +package ozone import ( "context" diff --git a/api/ozone/moderationlistScheduledActions.go b/api/ozone/moderationlistScheduledActions.go --- a/api/ozone/moderationlistScheduledActions.go +++ b/api/ozone/moderationlistScheduledActions.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.listScheduledActions -// schema: tools.ozone.moderation.listScheduledActions +package ozone import ( "context" diff --git a/api/ozone/moderationqueryEvents.go b/api/ozone/moderationqueryEvents.go --- a/api/ozone/moderationqueryEvents.go +++ b/api/ozone/moderationqueryEvents.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.queryEvents -// schema: tools.ozone.moderation.queryEvents +package ozone import ( "context" diff --git a/api/ozone/moderationqueryStatuses.go b/api/ozone/moderationqueryStatuses.go --- a/api/ozone/moderationqueryStatuses.go +++ b/api/ozone/moderationqueryStatuses.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.queryStatuses -// schema: tools.ozone.moderation.queryStatuses +package ozone import ( "context" diff --git a/api/ozone/moderationscheduleAction.go b/api/ozone/moderationscheduleAction.go --- a/api/ozone/moderationscheduleAction.go +++ b/api/ozone/moderationscheduleAction.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.scheduleAction -// schema: tools.ozone.moderation.scheduleAction +package ozone import ( "context" @@ -39,8 +39,9 @@ t.ModerationScheduleAction_Takedown.LexiconTypeID = "tools.ozone.moderation.scheduleAction#takedown" return json.Marshal(t.ModerationScheduleAction_Takedown) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *ModerationScheduleAction_Input_Action) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -77,11 +78,9 @@ // ModerationScheduleAction_Takedown is a "takedown" in the tools.ozone.moderation.scheduleAction schema. // -// # Schedule a takedown action -// -// RECORDTYPE: ModerationScheduleAction_Takedown +// Schedule a takedown action type ModerationScheduleAction_Takedown struct { - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.scheduleAction#takedown" cborgen:"$type,const=tools.ozone.moderation.scheduleAction#takedown"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.scheduleAction#takedown"` // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged). AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` diff --git a/api/ozone/moderationsearchRepos.go b/api/ozone/moderationsearchRepos.go --- a/api/ozone/moderationsearchRepos.go +++ b/api/ozone/moderationsearchRepos.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.moderation.searchRepos -// schema: tools.ozone.moderation.searchRepos +package ozone import ( "context" diff --git a/api/ozone/reportdefs.go b/api/ozone/reportdefs.go --- a/api/ozone/reportdefs.go +++ b/api/ozone/reportdefs.go @@ -1,5 +1,5 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.report.defs -// schema: tools.ozone.report.defs +package ozone diff --git a/api/ozone/safelinkaddRule.go b/api/ozone/safelinkaddRule.go --- a/api/ozone/safelinkaddRule.go +++ b/api/ozone/safelinkaddRule.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.safelink.addRule -// schema: tools.ozone.safelink.addRule +package ozone import ( "context" diff --git a/api/ozone/safelinkdefs.go b/api/ozone/safelinkdefs.go --- a/api/ozone/safelinkdefs.go +++ b/api/ozone/safelinkdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.safelink.defs -// schema: tools.ozone.safelink.defs +package ozone // SafelinkDefs_Event is a "event" in the tools.ozone.safelink.defs schema. // diff --git a/api/ozone/safelinkqueryEvents.go b/api/ozone/safelinkqueryEvents.go --- a/api/ozone/safelinkqueryEvents.go +++ b/api/ozone/safelinkqueryEvents.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.safelink.queryEvents -// schema: tools.ozone.safelink.queryEvents +package ozone import ( "context" diff --git a/api/ozone/safelinkqueryRules.go b/api/ozone/safelinkqueryRules.go --- a/api/ozone/safelinkqueryRules.go +++ b/api/ozone/safelinkqueryRules.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.safelink.queryRules -// schema: tools.ozone.safelink.queryRules +package ozone import ( "context" diff --git a/api/ozone/safelinkremoveRule.go b/api/ozone/safelinkremoveRule.go --- a/api/ozone/safelinkremoveRule.go +++ b/api/ozone/safelinkremoveRule.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.safelink.removeRule -// schema: tools.ozone.safelink.removeRule +package ozone import ( "context" diff --git a/api/ozone/safelinkupdateRule.go b/api/ozone/safelinkupdateRule.go --- a/api/ozone/safelinkupdateRule.go +++ b/api/ozone/safelinkupdateRule.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.safelink.updateRule -// schema: tools.ozone.safelink.updateRule +package ozone import ( "context" diff --git a/api/ozone/servergetConfig.go b/api/ozone/servergetConfig.go --- a/api/ozone/servergetConfig.go +++ b/api/ozone/servergetConfig.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.server.getConfig -// schema: tools.ozone.server.getConfig +package ozone import ( "context" diff --git a/api/ozone/setaddValues.go b/api/ozone/setaddValues.go --- a/api/ozone/setaddValues.go +++ b/api/ozone/setaddValues.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.set.addValues -// schema: tools.ozone.set.addValues +package ozone import ( "context" diff --git a/api/ozone/setdefs.go b/api/ozone/setdefs.go --- a/api/ozone/setdefs.go +++ b/api/ozone/setdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.set.defs -// schema: tools.ozone.set.defs +package ozone // SetDefs_Set is a "set" in the tools.ozone.set.defs schema. type SetDefs_Set struct { diff --git a/api/ozone/setdeleteSet.go b/api/ozone/setdeleteSet.go --- a/api/ozone/setdeleteSet.go +++ b/api/ozone/setdeleteSet.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.set.deleteSet -// schema: tools.ozone.set.deleteSet +package ozone import ( "context" diff --git a/api/ozone/setdeleteValues.go b/api/ozone/setdeleteValues.go --- a/api/ozone/setdeleteValues.go +++ b/api/ozone/setdeleteValues.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.set.deleteValues -// schema: tools.ozone.set.deleteValues +package ozone import ( "context" diff --git a/api/ozone/setgetValues.go b/api/ozone/setgetValues.go --- a/api/ozone/setgetValues.go +++ b/api/ozone/setgetValues.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.set.getValues -// schema: tools.ozone.set.getValues +package ozone import ( "context" diff --git a/api/ozone/setquerySets.go b/api/ozone/setquerySets.go --- a/api/ozone/setquerySets.go +++ b/api/ozone/setquerySets.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.set.querySets -// schema: tools.ozone.set.querySets +package ozone import ( "context" diff --git a/api/ozone/settingdefs.go b/api/ozone/settingdefs.go --- a/api/ozone/settingdefs.go +++ b/api/ozone/settingdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.setting.defs -// schema: tools.ozone.setting.defs +package ozone import ( "github.com/bluesky-social/indigo/lex/util" diff --git a/api/ozone/settinglistOptions.go b/api/ozone/settinglistOptions.go --- a/api/ozone/settinglistOptions.go +++ b/api/ozone/settinglistOptions.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.setting.listOptions -// schema: tools.ozone.setting.listOptions +package ozone import ( "context" diff --git a/api/ozone/settingremoveOptions.go b/api/ozone/settingremoveOptions.go --- a/api/ozone/settingremoveOptions.go +++ b/api/ozone/settingremoveOptions.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.setting.removeOptions -// schema: tools.ozone.setting.removeOptions +package ozone import ( "context" diff --git a/api/ozone/settingupsertOption.go b/api/ozone/settingupsertOption.go --- a/api/ozone/settingupsertOption.go +++ b/api/ozone/settingupsertOption.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.setting.upsertOption -// schema: tools.ozone.setting.upsertOption +package ozone import ( "context" diff --git a/api/ozone/setupsertSet.go b/api/ozone/setupsertSet.go --- a/api/ozone/setupsertSet.go +++ b/api/ozone/setupsertSet.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.set.upsertSet -// schema: tools.ozone.set.upsertSet +package ozone import ( "context" diff --git a/api/ozone/signaturedefs.go b/api/ozone/signaturedefs.go --- a/api/ozone/signaturedefs.go +++ b/api/ozone/signaturedefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.signature.defs -// schema: tools.ozone.signature.defs +package ozone // SignatureDefs_SigDetail is a "sigDetail" in the tools.ozone.signature.defs schema. type SignatureDefs_SigDetail struct { diff --git a/api/ozone/signaturefindCorrelation.go b/api/ozone/signaturefindCorrelation.go --- a/api/ozone/signaturefindCorrelation.go +++ b/api/ozone/signaturefindCorrelation.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.signature.findCorrelation -// schema: tools.ozone.signature.findCorrelation +package ozone import ( "context" diff --git a/api/ozone/signaturefindRelatedAccounts.go b/api/ozone/signaturefindRelatedAccounts.go --- a/api/ozone/signaturefindRelatedAccounts.go +++ b/api/ozone/signaturefindRelatedAccounts.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.signature.findRelatedAccounts -// schema: tools.ozone.signature.findRelatedAccounts +package ozone import ( "context" diff --git a/api/ozone/signaturesearchAccounts.go b/api/ozone/signaturesearchAccounts.go --- a/api/ozone/signaturesearchAccounts.go +++ b/api/ozone/signaturesearchAccounts.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.signature.searchAccounts -// schema: tools.ozone.signature.searchAccounts +package ozone import ( "context" diff --git a/api/ozone/teamaddMember.go b/api/ozone/teamaddMember.go --- a/api/ozone/teamaddMember.go +++ b/api/ozone/teamaddMember.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.team.addMember -// schema: tools.ozone.team.addMember +package ozone import ( "context" diff --git a/api/ozone/teamdefs.go b/api/ozone/teamdefs.go --- a/api/ozone/teamdefs.go +++ b/api/ozone/teamdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.team.defs -// schema: tools.ozone.team.defs +package ozone import ( appbskytypes "github.com/bluesky-social/indigo/api/bsky" diff --git a/api/ozone/teamdeleteMember.go b/api/ozone/teamdeleteMember.go --- a/api/ozone/teamdeleteMember.go +++ b/api/ozone/teamdeleteMember.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.team.deleteMember -// schema: tools.ozone.team.deleteMember +package ozone import ( "context" diff --git a/api/ozone/teamlistMembers.go b/api/ozone/teamlistMembers.go --- a/api/ozone/teamlistMembers.go +++ b/api/ozone/teamlistMembers.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.team.listMembers -// schema: tools.ozone.team.listMembers +package ozone import ( "context" diff --git a/api/ozone/teamupdateMember.go b/api/ozone/teamupdateMember.go --- a/api/ozone/teamupdateMember.go +++ b/api/ozone/teamupdateMember.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.team.updateMember -// schema: tools.ozone.team.updateMember +package ozone import ( "context" diff --git a/api/ozone/verificationdefs.go b/api/ozone/verificationdefs.go --- a/api/ozone/verificationdefs.go +++ b/api/ozone/verificationdefs.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.verification.defs -// schema: tools.ozone.verification.defs +package ozone import ( "encoding/json" @@ -53,8 +53,9 @@ t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" return json.Marshal(t.ModerationDefs_RepoViewNotFound) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *VerificationDefs_VerificationView_IssuerRepo) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { @@ -88,8 +89,9 @@ t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" return json.Marshal(t.ModerationDefs_RepoViewNotFound) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *VerificationDefs_VerificationView_SubjectRepo) UnmarshalJSON(b []byte) error { typ, err := util.TypeExtract(b) if err != nil { diff --git a/api/ozone/verificationgrantVerifications.go b/api/ozone/verificationgrantVerifications.go --- a/api/ozone/verificationgrantVerifications.go +++ b/api/ozone/verificationgrantVerifications.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.verification.grantVerifications -// schema: tools.ozone.verification.grantVerifications +package ozone import ( "context" diff --git a/api/ozone/verificationlistVerifications.go b/api/ozone/verificationlistVerifications.go --- a/api/ozone/verificationlistVerifications.go +++ b/api/ozone/verificationlistVerifications.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.verification.listVerifications -// schema: tools.ozone.verification.listVerifications +package ozone import ( "context" diff --git a/api/ozone/verificationrevokeVerifications.go b/api/ozone/verificationrevokeVerifications.go --- a/api/ozone/verificationrevokeVerifications.go +++ b/api/ozone/verificationrevokeVerifications.go @@ -1,8 +1,8 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package ozone +// Lexicon schema: tools.ozone.verification.revokeVerifications -// schema: tools.ozone.verification.revokeVerifications +package ozone import ( "context"