diff --git a/web/lex.config.ts b/web/lex.config.ts --- a/web/lex.config.ts +++ b/web/lex.config.ts @@ -28,6 +28,7 @@ "../lexicons/search/**/*.json", "../lexicons/spindle/**/*.json", "../lexicons/string/**/*.json", + "../lexicons/temp/**/*.json", "../lexicons/sync/**/*.json", "../bobbin/crates/types/lexicons/**/*.json" ] diff --git a/web/src/lib/api/lexicons/index.ts b/web/src/lib/api/lexicons/index.ts --- a/web/src/lib/api/lexicons/index.ts +++ b/web/src/lib/api/lexicons/index.ts @@ -1,3 +1,34 @@ +export * as OrgTangledTempAccountBeginSignup from "./types/org/tangled/temp/account/beginSignup.js"; +export * as OrgTangledTempAccountCompleteSignup from "./types/org/tangled/temp/account/completeSignup.js"; +export * as OrgTangledTempAccountDeleteEmail from "./types/org/tangled/temp/account/deleteEmail.js"; +export * as OrgTangledTempAccountDismissNewsletter from "./types/org/tangled/temp/account/dismissNewsletter.js"; +export * as OrgTangledTempAccountListEmails from "./types/org/tangled/temp/account/listEmails.js"; +export * as OrgTangledTempAccountSetPrimaryEmail from "./types/org/tangled/temp/account/setPrimaryEmail.js"; +export * as OrgTangledTempAccountSubscribeNewsletter from "./types/org/tangled/temp/account/subscribeNewsletter.js"; +export * as OrgTangledTempFocusBeginSession from "./types/org/tangled/temp/focus/beginSession.js"; +export * as OrgTangledTempFocusEndSession from "./types/org/tangled/temp/focus/endSession.js"; +export * as OrgTangledTempFocusNextItem from "./types/org/tangled/temp/focus/nextItem.js"; +export * as OrgTangledTempNotificationDeleteNotification from "./types/org/tangled/temp/notification/deleteNotification.js"; +export * as OrgTangledTempNotificationGetPreferences from "./types/org/tangled/temp/notification/getPreferences.js"; +export * as OrgTangledTempNotificationGetUnreadCount from "./types/org/tangled/temp/notification/getUnreadCount.js"; +export * as OrgTangledTempNotificationListNotifications from "./types/org/tangled/temp/notification/listNotifications.js"; +export * as OrgTangledTempNotificationMarkAllRead from "./types/org/tangled/temp/notification/markAllRead.js"; +export * as OrgTangledTempNotificationUpdatePreferences from "./types/org/tangled/temp/notification/updatePreferences.js"; +export * as OrgTangledTempNotificationUpdateSeen from "./types/org/tangled/temp/notification/updateSeen.js"; +export * as OrgTangledTempRepoCreateWebhook from "./types/org/tangled/temp/repo/createWebhook.js"; +export * as OrgTangledTempRepoDeleteWebhook from "./types/org/tangled/temp/repo/deleteWebhook.js"; +export * as OrgTangledTempRepoDisableSite from "./types/org/tangled/temp/repo/disableSite.js"; +export * as OrgTangledTempRepoGetSiteConfig from "./types/org/tangled/temp/repo/getSiteConfig.js"; +export * as OrgTangledTempRepoListWebhookDeliveries from "./types/org/tangled/temp/repo/listWebhookDeliveries.js"; +export * as OrgTangledTempRepoListWebhooks from "./types/org/tangled/temp/repo/listWebhooks.js"; +export * as OrgTangledTempRepoRetryWebhookDelivery from "./types/org/tangled/temp/repo/retryWebhookDelivery.js"; +export * as OrgTangledTempRepoToggleWebhook from "./types/org/tangled/temp/repo/toggleWebhook.js"; +export * as OrgTangledTempRepoUpdateSiteConfig from "./types/org/tangled/temp/repo/updateSiteConfig.js"; +export * as OrgTangledTempRepoUpdateWebhook from "./types/org/tangled/temp/repo/updateWebhook.js"; +export * as OrgTangledTempSearchSearchCode from "./types/org/tangled/temp/search/searchCode.js"; +export * as OrgTangledTempSiteClaimDomain from "./types/org/tangled/temp/site/claimDomain.js"; +export * as OrgTangledTempSiteGetDomainClaim from "./types/org/tangled/temp/site/getDomainClaim.js"; +export * as OrgTangledTempSiteReleaseDomain from "./types/org/tangled/temp/site/releaseDomain.js"; export * as ShTangledActorDefs from "./types/sh/tangled/actor/defs.js"; export * as ShTangledActorGetProfile from "./types/sh/tangled/actor/getProfile.js"; export * as ShTangledActorGetProfiles from "./types/sh/tangled/actor/getProfiles.js"; diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/account/beginSignup.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/account/beginSignup.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/account/beginSignup.ts @@ -0,0 +1,39 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.account.beginSignup", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Email address for the new account. + */ + email: /*#__PURE__*/ v.string(), + /** + * Cloudflare Turnstile challenge response token. + */ + turnstileToken: /*#__PURE__*/ v.string(), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.account.beginSignup": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/account/completeSignup.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/account/completeSignup.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/account/completeSignup.ts @@ -0,0 +1,56 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.account.completeSignup", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Verification code from the signup email. + */ + code: /*#__PURE__*/ v.string(), + /** + * Password for the new account. + */ + password: /*#__PURE__*/ v.string(), + /** + * Desired username; the assigned handle is .. + */ + username: /*#__PURE__*/ v.string(), + }), + }, + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * DID of the newly provisioned account. + */ + did: /*#__PURE__*/ v.didString(), + /** + * The assigned handle, .. + */ + handle: /*#__PURE__*/ v.string(), + }), + }, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.account.completeSignup": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/account/deleteEmail.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/account/deleteEmail.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/account/deleteEmail.ts @@ -0,0 +1,35 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.account.deleteEmail", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Email address to remove. + */ + email: /*#__PURE__*/ v.string(), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.account.deleteEmail": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/account/dismissNewsletter.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/account/dismissNewsletter.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/account/dismissNewsletter.ts @@ -0,0 +1,26 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.account.dismissNewsletter", + { + params: null, + input: null, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.account.dismissNewsletter": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/account/listEmails.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/account/listEmails.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/account/listEmails.ts @@ -0,0 +1,56 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _emailSchema = /*#__PURE__*/ v.object({ + $type: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.literal("org.tangled.temp.account.listEmails#email"), + ), + /** + * Email address. + */ + address: /*#__PURE__*/ v.string(), + createdAt: /*#__PURE__*/ v.datetimeString(), + /** + * Whether this is the primary email address. + */ + primary: /*#__PURE__*/ v.boolean(), + /** + * Whether the address has been verified. + */ + verified: /*#__PURE__*/ v.boolean(), +}); +const _mainSchema = /*#__PURE__*/ v.query( + "org.tangled.temp.account.listEmails", + { + params: null, + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + get emails() { + return /*#__PURE__*/ v.array(emailSchema); + }, + }), + }, + }, +); + +type email$schematype = typeof _emailSchema; +type main$schematype = typeof _mainSchema; + +export interface emailSchema extends email$schematype {} +export interface mainSchema extends main$schematype {} + +export const emailSchema = _emailSchema as emailSchema; +export const mainSchema = _mainSchema as mainSchema; + +export interface Email extends v.InferInput {} + +export interface $params {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCQueries { + "org.tangled.temp.account.listEmails": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/account/setPrimaryEmail.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/account/setPrimaryEmail.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/account/setPrimaryEmail.ts @@ -0,0 +1,35 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.account.setPrimaryEmail", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Email address to promote to primary. + */ + email: /*#__PURE__*/ v.string(), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.account.setPrimaryEmail": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/account/subscribeNewsletter.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/account/subscribeNewsletter.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/account/subscribeNewsletter.ts @@ -0,0 +1,26 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.account.subscribeNewsletter", + { + params: null, + input: null, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.account.subscribeNewsletter": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/focus/beginSession.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/focus/beginSession.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/focus/beginSession.ts @@ -0,0 +1,47 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.focus.beginSession", + { + params: null, + input: null, + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * AT-URI of the issue to navigate to, if the item is an issue. + */ + issueAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + /** + * ID of the first notification to address. Absent if the queue is empty. + */ + notificationId: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), + /** + * AT-URI of the pull to navigate to, if the item is a pull. + */ + pullAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + /** + * DID of the repository the item belongs to. Absent if the queue is empty. + */ + repoDid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), + }), + }, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.focus.beginSession": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/focus/endSession.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/focus/endSession.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/focus/endSession.ts @@ -0,0 +1,26 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.focus.endSession", + { + params: null, + input: null, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.focus.endSession": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/focus/nextItem.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/focus/nextItem.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/focus/nextItem.ts @@ -0,0 +1,56 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.focus.nextItem", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * ID of the notification just addressed, to be marked read. + */ + currentId: /*#__PURE__*/ v.integer(), + }), + }, + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * AT-URI of the issue to navigate to, if the item is an issue. + */ + issueAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + /** + * ID of the next notification to address. Absent when focus mode has ended. + */ + notificationId: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), + /** + * AT-URI of the pull to navigate to, if the item is a pull. + */ + pullAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + /** + * DID of the repository the next item belongs to. Absent when focus mode has ended. + */ + repoDid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), + }), + }, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.focus.nextItem": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/notification/deleteNotification.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/deleteNotification.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/deleteNotification.ts @@ -0,0 +1,35 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.notification.deleteNotification", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * ID of the notification to delete. + */ + id: /*#__PURE__*/ v.integer(), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.notification.deleteNotification": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/notification/getPreferences.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/getPreferences.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/getPreferences.ts @@ -0,0 +1,53 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.query( + "org.tangled.temp.notification.getPreferences", + { + params: null, + output: { + type: "lex", + get schema() { + return preferencesSchema; + }, + }, + }, +); +const _preferencesSchema = /*#__PURE__*/ v.object({ + $type: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.literal( + "org.tangled.temp.notification.getPreferences#preferences", + ), + ), + emailNotifications: /*#__PURE__*/ v.boolean(), + followed: /*#__PURE__*/ v.boolean(), + issueClosed: /*#__PURE__*/ v.boolean(), + issueCommented: /*#__PURE__*/ v.boolean(), + issueCreated: /*#__PURE__*/ v.boolean(), + pullCommented: /*#__PURE__*/ v.boolean(), + pullCreated: /*#__PURE__*/ v.boolean(), + pullMerged: /*#__PURE__*/ v.boolean(), + repoStarred: /*#__PURE__*/ v.boolean(), + userMentioned: /*#__PURE__*/ v.boolean(), +}); + +type main$schematype = typeof _mainSchema; +type preferences$schematype = typeof _preferencesSchema; + +export interface mainSchema extends main$schematype {} +export interface preferencesSchema extends preferences$schematype {} + +export const mainSchema = _mainSchema as mainSchema; +export const preferencesSchema = _preferencesSchema as preferencesSchema; + +export interface Preferences extends v.InferInput {} + +export interface $params {} +export type $output = v.InferXRPCBodyInput; + +declare module "@atcute/lexicons/ambient" { + interface XRPCQueries { + "org.tangled.temp.notification.getPreferences": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/notification/getUnreadCount.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/getUnreadCount.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/getUnreadCount.ts @@ -0,0 +1,31 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.query( + "org.tangled.temp.notification.getUnreadCount", + { + params: null, + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + count: /*#__PURE__*/ v.integer(), + }), + }, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCQueries { + "org.tangled.temp.notification.getUnreadCount": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/notification/listNotifications.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/listNotifications.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/listNotifications.ts @@ -0,0 +1,98 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.query( + "org.tangled.temp.notification.listNotifications", + { + params: /*#__PURE__*/ v.object({ + /** + * Filter by category: 'all', 'social', or 'work'. + */ + category: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + /** + * Max notifications per category to return. + * @minimum 1 + * @maximum 100 + */ + limit: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ + /*#__PURE__*/ v.integerRange(1, 100), + ]), + ), + /** + * Filter by read state: 'all' or 'unread'. + */ + read: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + }), + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + get notifications() { + return /*#__PURE__*/ v.array(notificationSchema); + }, + socialUnreadCount: /*#__PURE__*/ v.integer(), + workUnreadCount: /*#__PURE__*/ v.integer(), + }), + }, + }, +); +const _notificationSchema = /*#__PURE__*/ v.object({ + $type: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.literal( + "org.tangled.temp.notification.listNotifications#notification", + ), + ), + /** + * DID of the user who triggered this notification. + */ + actorDid: /*#__PURE__*/ v.didString(), + /** + * Broad category: 'social' or 'work'. + */ + category: /*#__PURE__*/ v.string(), + createdAt: /*#__PURE__*/ v.datetimeString(), + /** + * Stable numeric ID for this notification. + */ + id: /*#__PURE__*/ v.integer(), + /** + * AT-URI of the related org.tangled.issue.issue record, if applicable. + */ + issueAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + /** + * AT-URI of the related org.tangled.pulls.pull record, if applicable. + */ + pullAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + read: /*#__PURE__*/ v.boolean(), + /** + * DID of the related repository, if applicable. + */ + repoDid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), + /** + * 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: /*#__PURE__*/ v.string(), +}); + +type main$schematype = typeof _mainSchema; +type notification$schematype = typeof _notificationSchema; + +export interface mainSchema extends main$schematype {} +export interface notificationSchema extends notification$schematype {} + +export const mainSchema = _mainSchema as mainSchema; +export const notificationSchema = _notificationSchema as notificationSchema; + +export interface Notification extends v.InferInput {} + +export interface $params extends v.InferInput {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCQueries { + "org.tangled.temp.notification.listNotifications": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/notification/markAllRead.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/markAllRead.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/markAllRead.ts @@ -0,0 +1,26 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.notification.markAllRead", + { + params: null, + input: null, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.notification.markAllRead": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/notification/updatePreferences.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/updatePreferences.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/updatePreferences.ts @@ -0,0 +1,41 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.notification.updatePreferences", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + emailNotifications: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + followed: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + issueClosed: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + issueCommented: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + issueCreated: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + pullCommented: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + pullCreated: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + pullMerged: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + repoStarred: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + userMentioned: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.notification.updatePreferences": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/notification/updateSeen.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/updateSeen.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/updateSeen.ts @@ -0,0 +1,36 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.notification.updateSeen", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * ID of the notification to update. + */ + id: /*#__PURE__*/ v.integer(), + read: /*#__PURE__*/ v.boolean(), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.notification.updateSeen": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/repo/createWebhook.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/createWebhook.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/createWebhook.ts @@ -0,0 +1,60 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.repo.createWebhook", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Whether the webhook should be active immediately. Defaults to true. + */ + active: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + /** + * Event types to subscribe to (e.g. 'push', 'repository:renamed'). + */ + events: /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), + /** + * DID of the repository as minted by the knot. + */ + repoDid: /*#__PURE__*/ v.didString(), + /** + * Optional HMAC secret used to sign payloads. If omitted, payloads are not signed. + */ + secret: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + /** + * Endpoint URL that will receive webhook payloads. + */ + url: /*#__PURE__*/ v.genericUriString(), + }), + }, + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * ID of the newly created webhook. + */ + id: /*#__PURE__*/ v.integer(), + }), + }, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.repo.createWebhook": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/repo/deleteWebhook.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/deleteWebhook.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/deleteWebhook.ts @@ -0,0 +1,39 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.repo.deleteWebhook", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Webhook ID to delete. + */ + id: /*#__PURE__*/ v.integer(), + /** + * DID of the repository as minted by the knot. + */ + repoDid: /*#__PURE__*/ v.didString(), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.repo.deleteWebhook": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/repo/disableSite.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/disableSite.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/disableSite.ts @@ -0,0 +1,35 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.repo.disableSite", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * DID of the repository as minted by the knot. + */ + repoDid: /*#__PURE__*/ v.didString(), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.repo.disableSite": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/repo/getSiteConfig.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/getSiteConfig.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/getSiteConfig.ts @@ -0,0 +1,63 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.query( + "org.tangled.temp.repo.getSiteConfig", + { + params: /*#__PURE__*/ v.object({ + /** + * DID of the repository as minted by the knot. + */ + repoDid: /*#__PURE__*/ v.didString(), + }), + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Site config for the repository. Absent if no site is configured. + */ + get config() { + return /*#__PURE__*/ v.optional(siteConfigSchema); + }, + }), + }, + }, +); +const _siteConfigSchema = /*#__PURE__*/ v.object({ + $type: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.literal("org.tangled.temp.repo.getSiteConfig#siteConfig"), + ), + /** + * Branch to deploy from. + */ + branch: /*#__PURE__*/ v.string(), + /** + * Directory within the repository to deploy (e.g. '/' or '/docs'). + */ + dir: /*#__PURE__*/ v.string(), + /** + * Whether this repo serves as the index (root) for the domain. + */ + isIndex: /*#__PURE__*/ v.boolean(), +}); + +type main$schematype = typeof _mainSchema; +type siteConfig$schematype = typeof _siteConfigSchema; + +export interface mainSchema extends main$schematype {} +export interface siteConfigSchema extends siteConfig$schematype {} + +export const mainSchema = _mainSchema as mainSchema; +export const siteConfigSchema = _siteConfigSchema as siteConfigSchema; + +export interface SiteConfig extends v.InferInput {} + +export interface $params extends v.InferInput {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCQueries { + "org.tangled.temp.repo.getSiteConfig": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/repo/listWebhookDeliveries.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/listWebhookDeliveries.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/listWebhookDeliveries.ts @@ -0,0 +1,78 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _deliverySchema = /*#__PURE__*/ v.object({ + $type: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.literal( + "org.tangled.temp.repo.listWebhookDeliveries#delivery", + ), + ), + createdAt: /*#__PURE__*/ v.datetimeString(), + /** + * UUID for tracking this delivery attempt. + */ + deliveryId: /*#__PURE__*/ v.string(), + /** + * Event type that triggered the delivery. + */ + event: /*#__PURE__*/ v.string(), + id: /*#__PURE__*/ v.integer(), + requestBody: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + responseBody: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + responseCode: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), + success: /*#__PURE__*/ v.boolean(), + url: /*#__PURE__*/ v.genericUriString(), +}); +const _mainSchema = /*#__PURE__*/ v.query( + "org.tangled.temp.repo.listWebhookDeliveries", + { + params: /*#__PURE__*/ v.object({ + /** + * Webhook ID. + */ + id: /*#__PURE__*/ v.integer(), + /** + * @minimum 1 + * @maximum 100 + */ + limit: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ + /*#__PURE__*/ v.integerRange(1, 100), + ]), + ), + /** + * DID of the repository as minted by the knot. + */ + repoDid: /*#__PURE__*/ v.didString(), + }), + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + get deliveries() { + return /*#__PURE__*/ v.array(deliverySchema); + }, + }), + }, + }, +); + +type delivery$schematype = typeof _deliverySchema; +type main$schematype = typeof _mainSchema; + +export interface deliverySchema extends delivery$schematype {} +export interface mainSchema extends main$schematype {} + +export const deliverySchema = _deliverySchema as deliverySchema; +export const mainSchema = _mainSchema as mainSchema; + +export interface Delivery extends v.InferInput {} + +export interface $params extends v.InferInput {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCQueries { + "org.tangled.temp.repo.listWebhookDeliveries": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/repo/listWebhooks.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/listWebhooks.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/listWebhooks.ts @@ -0,0 +1,66 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.query( + "org.tangled.temp.repo.listWebhooks", + { + params: /*#__PURE__*/ v.object({ + /** + * DID of the repository as minted by the knot. + */ + repoDid: /*#__PURE__*/ v.didString(), + }), + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + get webhooks() { + return /*#__PURE__*/ v.array(webhookSchema); + }, + }), + }, + }, +); +const _webhookSchema = /*#__PURE__*/ v.object({ + $type: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.literal("org.tangled.temp.repo.listWebhooks#webhook"), + ), + /** + * Whether the webhook is currently enabled. + */ + active: /*#__PURE__*/ v.boolean(), + createdAt: /*#__PURE__*/ v.datetimeString(), + /** + * Event types this webhook is subscribed to (e.g. 'push', 'repository:renamed'). + */ + events: /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), + /** + * Webhook identifier. + */ + id: /*#__PURE__*/ v.integer(), + updatedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), + /** + * Endpoint URL that receives webhook payloads. + */ + url: /*#__PURE__*/ v.genericUriString(), +}); + +type main$schematype = typeof _mainSchema; +type webhook$schematype = typeof _webhookSchema; + +export interface mainSchema extends main$schematype {} +export interface webhookSchema extends webhook$schematype {} + +export const mainSchema = _mainSchema as mainSchema; +export const webhookSchema = _webhookSchema as webhookSchema; + +export interface Webhook extends v.InferInput {} + +export interface $params extends v.InferInput {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCQueries { + "org.tangled.temp.repo.listWebhooks": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/repo/retryWebhookDelivery.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/retryWebhookDelivery.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/retryWebhookDelivery.ts @@ -0,0 +1,43 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.repo.retryWebhookDelivery", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * UUID of the delivery to retry. + */ + deliveryId: /*#__PURE__*/ v.string(), + /** + * DID of the repository as minted by the knot. + */ + repoDid: /*#__PURE__*/ v.didString(), + /** + * Webhook ID that owns the delivery. + */ + webhookId: /*#__PURE__*/ v.integer(), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.repo.retryWebhookDelivery": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/repo/toggleWebhook.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/toggleWebhook.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/toggleWebhook.ts @@ -0,0 +1,48 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.repo.toggleWebhook", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Webhook ID to toggle. + */ + id: /*#__PURE__*/ v.integer(), + /** + * DID of the repository as minted by the knot. + */ + repoDid: /*#__PURE__*/ v.didString(), + }), + }, + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * New active state of the webhook. + */ + active: /*#__PURE__*/ v.boolean(), + }), + }, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.repo.toggleWebhook": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/repo/updateSiteConfig.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/updateSiteConfig.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/updateSiteConfig.ts @@ -0,0 +1,47 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.repo.updateSiteConfig", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Branch to deploy from. + */ + branch: /*#__PURE__*/ v.string(), + /** + * Directory within the repository to deploy (e.g. '/' or '/docs'). + */ + dir: /*#__PURE__*/ v.string(), + /** + * Whether this repo should serve as the index (root) for the claimed domain. + */ + isIndex: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + /** + * DID of the repository as minted by the knot. + */ + repoDid: /*#__PURE__*/ v.didString(), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.repo.updateSiteConfig": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/repo/updateWebhook.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/updateWebhook.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/repo/updateWebhook.ts @@ -0,0 +1,45 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.repo.updateWebhook", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + active: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + events: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), + ), + /** + * Webhook ID to update. + */ + id: /*#__PURE__*/ v.integer(), + /** + * DID of the repository as minted by the knot. + */ + repoDid: /*#__PURE__*/ v.didString(), + secret: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + url: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.repo.updateWebhook": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/search/searchCode.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/search/searchCode.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/search/searchCode.ts @@ -0,0 +1,122 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _chunkSchema = /*#__PURE__*/ v.object({ + $type: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.literal("org.tangled.temp.search.searchCode#chunk"), + ), + /** + * Source lines for this match chunk. + */ + content: /*#__PURE__*/ v.string(), + /** + * Byte-offset ranges within content that match the query. + */ + get highlights() { + return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(highlightSchema)); + }, + /** + * 1-based line number of the first line in content. + */ + lineStart: /*#__PURE__*/ v.integer(), +}); +const _fileResultSchema = /*#__PURE__*/ v.object({ + $type: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.literal("org.tangled.temp.search.searchCode#fileResult"), + ), + get chunks() { + return /*#__PURE__*/ v.array(chunkSchema); + }, + /** + * Detected programming language. + */ + language: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + /** + * File path relative to repository root. + */ + path: /*#__PURE__*/ v.string(), + /** + * DID of the repository as minted by the knot. + */ + repoDid: /*#__PURE__*/ v.didString(), +}); +const _highlightSchema = /*#__PURE__*/ v.object({ + $type: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.literal("org.tangled.temp.search.searchCode#highlight"), + ), + /** + * End byte offset (exclusive) within the chunk content string. + */ + end: /*#__PURE__*/ v.integer(), + /** + * Start byte offset within the chunk content string. + */ + start: /*#__PURE__*/ v.integer(), +}); +const _mainSchema = /*#__PURE__*/ v.query( + "org.tangled.temp.search.searchCode", + { + params: /*#__PURE__*/ v.object({ + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + /** + * Restrict search to a specific programming language (e.g. 'go', 'rust'). + */ + lang: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + /** + * @minimum 1 + * @maximum 100 + */ + limit: /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ + /*#__PURE__*/ v.integerRange(1, 100), + ]), + ), + /** + * Search query string. + */ + q: /*#__PURE__*/ v.string(), + /** + * Restrict search to a specific repository, by its DID. + */ + repoDid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), + }), + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + get results() { + return /*#__PURE__*/ v.array(fileResultSchema); + }, + }), + }, + }, +); + +type chunk$schematype = typeof _chunkSchema; +type fileResult$schematype = typeof _fileResultSchema; +type highlight$schematype = typeof _highlightSchema; +type main$schematype = typeof _mainSchema; + +export interface chunkSchema extends chunk$schematype {} +export interface fileResultSchema extends fileResult$schematype {} +export interface highlightSchema extends highlight$schematype {} +export interface mainSchema extends main$schematype {} + +export const chunkSchema = _chunkSchema as chunkSchema; +export const fileResultSchema = _fileResultSchema as fileResultSchema; +export const highlightSchema = _highlightSchema as highlightSchema; +export const mainSchema = _mainSchema as mainSchema; + +export interface Chunk extends v.InferInput {} +export interface FileResult extends v.InferInput {} +export interface Highlight extends v.InferInput {} + +export interface $params extends v.InferInput {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCQueries { + "org.tangled.temp.search.searchCode": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/site/claimDomain.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/site/claimDomain.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/site/claimDomain.ts @@ -0,0 +1,35 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.site.claimDomain", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Desired subdomain label (lowercase letters, digits, and hyphens; 4–63 characters). + */ + subdomain: /*#__PURE__*/ v.string(), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.site.claimDomain": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/site/getDomainClaim.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/site/getDomainClaim.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/site/getDomainClaim.ts @@ -0,0 +1,34 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.query( + "org.tangled.temp.site.getDomainClaim", + { + params: null, + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * The claimed domain (e.g. 'alice.sites.tangled.sh'). Absent if no active claim. + */ + domain: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + }), + }, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCQueries { + "org.tangled.temp.site.getDomainClaim": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/site/releaseDomain.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/site/releaseDomain.ts new file mode 100644 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/site/releaseDomain.ts @@ -0,0 +1,35 @@ +import type {} from "@atcute/lexicons"; +import * as v from "@atcute/lexicons/validations"; +import type {} from "@atcute/lexicons/ambient"; + +const _mainSchema = /*#__PURE__*/ v.procedure( + "org.tangled.temp.site.releaseDomain", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Full domain to release (must match the user's active claim). + */ + domain: /*#__PURE__*/ v.string(), + }), + }, + output: null, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params {} +export interface $input extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCProcedures { + "org.tangled.temp.site.releaseDomain": mainSchema; + } +}