Update api nsids

zio/stable
Paul Frazee 2022-10-12 15:18:46 -05:00
parent c9388a3cc5
commit 0c0c9eb05c
72 changed files with 1758 additions and 579 deletions

View File

@ -5,7 +5,7 @@
// import {ReactNativeStore} from './auth'
import AdxApi from '../../third-party/api'
import * as Profile from '../../third-party/api/src/types/todo/social/profile'
import * as Profile from '../../third-party/api/src/types/app/bsky/profile'
import {AdxUri} from '../../third-party/uri'
import {RootStoreModel} from '../models/root-store'
import {extractEntities} from '../../view/lib/strings'
@ -22,7 +22,7 @@ export async function post(
let reply
if (replyToUri) {
const replyToUrip = new AdxUri(replyToUri)
const parentPost = await store.api.todo.social.post.get({
const parentPost = await store.api.app.bsky.post.get({
nameOrDid: replyToUrip.host,
tid: replyToUrip.recordKey,
})
@ -34,7 +34,7 @@ export async function post(
}
}
const entities = extractEntities(text)
return await store.api.todo.social.post.create(
return await store.api.app.bsky.post.create(
{did: store.me.did || ''},
{
text,
@ -46,7 +46,7 @@ export async function post(
}
export async function like(store: RootStoreModel, uri: string) {
return await store.api.todo.social.like.create(
return await store.api.app.bsky.like.create(
{did: store.me.did || ''},
{
subject: uri,
@ -57,14 +57,14 @@ export async function like(store: RootStoreModel, uri: string) {
export async function unlike(store: RootStoreModel, likeUri: string) {
const likeUrip = new AdxUri(likeUri)
return await store.api.todo.social.like.delete({
return await store.api.app.bsky.like.delete({
did: likeUrip.hostname,
tid: likeUrip.recordKey,
})
}
export async function repost(store: RootStoreModel, uri: string) {
return await store.api.todo.social.repost.create(
return await store.api.app.bsky.repost.create(
{did: store.me.did || ''},
{
subject: uri,
@ -75,14 +75,14 @@ export async function repost(store: RootStoreModel, uri: string) {
export async function unrepost(store: RootStoreModel, repostUri: string) {
const repostUrip = new AdxUri(repostUri)
return await store.api.todo.social.repost.delete({
return await store.api.app.bsky.repost.delete({
did: repostUrip.hostname,
tid: repostUrip.recordKey,
})
}
export async function follow(store: RootStoreModel, subject: string) {
return await store.api.todo.social.follow.create(
return await store.api.app.bsky.follow.create(
{did: store.me.did || ''},
{
subject,
@ -93,7 +93,7 @@ export async function follow(store: RootStoreModel, subject: string) {
export async function unfollow(store: RootStoreModel, followUri: string) {
const followUrip = new AdxUri(followUri)
return await store.api.todo.social.follow.delete({
return await store.api.app.bsky.follow.delete({
did: followUrip.hostname,
tid: followUrip.recordKey,
})
@ -103,12 +103,12 @@ export async function updateProfile(
store: RootStoreModel,
modifyFn: (existing?: Profile.Record) => Profile.Record,
) {
const res = await store.api.todo.social.profile.list({
const res = await store.api.app.bsky.profile.list({
nameOrDid: store.me.did || '',
})
const existing = res.records[0]
if (existing) {
await store.api.todo.social.profile.put(
await store.api.app.bsky.profile.put(
{
did: store.me.did || '',
tid: new AdxUri(existing.uri).recordKey,
@ -116,7 +116,7 @@ export async function updateProfile(
modifyFn(existing.value),
)
} else {
await store.api.todo.social.profile.create(
await store.api.app.bsky.profile.create(
{
did: store.me.did || '',
},

View File

@ -1,6 +1,6 @@
import {makeAutoObservable, runInAction} from 'mobx'
import * as GetHomeFeed from '../../third-party/api/src/types/todo/social/getHomeFeed'
import * as GetAuthorFeed from '../../third-party/api/src/types/todo/social/getAuthorFeed'
import * as GetHomeFeed from '../../third-party/api/src/types/app/bsky/getHomeFeed'
import * as GetAuthorFeed from '../../third-party/api/src/types/app/bsky/getAuthorFeed'
import {RootStoreModel} from './root-store'
import * as apilib from '../lib/api'
@ -367,11 +367,11 @@ export class FeedModel {
): Promise<GetHomeFeed.Response | GetAuthorFeed.Response> {
params = Object.assign({}, this.params, params)
if (this.feedType === 'home') {
return this.rootStore.api.todo.social.getHomeFeed(
return this.rootStore.api.app.bsky.getHomeFeed(
params as GetHomeFeed.QueryParams,
)
} else {
return this.rootStore.api.todo.social.getAuthorFeed(
return this.rootStore.api.app.bsky.getAuthorFeed(
params as GetAuthorFeed.QueryParams,
)
}

View File

@ -1,6 +1,6 @@
import {makeAutoObservable, runInAction} from 'mobx'
import {AdxUri} from '../../third-party/uri'
import * as GetLikedBy from '../../third-party/api/src/types/todo/social/getLikedBy'
import * as GetLikedBy from '../../third-party/api/src/types/app/bsky/getLikedBy'
import {RootStoreModel} from './root-store'
type LikedByItem = GetLikedBy.OutputSchema['likedBy'][number]
@ -113,7 +113,7 @@ export class LikedByViewModel {
private async _fetch(isRefreshing = false) {
this._xLoading(isRefreshing)
try {
const res = await this.rootStore.api.todo.social.getLikedBy(
const res = await this.rootStore.api.app.bsky.getLikedBy(
Object.assign({}, this.params, {uri: this.resolvedUri}),
)
this._replaceAll(res)

View File

@ -25,7 +25,7 @@ export class MeModel {
if (sess.isAuthed && sess.data) {
this.did = sess.data.userdid || ''
this.name = sess.data.username
const profile = await this.rootStore.api.todo.social.getProfile({
const profile = await this.rootStore.api.app.bsky.getProfile({
user: this.did,
})
runInAction(() => {
@ -43,7 +43,7 @@ export class MeModel {
}
async fetchStateUpdate() {
const res = await this.rootStore.api.todo.social.getNotificationCount({})
const res = await this.rootStore.api.app.bsky.getNotificationCount({})
runInAction(() => {
this.notificationCount = res.data.count
})

View File

@ -1,5 +1,5 @@
import {makeAutoObservable} from 'mobx'
import * as GetNotifications from '../../third-party/api/src/types/todo/social/getNotifications'
import * as GetNotifications from '../../third-party/api/src/types/app/bsky/getNotifications'
import {RootStoreModel} from './root-store'
import {hasProp} from '../lib/type-guards'
@ -228,7 +228,7 @@ export class NotificationsViewModel {
private async _initialLoad(isRefreshing = false) {
this._xLoading(isRefreshing)
try {
const res = await this.rootStore.api.todo.social.getNotifications(
const res = await this.rootStore.api.app.bsky.getNotifications(
this.params,
)
this._replaceAll(res)
@ -244,7 +244,7 @@ export class NotificationsViewModel {
const params = Object.assign({}, this.params, {
before: this.loadMoreCursor,
})
const res = await this.rootStore.api.todo.social.getNotifications(params)
const res = await this.rootStore.api.app.bsky.getNotifications(params)
this._appendAll(res)
this._xIdle()
} catch (e: any) {
@ -259,7 +259,7 @@ export class NotificationsViewModel {
try {
do {
const res: GetNotifications.Response =
await this.rootStore.api.todo.social.getNotifications({
await this.rootStore.api.app.bsky.getNotifications({
before: cursor,
limit: Math.min(numToFetch, 100),
})
@ -312,7 +312,7 @@ export class NotificationsViewModel {
private async _updateReadState() {
try {
await this.rootStore.api.todo.social.postNotificationsSeen(
await this.rootStore.api.app.bsky.postNotificationsSeen(
{},
{seenAt: new Date().toISOString()},
)

View File

@ -1,5 +1,5 @@
import {makeAutoObservable, runInAction} from 'mobx'
import * as GetPostThread from '../../third-party/api/src/types/todo/social/getPostThread'
import * as GetPostThread from '../../third-party/api/src/types/app/bsky/getPostThread'
import {AdxUri} from '../../third-party/uri'
import _omit from 'lodash.omit'
import {RootStoreModel} from './root-store'
@ -238,7 +238,7 @@ export class PostThreadViewModel {
private async _load(isRefreshing = false) {
this._xLoading(isRefreshing)
try {
const res = await this.rootStore.api.todo.social.getPostThread(
const res = await this.rootStore.api.app.bsky.getPostThread(
Object.assign({}, this.params, {uri: this.resolvedUri}),
)
this._replaceAll(res)

View File

@ -1,5 +1,5 @@
import {makeAutoObservable} from 'mobx'
import * as Post from '../../third-party/api/src/types/todo/social/post'
import * as Post from '../../third-party/api/src/types/app/bsky/post'
import {AdxUri} from '../../third-party/uri'
import {RootStoreModel} from './root-store'
@ -77,7 +77,7 @@ export class PostModel implements RemoveIndex<Post.Record> {
this._xLoading()
try {
const urip = new AdxUri(this.uri)
const res = await this.rootStore.api.todo.social.post.get({
const res = await this.rootStore.api.app.bsky.post.get({
nameOrDid: urip.host,
tid: urip.recordKey,
})

View File

@ -1,6 +1,6 @@
import {makeAutoObservable, runInAction} from 'mobx'
import * as GetProfile from '../../third-party/api/src/types/todo/social/getProfile'
import * as Profile from '../../third-party/api/src/types/todo/social/profile'
import * as GetProfile from '../../third-party/api/src/types/app/bsky/getProfile'
import * as Profile from '../../third-party/api/src/types/app/bsky/profile'
import {RootStoreModel} from './root-store'
import * as apilib from '../lib/api'
@ -118,7 +118,7 @@ export class ProfileViewModel {
private async _load(isRefreshing = false) {
this._xLoading(isRefreshing)
try {
const res = await this.rootStore.api.todo.social.getProfile(this.params)
const res = await this.rootStore.api.app.bsky.getProfile(this.params)
this._replaceAll(res)
this._xIdle()
} catch (e: any) {

View File

@ -1,6 +1,6 @@
import {makeAutoObservable, runInAction} from 'mobx'
import {AdxUri} from '../../third-party/uri'
import * as GetRepostedBy from '../../third-party/api/src/types/todo/social/getRepostedBy'
import * as GetRepostedBy from '../../third-party/api/src/types/app/bsky/getRepostedBy'
import {RootStoreModel} from './root-store'
type RepostedByItem = GetRepostedBy.OutputSchema['repostedBy'][number]
@ -113,7 +113,7 @@ export class RepostedByViewModel {
private async _fetch(isRefreshing = false) {
this._xLoading(isRefreshing)
try {
const res = await this.rootStore.api.todo.social.getRepostedBy(
const res = await this.rootStore.api.app.bsky.getRepostedBy(
Object.assign({}, this.params, {uri: this.resolvedUri}),
)
this._replaceAll(res)

View File

@ -34,7 +34,7 @@ export class RootStoreModel {
if (didOrName.startsWith('did:')) {
return didOrName
}
const res = await this.api.todo.adx.resolveName({name: didOrName})
const res = await this.api.com.atproto.resolveName({name: didOrName})
return res.data.did
}

View File

@ -1,6 +1,6 @@
import {makeAutoObservable} from 'mobx'
import AdxApi from '../../third-party/api'
import type * as GetAccountsConfig from '../../third-party/api/src/types/todo/adx/getAccountsConfig'
import type * as GetAccountsConfig from '../../third-party/api/src/types/com/atproto/getAccountsConfig'
import {isObj, hasProp} from '../lib/type-guards'
import {RootStoreModel} from './root-store'
@ -122,7 +122,7 @@ export class SessionModel {
}
try {
const sess = await this.rootStore.api.todo.adx.getSession({})
const sess = await this.rootStore.api.com.atproto.getSession({})
if (sess.success && this.data && this.data.userdid === sess.data.did) {
this.rootStore.me.load().catch(e => {
console.error('Failed to fetch local user information', e)
@ -136,7 +136,7 @@ export class SessionModel {
async describeService(service: string): Promise<ServiceDescription> {
const api = AdxApi.service(service)
const res = await api.todo.adx.getAccountsConfig({})
const res = await api.com.atproto.getAccountsConfig({})
return res.data
}
@ -150,7 +150,7 @@ export class SessionModel {
password: string
}) {
const api = AdxApi.service(service)
const res = await api.todo.adx.createSession({}, {username, password})
const res = await api.com.atproto.createSession({}, {username, password})
if (res.data.jwt) {
this.setState({
service: service,
@ -179,7 +179,7 @@ export class SessionModel {
inviteCode?: string
}) {
const api = AdxApi.service(service)
const res = await api.todo.adx.createAccount(
const res = await api.com.atproto.createAccount(
{},
{username, password, email, inviteCode},
)
@ -200,7 +200,7 @@ export class SessionModel {
async logout() {
if (this.isAuthed) {
this.rootStore.api.todo.adx.deleteSession({}).catch((e: any) => {
this.rootStore.api.com.atproto.deleteSession({}).catch((e: any) => {
console.error('(Minor issue) Failed to delete session on the server', e)
})
}

View File

@ -1,5 +1,5 @@
import {makeAutoObservable} from 'mobx'
import * as GetUserFollowers from '../../third-party/api/src/types/todo/social/getUserFollowers'
import * as GetUserFollowers from '../../third-party/api/src/types/app/bsky/getUserFollowers'
import {RootStoreModel} from './root-store'
type Subject = GetUserFollowers.OutputSchema['subject']
@ -82,7 +82,7 @@ export class UserFollowersViewModel {
private async _fetch(isRefreshing = false) {
this._xLoading(isRefreshing)
try {
const res = await this.rootStore.api.todo.social.getUserFollowers(
const res = await this.rootStore.api.app.bsky.getUserFollowers(
this.params,
)
this._replaceAll(res)

View File

@ -1,5 +1,5 @@
import {makeAutoObservable} from 'mobx'
import * as GetUserFollows from '../../third-party/api/src/types/todo/social/getUserFollows'
import * as GetUserFollows from '../../third-party/api/src/types/app/bsky/getUserFollows'
import {RootStoreModel} from './root-store'
type Subject = GetUserFollows.OutputSchema['subject']
@ -83,9 +83,7 @@ export class UserFollowsViewModel {
private async _fetch(isRefreshing = false) {
this._xLoading(isRefreshing)
try {
const res = await this.rootStore.api.todo.social.getUserFollows(
this.params,
)
const res = await this.rootStore.api.app.bsky.getUserFollows(this.params)
this._replaceAll(res)
this._xIdle()
} catch (e: any) {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,76 +1,82 @@
import { Client as XrpcClient, ServiceClient as XrpcServiceClient } from '@adxp/xrpc';
import * as TodoAdxCreateAccount from './types/todo/adx/createAccount';
import * as TodoAdxCreateSession from './types/todo/adx/createSession';
import * as TodoAdxDeleteAccount from './types/todo/adx/deleteAccount';
import * as TodoAdxDeleteSession from './types/todo/adx/deleteSession';
import * as TodoAdxGetAccount from './types/todo/adx/getAccount';
import * as TodoAdxGetAccountsConfig from './types/todo/adx/getAccountsConfig';
import * as TodoAdxGetSession from './types/todo/adx/getSession';
import * as TodoAdxRepoBatchWrite from './types/todo/adx/repoBatchWrite';
import * as TodoAdxRepoCreateRecord from './types/todo/adx/repoCreateRecord';
import * as TodoAdxRepoDeleteRecord from './types/todo/adx/repoDeleteRecord';
import * as TodoAdxRepoDescribe from './types/todo/adx/repoDescribe';
import * as TodoAdxRepoGetRecord from './types/todo/adx/repoGetRecord';
import * as TodoAdxRepoListRecords from './types/todo/adx/repoListRecords';
import * as TodoAdxRepoPutRecord from './types/todo/adx/repoPutRecord';
import * as TodoAdxResolveName from './types/todo/adx/resolveName';
import * as TodoAdxSyncGetRepo from './types/todo/adx/syncGetRepo';
import * as TodoAdxSyncGetRoot from './types/todo/adx/syncGetRoot';
import * as TodoAdxSyncUpdateRepo from './types/todo/adx/syncUpdateRepo';
import * as TodoSocialBadge from './types/todo/social/badge';
import * as TodoSocialFollow from './types/todo/social/follow';
import * as TodoSocialGetAuthorFeed from './types/todo/social/getAuthorFeed';
import * as TodoSocialGetHomeFeed from './types/todo/social/getHomeFeed';
import * as TodoSocialGetLikedBy from './types/todo/social/getLikedBy';
import * as TodoSocialGetNotificationCount from './types/todo/social/getNotificationCount';
import * as TodoSocialGetNotifications from './types/todo/social/getNotifications';
import * as TodoSocialGetPostThread from './types/todo/social/getPostThread';
import * as TodoSocialGetProfile from './types/todo/social/getProfile';
import * as TodoSocialGetRepostedBy from './types/todo/social/getRepostedBy';
import * as TodoSocialGetUserFollowers from './types/todo/social/getUserFollowers';
import * as TodoSocialGetUserFollows from './types/todo/social/getUserFollows';
import * as TodoSocialLike from './types/todo/social/like';
import * as TodoSocialMediaEmbed from './types/todo/social/mediaEmbed';
import * as TodoSocialPost from './types/todo/social/post';
import * as TodoSocialPostNotificationsSeen from './types/todo/social/postNotificationsSeen';
import * as TodoSocialProfile from './types/todo/social/profile';
import * as TodoSocialRepost from './types/todo/social/repost';
export * as TodoAdxCreateAccount from './types/todo/adx/createAccount';
export * as TodoAdxCreateSession from './types/todo/adx/createSession';
export * as TodoAdxDeleteAccount from './types/todo/adx/deleteAccount';
export * as TodoAdxDeleteSession from './types/todo/adx/deleteSession';
export * as TodoAdxGetAccount from './types/todo/adx/getAccount';
export * as TodoAdxGetAccountsConfig from './types/todo/adx/getAccountsConfig';
export * as TodoAdxGetSession from './types/todo/adx/getSession';
export * as TodoAdxRepoBatchWrite from './types/todo/adx/repoBatchWrite';
export * as TodoAdxRepoCreateRecord from './types/todo/adx/repoCreateRecord';
export * as TodoAdxRepoDeleteRecord from './types/todo/adx/repoDeleteRecord';
export * as TodoAdxRepoDescribe from './types/todo/adx/repoDescribe';
export * as TodoAdxRepoGetRecord from './types/todo/adx/repoGetRecord';
export * as TodoAdxRepoListRecords from './types/todo/adx/repoListRecords';
export * as TodoAdxRepoPutRecord from './types/todo/adx/repoPutRecord';
export * as TodoAdxResolveName from './types/todo/adx/resolveName';
export * as TodoAdxSyncGetRepo from './types/todo/adx/syncGetRepo';
export * as TodoAdxSyncGetRoot from './types/todo/adx/syncGetRoot';
export * as TodoAdxSyncUpdateRepo from './types/todo/adx/syncUpdateRepo';
export * as TodoSocialBadge from './types/todo/social/badge';
export * as TodoSocialFollow from './types/todo/social/follow';
export * as TodoSocialGetAuthorFeed from './types/todo/social/getAuthorFeed';
export * as TodoSocialGetHomeFeed from './types/todo/social/getHomeFeed';
export * as TodoSocialGetLikedBy from './types/todo/social/getLikedBy';
export * as TodoSocialGetNotificationCount from './types/todo/social/getNotificationCount';
export * as TodoSocialGetNotifications from './types/todo/social/getNotifications';
export * as TodoSocialGetPostThread from './types/todo/social/getPostThread';
export * as TodoSocialGetProfile from './types/todo/social/getProfile';
export * as TodoSocialGetRepostedBy from './types/todo/social/getRepostedBy';
export * as TodoSocialGetUserFollowers from './types/todo/social/getUserFollowers';
export * as TodoSocialGetUserFollows from './types/todo/social/getUserFollows';
export * as TodoSocialLike from './types/todo/social/like';
export * as TodoSocialMediaEmbed from './types/todo/social/mediaEmbed';
export * as TodoSocialPost from './types/todo/social/post';
export * as TodoSocialPostNotificationsSeen from './types/todo/social/postNotificationsSeen';
export * as TodoSocialProfile from './types/todo/social/profile';
export * as TodoSocialRepost from './types/todo/social/repost';
import * as ComAtprotoCreateAccount from './types/com/atproto/createAccount';
import * as ComAtprotoCreateInviteCode from './types/com/atproto/createInviteCode';
import * as ComAtprotoCreateSession from './types/com/atproto/createSession';
import * as ComAtprotoDeleteAccount from './types/com/atproto/deleteAccount';
import * as ComAtprotoDeleteSession from './types/com/atproto/deleteSession';
import * as ComAtprotoGetAccount from './types/com/atproto/getAccount';
import * as ComAtprotoGetAccountsConfig from './types/com/atproto/getAccountsConfig';
import * as ComAtprotoGetSession from './types/com/atproto/getSession';
import * as ComAtprotoRepoBatchWrite from './types/com/atproto/repoBatchWrite';
import * as ComAtprotoRepoCreateRecord from './types/com/atproto/repoCreateRecord';
import * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repoDeleteRecord';
import * as ComAtprotoRepoDescribe from './types/com/atproto/repoDescribe';
import * as ComAtprotoRepoGetRecord from './types/com/atproto/repoGetRecord';
import * as ComAtprotoRepoListRecords from './types/com/atproto/repoListRecords';
import * as ComAtprotoRepoPutRecord from './types/com/atproto/repoPutRecord';
import * as ComAtprotoRequestAccountPasswordReset from './types/com/atproto/requestAccountPasswordReset';
import * as ComAtprotoResetAccountPassword from './types/com/atproto/resetAccountPassword';
import * as ComAtprotoResolveName from './types/com/atproto/resolveName';
import * as ComAtprotoSyncGetRepo from './types/com/atproto/syncGetRepo';
import * as ComAtprotoSyncGetRoot from './types/com/atproto/syncGetRoot';
import * as ComAtprotoSyncUpdateRepo from './types/com/atproto/syncUpdateRepo';
import * as AppBskyBadge from './types/app/bsky/badge';
import * as AppBskyFollow from './types/app/bsky/follow';
import * as AppBskyGetAuthorFeed from './types/app/bsky/getAuthorFeed';
import * as AppBskyGetHomeFeed from './types/app/bsky/getHomeFeed';
import * as AppBskyGetLikedBy from './types/app/bsky/getLikedBy';
import * as AppBskyGetNotificationCount from './types/app/bsky/getNotificationCount';
import * as AppBskyGetNotifications from './types/app/bsky/getNotifications';
import * as AppBskyGetPostThread from './types/app/bsky/getPostThread';
import * as AppBskyGetProfile from './types/app/bsky/getProfile';
import * as AppBskyGetRepostedBy from './types/app/bsky/getRepostedBy';
import * as AppBskyGetUserFollowers from './types/app/bsky/getUserFollowers';
import * as AppBskyGetUserFollows from './types/app/bsky/getUserFollows';
import * as AppBskyLike from './types/app/bsky/like';
import * as AppBskyMediaEmbed from './types/app/bsky/mediaEmbed';
import * as AppBskyPost from './types/app/bsky/post';
import * as AppBskyPostNotificationsSeen from './types/app/bsky/postNotificationsSeen';
import * as AppBskyProfile from './types/app/bsky/profile';
import * as AppBskyRepost from './types/app/bsky/repost';
export * as ComAtprotoCreateAccount from './types/com/atproto/createAccount';
export * as ComAtprotoCreateInviteCode from './types/com/atproto/createInviteCode';
export * as ComAtprotoCreateSession from './types/com/atproto/createSession';
export * as ComAtprotoDeleteAccount from './types/com/atproto/deleteAccount';
export * as ComAtprotoDeleteSession from './types/com/atproto/deleteSession';
export * as ComAtprotoGetAccount from './types/com/atproto/getAccount';
export * as ComAtprotoGetAccountsConfig from './types/com/atproto/getAccountsConfig';
export * as ComAtprotoGetSession from './types/com/atproto/getSession';
export * as ComAtprotoRepoBatchWrite from './types/com/atproto/repoBatchWrite';
export * as ComAtprotoRepoCreateRecord from './types/com/atproto/repoCreateRecord';
export * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repoDeleteRecord';
export * as ComAtprotoRepoDescribe from './types/com/atproto/repoDescribe';
export * as ComAtprotoRepoGetRecord from './types/com/atproto/repoGetRecord';
export * as ComAtprotoRepoListRecords from './types/com/atproto/repoListRecords';
export * as ComAtprotoRepoPutRecord from './types/com/atproto/repoPutRecord';
export * as ComAtprotoRequestAccountPasswordReset from './types/com/atproto/requestAccountPasswordReset';
export * as ComAtprotoResetAccountPassword from './types/com/atproto/resetAccountPassword';
export * as ComAtprotoResolveName from './types/com/atproto/resolveName';
export * as ComAtprotoSyncGetRepo from './types/com/atproto/syncGetRepo';
export * as ComAtprotoSyncGetRoot from './types/com/atproto/syncGetRoot';
export * as ComAtprotoSyncUpdateRepo from './types/com/atproto/syncUpdateRepo';
export * as AppBskyBadge from './types/app/bsky/badge';
export * as AppBskyFollow from './types/app/bsky/follow';
export * as AppBskyGetAuthorFeed from './types/app/bsky/getAuthorFeed';
export * as AppBskyGetHomeFeed from './types/app/bsky/getHomeFeed';
export * as AppBskyGetLikedBy from './types/app/bsky/getLikedBy';
export * as AppBskyGetNotificationCount from './types/app/bsky/getNotificationCount';
export * as AppBskyGetNotifications from './types/app/bsky/getNotifications';
export * as AppBskyGetPostThread from './types/app/bsky/getPostThread';
export * as AppBskyGetProfile from './types/app/bsky/getProfile';
export * as AppBskyGetRepostedBy from './types/app/bsky/getRepostedBy';
export * as AppBskyGetUserFollowers from './types/app/bsky/getUserFollowers';
export * as AppBskyGetUserFollows from './types/app/bsky/getUserFollows';
export * as AppBskyLike from './types/app/bsky/like';
export * as AppBskyMediaEmbed from './types/app/bsky/mediaEmbed';
export * as AppBskyPost from './types/app/bsky/post';
export * as AppBskyPostNotificationsSeen from './types/app/bsky/postNotificationsSeen';
export * as AppBskyProfile from './types/app/bsky/profile';
export * as AppBskyRepost from './types/app/bsky/repost';
export declare class Client {
xrpc: XrpcClient;
constructor();
@ -81,39 +87,47 @@ export default defaultInst;
export declare class ServiceClient {
_baseClient: Client;
xrpc: XrpcServiceClient;
todo: TodoNS;
com: ComNS;
app: AppNS;
constructor(baseClient: Client, xrpcService: XrpcServiceClient);
setHeader(key: string, value: string): void;
}
export declare class TodoNS {
export declare class ComNS {
_service: ServiceClient;
adx: AdxNS;
social: SocialNS;
atproto: AtprotoNS;
constructor(service: ServiceClient);
}
export declare class AdxNS {
export declare class AtprotoNS {
_service: ServiceClient;
constructor(service: ServiceClient);
createAccount(params: TodoAdxCreateAccount.QueryParams, data?: TodoAdxCreateAccount.InputSchema, opts?: TodoAdxCreateAccount.CallOptions): Promise<TodoAdxCreateAccount.Response>;
createSession(params: TodoAdxCreateSession.QueryParams, data?: TodoAdxCreateSession.InputSchema, opts?: TodoAdxCreateSession.CallOptions): Promise<TodoAdxCreateSession.Response>;
deleteAccount(params: TodoAdxDeleteAccount.QueryParams, data?: TodoAdxDeleteAccount.InputSchema, opts?: TodoAdxDeleteAccount.CallOptions): Promise<TodoAdxDeleteAccount.Response>;
deleteSession(params: TodoAdxDeleteSession.QueryParams, data?: TodoAdxDeleteSession.InputSchema, opts?: TodoAdxDeleteSession.CallOptions): Promise<TodoAdxDeleteSession.Response>;
getAccount(params: TodoAdxGetAccount.QueryParams, data?: TodoAdxGetAccount.InputSchema, opts?: TodoAdxGetAccount.CallOptions): Promise<TodoAdxGetAccount.Response>;
getAccountsConfig(params: TodoAdxGetAccountsConfig.QueryParams, data?: TodoAdxGetAccountsConfig.InputSchema, opts?: TodoAdxGetAccountsConfig.CallOptions): Promise<TodoAdxGetAccountsConfig.Response>;
getSession(params: TodoAdxGetSession.QueryParams, data?: TodoAdxGetSession.InputSchema, opts?: TodoAdxGetSession.CallOptions): Promise<TodoAdxGetSession.Response>;
repoBatchWrite(params: TodoAdxRepoBatchWrite.QueryParams, data?: TodoAdxRepoBatchWrite.InputSchema, opts?: TodoAdxRepoBatchWrite.CallOptions): Promise<TodoAdxRepoBatchWrite.Response>;
repoCreateRecord(params: TodoAdxRepoCreateRecord.QueryParams, data?: TodoAdxRepoCreateRecord.InputSchema, opts?: TodoAdxRepoCreateRecord.CallOptions): Promise<TodoAdxRepoCreateRecord.Response>;
repoDeleteRecord(params: TodoAdxRepoDeleteRecord.QueryParams, data?: TodoAdxRepoDeleteRecord.InputSchema, opts?: TodoAdxRepoDeleteRecord.CallOptions): Promise<TodoAdxRepoDeleteRecord.Response>;
repoDescribe(params: TodoAdxRepoDescribe.QueryParams, data?: TodoAdxRepoDescribe.InputSchema, opts?: TodoAdxRepoDescribe.CallOptions): Promise<TodoAdxRepoDescribe.Response>;
repoGetRecord(params: TodoAdxRepoGetRecord.QueryParams, data?: TodoAdxRepoGetRecord.InputSchema, opts?: TodoAdxRepoGetRecord.CallOptions): Promise<TodoAdxRepoGetRecord.Response>;
repoListRecords(params: TodoAdxRepoListRecords.QueryParams, data?: TodoAdxRepoListRecords.InputSchema, opts?: TodoAdxRepoListRecords.CallOptions): Promise<TodoAdxRepoListRecords.Response>;
repoPutRecord(params: TodoAdxRepoPutRecord.QueryParams, data?: TodoAdxRepoPutRecord.InputSchema, opts?: TodoAdxRepoPutRecord.CallOptions): Promise<TodoAdxRepoPutRecord.Response>;
resolveName(params: TodoAdxResolveName.QueryParams, data?: TodoAdxResolveName.InputSchema, opts?: TodoAdxResolveName.CallOptions): Promise<TodoAdxResolveName.Response>;
syncGetRepo(params: TodoAdxSyncGetRepo.QueryParams, data?: TodoAdxSyncGetRepo.InputSchema, opts?: TodoAdxSyncGetRepo.CallOptions): Promise<TodoAdxSyncGetRepo.Response>;
syncGetRoot(params: TodoAdxSyncGetRoot.QueryParams, data?: TodoAdxSyncGetRoot.InputSchema, opts?: TodoAdxSyncGetRoot.CallOptions): Promise<TodoAdxSyncGetRoot.Response>;
syncUpdateRepo(params: TodoAdxSyncUpdateRepo.QueryParams, data?: TodoAdxSyncUpdateRepo.InputSchema, opts?: TodoAdxSyncUpdateRepo.CallOptions): Promise<TodoAdxSyncUpdateRepo.Response>;
createAccount(params: ComAtprotoCreateAccount.QueryParams, data?: ComAtprotoCreateAccount.InputSchema, opts?: ComAtprotoCreateAccount.CallOptions): Promise<ComAtprotoCreateAccount.Response>;
createInviteCode(params: ComAtprotoCreateInviteCode.QueryParams, data?: ComAtprotoCreateInviteCode.InputSchema, opts?: ComAtprotoCreateInviteCode.CallOptions): Promise<ComAtprotoCreateInviteCode.Response>;
createSession(params: ComAtprotoCreateSession.QueryParams, data?: ComAtprotoCreateSession.InputSchema, opts?: ComAtprotoCreateSession.CallOptions): Promise<ComAtprotoCreateSession.Response>;
deleteAccount(params: ComAtprotoDeleteAccount.QueryParams, data?: ComAtprotoDeleteAccount.InputSchema, opts?: ComAtprotoDeleteAccount.CallOptions): Promise<ComAtprotoDeleteAccount.Response>;
deleteSession(params: ComAtprotoDeleteSession.QueryParams, data?: ComAtprotoDeleteSession.InputSchema, opts?: ComAtprotoDeleteSession.CallOptions): Promise<ComAtprotoDeleteSession.Response>;
getAccount(params: ComAtprotoGetAccount.QueryParams, data?: ComAtprotoGetAccount.InputSchema, opts?: ComAtprotoGetAccount.CallOptions): Promise<ComAtprotoGetAccount.Response>;
getAccountsConfig(params: ComAtprotoGetAccountsConfig.QueryParams, data?: ComAtprotoGetAccountsConfig.InputSchema, opts?: ComAtprotoGetAccountsConfig.CallOptions): Promise<ComAtprotoGetAccountsConfig.Response>;
getSession(params: ComAtprotoGetSession.QueryParams, data?: ComAtprotoGetSession.InputSchema, opts?: ComAtprotoGetSession.CallOptions): Promise<ComAtprotoGetSession.Response>;
repoBatchWrite(params: ComAtprotoRepoBatchWrite.QueryParams, data?: ComAtprotoRepoBatchWrite.InputSchema, opts?: ComAtprotoRepoBatchWrite.CallOptions): Promise<ComAtprotoRepoBatchWrite.Response>;
repoCreateRecord(params: ComAtprotoRepoCreateRecord.QueryParams, data?: ComAtprotoRepoCreateRecord.InputSchema, opts?: ComAtprotoRepoCreateRecord.CallOptions): Promise<ComAtprotoRepoCreateRecord.Response>;
repoDeleteRecord(params: ComAtprotoRepoDeleteRecord.QueryParams, data?: ComAtprotoRepoDeleteRecord.InputSchema, opts?: ComAtprotoRepoDeleteRecord.CallOptions): Promise<ComAtprotoRepoDeleteRecord.Response>;
repoDescribe(params: ComAtprotoRepoDescribe.QueryParams, data?: ComAtprotoRepoDescribe.InputSchema, opts?: ComAtprotoRepoDescribe.CallOptions): Promise<ComAtprotoRepoDescribe.Response>;
repoGetRecord(params: ComAtprotoRepoGetRecord.QueryParams, data?: ComAtprotoRepoGetRecord.InputSchema, opts?: ComAtprotoRepoGetRecord.CallOptions): Promise<ComAtprotoRepoGetRecord.Response>;
repoListRecords(params: ComAtprotoRepoListRecords.QueryParams, data?: ComAtprotoRepoListRecords.InputSchema, opts?: ComAtprotoRepoListRecords.CallOptions): Promise<ComAtprotoRepoListRecords.Response>;
repoPutRecord(params: ComAtprotoRepoPutRecord.QueryParams, data?: ComAtprotoRepoPutRecord.InputSchema, opts?: ComAtprotoRepoPutRecord.CallOptions): Promise<ComAtprotoRepoPutRecord.Response>;
requestAccountPasswordReset(params: ComAtprotoRequestAccountPasswordReset.QueryParams, data?: ComAtprotoRequestAccountPasswordReset.InputSchema, opts?: ComAtprotoRequestAccountPasswordReset.CallOptions): Promise<ComAtprotoRequestAccountPasswordReset.Response>;
resetAccountPassword(params: ComAtprotoResetAccountPassword.QueryParams, data?: ComAtprotoResetAccountPassword.InputSchema, opts?: ComAtprotoResetAccountPassword.CallOptions): Promise<ComAtprotoResetAccountPassword.Response>;
resolveName(params: ComAtprotoResolveName.QueryParams, data?: ComAtprotoResolveName.InputSchema, opts?: ComAtprotoResolveName.CallOptions): Promise<ComAtprotoResolveName.Response>;
syncGetRepo(params: ComAtprotoSyncGetRepo.QueryParams, data?: ComAtprotoSyncGetRepo.InputSchema, opts?: ComAtprotoSyncGetRepo.CallOptions): Promise<ComAtprotoSyncGetRepo.Response>;
syncGetRoot(params: ComAtprotoSyncGetRoot.QueryParams, data?: ComAtprotoSyncGetRoot.InputSchema, opts?: ComAtprotoSyncGetRoot.CallOptions): Promise<ComAtprotoSyncGetRoot.Response>;
syncUpdateRepo(params: ComAtprotoSyncUpdateRepo.QueryParams, data?: ComAtprotoSyncUpdateRepo.InputSchema, opts?: ComAtprotoSyncUpdateRepo.CallOptions): Promise<ComAtprotoSyncUpdateRepo.Response>;
}
export declare class SocialNS {
export declare class AppNS {
_service: ServiceClient;
bsky: BskyNS;
constructor(service: ServiceClient);
}
export declare class BskyNS {
_service: ServiceClient;
badge: BadgeRecord;
follow: FollowRecord;
@ -123,162 +137,162 @@ export declare class SocialNS {
profile: ProfileRecord;
repost: RepostRecord;
constructor(service: ServiceClient);
getAuthorFeed(params: TodoSocialGetAuthorFeed.QueryParams, data?: TodoSocialGetAuthorFeed.InputSchema, opts?: TodoSocialGetAuthorFeed.CallOptions): Promise<TodoSocialGetAuthorFeed.Response>;
getHomeFeed(params: TodoSocialGetHomeFeed.QueryParams, data?: TodoSocialGetHomeFeed.InputSchema, opts?: TodoSocialGetHomeFeed.CallOptions): Promise<TodoSocialGetHomeFeed.Response>;
getLikedBy(params: TodoSocialGetLikedBy.QueryParams, data?: TodoSocialGetLikedBy.InputSchema, opts?: TodoSocialGetLikedBy.CallOptions): Promise<TodoSocialGetLikedBy.Response>;
getNotificationCount(params: TodoSocialGetNotificationCount.QueryParams, data?: TodoSocialGetNotificationCount.InputSchema, opts?: TodoSocialGetNotificationCount.CallOptions): Promise<TodoSocialGetNotificationCount.Response>;
getNotifications(params: TodoSocialGetNotifications.QueryParams, data?: TodoSocialGetNotifications.InputSchema, opts?: TodoSocialGetNotifications.CallOptions): Promise<TodoSocialGetNotifications.Response>;
getPostThread(params: TodoSocialGetPostThread.QueryParams, data?: TodoSocialGetPostThread.InputSchema, opts?: TodoSocialGetPostThread.CallOptions): Promise<TodoSocialGetPostThread.Response>;
getProfile(params: TodoSocialGetProfile.QueryParams, data?: TodoSocialGetProfile.InputSchema, opts?: TodoSocialGetProfile.CallOptions): Promise<TodoSocialGetProfile.Response>;
getRepostedBy(params: TodoSocialGetRepostedBy.QueryParams, data?: TodoSocialGetRepostedBy.InputSchema, opts?: TodoSocialGetRepostedBy.CallOptions): Promise<TodoSocialGetRepostedBy.Response>;
getUserFollowers(params: TodoSocialGetUserFollowers.QueryParams, data?: TodoSocialGetUserFollowers.InputSchema, opts?: TodoSocialGetUserFollowers.CallOptions): Promise<TodoSocialGetUserFollowers.Response>;
getUserFollows(params: TodoSocialGetUserFollows.QueryParams, data?: TodoSocialGetUserFollows.InputSchema, opts?: TodoSocialGetUserFollows.CallOptions): Promise<TodoSocialGetUserFollows.Response>;
postNotificationsSeen(params: TodoSocialPostNotificationsSeen.QueryParams, data?: TodoSocialPostNotificationsSeen.InputSchema, opts?: TodoSocialPostNotificationsSeen.CallOptions): Promise<TodoSocialPostNotificationsSeen.Response>;
getAuthorFeed(params: AppBskyGetAuthorFeed.QueryParams, data?: AppBskyGetAuthorFeed.InputSchema, opts?: AppBskyGetAuthorFeed.CallOptions): Promise<AppBskyGetAuthorFeed.Response>;
getHomeFeed(params: AppBskyGetHomeFeed.QueryParams, data?: AppBskyGetHomeFeed.InputSchema, opts?: AppBskyGetHomeFeed.CallOptions): Promise<AppBskyGetHomeFeed.Response>;
getLikedBy(params: AppBskyGetLikedBy.QueryParams, data?: AppBskyGetLikedBy.InputSchema, opts?: AppBskyGetLikedBy.CallOptions): Promise<AppBskyGetLikedBy.Response>;
getNotificationCount(params: AppBskyGetNotificationCount.QueryParams, data?: AppBskyGetNotificationCount.InputSchema, opts?: AppBskyGetNotificationCount.CallOptions): Promise<AppBskyGetNotificationCount.Response>;
getNotifications(params: AppBskyGetNotifications.QueryParams, data?: AppBskyGetNotifications.InputSchema, opts?: AppBskyGetNotifications.CallOptions): Promise<AppBskyGetNotifications.Response>;
getPostThread(params: AppBskyGetPostThread.QueryParams, data?: AppBskyGetPostThread.InputSchema, opts?: AppBskyGetPostThread.CallOptions): Promise<AppBskyGetPostThread.Response>;
getProfile(params: AppBskyGetProfile.QueryParams, data?: AppBskyGetProfile.InputSchema, opts?: AppBskyGetProfile.CallOptions): Promise<AppBskyGetProfile.Response>;
getRepostedBy(params: AppBskyGetRepostedBy.QueryParams, data?: AppBskyGetRepostedBy.InputSchema, opts?: AppBskyGetRepostedBy.CallOptions): Promise<AppBskyGetRepostedBy.Response>;
getUserFollowers(params: AppBskyGetUserFollowers.QueryParams, data?: AppBskyGetUserFollowers.InputSchema, opts?: AppBskyGetUserFollowers.CallOptions): Promise<AppBskyGetUserFollowers.Response>;
getUserFollows(params: AppBskyGetUserFollows.QueryParams, data?: AppBskyGetUserFollows.InputSchema, opts?: AppBskyGetUserFollows.CallOptions): Promise<AppBskyGetUserFollows.Response>;
postNotificationsSeen(params: AppBskyPostNotificationsSeen.QueryParams, data?: AppBskyPostNotificationsSeen.InputSchema, opts?: AppBskyPostNotificationsSeen.CallOptions): Promise<AppBskyPostNotificationsSeen.Response>;
}
export declare class BadgeRecord {
_service: ServiceClient;
constructor(service: ServiceClient);
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'type'>): Promise<{
records: {
uri: string;
value: TodoSocialBadge.Record;
value: AppBskyBadge.Record;
}[];
}>;
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
get(params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'type'>): Promise<{
uri: string;
value: TodoSocialBadge.Record;
value: AppBskyBadge.Record;
}>;
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialBadge.Record, headers?: Record<string, string>): Promise<{
create(params: Omit<ComAtprotoRepoCreateRecord.QueryParams, 'type'>, record: AppBskyBadge.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialBadge.Record, headers?: Record<string, string>): Promise<{
put(params: Omit<ComAtprotoRepoPutRecord.QueryParams, 'type'>, record: AppBskyBadge.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
delete(params: Omit<ComAtprotoRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
}
export declare class FollowRecord {
_service: ServiceClient;
constructor(service: ServiceClient);
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'type'>): Promise<{
records: {
uri: string;
value: TodoSocialFollow.Record;
value: AppBskyFollow.Record;
}[];
}>;
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
get(params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'type'>): Promise<{
uri: string;
value: TodoSocialFollow.Record;
value: AppBskyFollow.Record;
}>;
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialFollow.Record, headers?: Record<string, string>): Promise<{
create(params: Omit<ComAtprotoRepoCreateRecord.QueryParams, 'type'>, record: AppBskyFollow.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialFollow.Record, headers?: Record<string, string>): Promise<{
put(params: Omit<ComAtprotoRepoPutRecord.QueryParams, 'type'>, record: AppBskyFollow.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
delete(params: Omit<ComAtprotoRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
}
export declare class LikeRecord {
_service: ServiceClient;
constructor(service: ServiceClient);
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'type'>): Promise<{
records: {
uri: string;
value: TodoSocialLike.Record;
value: AppBskyLike.Record;
}[];
}>;
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
get(params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'type'>): Promise<{
uri: string;
value: TodoSocialLike.Record;
value: AppBskyLike.Record;
}>;
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialLike.Record, headers?: Record<string, string>): Promise<{
create(params: Omit<ComAtprotoRepoCreateRecord.QueryParams, 'type'>, record: AppBskyLike.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialLike.Record, headers?: Record<string, string>): Promise<{
put(params: Omit<ComAtprotoRepoPutRecord.QueryParams, 'type'>, record: AppBskyLike.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
delete(params: Omit<ComAtprotoRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
}
export declare class MediaEmbedRecord {
_service: ServiceClient;
constructor(service: ServiceClient);
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'type'>): Promise<{
records: {
uri: string;
value: TodoSocialMediaEmbed.Record;
value: AppBskyMediaEmbed.Record;
}[];
}>;
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
get(params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'type'>): Promise<{
uri: string;
value: TodoSocialMediaEmbed.Record;
value: AppBskyMediaEmbed.Record;
}>;
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialMediaEmbed.Record, headers?: Record<string, string>): Promise<{
create(params: Omit<ComAtprotoRepoCreateRecord.QueryParams, 'type'>, record: AppBskyMediaEmbed.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialMediaEmbed.Record, headers?: Record<string, string>): Promise<{
put(params: Omit<ComAtprotoRepoPutRecord.QueryParams, 'type'>, record: AppBskyMediaEmbed.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
delete(params: Omit<ComAtprotoRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
}
export declare class PostRecord {
_service: ServiceClient;
constructor(service: ServiceClient);
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'type'>): Promise<{
records: {
uri: string;
value: TodoSocialPost.Record;
value: AppBskyPost.Record;
}[];
}>;
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
get(params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'type'>): Promise<{
uri: string;
value: TodoSocialPost.Record;
value: AppBskyPost.Record;
}>;
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialPost.Record, headers?: Record<string, string>): Promise<{
create(params: Omit<ComAtprotoRepoCreateRecord.QueryParams, 'type'>, record: AppBskyPost.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialPost.Record, headers?: Record<string, string>): Promise<{
put(params: Omit<ComAtprotoRepoPutRecord.QueryParams, 'type'>, record: AppBskyPost.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
delete(params: Omit<ComAtprotoRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
}
export declare class ProfileRecord {
_service: ServiceClient;
constructor(service: ServiceClient);
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'type'>): Promise<{
records: {
uri: string;
value: TodoSocialProfile.Record;
value: AppBskyProfile.Record;
}[];
}>;
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
get(params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'type'>): Promise<{
uri: string;
value: TodoSocialProfile.Record;
value: AppBskyProfile.Record;
}>;
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialProfile.Record, headers?: Record<string, string>): Promise<{
create(params: Omit<ComAtprotoRepoCreateRecord.QueryParams, 'type'>, record: AppBskyProfile.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialProfile.Record, headers?: Record<string, string>): Promise<{
put(params: Omit<ComAtprotoRepoPutRecord.QueryParams, 'type'>, record: AppBskyProfile.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
delete(params: Omit<ComAtprotoRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
}
export declare class RepostRecord {
_service: ServiceClient;
constructor(service: ServiceClient);
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'type'>): Promise<{
records: {
uri: string;
value: TodoSocialRepost.Record;
value: AppBskyRepost.Record;
}[];
}>;
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
get(params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'type'>): Promise<{
uri: string;
value: TodoSocialRepost.Record;
value: AppBskyRepost.Record;
}>;
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialRepost.Record, headers?: Record<string, string>): Promise<{
create(params: Omit<ComAtprotoRepoCreateRecord.QueryParams, 'type'>, record: AppBskyRepost.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialRepost.Record, headers?: Record<string, string>): Promise<{
put(params: Omit<ComAtprotoRepoPutRecord.QueryParams, 'type'>, record: AppBskyRepost.Record, headers?: Record<string, string>): Promise<{
uri: string;
}>;
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
delete(params: Omit<ComAtprotoRepoDeleteRecord.QueryParams, 'type'>, headers?: Record<string, string>): Promise<void>;
}

View File

@ -0,0 +1,23 @@
export interface Record {
assertion: InviteAssertion | EmployeeAssertion | TagAssertion | UnknownAssertion;
subject: string;
createdAt: string;
[k: string]: unknown;
}
export interface InviteAssertion {
type: 'invite';
[k: string]: unknown;
}
export interface EmployeeAssertion {
type: 'employee';
[k: string]: unknown;
}
export interface TagAssertion {
type: 'tag';
tag: string;
[k: string]: unknown;
}
export interface UnknownAssertion {
type: string;
[k: string]: unknown;
}

View File

@ -0,0 +1,5 @@
export interface Record {
subject: string;
createdAt: string;
[k: string]: unknown;
}

View File

@ -0,0 +1,55 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
author: string;
limit?: number;
before?: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
feed: FeedItem[];
}
export interface FeedItem {
cursor: string;
uri: string;
author: User;
repostedBy?: User;
record: {};
embed?: RecordEmbed | ExternalEmbed | UnknownEmbed;
replyCount: number;
repostCount: number;
likeCount: number;
indexedAt: string;
myState?: {
repost?: string;
like?: string;
};
}
export interface User {
did: string;
name: string;
displayName?: string;
}
export interface RecordEmbed {
type: 'record';
author: User;
record: {};
}
export interface ExternalEmbed {
type: 'external';
uri: string;
title: string;
description: string;
imageUri: string;
}
export interface UnknownEmbed {
type: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,55 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
algorithm?: string;
limit?: number;
before?: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
feed: FeedItem[];
}
export interface FeedItem {
cursor: string;
uri: string;
author: User;
repostedBy?: User;
record: {};
embed?: RecordEmbed | ExternalEmbed | UnknownEmbed;
replyCount: number;
repostCount: number;
likeCount: number;
indexedAt: string;
myState?: {
repost?: string;
like?: string;
};
}
export interface User {
did: string;
name: string;
displayName?: string;
}
export interface RecordEmbed {
type: 'record';
author: User;
record: {};
}
export interface ExternalEmbed {
type: 'external';
uri: string;
title: string;
description: string;
imageUri: string;
}
export interface UnknownEmbed {
type: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,26 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
uri: string;
limit?: number;
before?: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
uri: string;
likedBy: {
did: string;
name: string;
displayName?: string;
createdAt?: string;
indexedAt: string;
}[];
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,16 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
count: number;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,31 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
limit?: number;
before?: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
notifications: Notification[];
}
export interface Notification {
uri: string;
author: {
did: string;
name: string;
displayName?: string;
};
reason: string;
reasonSubject?: string;
record: {};
isRead: boolean;
indexedAt: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,54 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
uri: string;
depth?: number;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
thread: Post;
}
export interface Post {
uri: string;
author: User;
record: {};
embed?: RecordEmbed | ExternalEmbed | UnknownEmbed;
parent?: Post;
replyCount: number;
replies?: Post[];
likeCount: number;
repostCount: number;
indexedAt: string;
myState?: {
repost?: string;
like?: string;
};
}
export interface User {
did: string;
name: string;
displayName?: string;
}
export interface RecordEmbed {
type: 'record';
author: User;
record: {};
}
export interface ExternalEmbed {
type: 'external';
uri: string;
title: string;
description: string;
imageUri: string;
}
export interface UnknownEmbed {
type: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,40 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
user: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
did: string;
name: string;
displayName?: string;
description?: string;
followersCount: number;
followsCount: number;
postsCount: number;
badges: Badge[];
myState?: {
follow?: string;
};
}
export interface Badge {
uri: string;
error?: string;
issuer?: {
did: string;
name: string;
displayName: string;
};
assertion?: {
type: string;
};
createdAt?: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,26 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
uri: string;
limit?: number;
before?: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
uri: string;
repostedBy: {
did: string;
name: string;
displayName?: string;
createdAt?: string;
indexedAt: string;
}[];
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,30 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
user: string;
limit?: number;
before?: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
subject: {
did: string;
name: string;
displayName?: string;
};
followers: {
did: string;
name: string;
displayName?: string;
createdAt?: string;
indexedAt: string;
}[];
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,30 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
user: string;
limit?: number;
before?: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
subject: {
did: string;
name: string;
displayName?: string;
};
follows: {
did: string;
name: string;
displayName?: string;
createdAt?: string;
indexedAt: string;
}[];
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,5 @@
export interface Record {
subject: string;
createdAt: string;
[k: string]: unknown;
}

View File

@ -0,0 +1,15 @@
export interface Record {
media: MediaEmbed[];
[k: string]: unknown;
}
export interface MediaEmbed {
alt?: string;
thumb?: MediaEmbedBlob;
original: MediaEmbedBlob;
[k: string]: unknown;
}
export interface MediaEmbedBlob {
mimeType: string;
blobId: string;
[k: string]: unknown;
}

View File

@ -0,0 +1,18 @@
export declare type TextSlice = [number, number];
export declare type Entity = {
index: TextSlice;
type: string;
value: string;
[k: string]: unknown;
}[];
export interface Record {
text: string;
entities?: Entity;
reply?: {
root: string;
parent?: string;
[k: string]: unknown;
};
createdAt: string;
[k: string]: unknown;
}

View File

@ -0,0 +1,19 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
seenAt: string;
}
export interface OutputSchema {
[k: string]: unknown;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,10 @@
export interface Record {
displayName: string;
description?: string;
badges?: BadgeRef[];
[k: string]: unknown;
}
export interface BadgeRef {
uri: string;
[k: string]: unknown;
}

View File

@ -0,0 +1,5 @@
export interface Record {
subject: string;
createdAt: string;
[k: string]: unknown;
}

View File

@ -0,0 +1,36 @@
import { Headers, XRPCError } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
email: string;
username: string;
inviteCode?: string;
password: string;
}
export interface OutputSchema {
jwt: string;
username: string;
did: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare class InvalidUsernameError extends XRPCError {
constructor(src: XRPCError);
}
export declare class InvalidPasswordError extends XRPCError {
constructor(src: XRPCError);
}
export declare class InvalidInviteCodeError extends XRPCError {
constructor(src: XRPCError);
}
export declare class UsernameNotAvailableError extends XRPCError {
constructor(src: XRPCError);
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,19 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
useCount: number;
}
export interface OutputSchema {
code: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,22 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
username: string;
password: string;
}
export interface OutputSchema {
jwt: string;
name: string;
did: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,19 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: '';
}
export interface InputSchema {
[k: string]: unknown;
}
export interface OutputSchema {
[k: string]: unknown;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,19 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: '';
}
export interface InputSchema {
[k: string]: unknown;
}
export interface OutputSchema {
[k: string]: unknown;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,19 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: '';
}
export interface InputSchema {
[k: string]: unknown;
}
export interface OutputSchema {
[k: string]: unknown;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,17 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
inviteCodeRequired?: boolean;
availableUserDomains: string[];
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,17 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
name: string;
did: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,34 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
did: string;
validate?: boolean;
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
writes: ({
action: 'create';
collection: string;
value: unknown;
} | {
action: 'update';
collection: string;
tid: string;
value: unknown;
} | {
action: 'delete';
collection: string;
tid: string;
})[];
}
export interface OutputSchema {
[k: string]: unknown;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,22 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
did: string;
type: string;
validate?: boolean;
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
[k: string]: unknown;
}
export interface OutputSchema {
uri: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,15 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
did: string;
type: string;
tid: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface Response {
success: boolean;
headers: Headers;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,21 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
nameOrDid: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
name: string;
did: string;
didDoc: {};
collections: string[];
nameIsCorrect: boolean;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,20 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
nameOrDid: string;
type: string;
tid: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
uri: string;
value: {};
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,25 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
nameOrDid: string;
type: string;
limit?: number;
before?: string;
after?: string;
reverse?: boolean;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
records: {
uri: string;
value: {};
}[];
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,23 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
did: string;
type: string;
tid: string;
validate?: boolean;
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
[k: string]: unknown;
}
export interface OutputSchema {
uri: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,18 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
email: string;
}
export interface OutputSchema {
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,25 @@
import { Headers, XRPCError } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
token: string;
password: string;
}
export interface OutputSchema {
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare class ExpiredTokenError extends XRPCError {
constructor(src: XRPCError);
}
export declare class InvalidTokenError extends XRPCError {
constructor(src: XRPCError);
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,17 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
name?: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
did: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,15 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
did: string;
from?: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface Response {
success: boolean;
headers: Headers;
data: Uint8Array;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,17 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
did: string;
}
export interface CallOptions {
headers?: Headers;
}
export declare type InputSchema = undefined;
export interface OutputSchema {
root: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,14 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
did: string;
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/cbor';
}
export declare type InputSchema = string | Uint8Array;
export interface Response {
success: boolean;
headers: Headers;
}
export declare function toKnownErr(e: any): any;

View File

@ -27,6 +27,9 @@ export declare class InvalidUsernameError extends XRPCError {
export declare class InvalidPasswordError extends XRPCError {
constructor(src: XRPCError);
}
export declare class InvalidInviteCodeError extends XRPCError {
constructor(src: XRPCError);
}
export declare class UsernameNotAvailableError extends XRPCError {
constructor(src: XRPCError);
}

View File

@ -0,0 +1,19 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
useCount: number;
}
export interface OutputSchema {
code: string;
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,18 @@
import { Headers } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
email: string;
}
export interface OutputSchema {
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare function toKnownErr(e: any): any;

View File

@ -0,0 +1,25 @@
import { Headers, XRPCError } from '@adxp/xrpc';
export interface QueryParams {
}
export interface CallOptions {
headers?: Headers;
encoding: 'application/json';
}
export interface InputSchema {
token: string;
password: string;
}
export interface OutputSchema {
}
export interface Response {
success: boolean;
headers: Headers;
data: OutputSchema;
}
export declare class ExpiredTokenError extends XRPCError {
constructor(src: XRPCError);
}
export declare class InvalidTokenError extends XRPCError {
constructor(src: XRPCError);
}
export declare function toKnownErr(e: any): any;

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@ import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'
import {BottomSheetTextInput} from '@gorhom/bottom-sheet'
import LinearGradient from 'react-native-linear-gradient'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import * as GetUserFollows from '../../../third-party/api/src/types/todo/social/getUserFollows'
import * as GetUserFollows from '../../../third-party/api/src/types/app/bsky/getUserFollows'
import {Autocomplete} from './composer/Autocomplete'
import Toast from '../util/Toast'
import ProgressCircle from '../util/ProgressCircle'
@ -32,7 +32,7 @@ export function Component({
const [autocompleteOptions, setAutocompleteOptions] = useState<string[]>([])
useEffect(() => {
store.api.todo.social
store.api.app.bsky
.getUserFollows({
user: store.me.did || '',
})

View File

@ -6,7 +6,7 @@ import {ErrorMessage} from '../util/ErrorMessage'
import {useStores} from '../../../state'
import {ProfileViewModel} from '../../../state/models/profile-view'
import {s, colors, gradients} from '../../lib/styles'
import * as Profile from '../../../third-party/api/src/types/todo/social/profile'
import * as Profile from '../../../third-party/api/src/types/app/bsky/profile'
export const snapPoints = ['80%']

View File

@ -3,7 +3,7 @@ import {observer} from 'mobx-react-lite'
import {Image, StyleSheet, Text, TouchableOpacity, View} from 'react-native'
import Svg, {Line} from 'react-native-svg'
import {AdxUri} from '../../../third-party/uri'
import * as PostType from '../../../third-party/api/src/types/todo/social/post'
import * as PostType from '../../../third-party/api/src/types/app/bsky/post'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {PostThreadViewPostModel} from '../../../state/models/post-thread-view'
import {ComposePostModel} from '../../../state/models/shell'

View File

@ -1,7 +1,7 @@
import React, {useState, useEffect, useMemo} from 'react'
import {observer} from 'mobx-react-lite'
import {AdxUri} from '../../../third-party/uri'
import * as PostType from '../../../third-party/api/src/types/todo/social/post'
import * as PostType from '../../../third-party/api/src/types/app/bsky/post'
import {
ActivityIndicator,
Image,

View File

@ -2,7 +2,7 @@ import React, {useMemo} from 'react'
import {observer} from 'mobx-react-lite'
import {Image, StyleSheet, Text, TouchableOpacity, View} from 'react-native'
import {AdxUri} from '../../../third-party/uri'
import * as PostType from '../../../third-party/api/src/types/todo/social/post'
import * as PostType from '../../../third-party/api/src/types/app/bsky/post'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {FeedViewItemModel} from '../../../state/models/feed-view'
import {ComposePostModel, SharePostModel} from '../../../state/models/shell'

View File

@ -1,5 +1,5 @@
import React, {useState, useEffect} from 'react'
import * as TodoSocialGetProfile from '../../../third-party/api/src/types/todo/social/getProfile'
import * as AppBskyGetProfile from '../../../third-party/api/src/types/app/bsky/getProfile'
import {StyleProp, Text, TextStyle} from 'react-native'
import {useStores} from '../../../state'
@ -12,7 +12,7 @@ export function UserInfoText({
style,
}: {
did: string
attr?: keyof TodoSocialGetProfile.OutputSchema
attr?: keyof AppBskyGetProfile.OutputSchema
loading?: string
failed?: string
prefix?: string
@ -24,13 +24,13 @@ export function UserInfoText({
const store = useStores()
const [profile, setProfile] = useState<
undefined | TodoSocialGetProfile.OutputSchema
undefined | AppBskyGetProfile.OutputSchema
>(undefined)
const [didFail, setFailed] = useState<boolean>(false)
useEffect(() => {
// TODO use caching to reduce loads
store.api.todo.social.getProfile({user: did}).then(
store.api.app.bsky.getProfile({user: did}).then(
v => {
setProfile(v.data)
},
@ -38,7 +38,7 @@ export function UserInfoText({
setFailed(true)
},
)
}, [did, store.api.todo.social])
}, [did, store.api.app.bsky])
return (
<Text style={style}>

View File

@ -1,5 +1,5 @@
import {AdxUri} from '../../third-party/uri'
import {Entity as Entities} from '../../third-party/api/src/types/todo/social/post'
import {Entity as Entities} from '../../third-party/api/src/types/app/bsky/post'
type Entity = Entities[0]

View File

@ -16,7 +16,7 @@ import {Settings} from './screens/Settings'
export type ScreenParams = {
params: Record<string, any>
visible: boolean
scrollElRef: MutableRefObject<FlatList<any> | undefined>
scrollElRef?: MutableRefObject<FlatList<any> | undefined>
}
export type Route = [React.FC<ScreenParams>, IconProp, RegExp]
export type MatchResult = {

View File

@ -7,7 +7,7 @@ import {useStores} from '../../state'
export const PostLikedBy = ({visible, params}: ScreenParams) => {
const store = useStores()
const {name, recordKey} = params
const uri = makeRecordUri(name, 'todo.social.post', recordKey)
const uri = makeRecordUri(name, 'app.bsky.post', recordKey)
useEffect(() => {
if (visible) {

View File

@ -7,7 +7,7 @@ import {useStores} from '../../state'
export const PostRepostedBy = ({visible, params}: ScreenParams) => {
const store = useStores()
const {name, recordKey} = params
const uri = makeRecordUri(name, 'todo.social.post', recordKey)
const uri = makeRecordUri(name, 'app.bsky.post', recordKey)
useEffect(() => {
if (visible) {

View File

@ -7,7 +7,7 @@ import {useStores} from '../../state'
export const PostThread = ({visible, params}: ScreenParams) => {
const store = useStores()
const {name, recordKey} = params
const uri = makeRecordUri(name, 'todo.social.post', recordKey)
const uri = makeRecordUri(name, 'app.bsky.post', recordKey)
useEffect(() => {
if (visible) {

View File

@ -56,10 +56,12 @@ export const MainMenu = observer(
icon,
label,
url,
count,
}: {
icon: IconProp
label: string
url: string
count?: number
}) => (
<TouchableOpacity
style={[styles.menuItem, styles.menuItemMargin]}
@ -75,6 +77,11 @@ export const MainMenu = observer(
/>
)}
</View>
{count ? (
<View style={styles.menuItemCount}>
<Text style={styles.menuItemCountLabel}>{count}</Text>
</View>
) : undefined}
<Text style={styles.menuItemLabel} numberOfLines={1}>
{label}
</Text>
@ -123,6 +130,7 @@ export const MainMenu = observer(
icon={['far', 'bell']}
label="Notifications"
url="/notifications"
count={store.me.notificationCount}
/>
</Animated.View>
</View>
@ -212,4 +220,18 @@ const styles = StyleSheet.create({
menuItemLabel: {
fontSize: 13,
},
menuItemCount: {
position: 'absolute',
left: 48,
top: 10,
backgroundColor: colors.red3,
paddingHorizontal: 4,
paddingBottom: 1,
borderRadius: 6,
},
menuItemCountLabel: {
fontSize: 12,
fontWeight: 'bold',
color: colors.white,
},
})