From 0e25b41cdbd5904f0b35f351dcb8b6566d07a877 Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Wed, 15 Jul 2026 11:44:50 +0000 Subject: [PATCH] api,lexicons: all lexicons for "private" xrpc service Signed-off-by: Anirudh Oppiliappan --- lexicon-build-config.json | 7 +++++++ api/tangled/accountbeginSignup.go | 32 ++++++++++++++++++++++++++++++++ api/tangled/accountcompleteSignup.go | 43 +++++++++++++++++++++++++++++++++++++++++++ api/tangled/accountdeleteEmail.go | 30 ++++++++++++++++++++++++++++++ api/tangled/accountdismissNewsletter.go | 24 ++++++++++++++++++++++++ api/tangled/accountlistEmails.go | 41 +++++++++++++++++++++++++++++++++++++++++ api/tangled/accountsetPrimaryEmail.go | 30 ++++++++++++++++++++++++++++++ api/tangled/accountsubscribeNewsletter.go | 24 ++++++++++++++++++++++++ api/tangled/focusbeginSession.go | 37 +++++++++++++++++++++++++++++++++++++ api/tangled/focusendSession.go | 24 ++++++++++++++++++++++++ api/tangled/focusnextItem.go | 43 +++++++++++++++++++++++++++++++++++++++++++ api/tangled/notificationdeleteNotification.go | 30 ++++++++++++++++++++++++++++++ api/tangled/notificationgetPreferences.go | 39 +++++++++++++++++++++++++++++++++++++++ api/tangled/notificationgetUnreadCount.go | 30 ++++++++++++++++++++++++++++++ api/tangled/notificationlistNotifications.go | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ api/tangled/notificationmarkAllRead.go | 24 ++++++++++++++++++++++++ api/tangled/notificationupdatePreferences.go | 38 ++++++++++++++++++++++++++++++++++++++ api/tangled/notificationupdateSeen.go | 31 +++++++++++++++++++++++++++++++ api/tangled/repocreate.go | 2 ++ api/tangled/repocreateWebhook.go | 45 +++++++++++++++++++++++++++++++++++++++++++++ api/tangled/repodelete.go | 2 ++ api/tangled/repodeleteWebhook.go | 32 ++++++++++++++++++++++++++++++++ api/tangled/repodisableSite.go | 30 ++++++++++++++++++++++++++++++ api/tangled/repogetSiteConfig.go | 46 ++++++++++++++++++++++++++++++++++++++++++++++ api/tangled/repolistWebhookDeliveries.go | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ api/tangled/repolistWebhooks.go | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ api/tangled/reporetryWebhookDelivery.go | 34 ++++++++++++++++++++++++++++++++++ api/tangled/repotoggleWebhook.go | 39 +++++++++++++++++++++++++++++++++++++++ api/tangled/repoupdateSiteConfig.go | 36 ++++++++++++++++++++++++++++++++++++ api/tangled/repoupdateWebhook.go | 36 ++++++++++++++++++++++++++++++++++++ api/tangled/searchsearchCode.go | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ api/tangled/siteclaimDomain.go | 30 ++++++++++++++++++++++++++++++ api/tangled/sitegetDomainClaim.go | 31 +++++++++++++++++++++++++++++++ api/tangled/sitereleaseDomain.go | 30 ++++++++++++++++++++++++++++++ lexicons/temp/account/beginSignup.json | 33 +++++++++++++++++++++++++++++++++ lexicons/temp/account/completeSignup.json | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/account/deleteEmail.json | 26 ++++++++++++++++++++++++++ lexicons/temp/account/dismissNewsletter.json | 10 ++++++++++ lexicons/temp/account/listEmails.json | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/account/setPrimaryEmail.json | 27 +++++++++++++++++++++++++++ lexicons/temp/account/subscribeNewsletter.json | 10 ++++++++++ lexicons/temp/focus/beginSession.json | 43 +++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/focus/endSession.json | 10 ++++++++++ lexicons/temp/focus/nextItem.json | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/notification/deleteNotification.json | 23 +++++++++++++++++++++++ lexicons/temp/notification/getPreferences.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/notification/getUnreadCount.json | 22 ++++++++++++++++++++++ lexicons/temp/notification/listNotifications.json | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/notification/markAllRead.json | 10 ++++++++++ lexicons/temp/notification/updatePreferences.json | 28 ++++++++++++++++++++++++++++ lexicons/temp/notification/updateSeen.json | 26 ++++++++++++++++++++++++++ lexicons/temp/repo/createWebhook.json | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/repo/deleteWebhook.json | 31 +++++++++++++++++++++++++++++++ lexicons/temp/repo/disableSite.json | 27 +++++++++++++++++++++++++++ lexicons/temp/repo/getSiteConfig.json | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/repo/listWebhookDeliveries.json | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/repo/listWebhooks.json | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/repo/retryWebhookDelivery.json | 36 ++++++++++++++++++++++++++++++++++++ lexicons/temp/repo/toggleWebhook.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/repo/updateSiteConfig.json | 39 +++++++++++++++++++++++++++++++++++++++ lexicons/temp/repo/updateWebhook.json | 47 +++++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/search/searchCode.json | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/temp/site/claimDomain.json | 29 +++++++++++++++++++++++++++++ lexicons/temp/site/getDomainClaim.json | 22 ++++++++++++++++++++++ lexicons/temp/site/releaseDomain.json | 26 ++++++++++++++++++++++++++ 65 file(s) changed, 2426 insertion(s)(+), 0 deletion(s)(-) diff --git a/lexicon-build-config.json b/lexicon-build-config.json --- a/lexicon-build-config.json +++ b/lexicon-build-config.json @@ -11,5 +11,12 @@ "outdir": "api/tangled", "import": "tangled.org/core/api/tangled", "gen-server": true + }, + { + "package": "tangled", + "prefix": "org.tangled", + "outdir": "api/tangled", + "import": "tangled.org/core/api/tangled", + "gen-server": true } ] diff --git a/api/tangled/accountbeginSignup.go b/api/tangled/accountbeginSignup.go new file mode 100644 --- /dev/null +++ b/api/tangled/accountbeginSignup.go @@ -0,0 +1,32 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.account.beginSignup + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempAccountBeginSignupNSID = "org.tangled.temp.account.beginSignup" +) + +// TempAccountBeginSignup_Input is the input argument to a org.tangled.temp.account.beginSignup call. +type TempAccountBeginSignup_Input struct { + // email: Email address for the new account. + Email string `json:"email" cborgen:"email"` + // turnstileToken: Cloudflare Turnstile challenge response token. + TurnstileToken string `json:"turnstileToken" cborgen:"turnstileToken"` +} + +// TempAccountBeginSignup calls the XRPC method "org.tangled.temp.account.beginSignup". +func TempAccountBeginSignup(ctx context.Context, c util.LexClient, input *TempAccountBeginSignup_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.account.beginSignup", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/accountcompleteSignup.go b/api/tangled/accountcompleteSignup.go new file mode 100644 --- /dev/null +++ b/api/tangled/accountcompleteSignup.go @@ -0,0 +1,43 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.account.completeSignup + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempAccountCompleteSignupNSID = "org.tangled.temp.account.completeSignup" +) + +// TempAccountCompleteSignup_Input is the input argument to a org.tangled.temp.account.completeSignup call. +type TempAccountCompleteSignup_Input struct { + // code: Verification code from the signup email. + Code string `json:"code" cborgen:"code"` + // password: Password for the new account. + Password string `json:"password" cborgen:"password"` + // username: Desired username; the assigned handle is .. + Username string `json:"username" cborgen:"username"` +} + +// TempAccountCompleteSignup_Output is the output of a org.tangled.temp.account.completeSignup call. +type TempAccountCompleteSignup_Output struct { + // did: DID of the newly provisioned account. + Did string `json:"did" cborgen:"did"` + // handle: The assigned handle, .. + Handle string `json:"handle" cborgen:"handle"` +} + +// TempAccountCompleteSignup calls the XRPC method "org.tangled.temp.account.completeSignup". +func TempAccountCompleteSignup(ctx context.Context, c util.LexClient, input *TempAccountCompleteSignup_Input) (*TempAccountCompleteSignup_Output, error) { + var out TempAccountCompleteSignup_Output + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.account.completeSignup", nil, input, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/accountdeleteEmail.go b/api/tangled/accountdeleteEmail.go new file mode 100644 --- /dev/null +++ b/api/tangled/accountdeleteEmail.go @@ -0,0 +1,30 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.account.deleteEmail + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempAccountDeleteEmailNSID = "org.tangled.temp.account.deleteEmail" +) + +// TempAccountDeleteEmail_Input is the input argument to a org.tangled.temp.account.deleteEmail call. +type TempAccountDeleteEmail_Input struct { + // email: Email address to remove. + Email string `json:"email" cborgen:"email"` +} + +// TempAccountDeleteEmail calls the XRPC method "org.tangled.temp.account.deleteEmail". +func TempAccountDeleteEmail(ctx context.Context, c util.LexClient, input *TempAccountDeleteEmail_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.account.deleteEmail", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/accountdismissNewsletter.go b/api/tangled/accountdismissNewsletter.go new file mode 100644 --- /dev/null +++ b/api/tangled/accountdismissNewsletter.go @@ -0,0 +1,24 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.account.dismissNewsletter + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempAccountDismissNewsletterNSID = "org.tangled.temp.account.dismissNewsletter" +) + +// TempAccountDismissNewsletter calls the XRPC method "org.tangled.temp.account.dismissNewsletter". +func TempAccountDismissNewsletter(ctx context.Context, c util.LexClient) error { + if err := c.LexDo(ctx, util.Procedure, "", "org.tangled.temp.account.dismissNewsletter", nil, nil, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/accountlistEmails.go b/api/tangled/accountlistEmails.go new file mode 100644 --- /dev/null +++ b/api/tangled/accountlistEmails.go @@ -0,0 +1,41 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.account.listEmails + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempAccountListEmailsNSID = "org.tangled.temp.account.listEmails" +) + +// TempAccountListEmails_Email is a "email" in the org.tangled.temp.account.listEmails schema. +type TempAccountListEmails_Email struct { + // address: Email address. + Address string `json:"address" cborgen:"address"` + CreatedAt string `json:"createdAt" cborgen:"createdAt"` + // primary: Whether this is the primary email address. + Primary bool `json:"primary" cborgen:"primary"` + // verified: Whether the address has been verified. + Verified bool `json:"verified" cborgen:"verified"` +} + +// TempAccountListEmails_Output is the output of a org.tangled.temp.account.listEmails call. +type TempAccountListEmails_Output struct { + Emails []*TempAccountListEmails_Email `json:"emails" cborgen:"emails"` +} + +// TempAccountListEmails calls the XRPC method "org.tangled.temp.account.listEmails". +func TempAccountListEmails(ctx context.Context, c util.LexClient) (*TempAccountListEmails_Output, error) { + var out TempAccountListEmails_Output + if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.account.listEmails", nil, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/accountsetPrimaryEmail.go b/api/tangled/accountsetPrimaryEmail.go new file mode 100644 --- /dev/null +++ b/api/tangled/accountsetPrimaryEmail.go @@ -0,0 +1,30 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.account.setPrimaryEmail + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempAccountSetPrimaryEmailNSID = "org.tangled.temp.account.setPrimaryEmail" +) + +// TempAccountSetPrimaryEmail_Input is the input argument to a org.tangled.temp.account.setPrimaryEmail call. +type TempAccountSetPrimaryEmail_Input struct { + // email: Email address to promote to primary. + Email string `json:"email" cborgen:"email"` +} + +// TempAccountSetPrimaryEmail calls the XRPC method "org.tangled.temp.account.setPrimaryEmail". +func TempAccountSetPrimaryEmail(ctx context.Context, c util.LexClient, input *TempAccountSetPrimaryEmail_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.account.setPrimaryEmail", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/accountsubscribeNewsletter.go b/api/tangled/accountsubscribeNewsletter.go new file mode 100644 --- /dev/null +++ b/api/tangled/accountsubscribeNewsletter.go @@ -0,0 +1,24 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.account.subscribeNewsletter + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempAccountSubscribeNewsletterNSID = "org.tangled.temp.account.subscribeNewsletter" +) + +// TempAccountSubscribeNewsletter calls the XRPC method "org.tangled.temp.account.subscribeNewsletter". +func TempAccountSubscribeNewsletter(ctx context.Context, c util.LexClient) error { + if err := c.LexDo(ctx, util.Procedure, "", "org.tangled.temp.account.subscribeNewsletter", nil, nil, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/focusbeginSession.go b/api/tangled/focusbeginSession.go new file mode 100644 --- /dev/null +++ b/api/tangled/focusbeginSession.go @@ -0,0 +1,37 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.focus.beginSession + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempFocusBeginSessionNSID = "org.tangled.temp.focus.beginSession" +) + +// TempFocusBeginSession_Output is the output of a org.tangled.temp.focus.beginSession call. +type TempFocusBeginSession_Output struct { + // issueAt: AT-URI of the issue to navigate to, if the item is an issue. + IssueAt *string `json:"issueAt,omitempty" cborgen:"issueAt,omitempty"` + // notificationId: ID of the first notification to address. Absent if the queue is empty. + NotificationId *int64 `json:"notificationId,omitempty" cborgen:"notificationId,omitempty"` + // pullAt: AT-URI of the pull to navigate to, if the item is a pull. + PullAt *string `json:"pullAt,omitempty" cborgen:"pullAt,omitempty"` + // repoDid: DID of the repository the item belongs to. Absent if the queue is empty. + RepoDid *string `json:"repoDid,omitempty" cborgen:"repoDid,omitempty"` +} + +// TempFocusBeginSession calls the XRPC method "org.tangled.temp.focus.beginSession". +func TempFocusBeginSession(ctx context.Context, c util.LexClient) (*TempFocusBeginSession_Output, error) { + var out TempFocusBeginSession_Output + if err := c.LexDo(ctx, util.Procedure, "", "org.tangled.temp.focus.beginSession", nil, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/focusendSession.go b/api/tangled/focusendSession.go new file mode 100644 --- /dev/null +++ b/api/tangled/focusendSession.go @@ -0,0 +1,24 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.focus.endSession + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempFocusEndSessionNSID = "org.tangled.temp.focus.endSession" +) + +// TempFocusEndSession calls the XRPC method "org.tangled.temp.focus.endSession". +func TempFocusEndSession(ctx context.Context, c util.LexClient) error { + if err := c.LexDo(ctx, util.Procedure, "", "org.tangled.temp.focus.endSession", nil, nil, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/focusnextItem.go b/api/tangled/focusnextItem.go new file mode 100644 --- /dev/null +++ b/api/tangled/focusnextItem.go @@ -0,0 +1,43 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.focus.nextItem + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempFocusNextItemNSID = "org.tangled.temp.focus.nextItem" +) + +// TempFocusNextItem_Input is the input argument to a org.tangled.temp.focus.nextItem call. +type TempFocusNextItem_Input struct { + // currentId: ID of the notification just addressed, to be marked read. + CurrentId int64 `json:"currentId" cborgen:"currentId"` +} + +// TempFocusNextItem_Output is the output of a org.tangled.temp.focus.nextItem call. +type TempFocusNextItem_Output struct { + // issueAt: AT-URI of the issue to navigate to, if the item is an issue. + IssueAt *string `json:"issueAt,omitempty" cborgen:"issueAt,omitempty"` + // notificationId: ID of the next notification to address. Absent when focus mode has ended. + NotificationId *int64 `json:"notificationId,omitempty" cborgen:"notificationId,omitempty"` + // pullAt: AT-URI of the pull to navigate to, if the item is a pull. + PullAt *string `json:"pullAt,omitempty" cborgen:"pullAt,omitempty"` + // repoDid: DID of the repository the next item belongs to. Absent when focus mode has ended. + RepoDid *string `json:"repoDid,omitempty" cborgen:"repoDid,omitempty"` +} + +// TempFocusNextItem calls the XRPC method "org.tangled.temp.focus.nextItem". +func TempFocusNextItem(ctx context.Context, c util.LexClient, input *TempFocusNextItem_Input) (*TempFocusNextItem_Output, error) { + var out TempFocusNextItem_Output + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.focus.nextItem", nil, input, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/notificationdeleteNotification.go b/api/tangled/notificationdeleteNotification.go new file mode 100644 --- /dev/null +++ b/api/tangled/notificationdeleteNotification.go @@ -0,0 +1,30 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.notification.deleteNotification + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempNotificationDeleteNotificationNSID = "org.tangled.temp.notification.deleteNotification" +) + +// TempNotificationDeleteNotification_Input is the input argument to a org.tangled.temp.notification.deleteNotification call. +type TempNotificationDeleteNotification_Input struct { + // id: ID of the notification to delete. + Id int64 `json:"id" cborgen:"id"` +} + +// TempNotificationDeleteNotification calls the XRPC method "org.tangled.temp.notification.deleteNotification". +func TempNotificationDeleteNotification(ctx context.Context, c util.LexClient, input *TempNotificationDeleteNotification_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.notification.deleteNotification", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/notificationgetPreferences.go b/api/tangled/notificationgetPreferences.go new file mode 100644 --- /dev/null +++ b/api/tangled/notificationgetPreferences.go @@ -0,0 +1,39 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.notification.getPreferences + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempNotificationGetPreferencesNSID = "org.tangled.temp.notification.getPreferences" +) + +// TempNotificationGetPreferences_Preferences is a "preferences" in the org.tangled.temp.notification.getPreferences schema. +type TempNotificationGetPreferences_Preferences struct { + EmailNotifications bool `json:"emailNotifications" cborgen:"emailNotifications"` + Followed bool `json:"followed" cborgen:"followed"` + IssueClosed bool `json:"issueClosed" cborgen:"issueClosed"` + IssueCommented bool `json:"issueCommented" cborgen:"issueCommented"` + IssueCreated bool `json:"issueCreated" cborgen:"issueCreated"` + PullCommented bool `json:"pullCommented" cborgen:"pullCommented"` + PullCreated bool `json:"pullCreated" cborgen:"pullCreated"` + PullMerged bool `json:"pullMerged" cborgen:"pullMerged"` + RepoStarred bool `json:"repoStarred" cborgen:"repoStarred"` + UserMentioned bool `json:"userMentioned" cborgen:"userMentioned"` +} + +// TempNotificationGetPreferences calls the XRPC method "org.tangled.temp.notification.getPreferences". +func TempNotificationGetPreferences(ctx context.Context, c util.LexClient) (*TempNotificationGetPreferences_Preferences, error) { + var out TempNotificationGetPreferences_Preferences + if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.notification.getPreferences", nil, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/notificationgetUnreadCount.go b/api/tangled/notificationgetUnreadCount.go new file mode 100644 --- /dev/null +++ b/api/tangled/notificationgetUnreadCount.go @@ -0,0 +1,30 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.notification.getUnreadCount + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempNotificationGetUnreadCountNSID = "org.tangled.temp.notification.getUnreadCount" +) + +// TempNotificationGetUnreadCount_Output is the output of a org.tangled.temp.notification.getUnreadCount call. +type TempNotificationGetUnreadCount_Output struct { + Count int64 `json:"count" cborgen:"count"` +} + +// TempNotificationGetUnreadCount calls the XRPC method "org.tangled.temp.notification.getUnreadCount". +func TempNotificationGetUnreadCount(ctx context.Context, c util.LexClient) (*TempNotificationGetUnreadCount_Output, error) { + var out TempNotificationGetUnreadCount_Output + if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.notification.getUnreadCount", nil, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/notificationlistNotifications.go b/api/tangled/notificationlistNotifications.go new file mode 100644 --- /dev/null +++ b/api/tangled/notificationlistNotifications.go @@ -0,0 +1,71 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.notification.listNotifications + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempNotificationListNotificationsNSID = "org.tangled.temp.notification.listNotifications" +) + +// TempNotificationListNotifications_Notification is a "notification" in the org.tangled.temp.notification.listNotifications schema. +type TempNotificationListNotifications_Notification struct { + // actorDid: DID of the user who triggered this notification. + ActorDid string `json:"actorDid" cborgen:"actorDid"` + // category: Broad category: 'social' or 'work'. + Category string `json:"category" cborgen:"category"` + CreatedAt string `json:"createdAt" cborgen:"createdAt"` + // id: Stable numeric ID for this notification. + Id int64 `json:"id" cborgen:"id"` + // issueAt: AT-URI of the related org.tangled.issue.issue record, if applicable. + IssueAt *string `json:"issueAt,omitempty" cborgen:"issueAt,omitempty"` + // pullAt: AT-URI of the related org.tangled.pulls.pull record, if applicable. + PullAt *string `json:"pullAt,omitempty" cborgen:"pullAt,omitempty"` + Read bool `json:"read" cborgen:"read"` + // repoDid: DID of the related repository, if applicable. + RepoDid *string `json:"repoDid,omitempty" cborgen:"repoDid,omitempty"` + // type: Notification type: repo_starred, issue_created, issue_commented, issue_closed, issue_reopen, issue_assigned, issue_unassigned, pull_created, pull_commented, pull_merged, pull_closed, pull_reopen, pull_assigned, pull_unassigned, followed, user_mentioned. + Type string `json:"type" cborgen:"type"` +} + +// TempNotificationListNotifications_Output is the output of a org.tangled.temp.notification.listNotifications call. +type TempNotificationListNotifications_Output struct { + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` + Notifications []*TempNotificationListNotifications_Notification `json:"notifications" cborgen:"notifications"` + SocialUnreadCount int64 `json:"socialUnreadCount" cborgen:"socialUnreadCount"` + WorkUnreadCount int64 `json:"workUnreadCount" cborgen:"workUnreadCount"` +} + +// TempNotificationListNotifications calls the XRPC method "org.tangled.temp.notification.listNotifications". +// +// category: Filter by category: 'all', 'social', or 'work'. +// limit: Max notifications per category to return. +// read: Filter by read state: 'all' or 'unread'. +func TempNotificationListNotifications(ctx context.Context, c util.LexClient, category string, cursor string, limit int64, read string) (*TempNotificationListNotifications_Output, error) { + var out TempNotificationListNotifications_Output + + params := map[string]interface{}{} + if category != "" { + params["category"] = category + } + if cursor != "" { + params["cursor"] = cursor + } + if limit != 0 { + params["limit"] = limit + } + if read != "" { + params["read"] = read + } + if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.notification.listNotifications", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/notificationmarkAllRead.go b/api/tangled/notificationmarkAllRead.go new file mode 100644 --- /dev/null +++ b/api/tangled/notificationmarkAllRead.go @@ -0,0 +1,24 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.notification.markAllRead + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempNotificationMarkAllReadNSID = "org.tangled.temp.notification.markAllRead" +) + +// TempNotificationMarkAllRead calls the XRPC method "org.tangled.temp.notification.markAllRead". +func TempNotificationMarkAllRead(ctx context.Context, c util.LexClient) error { + if err := c.LexDo(ctx, util.Procedure, "", "org.tangled.temp.notification.markAllRead", nil, nil, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/notificationupdatePreferences.go b/api/tangled/notificationupdatePreferences.go new file mode 100644 --- /dev/null +++ b/api/tangled/notificationupdatePreferences.go @@ -0,0 +1,38 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.notification.updatePreferences + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempNotificationUpdatePreferencesNSID = "org.tangled.temp.notification.updatePreferences" +) + +// TempNotificationUpdatePreferences_Input is the input argument to a org.tangled.temp.notification.updatePreferences call. +type TempNotificationUpdatePreferences_Input struct { + EmailNotifications *bool `json:"emailNotifications,omitempty" cborgen:"emailNotifications,omitempty"` + Followed *bool `json:"followed,omitempty" cborgen:"followed,omitempty"` + IssueClosed *bool `json:"issueClosed,omitempty" cborgen:"issueClosed,omitempty"` + IssueCommented *bool `json:"issueCommented,omitempty" cborgen:"issueCommented,omitempty"` + IssueCreated *bool `json:"issueCreated,omitempty" cborgen:"issueCreated,omitempty"` + PullCommented *bool `json:"pullCommented,omitempty" cborgen:"pullCommented,omitempty"` + PullCreated *bool `json:"pullCreated,omitempty" cborgen:"pullCreated,omitempty"` + PullMerged *bool `json:"pullMerged,omitempty" cborgen:"pullMerged,omitempty"` + RepoStarred *bool `json:"repoStarred,omitempty" cborgen:"repoStarred,omitempty"` + UserMentioned *bool `json:"userMentioned,omitempty" cborgen:"userMentioned,omitempty"` +} + +// TempNotificationUpdatePreferences calls the XRPC method "org.tangled.temp.notification.updatePreferences". +func TempNotificationUpdatePreferences(ctx context.Context, c util.LexClient, input *TempNotificationUpdatePreferences_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.notification.updatePreferences", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/notificationupdateSeen.go b/api/tangled/notificationupdateSeen.go new file mode 100644 --- /dev/null +++ b/api/tangled/notificationupdateSeen.go @@ -0,0 +1,31 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.notification.updateSeen + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempNotificationUpdateSeenNSID = "org.tangled.temp.notification.updateSeen" +) + +// TempNotificationUpdateSeen_Input is the input argument to a org.tangled.temp.notification.updateSeen call. +type TempNotificationUpdateSeen_Input struct { + // id: ID of the notification to update. + Id int64 `json:"id" cborgen:"id"` + Read bool `json:"read" cborgen:"read"` +} + +// TempNotificationUpdateSeen calls the XRPC method "org.tangled.temp.notification.updateSeen". +func TempNotificationUpdateSeen(ctx context.Context, c util.LexClient, input *TempNotificationUpdateSeen_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.notification.updateSeen", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/repocreate.go b/api/tangled/repocreate.go --- a/api/tangled/repocreate.go +++ b/api/tangled/repocreate.go @@ -30,6 +30,8 @@ // RepoCreate_Output is the output of a sh.tangled.repo.create call. type RepoCreate_Output struct { + // key: Multibase-encoded public signing key the knot holds for this repository + Key *string `json:"key,omitempty" cborgen:"key,omitempty"` RepoDid *string `json:"repoDid,omitempty" cborgen:"repoDid,omitempty"` } diff --git a/api/tangled/repocreateWebhook.go b/api/tangled/repocreateWebhook.go new file mode 100644 --- /dev/null +++ b/api/tangled/repocreateWebhook.go @@ -0,0 +1,45 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.repo.createWebhook + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempRepoCreateWebhookNSID = "org.tangled.temp.repo.createWebhook" +) + +// TempRepoCreateWebhook_Input is the input argument to a org.tangled.temp.repo.createWebhook call. +type TempRepoCreateWebhook_Input struct { + // active: Whether the webhook should be active immediately. Defaults to true. + Active *bool `json:"active,omitempty" cborgen:"active,omitempty"` + // events: Event types to subscribe to (e.g. 'push', 'repository:renamed'). + Events []string `json:"events" cborgen:"events"` + // repoDid: DID of the repository as minted by the knot. + RepoDid string `json:"repoDid" cborgen:"repoDid"` + // secret: Optional HMAC secret used to sign payloads. If omitted, payloads are not signed. + Secret *string `json:"secret,omitempty" cborgen:"secret,omitempty"` + // url: Endpoint URL that will receive webhook payloads. + Url string `json:"url" cborgen:"url"` +} + +// TempRepoCreateWebhook_Output is the output of a org.tangled.temp.repo.createWebhook call. +type TempRepoCreateWebhook_Output struct { + // id: ID of the newly created webhook. + Id int64 `json:"id" cborgen:"id"` +} + +// TempRepoCreateWebhook calls the XRPC method "org.tangled.temp.repo.createWebhook". +func TempRepoCreateWebhook(ctx context.Context, c util.LexClient, input *TempRepoCreateWebhook_Input) (*TempRepoCreateWebhook_Output, error) { + var out TempRepoCreateWebhook_Output + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.repo.createWebhook", nil, input, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/repodelete.go b/api/tangled/repodelete.go --- a/api/tangled/repodelete.go +++ b/api/tangled/repodelete.go @@ -18,6 +18,8 @@ type RepoDelete_Input struct { // did: DID of the repository owner Did string `json:"did" cborgen:"did"` + // force: Admin-only. Delete even though the repository record still exists on the owner's PDS. + Force *bool `json:"force,omitempty" cborgen:"force,omitempty"` // name: Name of the repository to delete Name string `json:"name" cborgen:"name"` // rkey: Rkey of the repository record diff --git a/api/tangled/repodeleteWebhook.go b/api/tangled/repodeleteWebhook.go new file mode 100644 --- /dev/null +++ b/api/tangled/repodeleteWebhook.go @@ -0,0 +1,32 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.repo.deleteWebhook + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempRepoDeleteWebhookNSID = "org.tangled.temp.repo.deleteWebhook" +) + +// TempRepoDeleteWebhook_Input is the input argument to a org.tangled.temp.repo.deleteWebhook call. +type TempRepoDeleteWebhook_Input struct { + // id: Webhook ID to delete. + Id int64 `json:"id" cborgen:"id"` + // repoDid: DID of the repository as minted by the knot. + RepoDid string `json:"repoDid" cborgen:"repoDid"` +} + +// TempRepoDeleteWebhook calls the XRPC method "org.tangled.temp.repo.deleteWebhook". +func TempRepoDeleteWebhook(ctx context.Context, c util.LexClient, input *TempRepoDeleteWebhook_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.repo.deleteWebhook", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/repodisableSite.go b/api/tangled/repodisableSite.go new file mode 100644 --- /dev/null +++ b/api/tangled/repodisableSite.go @@ -0,0 +1,30 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.repo.disableSite + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempRepoDisableSiteNSID = "org.tangled.temp.repo.disableSite" +) + +// TempRepoDisableSite_Input is the input argument to a org.tangled.temp.repo.disableSite call. +type TempRepoDisableSite_Input struct { + // repoDid: DID of the repository as minted by the knot. + RepoDid string `json:"repoDid" cborgen:"repoDid"` +} + +// TempRepoDisableSite calls the XRPC method "org.tangled.temp.repo.disableSite". +func TempRepoDisableSite(ctx context.Context, c util.LexClient, input *TempRepoDisableSite_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.repo.disableSite", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/repogetSiteConfig.go b/api/tangled/repogetSiteConfig.go new file mode 100644 --- /dev/null +++ b/api/tangled/repogetSiteConfig.go @@ -0,0 +1,46 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.repo.getSiteConfig + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempRepoGetSiteConfigNSID = "org.tangled.temp.repo.getSiteConfig" +) + +// TempRepoGetSiteConfig_Output is the output of a org.tangled.temp.repo.getSiteConfig call. +type TempRepoGetSiteConfig_Output struct { + // config: Site config for the repository. Absent if no site is configured. + Config *TempRepoGetSiteConfig_SiteConfig `json:"config,omitempty" cborgen:"config,omitempty"` +} + +// TempRepoGetSiteConfig_SiteConfig is a "siteConfig" in the org.tangled.temp.repo.getSiteConfig schema. +type TempRepoGetSiteConfig_SiteConfig struct { + // branch: Branch to deploy from. + Branch string `json:"branch" cborgen:"branch"` + // dir: Directory within the repository to deploy (e.g. '/' or '/docs'). + Dir string `json:"dir" cborgen:"dir"` + // isIndex: Whether this repo serves as the index (root) for the domain. + IsIndex bool `json:"isIndex" cborgen:"isIndex"` +} + +// TempRepoGetSiteConfig calls the XRPC method "org.tangled.temp.repo.getSiteConfig". +// +// repoDid: DID of the repository as minted by the knot. +func TempRepoGetSiteConfig(ctx context.Context, c util.LexClient, repoDid string) (*TempRepoGetSiteConfig_Output, error) { + var out TempRepoGetSiteConfig_Output + + params := map[string]interface{}{} + params["repoDid"] = repoDid + if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.repo.getSiteConfig", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/repolistWebhookDeliveries.go b/api/tangled/repolistWebhookDeliveries.go new file mode 100644 --- /dev/null +++ b/api/tangled/repolistWebhookDeliveries.go @@ -0,0 +1,55 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.repo.listWebhookDeliveries + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempRepoListWebhookDeliveriesNSID = "org.tangled.temp.repo.listWebhookDeliveries" +) + +// TempRepoListWebhookDeliveries_Delivery is a "delivery" in the org.tangled.temp.repo.listWebhookDeliveries schema. +type TempRepoListWebhookDeliveries_Delivery struct { + CreatedAt string `json:"createdAt" cborgen:"createdAt"` + // deliveryId: UUID for tracking this delivery attempt. + DeliveryId string `json:"deliveryId" cborgen:"deliveryId"` + // event: Event type that triggered the delivery. + Event string `json:"event" cborgen:"event"` + Id int64 `json:"id" cborgen:"id"` + RequestBody *string `json:"requestBody,omitempty" cborgen:"requestBody,omitempty"` + ResponseBody *string `json:"responseBody,omitempty" cborgen:"responseBody,omitempty"` + ResponseCode *int64 `json:"responseCode,omitempty" cborgen:"responseCode,omitempty"` + Success bool `json:"success" cborgen:"success"` + Url string `json:"url" cborgen:"url"` +} + +// TempRepoListWebhookDeliveries_Output is the output of a org.tangled.temp.repo.listWebhookDeliveries call. +type TempRepoListWebhookDeliveries_Output struct { + Deliveries []*TempRepoListWebhookDeliveries_Delivery `json:"deliveries" cborgen:"deliveries"` +} + +// TempRepoListWebhookDeliveries calls the XRPC method "org.tangled.temp.repo.listWebhookDeliveries". +// +// id: Webhook ID. +// repoDid: DID of the repository as minted by the knot. +func TempRepoListWebhookDeliveries(ctx context.Context, c util.LexClient, id int64, limit int64, repoDid string) (*TempRepoListWebhookDeliveries_Output, error) { + var out TempRepoListWebhookDeliveries_Output + + params := map[string]interface{}{} + params["id"] = id + if limit != 0 { + params["limit"] = limit + } + params["repoDid"] = repoDid + if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.repo.listWebhookDeliveries", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/repolistWebhooks.go b/api/tangled/repolistWebhooks.go new file mode 100644 --- /dev/null +++ b/api/tangled/repolistWebhooks.go @@ -0,0 +1,49 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.repo.listWebhooks + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempRepoListWebhooksNSID = "org.tangled.temp.repo.listWebhooks" +) + +// TempRepoListWebhooks_Output is the output of a org.tangled.temp.repo.listWebhooks call. +type TempRepoListWebhooks_Output struct { + Webhooks []*TempRepoListWebhooks_Webhook `json:"webhooks" cborgen:"webhooks"` +} + +// TempRepoListWebhooks_Webhook is a "webhook" in the org.tangled.temp.repo.listWebhooks schema. +type TempRepoListWebhooks_Webhook struct { + // active: Whether the webhook is currently enabled. + Active bool `json:"active" cborgen:"active"` + CreatedAt string `json:"createdAt" cborgen:"createdAt"` + // events: Event types this webhook is subscribed to (e.g. 'push', 'repository:renamed'). + Events []string `json:"events" cborgen:"events"` + // id: Webhook identifier. + Id int64 `json:"id" cborgen:"id"` + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` + // url: Endpoint URL that receives webhook payloads. + Url string `json:"url" cborgen:"url"` +} + +// TempRepoListWebhooks calls the XRPC method "org.tangled.temp.repo.listWebhooks". +// +// repoDid: DID of the repository as minted by the knot. +func TempRepoListWebhooks(ctx context.Context, c util.LexClient, repoDid string) (*TempRepoListWebhooks_Output, error) { + var out TempRepoListWebhooks_Output + + params := map[string]interface{}{} + params["repoDid"] = repoDid + if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.repo.listWebhooks", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/reporetryWebhookDelivery.go b/api/tangled/reporetryWebhookDelivery.go new file mode 100644 --- /dev/null +++ b/api/tangled/reporetryWebhookDelivery.go @@ -0,0 +1,34 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.repo.retryWebhookDelivery + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempRepoRetryWebhookDeliveryNSID = "org.tangled.temp.repo.retryWebhookDelivery" +) + +// TempRepoRetryWebhookDelivery_Input is the input argument to a org.tangled.temp.repo.retryWebhookDelivery call. +type TempRepoRetryWebhookDelivery_Input struct { + // deliveryId: UUID of the delivery to retry. + DeliveryId string `json:"deliveryId" cborgen:"deliveryId"` + // repoDid: DID of the repository as minted by the knot. + RepoDid string `json:"repoDid" cborgen:"repoDid"` + // webhookId: Webhook ID that owns the delivery. + WebhookId int64 `json:"webhookId" cborgen:"webhookId"` +} + +// TempRepoRetryWebhookDelivery calls the XRPC method "org.tangled.temp.repo.retryWebhookDelivery". +func TempRepoRetryWebhookDelivery(ctx context.Context, c util.LexClient, input *TempRepoRetryWebhookDelivery_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.repo.retryWebhookDelivery", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/repotoggleWebhook.go b/api/tangled/repotoggleWebhook.go new file mode 100644 --- /dev/null +++ b/api/tangled/repotoggleWebhook.go @@ -0,0 +1,39 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.repo.toggleWebhook + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempRepoToggleWebhookNSID = "org.tangled.temp.repo.toggleWebhook" +) + +// TempRepoToggleWebhook_Input is the input argument to a org.tangled.temp.repo.toggleWebhook call. +type TempRepoToggleWebhook_Input struct { + // id: Webhook ID to toggle. + Id int64 `json:"id" cborgen:"id"` + // repoDid: DID of the repository as minted by the knot. + RepoDid string `json:"repoDid" cborgen:"repoDid"` +} + +// TempRepoToggleWebhook_Output is the output of a org.tangled.temp.repo.toggleWebhook call. +type TempRepoToggleWebhook_Output struct { + // active: New active state of the webhook. + Active bool `json:"active" cborgen:"active"` +} + +// TempRepoToggleWebhook calls the XRPC method "org.tangled.temp.repo.toggleWebhook". +func TempRepoToggleWebhook(ctx context.Context, c util.LexClient, input *TempRepoToggleWebhook_Input) (*TempRepoToggleWebhook_Output, error) { + var out TempRepoToggleWebhook_Output + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.repo.toggleWebhook", nil, input, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/repoupdateSiteConfig.go b/api/tangled/repoupdateSiteConfig.go new file mode 100644 --- /dev/null +++ b/api/tangled/repoupdateSiteConfig.go @@ -0,0 +1,36 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.repo.updateSiteConfig + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempRepoUpdateSiteConfigNSID = "org.tangled.temp.repo.updateSiteConfig" +) + +// TempRepoUpdateSiteConfig_Input is the input argument to a org.tangled.temp.repo.updateSiteConfig call. +type TempRepoUpdateSiteConfig_Input struct { + // branch: Branch to deploy from. + Branch string `json:"branch" cborgen:"branch"` + // dir: Directory within the repository to deploy (e.g. '/' or '/docs'). + Dir string `json:"dir" cborgen:"dir"` + // isIndex: Whether this repo should serve as the index (root) for the claimed domain. + IsIndex *bool `json:"isIndex,omitempty" cborgen:"isIndex,omitempty"` + // repoDid: DID of the repository as minted by the knot. + RepoDid string `json:"repoDid" cborgen:"repoDid"` +} + +// TempRepoUpdateSiteConfig calls the XRPC method "org.tangled.temp.repo.updateSiteConfig". +func TempRepoUpdateSiteConfig(ctx context.Context, c util.LexClient, input *TempRepoUpdateSiteConfig_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.repo.updateSiteConfig", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/repoupdateWebhook.go b/api/tangled/repoupdateWebhook.go new file mode 100644 --- /dev/null +++ b/api/tangled/repoupdateWebhook.go @@ -0,0 +1,36 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.repo.updateWebhook + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempRepoUpdateWebhookNSID = "org.tangled.temp.repo.updateWebhook" +) + +// TempRepoUpdateWebhook_Input is the input argument to a org.tangled.temp.repo.updateWebhook call. +type TempRepoUpdateWebhook_Input struct { + Active *bool `json:"active,omitempty" cborgen:"active,omitempty"` + Events []string `json:"events,omitempty" cborgen:"events,omitempty"` + // id: Webhook ID to update. + Id int64 `json:"id" cborgen:"id"` + // repoDid: DID of the repository as minted by the knot. + RepoDid string `json:"repoDid" cborgen:"repoDid"` + Secret *string `json:"secret,omitempty" cborgen:"secret,omitempty"` + Url *string `json:"url,omitempty" cborgen:"url,omitempty"` +} + +// TempRepoUpdateWebhook calls the XRPC method "org.tangled.temp.repo.updateWebhook". +func TempRepoUpdateWebhook(ctx context.Context, c util.LexClient, input *TempRepoUpdateWebhook_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.repo.updateWebhook", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/searchsearchCode.go b/api/tangled/searchsearchCode.go new file mode 100644 --- /dev/null +++ b/api/tangled/searchsearchCode.go @@ -0,0 +1,79 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.search.searchCode + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempSearchSearchCodeNSID = "org.tangled.temp.search.searchCode" +) + +// TempSearchSearchCode_Chunk is a "chunk" in the org.tangled.temp.search.searchCode schema. +type TempSearchSearchCode_Chunk struct { + // content: Source lines for this match chunk. + Content string `json:"content" cborgen:"content"` + // highlights: Byte-offset ranges within content that match the query. + Highlights []*TempSearchSearchCode_Highlight `json:"highlights,omitempty" cborgen:"highlights,omitempty"` + // lineStart: 1-based line number of the first line in content. + LineStart int64 `json:"lineStart" cborgen:"lineStart"` +} + +// TempSearchSearchCode_FileResult is a "fileResult" in the org.tangled.temp.search.searchCode schema. +type TempSearchSearchCode_FileResult struct { + Chunks []*TempSearchSearchCode_Chunk `json:"chunks" cborgen:"chunks"` + // language: Detected programming language. + Language *string `json:"language,omitempty" cborgen:"language,omitempty"` + // path: File path relative to repository root. + Path string `json:"path" cborgen:"path"` + // repoDid: DID of the repository as minted by the knot. + RepoDid string `json:"repoDid" cborgen:"repoDid"` +} + +// TempSearchSearchCode_Highlight is a "highlight" in the org.tangled.temp.search.searchCode schema. +type TempSearchSearchCode_Highlight struct { + // end: End byte offset (exclusive) within the chunk content string. + End int64 `json:"end" cborgen:"end"` + // start: Start byte offset within the chunk content string. + Start int64 `json:"start" cborgen:"start"` +} + +// TempSearchSearchCode_Output is the output of a org.tangled.temp.search.searchCode call. +type TempSearchSearchCode_Output struct { + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` + Results []*TempSearchSearchCode_FileResult `json:"results" cborgen:"results"` +} + +// TempSearchSearchCode calls the XRPC method "org.tangled.temp.search.searchCode". +// +// lang: Restrict search to a specific programming language (e.g. 'go', 'rust'). +// q: Search query string. +// repoDid: Restrict search to a specific repository, by its DID. +func TempSearchSearchCode(ctx context.Context, c util.LexClient, cursor string, lang string, limit int64, q string, repoDid string) (*TempSearchSearchCode_Output, error) { + var out TempSearchSearchCode_Output + + params := map[string]interface{}{} + if cursor != "" { + params["cursor"] = cursor + } + if lang != "" { + params["lang"] = lang + } + if limit != 0 { + params["limit"] = limit + } + params["q"] = q + if repoDid != "" { + params["repoDid"] = repoDid + } + if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.search.searchCode", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/siteclaimDomain.go b/api/tangled/siteclaimDomain.go new file mode 100644 --- /dev/null +++ b/api/tangled/siteclaimDomain.go @@ -0,0 +1,30 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.site.claimDomain + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempSiteClaimDomainNSID = "org.tangled.temp.site.claimDomain" +) + +// TempSiteClaimDomain_Input is the input argument to a org.tangled.temp.site.claimDomain call. +type TempSiteClaimDomain_Input struct { + // subdomain: Desired subdomain label (lowercase letters, digits, and hyphens; 4–63 characters). + Subdomain string `json:"subdomain" cborgen:"subdomain"` +} + +// TempSiteClaimDomain calls the XRPC method "org.tangled.temp.site.claimDomain". +func TempSiteClaimDomain(ctx context.Context, c util.LexClient, input *TempSiteClaimDomain_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.site.claimDomain", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/api/tangled/sitegetDomainClaim.go b/api/tangled/sitegetDomainClaim.go new file mode 100644 --- /dev/null +++ b/api/tangled/sitegetDomainClaim.go @@ -0,0 +1,31 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.site.getDomainClaim + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempSiteGetDomainClaimNSID = "org.tangled.temp.site.getDomainClaim" +) + +// TempSiteGetDomainClaim_Output is the output of a org.tangled.temp.site.getDomainClaim call. +type TempSiteGetDomainClaim_Output struct { + // domain: The claimed domain (e.g. 'alice.sites.tangled.sh'). Absent if no active claim. + Domain *string `json:"domain,omitempty" cborgen:"domain,omitempty"` +} + +// TempSiteGetDomainClaim calls the XRPC method "org.tangled.temp.site.getDomainClaim". +func TempSiteGetDomainClaim(ctx context.Context, c util.LexClient) (*TempSiteGetDomainClaim_Output, error) { + var out TempSiteGetDomainClaim_Output + if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.site.getDomainClaim", nil, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/sitereleaseDomain.go b/api/tangled/sitereleaseDomain.go new file mode 100644 --- /dev/null +++ b/api/tangled/sitereleaseDomain.go @@ -0,0 +1,30 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: org.tangled.temp.site.releaseDomain + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + TempSiteReleaseDomainNSID = "org.tangled.temp.site.releaseDomain" +) + +// TempSiteReleaseDomain_Input is the input argument to a org.tangled.temp.site.releaseDomain call. +type TempSiteReleaseDomain_Input struct { + // domain: Full domain to release (must match the user's active claim). + Domain string `json:"domain" cborgen:"domain"` +} + +// TempSiteReleaseDomain calls the XRPC method "org.tangled.temp.site.releaseDomain". +func TempSiteReleaseDomain(ctx context.Context, c util.LexClient, input *TempSiteReleaseDomain_Input) error { + if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.site.releaseDomain", nil, input, nil); err != nil { + return err + } + + return nil +} diff --git a/lexicons/temp/account/beginSignup.json b/lexicons/temp/account/beginSignup.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/account/beginSignup.json @@ -0,0 +1,33 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.account.beginSignup", + "defs": { + "main": { + "type": "procedure", + "description": "Begin signup: validate the Turnstile token and email a verification code to the address.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["email", "turnstileToken"], + "properties": { + "email": { + "type": "string", + "description": "Email address for the new account." + }, + "turnstileToken": { + "type": "string", + "description": "Cloudflare Turnstile challenge response token." + } + } + } + }, + "errors": [ + { "name": "SignupDisabled", "description": "Signup is not currently enabled on this service." }, + { "name": "InvalidTurnstileToken", "description": "The Turnstile captcha response could not be verified." }, + { "name": "InvalidEmail", "description": "The email address is not valid." }, + { "name": "EmailAlreadyRegistered", "description": "An account already exists for this email address." } + ] + } + } +} diff --git a/lexicons/temp/account/completeSignup.json b/lexicons/temp/account/completeSignup.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/account/completeSignup.json @@ -0,0 +1,55 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.account.completeSignup", + "defs": { + "main": { + "type": "procedure", + "description": "Complete signup: provision the PDS account for the chosen username using the verification code from the signup email.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["username", "password", "code"], + "properties": { + "username": { + "type": "string", + "description": "Desired username; the assigned handle is .." + }, + "password": { + "type": "string", + "description": "Password for the new account." + }, + "code": { + "type": "string", + "description": "Verification code from the signup email." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did", "handle"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "DID of the newly provisioned account." + }, + "handle": { + "type": "string", + "description": "The assigned handle, .." + } + } + } + }, + "errors": [ + { "name": "SignupDisabled", "description": "Signup is not currently enabled on this service." }, + { "name": "InvalidUsername", "description": "Username must be 4-63 characters, lowercase letters, digits, or hyphens, and cannot start or end with a hyphen." }, + { "name": "UsernameUnavailable", "description": "This username is reserved or already taken." }, + { "name": "InvalidCode", "description": "The verification code is invalid or has expired." } + ] + } + } +} diff --git a/lexicons/temp/account/deleteEmail.json b/lexicons/temp/account/deleteEmail.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/account/deleteEmail.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.account.deleteEmail", + "defs": { + "main": { + "type": "procedure", + "description": "Remove an email address from the authenticated account. Cannot remove the primary address.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["email"], + "properties": { + "email": { + "type": "string", + "description": "Email address to remove." + } + } + } + }, + "errors": [ + { "name": "CannotDeletePrimary", "description": "The primary email address cannot be deleted. Set another address as primary first." } + ] + } + } +} diff --git a/lexicons/temp/account/dismissNewsletter.json b/lexicons/temp/account/dismissNewsletter.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/account/dismissNewsletter.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.account.dismissNewsletter", + "defs": { + "main": { + "type": "procedure", + "description": "Dismiss the newsletter sign-up prompt without subscribing." + } + } +} diff --git a/lexicons/temp/account/listEmails.json b/lexicons/temp/account/listEmails.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/account/listEmails.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.account.listEmails", + "defs": { + "main": { + "type": "query", + "description": "List all email addresses associated with the authenticated account.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["emails"], + "properties": { + "emails": { + "type": "array", + "items": { + "type": "ref", + "ref": "#email" + } + } + } + } + } + }, + "email": { + "type": "object", + "required": ["address", "verified", "primary", "createdAt"], + "properties": { + "address": { + "type": "string", + "description": "Email address." + }, + "verified": { + "type": "boolean", + "description": "Whether the address has been verified." + }, + "primary": { + "type": "boolean", + "description": "Whether this is the primary email address." + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + } + } +} diff --git a/lexicons/temp/account/setPrimaryEmail.json b/lexicons/temp/account/setPrimaryEmail.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/account/setPrimaryEmail.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.account.setPrimaryEmail", + "defs": { + "main": { + "type": "procedure", + "description": "Set an email address as the primary address for the authenticated account. The address must already be verified.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["email"], + "properties": { + "email": { + "type": "string", + "description": "Email address to promote to primary." + } + } + } + }, + "errors": [ + { "name": "EmailNotVerified", "description": "The email address must be verified before it can be made primary." }, + { "name": "EmailNotFound", "description": "The email address is not associated with this account." } + ] + } + } +} diff --git a/lexicons/temp/account/subscribeNewsletter.json b/lexicons/temp/account/subscribeNewsletter.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/account/subscribeNewsletter.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.account.subscribeNewsletter", + "defs": { + "main": { + "type": "procedure", + "description": "Opt the authenticated account into newsletter / announcement emails." + } + } +} diff --git a/lexicons/temp/focus/beginSession.json b/lexicons/temp/focus/beginSession.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/focus/beginSession.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.focus.beginSession", + "defs": { + "main": { + "type": "procedure", + "description": "Activate focus mode. Returns the oldest unread work notification so the client can navigate to it.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "notificationId": { + "type": "integer", + "description": "ID of the first notification to address. Absent if the queue is empty." + }, + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository the item belongs to. Absent if the queue is empty." + }, + "issueAt": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the issue to navigate to, if the item is an issue." + }, + "pullAt": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the pull to navigate to, if the item is a pull." + } + } + } + }, + "errors": [ + { + "name": "NoFocusItems", + "description": "There are no unread work notifications to focus on." + } + ] + } + } +} diff --git a/lexicons/temp/focus/endSession.json b/lexicons/temp/focus/endSession.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/focus/endSession.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.focus.endSession", + "defs": { + "main": { + "type": "procedure", + "description": "Deactivate focus mode." + } + } +} diff --git a/lexicons/temp/focus/nextItem.json b/lexicons/temp/focus/nextItem.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/focus/nextItem.json @@ -0,0 +1,50 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.focus.nextItem", + "defs": { + "main": { + "type": "procedure", + "description": "Mark the current focus notification as read and return the next one. Ends focus mode and returns no item when the queue is exhausted.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["currentId"], + "properties": { + "currentId": { + "type": "integer", + "description": "ID of the notification just addressed, to be marked read." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "notificationId": { + "type": "integer", + "description": "ID of the next notification to address. Absent when focus mode has ended." + }, + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository the next item belongs to. Absent when focus mode has ended." + }, + "issueAt": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the issue to navigate to, if the item is an issue." + }, + "pullAt": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the pull to navigate to, if the item is a pull." + } + } + } + } + } + } +} diff --git a/lexicons/temp/notification/deleteNotification.json b/lexicons/temp/notification/deleteNotification.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/notification/deleteNotification.json @@ -0,0 +1,23 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.notification.deleteNotification", + "defs": { + "main": { + "type": "procedure", + "description": "Delete a notification.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["id"], + "properties": { + "id": { + "type": "integer", + "description": "ID of the notification to delete." + } + } + } + } + } + } +} diff --git a/lexicons/temp/notification/getPreferences.json b/lexicons/temp/notification/getPreferences.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/notification/getPreferences.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.notification.getPreferences", + "defs": { + "main": { + "type": "query", + "description": "Get notification preferences for the authenticated user.", + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "#preferences" + } + } + }, + "preferences": { + "type": "object", + "required": [ + "repoStarred", + "issueCreated", + "issueCommented", + "issueClosed", + "pullCreated", + "pullCommented", + "pullMerged", + "followed", + "userMentioned", + "emailNotifications" + ], + "properties": { + "repoStarred": { "type": "boolean" }, + "issueCreated": { "type": "boolean" }, + "issueCommented": { "type": "boolean" }, + "issueClosed": { "type": "boolean" }, + "pullCreated": { "type": "boolean" }, + "pullCommented": { "type": "boolean" }, + "pullMerged": { "type": "boolean" }, + "followed": { "type": "boolean" }, + "userMentioned": { "type": "boolean" }, + "emailNotifications": { "type": "boolean" } + } + } + } +} diff --git a/lexicons/temp/notification/getUnreadCount.json b/lexicons/temp/notification/getUnreadCount.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/notification/getUnreadCount.json @@ -0,0 +1,22 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.notification.getUnreadCount", + "defs": { + "main": { + "type": "query", + "description": "Get the total number of unread notifications for the authenticated user. Used to drive the bell badge.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["count"], + "properties": { + "count": { + "type": "integer" + } + } + } + } + } + } +} diff --git a/lexicons/temp/notification/listNotifications.json b/lexicons/temp/notification/listNotifications.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/notification/listNotifications.json @@ -0,0 +1,102 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.notification.listNotifications", + "defs": { + "main": { + "type": "query", + "description": "List notifications for the authenticated user, split by category.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "Max notifications per category to return." + }, + "cursor": { + "type": "string" + }, + "read": { + "type": "string", + "description": "Filter by read state: 'all' or 'unread'." + }, + "category": { + "type": "string", + "description": "Filter by category: 'all', 'social', or 'work'." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["notifications", "workUnreadCount", "socialUnreadCount"], + "properties": { + "notifications": { + "type": "array", + "items": { + "type": "ref", + "ref": "#notification" + } + }, + "workUnreadCount": { + "type": "integer" + }, + "socialUnreadCount": { + "type": "integer" + }, + "cursor": { + "type": "string" + } + } + } + } + }, + "notification": { + "type": "object", + "required": ["id", "type", "category", "actorDid", "read", "createdAt"], + "properties": { + "id": { + "type": "integer", + "description": "Stable numeric ID for this notification." + }, + "type": { + "type": "string", + "description": "Notification type: repo_starred, issue_created, issue_commented, issue_closed, issue_reopen, issue_assigned, issue_unassigned, pull_created, pull_commented, pull_merged, pull_closed, pull_reopen, pull_assigned, pull_unassigned, followed, user_mentioned." + }, + "category": { + "type": "string", + "description": "Broad category: 'social' or 'work'." + }, + "actorDid": { + "type": "string", + "format": "did", + "description": "DID of the user who triggered this notification." + }, + "read": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the related repository, if applicable." + }, + "issueAt": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the related org.tangled.issue.issue record, if applicable." + }, + "pullAt": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the related org.tangled.pulls.pull record, if applicable." + } + } + } + } +} diff --git a/lexicons/temp/notification/markAllRead.json b/lexicons/temp/notification/markAllRead.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/notification/markAllRead.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.notification.markAllRead", + "defs": { + "main": { + "type": "procedure", + "description": "Mark all of the authenticated user's notifications as read." + } + } +} diff --git a/lexicons/temp/notification/updatePreferences.json b/lexicons/temp/notification/updatePreferences.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/notification/updatePreferences.json @@ -0,0 +1,28 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.notification.updatePreferences", + "defs": { + "main": { + "type": "procedure", + "description": "Update notification preferences for the authenticated user. Only provided fields are updated.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "repoStarred": { "type": "boolean" }, + "issueCreated": { "type": "boolean" }, + "issueCommented": { "type": "boolean" }, + "issueClosed": { "type": "boolean" }, + "pullCreated": { "type": "boolean" }, + "pullCommented": { "type": "boolean" }, + "pullMerged": { "type": "boolean" }, + "followed": { "type": "boolean" }, + "userMentioned": { "type": "boolean" }, + "emailNotifications": { "type": "boolean" } + } + } + } + } + } +} diff --git a/lexicons/temp/notification/updateSeen.json b/lexicons/temp/notification/updateSeen.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/notification/updateSeen.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.notification.updateSeen", + "defs": { + "main": { + "type": "procedure", + "description": "Mark a single notification as read or unread.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["id", "read"], + "properties": { + "id": { + "type": "integer", + "description": "ID of the notification to update." + }, + "read": { + "type": "boolean" + } + } + } + } + } + } +} diff --git a/lexicons/temp/repo/createWebhook.json b/lexicons/temp/repo/createWebhook.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/repo/createWebhook.json @@ -0,0 +1,60 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.repo.createWebhook", + "defs": { + "main": { + "type": "procedure", + "description": "Create a new webhook for a repository.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repoDid", "url", "events"], + "properties": { + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository as minted by the knot." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Endpoint URL that will receive webhook payloads." + }, + "secret": { + "type": "string", + "description": "Optional HMAC secret used to sign payloads. If omitted, payloads are not signed." + }, + "active": { + "type": "boolean", + "description": "Whether the webhook should be active immediately. Defaults to true." + }, + "events": { + "type": "array", + "description": "Event types to subscribe to (e.g. 'push', 'repository:renamed').", + "items": { + "type": "string" + } + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["id"], + "properties": { + "id": { + "type": "integer", + "description": "ID of the newly created webhook." + } + } + } + }, + "errors": [ + { "name": "NoEventsSelected", "description": "At least one event type must be specified." } + ] + } + } +} diff --git a/lexicons/temp/repo/deleteWebhook.json b/lexicons/temp/repo/deleteWebhook.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/repo/deleteWebhook.json @@ -0,0 +1,31 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.repo.deleteWebhook", + "defs": { + "main": { + "type": "procedure", + "description": "Delete a webhook from a repository.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repoDid", "id"], + "properties": { + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository as minted by the knot." + }, + "id": { + "type": "integer", + "description": "Webhook ID to delete." + } + } + } + }, + "errors": [ + { "name": "WebhookNotFound" } + ] + } + } +} diff --git a/lexicons/temp/repo/disableSite.json b/lexicons/temp/repo/disableSite.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/repo/disableSite.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.repo.disableSite", + "defs": { + "main": { + "type": "procedure", + "description": "Remove the site configuration for a repository, deleting its deployed files.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repoDid"], + "properties": { + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository as minted by the knot." + } + } + } + }, + "errors": [ + { "name": "SiteNotFound", "description": "No site configuration exists for this repository." } + ] + } + } +} diff --git a/lexicons/temp/repo/getSiteConfig.json b/lexicons/temp/repo/getSiteConfig.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/repo/getSiteConfig.json @@ -0,0 +1,52 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.repo.getSiteConfig", + "defs": { + "main": { + "type": "query", + "description": "Get the site configuration for a repository, if one exists.", + "parameters": { + "type": "params", + "required": ["repoDid"], + "properties": { + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository as minted by the knot." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "config": { + "type": "ref", + "ref": "#siteConfig", + "description": "Site config for the repository. Absent if no site is configured." + } + } + } + } + }, + "siteConfig": { + "type": "object", + "required": ["branch", "dir", "isIndex"], + "properties": { + "branch": { + "type": "string", + "description": "Branch to deploy from." + }, + "dir": { + "type": "string", + "description": "Directory within the repository to deploy (e.g. '/' or '/docs')." + }, + "isIndex": { + "type": "boolean", + "description": "Whether this repo serves as the index (root) for the domain." + } + } + } + } +} diff --git a/lexicons/temp/repo/listWebhookDeliveries.json b/lexicons/temp/repo/listWebhookDeliveries.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/repo/listWebhookDeliveries.json @@ -0,0 +1,83 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.repo.listWebhookDeliveries", + "defs": { + "main": { + "type": "query", + "description": "List recent delivery attempts for a webhook.", + "parameters": { + "type": "params", + "required": ["repoDid", "id"], + "properties": { + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository as minted by the knot." + }, + "id": { + "type": "integer", + "description": "Webhook ID." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["deliveries"], + "properties": { + "deliveries": { + "type": "array", + "items": { + "type": "ref", + "ref": "#delivery" + } + } + } + } + } + }, + "delivery": { + "type": "object", + "required": ["id", "deliveryId", "event", "url", "success", "createdAt"], + "properties": { + "id": { + "type": "integer" + }, + "deliveryId": { + "type": "string", + "description": "UUID for tracking this delivery attempt." + }, + "event": { + "type": "string", + "description": "Event type that triggered the delivery." + }, + "url": { + "type": "string", + "format": "uri" + }, + "requestBody": { + "type": "string" + }, + "responseCode": { + "type": "integer" + }, + "responseBody": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + } + } +} diff --git a/lexicons/temp/repo/listWebhooks.json b/lexicons/temp/repo/listWebhooks.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/repo/listWebhooks.json @@ -0,0 +1,71 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.repo.listWebhooks", + "defs": { + "main": { + "type": "query", + "description": "List webhooks configured for a repository.", + "parameters": { + "type": "params", + "required": ["repoDid"], + "properties": { + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository as minted by the knot." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["webhooks"], + "properties": { + "webhooks": { + "type": "array", + "items": { + "type": "ref", + "ref": "#webhook" + } + } + } + } + } + }, + "webhook": { + "type": "object", + "required": ["id", "url", "active", "events", "createdAt"], + "properties": { + "id": { + "type": "integer", + "description": "Webhook identifier." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Endpoint URL that receives webhook payloads." + }, + "active": { + "type": "boolean", + "description": "Whether the webhook is currently enabled." + }, + "events": { + "type": "array", + "description": "Event types this webhook is subscribed to (e.g. 'push', 'repository:renamed').", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "updatedAt": { + "type": "string", + "format": "datetime" + } + } + } + } +} diff --git a/lexicons/temp/repo/retryWebhookDelivery.json b/lexicons/temp/repo/retryWebhookDelivery.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/repo/retryWebhookDelivery.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.repo.retryWebhookDelivery", + "defs": { + "main": { + "type": "procedure", + "description": "Re-send a specific webhook delivery.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repoDid", "webhookId", "deliveryId"], + "properties": { + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository as minted by the knot." + }, + "webhookId": { + "type": "integer", + "description": "Webhook ID that owns the delivery." + }, + "deliveryId": { + "type": "string", + "description": "UUID of the delivery to retry." + } + } + } + }, + "errors": [ + { "name": "WebhookNotFound" }, + { "name": "DeliveryNotFound" } + ] + } + } +} diff --git a/lexicons/temp/repo/toggleWebhook.json b/lexicons/temp/repo/toggleWebhook.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/repo/toggleWebhook.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.repo.toggleWebhook", + "defs": { + "main": { + "type": "procedure", + "description": "Toggle the active state of a webhook.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repoDid", "id"], + "properties": { + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository as minted by the knot." + }, + "id": { + "type": "integer", + "description": "Webhook ID to toggle." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["active"], + "properties": { + "active": { + "type": "boolean", + "description": "New active state of the webhook." + } + } + } + }, + "errors": [ + { "name": "WebhookNotFound" } + ] + } + } +} diff --git a/lexicons/temp/repo/updateSiteConfig.json b/lexicons/temp/repo/updateSiteConfig.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/repo/updateSiteConfig.json @@ -0,0 +1,39 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.repo.updateSiteConfig", + "defs": { + "main": { + "type": "procedure", + "description": "Create or update the site configuration for a repository and trigger a deployment.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repoDid", "branch", "dir"], + "properties": { + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository as minted by the knot." + }, + "branch": { + "type": "string", + "description": "Branch to deploy from." + }, + "dir": { + "type": "string", + "description": "Directory within the repository to deploy (e.g. '/' or '/docs')." + }, + "isIndex": { + "type": "boolean", + "description": "Whether this repo should serve as the index (root) for the claimed domain." + } + } + } + }, + "errors": [ + { "name": "NoDomainClaim", "description": "The account does not have an active domain claim." } + ] + } + } +} diff --git a/lexicons/temp/repo/updateWebhook.json b/lexicons/temp/repo/updateWebhook.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/repo/updateWebhook.json @@ -0,0 +1,47 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.repo.updateWebhook", + "defs": { + "main": { + "type": "procedure", + "description": "Update an existing webhook. Only supplied fields are changed.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repoDid", "id"], + "properties": { + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository as minted by the knot." + }, + "id": { + "type": "integer", + "description": "Webhook ID to update." + }, + "url": { + "type": "string", + "format": "uri" + }, + "secret": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "errors": [ + { "name": "WebhookNotFound" } + ] + } + } +} diff --git a/lexicons/temp/search/searchCode.json b/lexicons/temp/search/searchCode.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/search/searchCode.json @@ -0,0 +1,118 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.search.searchCode", + "defs": { + "main": { + "type": "query", + "description": "Full-text code search across indexed repositories, backed by Zoekt.", + "parameters": { + "type": "params", + "required": ["q"], + "properties": { + "q": { + "type": "string", + "description": "Search query string." + }, + "repoDid": { + "type": "string", + "format": "did", + "description": "Restrict search to a specific repository, by its DID." + }, + "lang": { + "type": "string", + "description": "Restrict search to a specific programming language (e.g. 'go', 'rust')." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "cursor": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["results"], + "properties": { + "results": { + "type": "array", + "items": { + "type": "ref", + "ref": "#fileResult" + } + }, + "cursor": { + "type": "string" + } + } + } + } + }, + "fileResult": { + "type": "object", + "required": ["repoDid", "path", "chunks"], + "properties": { + "repoDid": { + "type": "string", + "format": "did", + "description": "DID of the repository as minted by the knot." + }, + "path": { + "type": "string", + "description": "File path relative to repository root." + }, + "language": { + "type": "string", + "description": "Detected programming language." + }, + "chunks": { + "type": "array", + "items": { + "type": "ref", + "ref": "#chunk" + } + } + } + }, + "chunk": { + "type": "object", + "required": ["content", "lineStart"], + "properties": { + "content": { + "type": "string", + "description": "Source lines for this match chunk." + }, + "lineStart": { + "type": "integer", + "description": "1-based line number of the first line in content." + }, + "highlights": { + "type": "array", + "description": "Byte-offset ranges within content that match the query.", + "items": { + "type": "ref", + "ref": "#highlight" + } + } + } + }, + "highlight": { + "type": "object", + "required": ["start", "end"], + "properties": { + "start": { + "type": "integer", + "description": "Start byte offset within the chunk content string." + }, + "end": { + "type": "integer", + "description": "End byte offset (exclusive) within the chunk content string." + } + } + } + } +} diff --git a/lexicons/temp/site/claimDomain.json b/lexicons/temp/site/claimDomain.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/site/claimDomain.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.site.claimDomain", + "defs": { + "main": { + "type": "procedure", + "description": "Claim a subdomain under the sites domain (e.g. 'alice' → alice.sites.tangled.sh) for the authenticated user.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["subdomain"], + "properties": { + "subdomain": { + "type": "string", + "description": "Desired subdomain label (lowercase letters, digits, and hyphens; 4–63 characters)." + } + } + } + }, + "errors": [ + { "name": "DomainTaken", "description": "That subdomain is already claimed by another user." }, + { "name": "DomainCooldown", "description": "That subdomain was recently released and is in a cooldown period." }, + { "name": "AlreadyClaimed", "description": "You already have a domain claimed. Release it before claiming a new one." }, + { "name": "InvalidSubdomain", "description": "The subdomain label is invalid." } + ] + } + } +} diff --git a/lexicons/temp/site/getDomainClaim.json b/lexicons/temp/site/getDomainClaim.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/site/getDomainClaim.json @@ -0,0 +1,22 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.site.getDomainClaim", + "defs": { + "main": { + "type": "query", + "description": "Get the active sites domain claim for the authenticated user, if any.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "The claimed domain (e.g. 'alice.sites.tangled.sh'). Absent if no active claim." + } + } + } + } + } + } +} diff --git a/lexicons/temp/site/releaseDomain.json b/lexicons/temp/site/releaseDomain.json new file mode 100644 --- /dev/null +++ b/lexicons/temp/site/releaseDomain.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.site.releaseDomain", + "defs": { + "main": { + "type": "procedure", + "description": "Release the authenticated user's active domain claim, removing all associated site data.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["domain"], + "properties": { + "domain": { + "type": "string", + "description": "Full domain to release (must match the user's active claim)." + } + } + } + }, + "errors": [ + { "name": "DomainNotFound", "description": "No active claim found for the given domain under this account." } + ] + } + } +} -- tangled.sh