diff --git a/web/src/lib/api/lexicons/index.ts b/web/src/lib/api/lexicons/index.ts index f940142a..98dc52e6 100644 --- a/web/src/lib/api/lexicons/index.ts +++ b/web/src/lib/api/lexicons/index.ts @@ -1,10 +1,14 @@ +export * as OrgTangledFeedSubscription from "./types/org/tangled/feed/subscription.js"; +export * as OrgTangledTempAccountAddEmail from "./types/org/tangled/temp/account/addEmail.js"; 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 OrgTangledTempAccountResendSignup from "./types/org/tangled/temp/account/resendSignup.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 OrgTangledTempAccountVerifyEmail from "./types/org/tangled/temp/account/verifyEmail.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"; @@ -12,7 +16,9 @@ export * as OrgTangledTempNotificationDeleteNotification from "./types/org/tangl 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 OrgTangledTempNotificationListRecipients from "./types/org/tangled/temp/notification/listRecipients.js"; export * as OrgTangledTempNotificationMarkAllRead from "./types/org/tangled/temp/notification/markAllRead.js"; +export * as OrgTangledTempNotificationMarkEntityRead from "./types/org/tangled/temp/notification/markEntityRead.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"; @@ -62,7 +68,6 @@ export * as ShTangledFeedListStars from "./types/sh/tangled/feed/listStars.js"; export * as ShTangledFeedListStarsBy from "./types/sh/tangled/feed/listStarsBy.js"; export * as ShTangledFeedReaction from "./types/sh/tangled/feed/reaction.js"; export * as ShTangledFeedStar from "./types/sh/tangled/feed/star.js"; -export * as ShTangledFeedSubscription from "./types/sh/tangled/feed/subscription.js"; export * as ShTangledGitCountRefUpdates from "./types/sh/tangled/git/countRefUpdates.js"; export * as ShTangledGitCountRefUpdatesBy from "./types/sh/tangled/git/countRefUpdatesBy.js"; export * as ShTangledGitDefs from "./types/sh/tangled/git/defs.js"; diff --git a/web/src/lib/api/lexicons/types/sh/tangled/feed/subscription.ts b/web/src/lib/api/lexicons/types/org/tangled/feed/subscription.ts similarity index 84% rename from web/src/lib/api/lexicons/types/sh/tangled/feed/subscription.ts rename to web/src/lib/api/lexicons/types/org/tangled/feed/subscription.ts index 436fd5fe..7ea8ed53 100644 --- a/web/src/lib/api/lexicons/types/sh/tangled/feed/subscription.ts +++ b/web/src/lib/api/lexicons/types/org/tangled/feed/subscription.ts @@ -5,7 +5,7 @@ import type {} from "@atcute/lexicons/ambient"; const _mainSchema = /*#__PURE__*/ v.record( /*#__PURE__*/ v.tidString(), /*#__PURE__*/ v.object({ - $type: /*#__PURE__*/ v.literal("sh.tangled.feed.subscription"), + $type: /*#__PURE__*/ v.literal("org.tangled.feed.subscription"), createdAt: /*#__PURE__*/ v.datetimeString(), get subject() { return /*#__PURE__*/ v.variant([recordSchema, repoSchema], true); @@ -14,13 +14,13 @@ const _mainSchema = /*#__PURE__*/ v.record( ); const _recordSchema = /*#__PURE__*/ v.object({ $type: /*#__PURE__*/ v.optional( - /*#__PURE__*/ v.literal("sh.tangled.feed.subscription#record"), + /*#__PURE__*/ v.literal("org.tangled.feed.subscription#record"), ), uri: /*#__PURE__*/ v.resourceUriString(), }); const _repoSchema = /*#__PURE__*/ v.object({ $type: /*#__PURE__*/ v.optional( - /*#__PURE__*/ v.literal("sh.tangled.feed.subscription#repo"), + /*#__PURE__*/ v.literal("org.tangled.feed.subscription#repo"), ), did: /*#__PURE__*/ v.didString(), }); @@ -43,6 +43,6 @@ export interface Repo extends v.InferInput {} declare module "@atcute/lexicons/ambient" { interface Records { - "sh.tangled.feed.subscription": mainSchema; + "org.tangled.feed.subscription": mainSchema; } } diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/account/addEmail.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/account/addEmail.ts new file mode 100644 index 00000000..936d1226 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/account/addEmail.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.addEmail", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Email address to add. + */ + 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.addEmail": 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 index 99c7de81..442aaf0b 100644 --- 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 @@ -9,16 +9,16 @@ const _mainSchema = /*#__PURE__*/ v.procedure( 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 .. + * Verification token from the emailed link. + */ + token: /*#__PURE__*/ v.string(), + /** + * Desired username; the handle is .. */ username: /*#__PURE__*/ v.string(), }), diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/account/resendSignup.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/account/resendSignup.ts new file mode 100644 index 00000000..6447c58c --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/account/resendSignup.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.resendSignup", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Email address used to begin the signup. + */ + 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.resendSignup": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/account/verifyEmail.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/account/verifyEmail.ts new file mode 100644 index 00000000..c2029440 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/account/verifyEmail.ts @@ -0,0 +1,44 @@ +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.verifyEmail", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * Verification token from the emailed link. + */ + token: /*#__PURE__*/ v.string(), + }), + }, + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * The address that was verified. + */ + email: /*#__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.verifyEmail": 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 index 5907af0c..28a11048 100644 --- 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 @@ -10,9 +10,9 @@ const _mainSchema = /*#__PURE__*/ v.procedure( type: "lex", schema: /*#__PURE__*/ v.object({ /** - * ID of the notification to delete. + * at-uri of the notification to delete. */ - id: /*#__PURE__*/ v.integer(), + uri: /*#__PURE__*/ v.resourceUriString(), }), }, output: null, 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 index b086a6fc..5e745c51 100644 --- 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 @@ -54,10 +54,6 @@ const _notificationSchema = /*#__PURE__*/ v.object({ */ 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. */ @@ -75,6 +71,10 @@ const _notificationSchema = /*#__PURE__*/ v.object({ * 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(), + /** + * at-uri of this notification; the stable key for read/unread state. + */ + uri: /*#__PURE__*/ v.resourceUriString(), }); type main$schematype = typeof _mainSchema; diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/notification/listRecipients.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/listRecipients.ts new file mode 100644 index 00000000..5fa790a8 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/listRecipients.ts @@ -0,0 +1,40 @@ +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.listRecipients", + { + params: /*#__PURE__*/ v.object({ + /** + * Optional collection NSID to filter subscribers by subscription scope. Only subscribers with no collection filter or a filter containing this NSID are returned. + */ + collection: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + /** + * at-uri of the entity (for entity-level subscribers) or a repo DID (for repo-level subscribers). + */ + subject: /*#__PURE__*/ v.string(), + }), + output: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + dids: /*#__PURE__*/ v.array(/*#__PURE__*/ v.didString()), + }), + }, + }, +); + +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} + +export const mainSchema = _mainSchema as mainSchema; + +export interface $params extends v.InferInput {} +export interface $output extends v.InferXRPCBodyInput {} + +declare module "@atcute/lexicons/ambient" { + interface XRPCQueries { + "org.tangled.temp.notification.listRecipients": mainSchema; + } +} diff --git a/web/src/lib/api/lexicons/types/org/tangled/temp/notification/markEntityRead.ts b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/markEntityRead.ts new file mode 100644 index 00000000..53ff1768 --- /dev/null +++ b/web/src/lib/api/lexicons/types/org/tangled/temp/notification/markEntityRead.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.markEntityRead", + { + params: null, + input: { + type: "lex", + schema: /*#__PURE__*/ v.object({ + /** + * at-uri of the issue or pull whose notifications should be marked read. + */ + entityAt: /*#__PURE__*/ v.resourceUriString(), + }), + }, + 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.markEntityRead": 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 index 30daad12..1d63a117 100644 --- 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 @@ -9,11 +9,11 @@ const _mainSchema = /*#__PURE__*/ v.procedure( input: { type: "lex", schema: /*#__PURE__*/ v.object({ + read: /*#__PURE__*/ v.boolean(), /** - * ID of the notification to update. + * at-uri of the notification to update. */ - id: /*#__PURE__*/ v.integer(), - read: /*#__PURE__*/ v.boolean(), + uri: /*#__PURE__*/ v.resourceUriString(), }), }, output: null,