Merge branch 'main' into 4-update-to-react-native-070
This commit is contained in:
@@ -400,6 +400,7 @@ DEPENDENCIES:
|
|||||||
- react-native-pager-view (from `../node_modules/react-native-pager-view`)
|
- react-native-pager-view (from `../node_modules/react-native-pager-view`)
|
||||||
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
|
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
|
||||||
- react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
|
- react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
|
||||||
|
- react-native-version-number (from `../node_modules/react-native-version-number`)
|
||||||
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
|
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
|
||||||
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
|
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
|
||||||
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
|
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
|
||||||
@@ -481,6 +482,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../node_modules/react-native-safe-area-context"
|
:path: "../node_modules/react-native-safe-area-context"
|
||||||
react-native-splash-screen:
|
react-native-splash-screen:
|
||||||
:path: "../node_modules/react-native-splash-screen"
|
:path: "../node_modules/react-native-splash-screen"
|
||||||
|
react-native-version-number:
|
||||||
|
:path: "../node_modules/react-native-version-number"
|
||||||
React-perflogger:
|
React-perflogger:
|
||||||
:path: "../node_modules/react-native/ReactCommon/reactperflogger"
|
:path: "../node_modules/react-native/ReactCommon/reactperflogger"
|
||||||
React-RCTActionSheet:
|
React-RCTActionSheet:
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
"react-native-svg": "^12.4.0",
|
"react-native-svg": "^12.4.0",
|
||||||
"react-native-tab-view": "^3.3.0",
|
"react-native-tab-view": "^3.3.0",
|
||||||
"react-native-url-polyfill": "^1.3.0",
|
"react-native-url-polyfill": "^1.3.0",
|
||||||
|
"react-native-version-number": "^0.3.6",
|
||||||
"react-native-web": "^0.17.7",
|
"react-native-web": "^0.17.7",
|
||||||
"tlds": "^1.234.0"
|
"tlds": "^1.234.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export function doPolyfill() {
|
|||||||
export async function post(
|
export async function post(
|
||||||
store: RootStoreModel,
|
store: RootStoreModel,
|
||||||
text: string,
|
text: string,
|
||||||
replyTo?: Post.PostRef,
|
replyTo?: Post.ReplyRef,
|
||||||
knownHandles?: Set<string>,
|
knownHandles?: Set<string>,
|
||||||
) {
|
) {
|
||||||
let reply
|
let reply
|
||||||
@@ -43,6 +43,14 @@ export async function post(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const entities = extractEntities(text, knownHandles)
|
const entities = extractEntities(text, knownHandles)
|
||||||
|
if (entities) {
|
||||||
|
for (const ent of entities) {
|
||||||
|
if (ent.type === 'mention') {
|
||||||
|
const prof = await store.profiles.getProfile(ent.value)
|
||||||
|
ent.value = prof.data.did
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return await store.api.app.bsky.feed.post.create(
|
return await store.api.app.bsky.feed.post.create(
|
||||||
{did: store.me.did || ''},
|
{did: store.me.did || ''},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import {makeAutoObservable, runInAction} from 'mobx'
|
import {makeAutoObservable, runInAction} from 'mobx'
|
||||||
|
import {Record as PostRecord} from '../../third-party/api/src/client/types/app/bsky/feed/post'
|
||||||
import * as GetTimeline from '../../third-party/api/src/client/types/app/bsky/feed/getTimeline'
|
import * as GetTimeline from '../../third-party/api/src/client/types/app/bsky/feed/getTimeline'
|
||||||
import * as GetAuthorFeed from '../../third-party/api/src/client/types/app/bsky/feed/getAuthorFeed'
|
import * as GetAuthorFeed from '../../third-party/api/src/client/types/app/bsky/feed/getAuthorFeed'
|
||||||
|
import {PostThreadViewModel} from './post-thread-view'
|
||||||
import {AtUri} from '../../third-party/uri'
|
import {AtUri} from '../../third-party/uri'
|
||||||
import {RootStoreModel} from './root-store'
|
import {RootStoreModel} from './root-store'
|
||||||
import * as apilib from '../lib/api'
|
import * as apilib from '../lib/api'
|
||||||
@@ -43,10 +45,6 @@ export class FeedItemModel implements GetTimeline.FeedItem {
|
|||||||
repostedBy?: GetTimeline.Actor
|
repostedBy?: GetTimeline.Actor
|
||||||
trendedBy?: GetTimeline.Actor
|
trendedBy?: GetTimeline.Actor
|
||||||
record: Record<string, unknown> = {}
|
record: Record<string, unknown> = {}
|
||||||
embed?:
|
|
||||||
| GetTimeline.RecordEmbed
|
|
||||||
| GetTimeline.ExternalEmbed
|
|
||||||
| GetTimeline.UnknownEmbed
|
|
||||||
replyCount: number = 0
|
replyCount: number = 0
|
||||||
repostCount: number = 0
|
repostCount: number = 0
|
||||||
upvoteCount: number = 0
|
upvoteCount: number = 0
|
||||||
@@ -54,6 +52,9 @@ export class FeedItemModel implements GetTimeline.FeedItem {
|
|||||||
indexedAt: string = ''
|
indexedAt: string = ''
|
||||||
myState = new FeedItemMyStateModel()
|
myState = new FeedItemMyStateModel()
|
||||||
|
|
||||||
|
// additional data
|
||||||
|
additionalParentPost?: PostThreadViewModel
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public rootStore: RootStoreModel,
|
public rootStore: RootStoreModel,
|
||||||
reactKey: string,
|
reactKey: string,
|
||||||
@@ -73,7 +74,6 @@ export class FeedItemModel implements GetTimeline.FeedItem {
|
|||||||
this.repostedBy = v.repostedBy
|
this.repostedBy = v.repostedBy
|
||||||
this.trendedBy = v.trendedBy
|
this.trendedBy = v.trendedBy
|
||||||
this.record = v.record
|
this.record = v.record
|
||||||
this.embed = v.embed
|
|
||||||
this.replyCount = v.replyCount
|
this.replyCount = v.replyCount
|
||||||
this.repostCount = v.repostCount
|
this.repostCount = v.repostCount
|
||||||
this.upvoteCount = v.upvoteCount
|
this.upvoteCount = v.upvoteCount
|
||||||
@@ -156,6 +156,29 @@ export class FeedItemModel implements GetTimeline.FeedItem {
|
|||||||
rkey: new AtUri(this.uri).rkey,
|
rkey: new AtUri(this.uri).rkey,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get needsAdditionalData() {
|
||||||
|
if (
|
||||||
|
(this.record as PostRecord).reply?.parent?.uri &&
|
||||||
|
!this._isThreadChild
|
||||||
|
) {
|
||||||
|
return !this.additionalParentPost
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
async fetchAdditionalData() {
|
||||||
|
if (!this.needsAdditionalData) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.additionalParentPost = new PostThreadViewModel(this.rootStore, {
|
||||||
|
uri: (this.record as PostRecord).reply?.parent.uri,
|
||||||
|
depth: 0,
|
||||||
|
})
|
||||||
|
await this.additionalParentPost.setup().catch(e => {
|
||||||
|
console.error('Failed to load post needed by notification', e)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class FeedModel {
|
export class FeedModel {
|
||||||
@@ -345,7 +368,7 @@ export class FeedModel {
|
|||||||
this._xLoading(isRefreshing)
|
this._xLoading(isRefreshing)
|
||||||
try {
|
try {
|
||||||
const res = await this._getFeed({limit: PAGE_SIZE})
|
const res = await this._getFeed({limit: PAGE_SIZE})
|
||||||
this._replaceAll(res)
|
await this._replaceAll(res)
|
||||||
this._xIdle()
|
this._xIdle()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this._xIdle(e.toString())
|
this._xIdle(e.toString())
|
||||||
@@ -356,7 +379,7 @@ export class FeedModel {
|
|||||||
this._xLoading()
|
this._xLoading()
|
||||||
try {
|
try {
|
||||||
const res = await this._getFeed({limit: PAGE_SIZE})
|
const res = await this._getFeed({limit: PAGE_SIZE})
|
||||||
this._prependAll(res)
|
await this._prependAll(res)
|
||||||
this._xIdle()
|
this._xIdle()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this._xIdle(e.toString())
|
this._xIdle(e.toString())
|
||||||
@@ -373,7 +396,7 @@ export class FeedModel {
|
|||||||
before: this.loadMoreCursor,
|
before: this.loadMoreCursor,
|
||||||
limit: PAGE_SIZE,
|
limit: PAGE_SIZE,
|
||||||
})
|
})
|
||||||
this._appendAll(res)
|
await this._appendAll(res)
|
||||||
this._xIdle()
|
this._xIdle()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this._xIdle(`Failed to load feed: ${e.toString()}`)
|
this._xIdle(`Failed to load feed: ${e.toString()}`)
|
||||||
@@ -407,13 +430,17 @@ export class FeedModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _replaceAll(res: GetTimeline.Response | GetAuthorFeed.Response) {
|
private async _replaceAll(
|
||||||
this.feed.length = 0
|
res: GetTimeline.Response | GetAuthorFeed.Response,
|
||||||
|
) {
|
||||||
this.pollCursor = res.data.feed[0]?.uri
|
this.pollCursor = res.data.feed[0]?.uri
|
||||||
this._appendAll(res)
|
return this._appendAll(res, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
private _appendAll(res: GetTimeline.Response | GetAuthorFeed.Response) {
|
private async _appendAll(
|
||||||
|
res: GetTimeline.Response | GetAuthorFeed.Response,
|
||||||
|
replace = false,
|
||||||
|
) {
|
||||||
this.loadMoreCursor = res.data.cursor
|
this.loadMoreCursor = res.data.cursor
|
||||||
this.hasMore = !!this.loadMoreCursor
|
this.hasMore = !!this.loadMoreCursor
|
||||||
let counter = this.feed.length
|
let counter = this.feed.length
|
||||||
@@ -428,40 +455,64 @@ export class FeedModel {
|
|||||||
// -prf
|
// -prf
|
||||||
const reorgedFeed = preprocessFeed(res.data.feed, this.feedType === 'home')
|
const reorgedFeed = preprocessFeed(res.data.feed, this.feedType === 'home')
|
||||||
|
|
||||||
|
const promises = []
|
||||||
|
const toAppend: FeedItemModel[] = []
|
||||||
for (const item of reorgedFeed) {
|
for (const item of reorgedFeed) {
|
||||||
this._append(counter++, item)
|
const itemModel = new FeedItemModel(
|
||||||
|
this.rootStore,
|
||||||
|
`item-${counter++}`,
|
||||||
|
item,
|
||||||
|
)
|
||||||
|
if (itemModel.needsAdditionalData) {
|
||||||
|
promises.push(
|
||||||
|
itemModel.fetchAdditionalData().catch(e => {
|
||||||
|
console.error('Failure during feed-view _appendAll()', e)
|
||||||
|
}),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
toAppend.push(itemModel)
|
||||||
|
}
|
||||||
|
await Promise.all(promises)
|
||||||
|
runInAction(() => {
|
||||||
|
if (replace) {
|
||||||
|
this.feed = toAppend
|
||||||
|
} else {
|
||||||
|
this.feed = this.feed.concat(toAppend)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private _append(
|
private async _prependAll(
|
||||||
keyId: number,
|
res: GetTimeline.Response | GetAuthorFeed.Response,
|
||||||
item: GetTimeline.FeedItem | GetAuthorFeed.FeedItem,
|
|
||||||
) {
|
) {
|
||||||
// TODO: validate .record
|
|
||||||
this.feed.push(new FeedItemModel(this.rootStore, `item-${keyId}`, item))
|
|
||||||
}
|
|
||||||
|
|
||||||
private _prependAll(res: GetTimeline.Response | GetAuthorFeed.Response) {
|
|
||||||
this.pollCursor = res.data.feed[0]?.uri
|
this.pollCursor = res.data.feed[0]?.uri
|
||||||
let counter = this.feed.length
|
let counter = this.feed.length
|
||||||
const toPrepend = []
|
|
||||||
|
const promises = []
|
||||||
|
const toPrepend: FeedItemModel[] = []
|
||||||
for (const item of res.data.feed) {
|
for (const item of res.data.feed) {
|
||||||
if (this.feed.find(item2 => item2.uri === item.uri)) {
|
if (this.feed.find(item2 => item2.uri === item.uri)) {
|
||||||
break // stop here - we've hit a post we already have
|
break // stop here - we've hit a post we already have
|
||||||
}
|
}
|
||||||
toPrepend.unshift(item) // reverse the order
|
|
||||||
}
|
|
||||||
for (const item of toPrepend) {
|
|
||||||
this._prepend(counter++, item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private _prepend(
|
const itemModel = new FeedItemModel(
|
||||||
keyId: number,
|
this.rootStore,
|
||||||
item: GetTimeline.FeedItem | GetAuthorFeed.FeedItem,
|
`item-${counter++}`,
|
||||||
) {
|
item,
|
||||||
// TODO: validate .record
|
)
|
||||||
this.feed.unshift(new FeedItemModel(this.rootStore, `item-${keyId}`, item))
|
if (itemModel.needsAdditionalData) {
|
||||||
|
promises.push(
|
||||||
|
itemModel.fetchAdditionalData().catch(e => {
|
||||||
|
console.error('Failure during feed-view _prependAll()', e)
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
toPrepend.push(itemModel)
|
||||||
|
}
|
||||||
|
await Promise.all(promises)
|
||||||
|
runInAction(() => {
|
||||||
|
this.feed = toPrepend.concat(this.feed)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private _updateAll(res: GetTimeline.Response | GetAuthorFeed.Response) {
|
private _updateAll(res: GetTimeline.Response | GetAuthorFeed.Response) {
|
||||||
|
|||||||
@@ -81,6 +81,10 @@ export class NotificationsViewItemModel implements GroupedNotification {
|
|||||||
return this.reason === 'trend'
|
return this.reason === 'trend'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isMention() {
|
||||||
|
return this.reason === 'mention'
|
||||||
|
}
|
||||||
|
|
||||||
get isReply() {
|
get isReply() {
|
||||||
return this.reason === 'reply'
|
return this.reason === 'reply'
|
||||||
}
|
}
|
||||||
@@ -94,7 +98,13 @@ export class NotificationsViewItemModel implements GroupedNotification {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get needsAdditionalData() {
|
get needsAdditionalData() {
|
||||||
if (this.isUpvote || this.isRepost || this.isTrend || this.isReply) {
|
if (
|
||||||
|
this.isUpvote ||
|
||||||
|
this.isRepost ||
|
||||||
|
this.isTrend ||
|
||||||
|
this.isReply ||
|
||||||
|
this.isMention
|
||||||
|
) {
|
||||||
return !this.additionalPost
|
return !this.additionalPost
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@@ -124,7 +134,7 @@ export class NotificationsViewItemModel implements GroupedNotification {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let postUri
|
let postUri
|
||||||
if (this.isReply) {
|
if (this.isReply || this.isMention) {
|
||||||
postUri = this.uri
|
postUri = this.uri
|
||||||
} else if (this.isUpvote || this.isRead || this.isTrend) {
|
} else if (this.isUpvote || this.isRead || this.isTrend) {
|
||||||
postUri = this.subjectUri
|
postUri = this.subjectUri
|
||||||
|
|||||||
Vendored
+2171
-10014
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
+8
-24
@@ -33,7 +33,6 @@ import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread';
|
|||||||
import * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy';
|
import * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy';
|
||||||
import * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline';
|
import * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline';
|
||||||
import * as AppBskyFeedGetVotes from './types/app/bsky/feed/getVotes';
|
import * as AppBskyFeedGetVotes from './types/app/bsky/feed/getVotes';
|
||||||
import * as AppBskyFeedMediaEmbed from './types/app/bsky/feed/mediaEmbed';
|
|
||||||
import * as AppBskyFeedPost from './types/app/bsky/feed/post';
|
import * as AppBskyFeedPost from './types/app/bsky/feed/post';
|
||||||
import * as AppBskyFeedRepost from './types/app/bsky/feed/repost';
|
import * as AppBskyFeedRepost from './types/app/bsky/feed/repost';
|
||||||
import * as AppBskyFeedSetVote from './types/app/bsky/feed/setVote';
|
import * as AppBskyFeedSetVote from './types/app/bsky/feed/setVote';
|
||||||
@@ -65,6 +64,7 @@ export * as ComAtprotoRepoDescribe from './types/com/atproto/repo/describe';
|
|||||||
export * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord';
|
export * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord';
|
||||||
export * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords';
|
export * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords';
|
||||||
export * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord';
|
export * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord';
|
||||||
|
export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef';
|
||||||
export * as ComAtprotoServerGetAccountsConfig from './types/com/atproto/server/getAccountsConfig';
|
export * as ComAtprotoServerGetAccountsConfig from './types/com/atproto/server/getAccountsConfig';
|
||||||
export * as ComAtprotoSessionCreate from './types/com/atproto/session/create';
|
export * as ComAtprotoSessionCreate from './types/com/atproto/session/create';
|
||||||
export * as ComAtprotoSessionDelete from './types/com/atproto/session/delete';
|
export * as ComAtprotoSessionDelete from './types/com/atproto/session/delete';
|
||||||
@@ -77,20 +77,23 @@ export * as AppBskyActorCreateScene from './types/app/bsky/actor/createScene';
|
|||||||
export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile';
|
export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile';
|
||||||
export * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions';
|
export * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions';
|
||||||
export * as AppBskyActorProfile from './types/app/bsky/actor/profile';
|
export * as AppBskyActorProfile from './types/app/bsky/actor/profile';
|
||||||
|
export * as AppBskyActorRef from './types/app/bsky/actor/ref';
|
||||||
export * as AppBskyActorSearch from './types/app/bsky/actor/search';
|
export * as AppBskyActorSearch from './types/app/bsky/actor/search';
|
||||||
export * as AppBskyActorSearchTypeahead from './types/app/bsky/actor/searchTypeahead';
|
export * as AppBskyActorSearchTypeahead from './types/app/bsky/actor/searchTypeahead';
|
||||||
export * as AppBskyActorUpdateProfile from './types/app/bsky/actor/updateProfile';
|
export * as AppBskyActorUpdateProfile from './types/app/bsky/actor/updateProfile';
|
||||||
|
export * as AppBskyFeedEmbed from './types/app/bsky/feed/embed';
|
||||||
export * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed';
|
export * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed';
|
||||||
export * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread';
|
export * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread';
|
||||||
export * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy';
|
export * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy';
|
||||||
export * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline';
|
export * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline';
|
||||||
export * as AppBskyFeedGetVotes from './types/app/bsky/feed/getVotes';
|
export * as AppBskyFeedGetVotes from './types/app/bsky/feed/getVotes';
|
||||||
export * as AppBskyFeedMediaEmbed from './types/app/bsky/feed/mediaEmbed';
|
|
||||||
export * as AppBskyFeedPost from './types/app/bsky/feed/post';
|
export * as AppBskyFeedPost from './types/app/bsky/feed/post';
|
||||||
export * as AppBskyFeedRepost from './types/app/bsky/feed/repost';
|
export * as AppBskyFeedRepost from './types/app/bsky/feed/repost';
|
||||||
export * as AppBskyFeedSetVote from './types/app/bsky/feed/setVote';
|
export * as AppBskyFeedSetVote from './types/app/bsky/feed/setVote';
|
||||||
export * as AppBskyFeedTrend from './types/app/bsky/feed/trend';
|
export * as AppBskyFeedTrend from './types/app/bsky/feed/trend';
|
||||||
export * as AppBskyFeedVote from './types/app/bsky/feed/vote';
|
export * as AppBskyFeedVote from './types/app/bsky/feed/vote';
|
||||||
|
export * as AppBskyGraphAssertCreator from './types/app/bsky/graph/assertCreator';
|
||||||
|
export * as AppBskyGraphAssertMember from './types/app/bsky/graph/assertMember';
|
||||||
export * as AppBskyGraphAssertion from './types/app/bsky/graph/assertion';
|
export * as AppBskyGraphAssertion from './types/app/bsky/graph/assertion';
|
||||||
export * as AppBskyGraphConfirmation from './types/app/bsky/graph/confirmation';
|
export * as AppBskyGraphConfirmation from './types/app/bsky/graph/confirmation';
|
||||||
export * as AppBskyGraphFollow from './types/app/bsky/graph/follow';
|
export * as AppBskyGraphFollow from './types/app/bsky/graph/follow';
|
||||||
@@ -102,6 +105,9 @@ export * as AppBskyGraphGetMemberships from './types/app/bsky/graph/getMembershi
|
|||||||
export * as AppBskyNotificationGetCount from './types/app/bsky/notification/getCount';
|
export * as AppBskyNotificationGetCount from './types/app/bsky/notification/getCount';
|
||||||
export * as AppBskyNotificationList from './types/app/bsky/notification/list';
|
export * as AppBskyNotificationList from './types/app/bsky/notification/list';
|
||||||
export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen';
|
export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen';
|
||||||
|
export * as AppBskySystemActorScene from './types/app/bsky/system/actorScene';
|
||||||
|
export * as AppBskySystemActorUser from './types/app/bsky/system/actorUser';
|
||||||
|
export * as AppBskySystemDeclRef from './types/app/bsky/system/declRef';
|
||||||
export * as AppBskySystemDeclaration from './types/app/bsky/system/declaration';
|
export * as AppBskySystemDeclaration from './types/app/bsky/system/declaration';
|
||||||
export declare const APP_BSKY_GRAPH: {
|
export declare const APP_BSKY_GRAPH: {
|
||||||
AssertCreator: string;
|
AssertCreator: string;
|
||||||
@@ -235,7 +241,6 @@ export declare class ProfileRecord {
|
|||||||
}
|
}
|
||||||
export declare class FeedNS {
|
export declare class FeedNS {
|
||||||
_service: ServiceClient;
|
_service: ServiceClient;
|
||||||
mediaEmbed: MediaEmbedRecord;
|
|
||||||
post: PostRecord;
|
post: PostRecord;
|
||||||
repost: RepostRecord;
|
repost: RepostRecord;
|
||||||
trend: TrendRecord;
|
trend: TrendRecord;
|
||||||
@@ -248,27 +253,6 @@ export declare class FeedNS {
|
|||||||
getVotes(params?: AppBskyFeedGetVotes.QueryParams, opts?: AppBskyFeedGetVotes.CallOptions): Promise<AppBskyFeedGetVotes.Response>;
|
getVotes(params?: AppBskyFeedGetVotes.QueryParams, opts?: AppBskyFeedGetVotes.CallOptions): Promise<AppBskyFeedGetVotes.Response>;
|
||||||
setVote(data?: AppBskyFeedSetVote.InputSchema, opts?: AppBskyFeedSetVote.CallOptions): Promise<AppBskyFeedSetVote.Response>;
|
setVote(data?: AppBskyFeedSetVote.InputSchema, opts?: AppBskyFeedSetVote.CallOptions): Promise<AppBskyFeedSetVote.Response>;
|
||||||
}
|
}
|
||||||
export declare class MediaEmbedRecord {
|
|
||||||
_service: ServiceClient;
|
|
||||||
constructor(service: ServiceClient);
|
|
||||||
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{
|
|
||||||
cursor?: string;
|
|
||||||
records: {
|
|
||||||
uri: string;
|
|
||||||
value: AppBskyFeedMediaEmbed.Record;
|
|
||||||
}[];
|
|
||||||
}>;
|
|
||||||
get(params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>): Promise<{
|
|
||||||
uri: string;
|
|
||||||
cid: string;
|
|
||||||
value: AppBskyFeedMediaEmbed.Record;
|
|
||||||
}>;
|
|
||||||
create(params: Omit<ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record'>, record: AppBskyFeedMediaEmbed.Record, headers?: Record<string, string>): Promise<{
|
|
||||||
uri: string;
|
|
||||||
cid: string;
|
|
||||||
}>;
|
|
||||||
delete(params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>): Promise<void>;
|
|
||||||
}
|
|
||||||
export declare class PostRecord {
|
export declare class PostRecord {
|
||||||
_service: ServiceClient;
|
_service: ServiceClient;
|
||||||
constructor(service: ServiceClient);
|
constructor(service: ServiceClient);
|
||||||
|
|||||||
+63
@@ -0,0 +1,63 @@
|
|||||||
|
import { LexiconDoc } from '@atproto/lexicon';
|
||||||
|
export declare const lexicons: LexiconDoc[];
|
||||||
|
export declare const ids: {
|
||||||
|
ComAtprotoAccountCreate: string;
|
||||||
|
ComAtprotoAccountCreateInviteCode: string;
|
||||||
|
ComAtprotoAccountDelete: string;
|
||||||
|
ComAtprotoAccountGet: string;
|
||||||
|
ComAtprotoAccountRequestPasswordReset: string;
|
||||||
|
ComAtprotoAccountResetPassword: string;
|
||||||
|
ComAtprotoHandleResolve: string;
|
||||||
|
ComAtprotoRepoBatchWrite: string;
|
||||||
|
ComAtprotoRepoCreateRecord: string;
|
||||||
|
ComAtprotoRepoDeleteRecord: string;
|
||||||
|
ComAtprotoRepoDescribe: string;
|
||||||
|
ComAtprotoRepoGetRecord: string;
|
||||||
|
ComAtprotoRepoListRecords: string;
|
||||||
|
ComAtprotoRepoPutRecord: string;
|
||||||
|
ComAtprotoRepoStrongRef: string;
|
||||||
|
ComAtprotoServerGetAccountsConfig: string;
|
||||||
|
ComAtprotoSessionCreate: string;
|
||||||
|
ComAtprotoSessionDelete: string;
|
||||||
|
ComAtprotoSessionGet: string;
|
||||||
|
ComAtprotoSessionRefresh: string;
|
||||||
|
ComAtprotoSyncGetRepo: string;
|
||||||
|
ComAtprotoSyncGetRoot: string;
|
||||||
|
ComAtprotoSyncUpdateRepo: string;
|
||||||
|
AppBskyActorCreateScene: string;
|
||||||
|
AppBskyActorGetProfile: string;
|
||||||
|
AppBskyActorGetSuggestions: string;
|
||||||
|
AppBskyActorProfile: string;
|
||||||
|
AppBskyActorRef: string;
|
||||||
|
AppBskyActorSearch: string;
|
||||||
|
AppBskyActorSearchTypeahead: string;
|
||||||
|
AppBskyActorUpdateProfile: string;
|
||||||
|
AppBskyFeedEmbed: string;
|
||||||
|
AppBskyFeedGetAuthorFeed: string;
|
||||||
|
AppBskyFeedGetPostThread: string;
|
||||||
|
AppBskyFeedGetRepostedBy: string;
|
||||||
|
AppBskyFeedGetTimeline: string;
|
||||||
|
AppBskyFeedGetVotes: string;
|
||||||
|
AppBskyFeedPost: string;
|
||||||
|
AppBskyFeedRepost: string;
|
||||||
|
AppBskyFeedSetVote: string;
|
||||||
|
AppBskyFeedTrend: string;
|
||||||
|
AppBskyFeedVote: string;
|
||||||
|
AppBskyGraphAssertCreator: string;
|
||||||
|
AppBskyGraphAssertMember: string;
|
||||||
|
AppBskyGraphAssertion: string;
|
||||||
|
AppBskyGraphConfirmation: string;
|
||||||
|
AppBskyGraphFollow: string;
|
||||||
|
AppBskyGraphGetAssertions: string;
|
||||||
|
AppBskyGraphGetFollowers: string;
|
||||||
|
AppBskyGraphGetFollows: string;
|
||||||
|
AppBskyGraphGetMembers: string;
|
||||||
|
AppBskyGraphGetMemberships: string;
|
||||||
|
AppBskyNotificationGetCount: string;
|
||||||
|
AppBskyNotificationList: string;
|
||||||
|
AppBskyNotificationUpdateSeen: string;
|
||||||
|
AppBskySystemActorScene: string;
|
||||||
|
AppBskySystemActorUser: string;
|
||||||
|
AppBskySystemDeclRef: string;
|
||||||
|
AppBskySystemDeclaration: string;
|
||||||
|
};
|
||||||
@@ -1,26 +1,23 @@
|
|||||||
import { Headers, XRPCError } from '@atproto/xrpc';
|
import { Headers, XRPCError } from '@atproto/xrpc';
|
||||||
|
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
|
export interface InputSchema {
|
||||||
|
handle: string;
|
||||||
|
recoveryKey?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface OutputSchema {
|
||||||
|
handle: string;
|
||||||
|
did: string;
|
||||||
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
encoding: 'application/json';
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface InputSchema {
|
|
||||||
handle: string;
|
|
||||||
recoveryKey?: string;
|
|
||||||
}
|
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
|
||||||
handle: string;
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
actor: string;
|
actor: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
did: string;
|
did: string;
|
||||||
declaration: Declaration;
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
handle: string;
|
handle: string;
|
||||||
creator: string;
|
creator: string;
|
||||||
displayName?: string;
|
displayName?: string;
|
||||||
@@ -19,14 +15,11 @@ export interface OutputSchema {
|
|||||||
followsCount: number;
|
followsCount: number;
|
||||||
membersCount: number;
|
membersCount: number;
|
||||||
postsCount: number;
|
postsCount: number;
|
||||||
myState?: {
|
myState?: MyState;
|
||||||
follow?: string;
|
[k: string]: unknown;
|
||||||
member?: string;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
export interface Declaration {
|
export interface CallOptions {
|
||||||
cid: string;
|
headers?: Headers;
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -34,3 +27,8 @@ export interface Response {
|
|||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface MyState {
|
||||||
|
follow?: string;
|
||||||
|
member?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,31 +1,17 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
limit?: number;
|
limit?: number;
|
||||||
cursor?: string;
|
cursor?: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
cursor?: string;
|
cursor?: string;
|
||||||
actors: {
|
actors: Actor[];
|
||||||
did: string;
|
[k: string]: unknown;
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
description?: string;
|
|
||||||
indexedAt?: string;
|
|
||||||
myState?: {
|
|
||||||
follow?: string;
|
|
||||||
};
|
|
||||||
}[];
|
|
||||||
}
|
}
|
||||||
export interface Declaration {
|
export interface CallOptions {
|
||||||
cid: string;
|
headers?: Headers;
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -33,3 +19,17 @@ export interface Response {
|
|||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Actor {
|
||||||
|
did: string;
|
||||||
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
|
handle: string;
|
||||||
|
displayName?: string;
|
||||||
|
description?: string;
|
||||||
|
indexedAt?: string;
|
||||||
|
myState?: MyState;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface MyState {
|
||||||
|
follow?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||||
|
export interface Main {
|
||||||
|
did: string;
|
||||||
|
declarationCid: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface WithInfo {
|
||||||
|
did: string;
|
||||||
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
|
handle: string;
|
||||||
|
displayName?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
+14
-16
@@ -1,29 +1,18 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
term: string;
|
term: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
before?: string;
|
before?: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
cursor?: string;
|
cursor?: string;
|
||||||
users: {
|
users: User[];
|
||||||
did: string;
|
[k: string]: unknown;
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
description?: string;
|
|
||||||
indexedAt?: string;
|
|
||||||
}[];
|
|
||||||
}
|
}
|
||||||
export interface Declaration {
|
export interface CallOptions {
|
||||||
cid: string;
|
headers?: Headers;
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -31,3 +20,12 @@ export interface Response {
|
|||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface User {
|
||||||
|
did: string;
|
||||||
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
|
handle: string;
|
||||||
|
displayName?: string;
|
||||||
|
description?: string;
|
||||||
|
indexedAt?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,29 +1,27 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
term: string;
|
term: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
}
|
}
|
||||||
|
export declare type InputSchema = undefined;
|
||||||
|
export interface OutputSchema {
|
||||||
|
users: User[];
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export declare type InputSchema = undefined;
|
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
|
||||||
users: {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
}[];
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface User {
|
||||||
|
did: string;
|
||||||
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
|
handle: string;
|
||||||
|
displayName?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
qp?: QueryParams;
|
|
||||||
encoding: 'application/json';
|
|
||||||
}
|
|
||||||
export interface InputSchema {
|
export interface InputSchema {
|
||||||
did?: string;
|
did?: string;
|
||||||
displayName?: string;
|
displayName?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
uri: string;
|
uri: string;
|
||||||
cid: string;
|
cid: string;
|
||||||
record: {};
|
record: {};
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
|
qp?: QueryParams;
|
||||||
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
export interface Record {
|
||||||
|
text: string;
|
||||||
|
entities?: Entity[];
|
||||||
|
reply?: Reply;
|
||||||
|
createdAt: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export declare const SOMETOKEN = "app.bsky.feed.debug#someToken";
|
||||||
|
export declare type Unknown = {};
|
||||||
|
export declare type Boolean = boolean;
|
||||||
|
export declare type Number = number;
|
||||||
|
export declare type Integer = number;
|
||||||
|
export declare type String = string;
|
||||||
|
export declare type Blob = {
|
||||||
|
cid: string;
|
||||||
|
mimeType: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
|
export declare type Image = {
|
||||||
|
cid: string;
|
||||||
|
mimeType: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
|
export declare type Video = {
|
||||||
|
cid: string;
|
||||||
|
mimeType: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
|
export declare type Audio = {
|
||||||
|
cid: string;
|
||||||
|
mimeType: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
|
export declare type StringArr = string[];
|
||||||
|
export declare type ReplyArr = Reply[];
|
||||||
|
export declare type MultiArr = (Reply | PostRef | Entity)[];
|
||||||
|
export interface Reply {
|
||||||
|
root: PostRef;
|
||||||
|
parent: PostRef;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface PostRef {
|
||||||
|
uri: string;
|
||||||
|
cid: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface Entity {
|
||||||
|
index: TextSlice;
|
||||||
|
type: string;
|
||||||
|
value: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface TextSlice {
|
||||||
|
start: number;
|
||||||
|
end: number;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
|
export interface Main {
|
||||||
|
items?: (Media | Record | External | {
|
||||||
|
$type: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
})[];
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface Media {
|
||||||
|
alt?: string;
|
||||||
|
thumb?: {
|
||||||
|
cid: string;
|
||||||
|
mimeType: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
|
original: {
|
||||||
|
cid: string;
|
||||||
|
mimeType: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface Record {
|
||||||
|
type: 'record';
|
||||||
|
author: AppBskyActorRef.WithInfo;
|
||||||
|
record: {};
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface External {
|
||||||
|
type: 'external';
|
||||||
|
uri: string;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
imageUri: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
@@ -1,62 +1,19 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
|
import * as AppBskyFeedEmbed from './embed';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
author: string;
|
author: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
before?: string;
|
before?: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
cursor?: string;
|
cursor?: string;
|
||||||
feed: FeedItem[];
|
feed: FeedItem[];
|
||||||
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface FeedItem {
|
export interface CallOptions {
|
||||||
uri: string;
|
headers?: Headers;
|
||||||
cid: string;
|
|
||||||
author: Actor;
|
|
||||||
trendedBy?: Actor;
|
|
||||||
repostedBy?: Actor;
|
|
||||||
record: {};
|
|
||||||
embed?: RecordEmbed | ExternalEmbed | UnknownEmbed;
|
|
||||||
replyCount: number;
|
|
||||||
repostCount: number;
|
|
||||||
upvoteCount: number;
|
|
||||||
downvoteCount: number;
|
|
||||||
indexedAt: string;
|
|
||||||
myState?: {
|
|
||||||
repost?: string;
|
|
||||||
upvote?: string;
|
|
||||||
downvote?: string;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
export interface Actor {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
|
||||||
export interface RecordEmbed {
|
|
||||||
type: 'record';
|
|
||||||
author: Actor;
|
|
||||||
record: {};
|
|
||||||
}
|
|
||||||
export interface ExternalEmbed {
|
|
||||||
type: 'external';
|
|
||||||
uri: string;
|
|
||||||
title: string;
|
|
||||||
description: string;
|
|
||||||
imageUri: string;
|
|
||||||
}
|
|
||||||
export interface UnknownEmbed {
|
|
||||||
type: string;
|
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -64,3 +21,25 @@ export interface Response {
|
|||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface FeedItem {
|
||||||
|
uri: string;
|
||||||
|
cid: string;
|
||||||
|
author: AppBskyActorRef.WithInfo;
|
||||||
|
trendedBy?: AppBskyActorRef.WithInfo;
|
||||||
|
repostedBy?: AppBskyActorRef.WithInfo;
|
||||||
|
record: {};
|
||||||
|
embed?: AppBskyFeedEmbed.Main;
|
||||||
|
replyCount: number;
|
||||||
|
repostCount: number;
|
||||||
|
upvoteCount: number;
|
||||||
|
downvoteCount: number;
|
||||||
|
indexedAt: string;
|
||||||
|
myState?: MyState;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface MyState {
|
||||||
|
repost?: string;
|
||||||
|
upvote?: string;
|
||||||
|
downvote?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,61 +1,21 @@
|
|||||||
import { Headers, XRPCError } from '@atproto/xrpc';
|
import { Headers, XRPCError } from '@atproto/xrpc';
|
||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
|
import * as AppBskyFeedEmbed from './embed';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
uri: string;
|
uri: string;
|
||||||
depth?: number;
|
depth?: number;
|
||||||
}
|
}
|
||||||
|
export declare type InputSchema = undefined;
|
||||||
|
export interface OutputSchema {
|
||||||
|
thread: Post | NotFoundPost | {
|
||||||
|
$type: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export declare type InputSchema = undefined;
|
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
|
||||||
thread: Post;
|
|
||||||
}
|
|
||||||
export interface Post {
|
|
||||||
uri: string;
|
|
||||||
cid: string;
|
|
||||||
author: User;
|
|
||||||
record: {};
|
|
||||||
embed?: RecordEmbed | ExternalEmbed | UnknownEmbed;
|
|
||||||
parent?: Post;
|
|
||||||
replyCount: number;
|
|
||||||
replies?: Post[];
|
|
||||||
repostCount: number;
|
|
||||||
upvoteCount: number;
|
|
||||||
downvoteCount: number;
|
|
||||||
indexedAt: string;
|
|
||||||
myState?: {
|
|
||||||
repost?: string;
|
|
||||||
upvote?: string;
|
|
||||||
downvote?: string;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
export interface User {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
|
||||||
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 {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
@@ -65,3 +25,36 @@ export declare class NotFoundError extends XRPCError {
|
|||||||
constructor(src: XRPCError);
|
constructor(src: XRPCError);
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Post {
|
||||||
|
uri: string;
|
||||||
|
cid: string;
|
||||||
|
author: AppBskyActorRef.WithInfo;
|
||||||
|
record: {};
|
||||||
|
embed?: AppBskyFeedEmbed.Main;
|
||||||
|
parent?: Post | NotFoundPost | {
|
||||||
|
$type: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
|
replyCount: number;
|
||||||
|
replies?: (Post | NotFoundPost | {
|
||||||
|
$type: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
})[];
|
||||||
|
repostCount: number;
|
||||||
|
upvoteCount: number;
|
||||||
|
downvoteCount: number;
|
||||||
|
indexedAt: string;
|
||||||
|
myState?: MyState;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface NotFoundPost {
|
||||||
|
uri: string;
|
||||||
|
notFound: true;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface MyState {
|
||||||
|
repost?: string;
|
||||||
|
upvote?: string;
|
||||||
|
downvote?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,32 +1,21 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
uri: string;
|
uri: string;
|
||||||
cid?: string;
|
cid?: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
before?: string;
|
before?: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
uri: string;
|
uri: string;
|
||||||
cid?: string;
|
cid?: string;
|
||||||
cursor?: string;
|
cursor?: string;
|
||||||
repostedBy: {
|
repostedBy: RepostedBy[];
|
||||||
did: string;
|
[k: string]: unknown;
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
createdAt?: string;
|
|
||||||
indexedAt: string;
|
|
||||||
}[];
|
|
||||||
}
|
}
|
||||||
export interface Declaration {
|
export interface CallOptions {
|
||||||
cid: string;
|
headers?: Headers;
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -34,3 +23,12 @@ export interface Response {
|
|||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface RepostedBy {
|
||||||
|
did: string;
|
||||||
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
|
handle: string;
|
||||||
|
displayName?: string;
|
||||||
|
createdAt?: string;
|
||||||
|
indexedAt: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,63 +1,19 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
|
import * as AppBskyFeedEmbed from './embed';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
algorithm?: string;
|
algorithm?: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
before?: string;
|
before?: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
cursor?: string;
|
cursor?: string;
|
||||||
feed: FeedItem[];
|
feed: FeedItem[];
|
||||||
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface FeedItem {
|
export interface CallOptions {
|
||||||
uri: string;
|
headers?: Headers;
|
||||||
cid: string;
|
|
||||||
author: Actor;
|
|
||||||
trendedBy?: Actor;
|
|
||||||
repostedBy?: Actor;
|
|
||||||
record: {};
|
|
||||||
embed?: RecordEmbed | ExternalEmbed | UnknownEmbed;
|
|
||||||
replyCount: number;
|
|
||||||
repostCount: number;
|
|
||||||
upvoteCount: number;
|
|
||||||
downvoteCount: number;
|
|
||||||
indexedAt: string;
|
|
||||||
myState?: {
|
|
||||||
repost?: string;
|
|
||||||
upvote?: string;
|
|
||||||
downvote?: string;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
export interface Actor {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
actorType?: string;
|
|
||||||
displayName?: string;
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
|
||||||
export interface RecordEmbed {
|
|
||||||
type: 'record';
|
|
||||||
author: Actor;
|
|
||||||
record: {};
|
|
||||||
}
|
|
||||||
export interface ExternalEmbed {
|
|
||||||
type: 'external';
|
|
||||||
uri: string;
|
|
||||||
title: string;
|
|
||||||
description: string;
|
|
||||||
imageUri: string;
|
|
||||||
}
|
|
||||||
export interface UnknownEmbed {
|
|
||||||
type: string;
|
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -65,3 +21,25 @@ export interface Response {
|
|||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface FeedItem {
|
||||||
|
uri: string;
|
||||||
|
cid: string;
|
||||||
|
author: AppBskyActorRef.WithInfo;
|
||||||
|
trendedBy?: AppBskyActorRef.WithInfo;
|
||||||
|
repostedBy?: AppBskyActorRef.WithInfo;
|
||||||
|
record: {};
|
||||||
|
embed?: AppBskyFeedEmbed.Main;
|
||||||
|
replyCount: number;
|
||||||
|
repostCount: number;
|
||||||
|
upvoteCount: number;
|
||||||
|
downvoteCount: number;
|
||||||
|
indexedAt: string;
|
||||||
|
myState?: MyState;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface MyState {
|
||||||
|
repost?: string;
|
||||||
|
upvote?: string;
|
||||||
|
downvote?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
uri: string;
|
uri: string;
|
||||||
cid?: string;
|
cid?: string;
|
||||||
@@ -6,32 +7,16 @@ export interface QueryParams {
|
|||||||
limit?: number;
|
limit?: number;
|
||||||
before?: string;
|
before?: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
uri: string;
|
uri: string;
|
||||||
cid?: string;
|
cid?: string;
|
||||||
cursor?: string;
|
cursor?: string;
|
||||||
votes: {
|
votes: Vote[];
|
||||||
direction: 'up' | 'down';
|
[k: string]: unknown;
|
||||||
indexedAt: string;
|
|
||||||
createdAt: string;
|
|
||||||
actor: Actor;
|
|
||||||
}[];
|
|
||||||
}
|
}
|
||||||
export interface Actor {
|
export interface CallOptions {
|
||||||
did: string;
|
headers?: Headers;
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -39,3 +24,10 @@ export interface Response {
|
|||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Vote {
|
||||||
|
direction: 'up' | 'down';
|
||||||
|
indexedAt: string;
|
||||||
|
createdAt: string;
|
||||||
|
actor: AppBskyActorRef.WithInfo;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
export interface Record {
|
export interface Main {
|
||||||
media: MediaEmbed[];
|
media: MediaEmbed[];
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface MediaEmbed {
|
export interface MediaEmbed {
|
||||||
alt?: string;
|
alt?: string;
|
||||||
thumb?: MediaEmbedBlob;
|
thumb?: {
|
||||||
original: MediaEmbedBlob;
|
cid: string;
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
export interface MediaEmbedBlob {
|
|
||||||
mimeType: string;
|
mimeType: string;
|
||||||
blobId: string;
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
|
original: {
|
||||||
|
cid: string;
|
||||||
|
mimeType: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
||||||
export interface Record {
|
export interface Record {
|
||||||
text: string;
|
text: string;
|
||||||
entities?: Entity[];
|
entities?: Entity[];
|
||||||
reply?: {
|
reply?: ReplyRef;
|
||||||
root: PostRef;
|
|
||||||
parent: PostRef;
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
|
export interface ReplyRef {
|
||||||
|
root: ComAtprotoRepoStrongRef.Main;
|
||||||
|
parent: ComAtprotoRepoStrongRef.Main;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface Entity {
|
export interface Entity {
|
||||||
index: TextSlice;
|
index: TextSlice;
|
||||||
type: string;
|
type: string;
|
||||||
@@ -20,8 +22,3 @@ export interface TextSlice {
|
|||||||
end: number;
|
end: number;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface PostRef {
|
|
||||||
uri: string;
|
|
||||||
cid: string;
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
||||||
export interface Record {
|
export interface Record {
|
||||||
subject: Subject;
|
subject: ComAtprotoRepoStrongRef.Main;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface Subject {
|
|
||||||
uri: string;
|
|
||||||
cid: string;
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
|
|||||||
+11
-12
@@ -1,23 +1,22 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
|
export interface InputSchema {
|
||||||
|
subject: ComAtprotoRepoStrongRef.Main;
|
||||||
|
direction: 'up' | 'down' | 'none';
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface OutputSchema {
|
||||||
|
upvote?: string;
|
||||||
|
downvote?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
encoding: 'application/json';
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface InputSchema {
|
|
||||||
subject: Subject;
|
|
||||||
direction: 'up' | 'down' | 'none';
|
|
||||||
}
|
|
||||||
export interface Subject {
|
|
||||||
uri: string;
|
|
||||||
cid: string;
|
|
||||||
}
|
|
||||||
export interface OutputSchema {
|
|
||||||
upvote?: string;
|
|
||||||
downvote?: string;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
||||||
export interface Record {
|
export interface Record {
|
||||||
subject: Subject;
|
subject: ComAtprotoRepoStrongRef.Main;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface Subject {
|
|
||||||
uri: string;
|
|
||||||
cid: string;
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
||||||
export interface Record {
|
export interface Record {
|
||||||
subject: Subject;
|
subject: ComAtprotoRepoStrongRef.Main;
|
||||||
direction: 'up' | 'down';
|
direction: 'up' | 'down';
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface Subject {
|
|
||||||
uri: string;
|
|
||||||
cid: string;
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export declare const MAIN = "app.bsky.graph.assertCreator#main";
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export declare const MAIN = "app.bsky.graph.assertMember#main";
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
export interface Record {
|
export interface Record {
|
||||||
assertion: string;
|
assertion: string;
|
||||||
subject: {
|
subject: AppBskyActorRef.Main;
|
||||||
did: string;
|
|
||||||
declarationCid: string;
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,8 @@
|
|||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
||||||
export interface Record {
|
export interface Record {
|
||||||
originator: {
|
originator: AppBskyActorRef.Main;
|
||||||
did: string;
|
assertion: ComAtprotoRepoStrongRef.Main;
|
||||||
declarationCid: string;
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
assertion: {
|
|
||||||
uri: string;
|
|
||||||
cid: string;
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
export interface Record {
|
export interface Record {
|
||||||
subject: {
|
subject: AppBskyActorRef.Main;
|
||||||
did: string;
|
|
||||||
declarationCid: string;
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
author?: string;
|
author?: string;
|
||||||
subject?: string;
|
subject?: string;
|
||||||
@@ -7,40 +8,14 @@ export interface QueryParams {
|
|||||||
limit?: number;
|
limit?: number;
|
||||||
before?: string;
|
before?: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
cursor?: string;
|
cursor?: string;
|
||||||
assertions: {
|
assertions: Assertion[];
|
||||||
uri: string;
|
[k: string]: unknown;
|
||||||
cid: string;
|
|
||||||
assertion: string;
|
|
||||||
confirmation?: Confirmation;
|
|
||||||
author: Actor;
|
|
||||||
subject: Actor;
|
|
||||||
indexedAt: string;
|
|
||||||
createdAt: string;
|
|
||||||
}[];
|
|
||||||
}
|
}
|
||||||
export interface Confirmation {
|
export interface CallOptions {
|
||||||
uri: string;
|
headers?: Headers;
|
||||||
cid: string;
|
|
||||||
indexedAt: string;
|
|
||||||
createdAt: string;
|
|
||||||
}
|
|
||||||
export interface Actor {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -48,3 +23,21 @@ export interface Response {
|
|||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Assertion {
|
||||||
|
uri: string;
|
||||||
|
cid: string;
|
||||||
|
assertion: string;
|
||||||
|
confirmation?: Confirmation;
|
||||||
|
author: AppBskyActorRef.WithInfo;
|
||||||
|
subject: AppBskyActorRef.WithInfo;
|
||||||
|
indexedAt: string;
|
||||||
|
createdAt: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface Confirmation {
|
||||||
|
uri: string;
|
||||||
|
cid: string;
|
||||||
|
indexedAt: string;
|
||||||
|
createdAt: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,39 +1,39 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
user: string;
|
user: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
before?: string;
|
before?: string;
|
||||||
}
|
}
|
||||||
|
export declare type InputSchema = undefined;
|
||||||
|
export interface OutputSchema {
|
||||||
|
subject: Subject;
|
||||||
|
cursor?: string;
|
||||||
|
followers: Follower[];
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export declare type InputSchema = undefined;
|
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
|
||||||
subject: {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
};
|
|
||||||
cursor?: string;
|
|
||||||
followers: {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
createdAt?: string;
|
|
||||||
indexedAt: string;
|
|
||||||
}[];
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Subject {
|
||||||
|
did: string;
|
||||||
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
|
handle: string;
|
||||||
|
displayName?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface Follower {
|
||||||
|
did: string;
|
||||||
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
|
handle: string;
|
||||||
|
displayName?: string;
|
||||||
|
createdAt?: string;
|
||||||
|
indexedAt: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,39 +1,33 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
|
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
user: string;
|
user: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
before?: string;
|
before?: string;
|
||||||
}
|
}
|
||||||
|
export declare type InputSchema = undefined;
|
||||||
|
export interface OutputSchema {
|
||||||
|
subject: AppBskyActorRef.WithInfo;
|
||||||
|
cursor?: string;
|
||||||
|
follows: Follow[];
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export declare type InputSchema = undefined;
|
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
|
||||||
subject: {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
};
|
|
||||||
cursor?: string;
|
|
||||||
follows: {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
createdAt?: string;
|
|
||||||
indexedAt: string;
|
|
||||||
}[];
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Follow {
|
||||||
|
did: string;
|
||||||
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
|
handle: string;
|
||||||
|
displayName?: string;
|
||||||
|
createdAt?: string;
|
||||||
|
indexedAt: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,39 +1,33 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
|
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
actor: string;
|
actor: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
before?: string;
|
before?: string;
|
||||||
}
|
}
|
||||||
|
export declare type InputSchema = undefined;
|
||||||
|
export interface OutputSchema {
|
||||||
|
subject: AppBskyActorRef.WithInfo;
|
||||||
|
cursor?: string;
|
||||||
|
members: Member[];
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export declare type InputSchema = undefined;
|
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
|
||||||
subject: {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
};
|
|
||||||
cursor?: string;
|
|
||||||
members: {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
createdAt?: string;
|
|
||||||
indexedAt: string;
|
|
||||||
}[];
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Member {
|
||||||
|
did: string;
|
||||||
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
|
handle: string;
|
||||||
|
displayName?: string;
|
||||||
|
createdAt?: string;
|
||||||
|
indexedAt: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,39 +1,33 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
|
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
actor: string;
|
actor: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
before?: string;
|
before?: string;
|
||||||
}
|
}
|
||||||
|
export declare type InputSchema = undefined;
|
||||||
|
export interface OutputSchema {
|
||||||
|
subject: AppBskyActorRef.WithInfo;
|
||||||
|
cursor?: string;
|
||||||
|
memberships: Membership[];
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export declare type InputSchema = undefined;
|
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
|
||||||
subject: {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
};
|
|
||||||
cursor?: string;
|
|
||||||
memberships: {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
createdAt?: string;
|
|
||||||
indexedAt: string;
|
|
||||||
}[];
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Membership {
|
||||||
|
did: string;
|
||||||
|
declaration: AppBskySystemDeclRef.Main;
|
||||||
|
handle: string;
|
||||||
|
displayName?: string;
|
||||||
|
createdAt?: string;
|
||||||
|
indexedAt: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
count: number;
|
count: number;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
@@ -1,36 +1,17 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
|
import * as AppBskyActorRef from '../actor/ref';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
limit?: number;
|
limit?: number;
|
||||||
before?: string;
|
before?: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
cursor?: string;
|
cursor?: string;
|
||||||
notifications: Notification[];
|
notifications: Notification[];
|
||||||
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface Notification {
|
export interface CallOptions {
|
||||||
uri: string;
|
headers?: Headers;
|
||||||
cid: string;
|
|
||||||
author: {
|
|
||||||
did: string;
|
|
||||||
declaration: Declaration;
|
|
||||||
handle: string;
|
|
||||||
displayName?: string;
|
|
||||||
};
|
|
||||||
reason: string;
|
|
||||||
reasonSubject?: string;
|
|
||||||
record: {};
|
|
||||||
isRead: boolean;
|
|
||||||
indexedAt: string;
|
|
||||||
}
|
|
||||||
export interface Declaration {
|
|
||||||
cid: string;
|
|
||||||
actorType: ActorKnown | ActorUnknown;
|
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -38,3 +19,14 @@ export interface Response {
|
|||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Notification {
|
||||||
|
uri: string;
|
||||||
|
cid: string;
|
||||||
|
author: AppBskyActorRef.WithInfo;
|
||||||
|
reason: 'vote' | 'repost' | 'trend' | 'follow' | 'invite' | 'mention' | 'reply' | (string & {});
|
||||||
|
reasonSubject?: string;
|
||||||
|
record: {};
|
||||||
|
isRead: boolean;
|
||||||
|
indexedAt: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,20 +1,17 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
|
export interface InputSchema {
|
||||||
|
seenAt: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
encoding: 'application/json';
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface InputSchema {
|
|
||||||
seenAt: string;
|
|
||||||
}
|
|
||||||
export interface OutputSchema {
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export declare const MAIN = "app.bsky.system.actorScene#main";
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export declare const MAIN = "app.bsky.system.actorUser#main";
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export interface Main {
|
||||||
|
cid: string;
|
||||||
|
actorType: 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene' | (string & {});
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
export declare type ActorKnown = 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene';
|
|
||||||
export declare type ActorUnknown = string;
|
|
||||||
export interface Record {
|
export interface Record {
|
||||||
actorType: ActorKnown | ActorUnknown;
|
actorType: 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene' | (string & {});
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,25 @@
|
|||||||
import { Headers, XRPCError } from '@atproto/xrpc';
|
import { Headers, XRPCError } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
qp?: QueryParams;
|
|
||||||
encoding: 'application/json';
|
|
||||||
}
|
|
||||||
export interface InputSchema {
|
export interface InputSchema {
|
||||||
email: string;
|
email: string;
|
||||||
handle: string;
|
handle: string;
|
||||||
inviteCode?: string;
|
inviteCode?: string;
|
||||||
password: string;
|
password: string;
|
||||||
recoveryKey?: string;
|
recoveryKey?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
accessJwt: string;
|
accessJwt: string;
|
||||||
refreshJwt: string;
|
refreshJwt: string;
|
||||||
handle: string;
|
handle: string;
|
||||||
did: string;
|
did: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
|
qp?: QueryParams;
|
||||||
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
+8
-6
@@ -1,17 +1,19 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
|
export interface InputSchema {
|
||||||
|
useCount: number;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface OutputSchema {
|
||||||
|
code: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
encoding: 'application/json';
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface InputSchema {
|
|
||||||
useCount: number;
|
|
||||||
}
|
|
||||||
export interface OutputSchema {
|
|
||||||
code: string;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
|
|||||||
@@ -1,20 +1,13 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
|
export declare type InputSchema = undefined;
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
encoding: '';
|
|
||||||
}
|
|
||||||
export interface InputSchema {
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
export interface OutputSchema {
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
|
export declare type InputSchema = undefined;
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export declare type InputSchema = undefined;
|
|
||||||
export interface OutputSchema {
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
|||||||
+4
-6
@@ -1,19 +1,17 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
|
export interface InputSchema {
|
||||||
|
email: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
encoding: 'application/json';
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface InputSchema {
|
|
||||||
email: string;
|
|
||||||
}
|
|
||||||
export interface OutputSchema {
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
|||||||
+5
-7
@@ -1,21 +1,19 @@
|
|||||||
import { Headers, XRPCError } from '@atproto/xrpc';
|
import { Headers, XRPCError } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
|
export interface InputSchema {
|
||||||
|
token: string;
|
||||||
|
password: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
encoding: 'application/json';
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface InputSchema {
|
|
||||||
token: string;
|
|
||||||
password: string;
|
|
||||||
}
|
|
||||||
export interface OutputSchema {
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
|
||||||
}
|
}
|
||||||
export declare class ExpiredTokenError extends XRPCError {
|
export declare class ExpiredTokenError extends XRPCError {
|
||||||
constructor(src: XRPCError);
|
constructor(src: XRPCError);
|
||||||
|
|||||||
@@ -2,12 +2,13 @@ import { Headers } from '@atproto/xrpc';
|
|||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
handle?: string;
|
handle?: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
did: string;
|
did: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
@@ -1,36 +1,39 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
|
export interface InputSchema {
|
||||||
|
did: string;
|
||||||
|
validate?: boolean;
|
||||||
|
writes: (Create | Update | Delete)[];
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
encoding: 'application/json';
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface InputSchema {
|
|
||||||
did: string;
|
|
||||||
validate?: boolean;
|
|
||||||
writes: ({
|
|
||||||
action: 'create';
|
|
||||||
collection: string;
|
|
||||||
rkey?: string;
|
|
||||||
value: unknown;
|
|
||||||
} | {
|
|
||||||
action: 'update';
|
|
||||||
collection: string;
|
|
||||||
rkey: string;
|
|
||||||
value: unknown;
|
|
||||||
} | {
|
|
||||||
action: 'delete';
|
|
||||||
collection: string;
|
|
||||||
rkey: string;
|
|
||||||
})[];
|
|
||||||
}
|
|
||||||
export interface OutputSchema {
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Create {
|
||||||
|
action: 'create';
|
||||||
|
collection: string;
|
||||||
|
rkey?: string;
|
||||||
|
value: {};
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface Update {
|
||||||
|
action: 'update';
|
||||||
|
collection: string;
|
||||||
|
rkey: string;
|
||||||
|
value: {};
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface Delete {
|
||||||
|
action: 'delete';
|
||||||
|
collection: string;
|
||||||
|
rkey: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
qp?: QueryParams;
|
|
||||||
encoding: 'application/json';
|
|
||||||
}
|
|
||||||
export interface InputSchema {
|
export interface InputSchema {
|
||||||
did: string;
|
did: string;
|
||||||
collection: string;
|
collection: string;
|
||||||
validate?: boolean;
|
validate?: boolean;
|
||||||
record: {};
|
record: {};
|
||||||
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
uri: string;
|
uri: string;
|
||||||
cid: string;
|
cid: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
|
qp?: QueryParams;
|
||||||
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
|
export interface InputSchema {
|
||||||
|
did: string;
|
||||||
|
collection: string;
|
||||||
|
rkey: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
encoding: 'application/json';
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface InputSchema {
|
|
||||||
did: string;
|
|
||||||
collection: string;
|
|
||||||
rkey: string;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
|
|||||||
@@ -2,9 +2,6 @@ import { Headers } from '@atproto/xrpc';
|
|||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
user: string;
|
user: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
handle: string;
|
handle: string;
|
||||||
@@ -12,6 +9,10 @@ export interface OutputSchema {
|
|||||||
didDoc: {};
|
didDoc: {};
|
||||||
collections: string[];
|
collections: string[];
|
||||||
handleIsCorrect: boolean;
|
handleIsCorrect: boolean;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
@@ -5,14 +5,15 @@ export interface QueryParams {
|
|||||||
rkey: string;
|
rkey: string;
|
||||||
cid?: string;
|
cid?: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
uri: string;
|
uri: string;
|
||||||
cid?: string;
|
cid?: string;
|
||||||
value: {};
|
value: {};
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
@@ -7,17 +7,14 @@ export interface QueryParams {
|
|||||||
after?: string;
|
after?: string;
|
||||||
reverse?: boolean;
|
reverse?: boolean;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
cursor?: string;
|
cursor?: string;
|
||||||
records: {
|
records: Record[];
|
||||||
uri: string;
|
[k: string]: unknown;
|
||||||
cid: string;
|
}
|
||||||
value: {};
|
export interface CallOptions {
|
||||||
}[];
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -25,3 +22,9 @@ export interface Response {
|
|||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Record {
|
||||||
|
uri: string;
|
||||||
|
cid: string;
|
||||||
|
value: {};
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,21 +1,23 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
qp?: QueryParams;
|
|
||||||
encoding: 'application/json';
|
|
||||||
}
|
|
||||||
export interface InputSchema {
|
export interface InputSchema {
|
||||||
did: string;
|
did: string;
|
||||||
collection: string;
|
collection: string;
|
||||||
rkey: string;
|
rkey: string;
|
||||||
validate?: boolean;
|
validate?: boolean;
|
||||||
record: {};
|
record: {};
|
||||||
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
uri: string;
|
uri: string;
|
||||||
cid: string;
|
cid: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
|
qp?: QueryParams;
|
||||||
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export interface Main {
|
||||||
|
uri: string;
|
||||||
|
cid: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
+10
-3
@@ -1,13 +1,15 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
inviteCodeRequired?: boolean;
|
inviteCodeRequired?: boolean;
|
||||||
availableUserDomains: string[];
|
availableUserDomains: string[];
|
||||||
|
links?: Links;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@@ -15,3 +17,8 @@ export interface Response {
|
|||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
export interface Links {
|
||||||
|
privacyPolicy?: string;
|
||||||
|
termsOfService?: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
qp?: QueryParams;
|
|
||||||
encoding: 'application/json';
|
|
||||||
}
|
|
||||||
export interface InputSchema {
|
export interface InputSchema {
|
||||||
handle: string;
|
handle: string;
|
||||||
password: string;
|
password: string;
|
||||||
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
accessJwt: string;
|
accessJwt: string;
|
||||||
refreshJwt: string;
|
refreshJwt: string;
|
||||||
handle: string;
|
handle: string;
|
||||||
did: string;
|
did: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
|
qp?: QueryParams;
|
||||||
|
encoding: 'application/json';
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
|
export declare type InputSchema = undefined;
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
}
|
}
|
||||||
export declare type InputSchema = undefined;
|
|
||||||
export interface OutputSchema {
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
|
||||||
}
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
handle: string;
|
handle: string;
|
||||||
did: string;
|
did: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
qp?: QueryParams;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
accessJwt: string;
|
accessJwt: string;
|
||||||
refreshJwt: string;
|
refreshJwt: string;
|
||||||
handle: string;
|
handle: string;
|
||||||
did: string;
|
did: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
|
qp?: QueryParams;
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ export interface QueryParams {
|
|||||||
did: string;
|
did: string;
|
||||||
from?: string;
|
from?: string;
|
||||||
}
|
}
|
||||||
|
export declare type InputSchema = undefined;
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export declare type InputSchema = undefined;
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
|
|||||||
@@ -2,12 +2,13 @@ import { Headers } from '@atproto/xrpc';
|
|||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
did: string;
|
did: string;
|
||||||
}
|
}
|
||||||
export interface CallOptions {
|
|
||||||
headers?: Headers;
|
|
||||||
}
|
|
||||||
export declare type InputSchema = undefined;
|
export declare type InputSchema = undefined;
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
root: string;
|
root: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
export interface CallOptions {
|
||||||
|
headers?: Headers;
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ import { Headers } from '@atproto/xrpc';
|
|||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
did: string;
|
did: string;
|
||||||
}
|
}
|
||||||
|
export declare type InputSchema = string | Uint8Array;
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
encoding: 'application/cbor';
|
encoding: 'application/cbor';
|
||||||
}
|
}
|
||||||
export declare type InputSchema = string | Uint8Array;
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,16 +1,12 @@
|
|||||||
import React, {useEffect} from 'react'
|
import React, {useEffect} from 'react'
|
||||||
import {
|
import {
|
||||||
useWindowDimensions,
|
Animated,
|
||||||
Text,
|
Text,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
|
useWindowDimensions,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import Animated, {
|
import {useAnimatedValue} from '../../lib/useAnimatedValue'
|
||||||
useSharedValue,
|
|
||||||
useAnimatedStyle,
|
|
||||||
withTiming,
|
|
||||||
interpolate,
|
|
||||||
} from 'react-native-reanimated'
|
|
||||||
import {colors} from '../../lib/styles'
|
import {colors} from '../../lib/styles'
|
||||||
|
|
||||||
interface AutocompleteItem {
|
interface AutocompleteItem {
|
||||||
@@ -28,23 +24,22 @@ export function Autocomplete({
|
|||||||
onSelect: (item: string) => void
|
onSelect: (item: string) => void
|
||||||
}) {
|
}) {
|
||||||
const winDim = useWindowDimensions()
|
const winDim = useWindowDimensions()
|
||||||
const positionInterp = useSharedValue<number>(0)
|
const positionInterp = useAnimatedValue(0)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (active) {
|
Animated.timing(positionInterp, {
|
||||||
positionInterp.value = withTiming(1, {duration: 250})
|
toValue: active ? 1 : 0,
|
||||||
} else {
|
duration: 200,
|
||||||
positionInterp.value = withTiming(0, {duration: 250})
|
useNativeDriver: false,
|
||||||
}
|
}).start()
|
||||||
}, [positionInterp, active])
|
}, [positionInterp, active])
|
||||||
|
|
||||||
const topAnimStyle = useAnimatedStyle(() => ({
|
const topAnimStyle = {
|
||||||
top: interpolate(
|
top: positionInterp.interpolate({
|
||||||
positionInterp.value,
|
inputRange: [0, 1],
|
||||||
[0, 1.0],
|
outputRange: [winDim.height, winDim.height / 4],
|
||||||
[winDim.height, winDim.height / 4],
|
}),
|
||||||
),
|
}
|
||||||
}))
|
|
||||||
return (
|
return (
|
||||||
<Animated.View style={[styles.outer, topAnimStyle]}>
|
<Animated.View style={[styles.outer, topAnimStyle]}>
|
||||||
{items.map((item, i) => (
|
{items.map((item, i) => (
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {observer} from 'mobx-react-lite'
|
import {observer} from 'mobx-react-lite'
|
||||||
import {View, FlatList} from 'react-native'
|
import {View, FlatList} from 'react-native'
|
||||||
import {
|
import {NotificationsViewModel} from '../../../state/models/notifications-view'
|
||||||
NotificationsViewModel,
|
|
||||||
NotificationsViewItemModel,
|
|
||||||
} from '../../../state/models/notifications-view'
|
|
||||||
import {FeedItem} from './FeedItem'
|
import {FeedItem} from './FeedItem'
|
||||||
import {NotificationFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
import {NotificationFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||||
import {ErrorMessage} from '../util/ErrorMessage'
|
import {ErrorMessage} from '../util/ErrorMessage'
|
||||||
import {EmptyState} from '../util/EmptyState'
|
import {EmptyState} from '../util/EmptyState'
|
||||||
|
|
||||||
|
const EMPTY_FEED_ITEM = {_reactKey: '__empty__'}
|
||||||
|
|
||||||
export const Feed = observer(function Feed({
|
export const Feed = observer(function Feed({
|
||||||
view,
|
view,
|
||||||
onPressTryAgain,
|
onPressTryAgain,
|
||||||
@@ -21,20 +20,35 @@ export const Feed = observer(function Feed({
|
|||||||
// VirtualizedList: You have a large list that is slow to update - make sure your
|
// VirtualizedList: You have a large list that is slow to update - make sure your
|
||||||
// renderItem function renders components that follow React performance best practices
|
// renderItem function renders components that follow React performance best practices
|
||||||
// like PureComponent, shouldComponentUpdate, etc
|
// like PureComponent, shouldComponentUpdate, etc
|
||||||
const renderItem = ({item}: {item: NotificationsViewItemModel}) => (
|
const renderItem = ({item}: {item: any}) => {
|
||||||
<FeedItem item={item} />
|
if (item === EMPTY_FEED_ITEM) {
|
||||||
|
return (
|
||||||
|
<EmptyState
|
||||||
|
icon="bell"
|
||||||
|
message="No notifications yet!"
|
||||||
|
style={{paddingVertical: 40}}
|
||||||
|
/>
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
return <FeedItem item={item} />
|
||||||
|
}
|
||||||
const onRefresh = () => {
|
const onRefresh = () => {
|
||||||
view.refresh().catch(err => console.error('Failed to refresh', err))
|
view.refresh().catch(err => console.error('Failed to refresh', err))
|
||||||
}
|
}
|
||||||
const onEndReached = () => {
|
const onEndReached = () => {
|
||||||
view.loadMore().catch(err => console.error('Failed to load more', err))
|
view.loadMore().catch(err => console.error('Failed to load more', err))
|
||||||
}
|
}
|
||||||
|
let data
|
||||||
|
if (view.hasLoaded) {
|
||||||
|
if (view.isEmpty) {
|
||||||
|
data = [EMPTY_FEED_ITEM]
|
||||||
|
} else {
|
||||||
|
data = view.notifications
|
||||||
|
}
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<View style={{flex: 1}}>
|
<View style={{flex: 1}}>
|
||||||
{view.isLoading && !view.isRefreshing && !view.hasContent && (
|
{view.isLoading && !data && <NotificationFeedLoadingPlaceholder />}
|
||||||
<NotificationFeedLoadingPlaceholder />
|
|
||||||
)}
|
|
||||||
{view.hasError && (
|
{view.hasError && (
|
||||||
<ErrorMessage
|
<ErrorMessage
|
||||||
dark
|
dark
|
||||||
@@ -43,9 +57,9 @@ export const Feed = observer(function Feed({
|
|||||||
onPressTryAgain={onPressTryAgain}
|
onPressTryAgain={onPressTryAgain}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{view.hasLoaded && (
|
{data && (
|
||||||
<FlatList
|
<FlatList
|
||||||
data={view.notifications}
|
data={data}
|
||||||
keyExtractor={item => item._reactKey}
|
keyExtractor={item => item._reactKey}
|
||||||
renderItem={renderItem}
|
renderItem={renderItem}
|
||||||
refreshing={view.isRefreshing}
|
refreshing={view.isRefreshing}
|
||||||
@@ -53,9 +67,6 @@ export const Feed = observer(function Feed({
|
|||||||
onEndReached={onEndReached}
|
onEndReached={onEndReached}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{view.hasLoaded && view.isEmpty && (
|
|
||||||
<EmptyState icon="bell" message="No notifications yet!" />
|
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export const FeedItem = observer(function FeedItem({
|
|||||||
return <View />
|
return <View />
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isReply) {
|
if (item.isReply || item.isMention) {
|
||||||
return (
|
return (
|
||||||
<Link href={itemHref} title={itemTitle}>
|
<Link href={itemHref} title={itemTitle}>
|
||||||
<Post
|
<Post
|
||||||
|
|||||||
+23
-13
@@ -4,11 +4,12 @@ import {View, FlatList, StyleProp, ViewStyle} from 'react-native'
|
|||||||
import {PostFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
import {PostFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||||
import {EmptyState} from '../util/EmptyState'
|
import {EmptyState} from '../util/EmptyState'
|
||||||
import {ErrorMessage} from '../util/ErrorMessage'
|
import {ErrorMessage} from '../util/ErrorMessage'
|
||||||
import {FeedModel, FeedItemModel} from '../../../state/models/feed-view'
|
import {FeedModel} from '../../../state/models/feed-view'
|
||||||
import {FeedItem} from './FeedItem'
|
import {FeedItem} from './FeedItem'
|
||||||
import {ComposePrompt} from '../composer/Prompt'
|
import {ComposePrompt} from '../composer/Prompt'
|
||||||
|
|
||||||
const COMPOSE_PROMPT_ITEM = {_reactKey: '__prompt__'}
|
const COMPOSE_PROMPT_ITEM = {_reactKey: '__prompt__'}
|
||||||
|
const EMPTY_FEED_ITEM = {_reactKey: '__empty__'}
|
||||||
|
|
||||||
export const Feed = observer(function Feed({
|
export const Feed = observer(function Feed({
|
||||||
feed,
|
feed,
|
||||||
@@ -27,9 +28,17 @@ export const Feed = observer(function Feed({
|
|||||||
// VirtualizedList: You have a large list that is slow to update - make sure your
|
// VirtualizedList: You have a large list that is slow to update - make sure your
|
||||||
// renderItem function renders components that follow React performance best practices
|
// renderItem function renders components that follow React performance best practices
|
||||||
// like PureComponent, shouldComponentUpdate, etc
|
// like PureComponent, shouldComponentUpdate, etc
|
||||||
const renderItem = ({item}: {item: FeedItemModel}) => {
|
const renderItem = ({item}: {item: any}) => {
|
||||||
if (item === COMPOSE_PROMPT_ITEM) {
|
if (item === COMPOSE_PROMPT_ITEM) {
|
||||||
return <ComposePrompt onPressCompose={onPressCompose} />
|
return <ComposePrompt onPressCompose={onPressCompose} />
|
||||||
|
} else if (item === EMPTY_FEED_ITEM) {
|
||||||
|
return (
|
||||||
|
<EmptyState
|
||||||
|
icon="bars"
|
||||||
|
message="This feed is empty!"
|
||||||
|
style={{paddingVertical: 40}}
|
||||||
|
/>
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
return <FeedItem item={item} />
|
return <FeedItem item={item} />
|
||||||
}
|
}
|
||||||
@@ -40,11 +49,18 @@ export const Feed = observer(function Feed({
|
|||||||
const onEndReached = () => {
|
const onEndReached = () => {
|
||||||
feed.loadMore().catch(err => console.error('Failed to load more', err))
|
feed.loadMore().catch(err => console.error('Failed to load more', err))
|
||||||
}
|
}
|
||||||
|
let data
|
||||||
|
if (feed.hasLoaded) {
|
||||||
|
if (feed.isEmpty) {
|
||||||
|
data = [COMPOSE_PROMPT_ITEM, EMPTY_FEED_ITEM]
|
||||||
|
} else {
|
||||||
|
data = [COMPOSE_PROMPT_ITEM].concat(feed.feed)
|
||||||
|
}
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<View style={style}>
|
<View style={style}>
|
||||||
{feed.isLoading && !feed.isRefreshing && !feed.hasContent && (
|
{!data && <ComposePrompt onPressCompose={onPressCompose} />}
|
||||||
<PostFeedLoadingPlaceholder />
|
{feed.isLoading && !data && <PostFeedLoadingPlaceholder />}
|
||||||
)}
|
|
||||||
{feed.hasError && (
|
{feed.hasError && (
|
||||||
<ErrorMessage
|
<ErrorMessage
|
||||||
dark
|
dark
|
||||||
@@ -53,10 +69,10 @@ export const Feed = observer(function Feed({
|
|||||||
onPressTryAgain={onPressTryAgain}
|
onPressTryAgain={onPressTryAgain}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{feed.hasContent && (
|
{feed.hasLoaded && data && (
|
||||||
<FlatList
|
<FlatList
|
||||||
ref={scrollElRef}
|
ref={scrollElRef}
|
||||||
data={[COMPOSE_PROMPT_ITEM].concat(feed.feed.slice())}
|
data={data}
|
||||||
keyExtractor={item => item._reactKey}
|
keyExtractor={item => item._reactKey}
|
||||||
renderItem={renderItem}
|
renderItem={renderItem}
|
||||||
refreshing={feed.isRefreshing}
|
refreshing={feed.isRefreshing}
|
||||||
@@ -65,12 +81,6 @@ export const Feed = observer(function Feed({
|
|||||||
onEndReached={onEndReached}
|
onEndReached={onEndReached}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{feed.isEmpty && (
|
|
||||||
<View>
|
|
||||||
<ComposePrompt onPressCompose={onPressCompose} />
|
|
||||||
<EmptyState icon="bars" message="This feed is empty!" />
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import {s, colors} from '../../lib/styles'
|
|||||||
import {useStores} from '../../../state'
|
import {useStores} from '../../../state'
|
||||||
|
|
||||||
const TOP_REPLY_LINE_LENGTH = 12
|
const TOP_REPLY_LINE_LENGTH = 12
|
||||||
|
const REPLYING_TO_LINE_LENGTH = 8
|
||||||
|
|
||||||
export const FeedItem = observer(function FeedItem({
|
export const FeedItem = observer(function FeedItem({
|
||||||
item,
|
item,
|
||||||
@@ -129,6 +130,25 @@ export const FeedItem = observer(function FeedItem({
|
|||||||
</Text>
|
</Text>
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
|
{item.additionalParentPost ? (
|
||||||
|
<View style={styles.replyingTo}>
|
||||||
|
<View style={styles.replyingToLine} />
|
||||||
|
<View style={styles.replyingToAvatar}>
|
||||||
|
<UserAvatar
|
||||||
|
handle={item.additionalParentPost?.thread?.author.handle}
|
||||||
|
displayName={
|
||||||
|
item.additionalParentPost?.thread?.author.displayName
|
||||||
|
}
|
||||||
|
size={32}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={styles.replyingToTextContainer}>
|
||||||
|
<Text style={styles.replyingToText} numberOfLines={2}>
|
||||||
|
{item.additionalParentPost?.thread?.record.text}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
) : undefined}
|
||||||
<View style={styles.layout}>
|
<View style={styles.layout}>
|
||||||
<View style={styles.layoutAvi}>
|
<View style={styles.layoutAvi}>
|
||||||
<Link
|
<Link
|
||||||
@@ -237,6 +257,35 @@ const styles = StyleSheet.create({
|
|||||||
marginRight: 4,
|
marginRight: 4,
|
||||||
color: colors.gray4,
|
color: colors.gray4,
|
||||||
},
|
},
|
||||||
|
replyingToLine: {
|
||||||
|
position: 'absolute',
|
||||||
|
left: 24,
|
||||||
|
bottom: -1 * REPLYING_TO_LINE_LENGTH + 6,
|
||||||
|
height: REPLYING_TO_LINE_LENGTH,
|
||||||
|
borderLeftWidth: 2,
|
||||||
|
borderLeftColor: colors.gray2,
|
||||||
|
},
|
||||||
|
replyingTo: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
backgroundColor: colors.white,
|
||||||
|
paddingBottom: 8,
|
||||||
|
paddingRight: 24,
|
||||||
|
},
|
||||||
|
replyingToAvatar: {
|
||||||
|
marginLeft: 9,
|
||||||
|
marginRight: 19,
|
||||||
|
marginTop: 1,
|
||||||
|
},
|
||||||
|
replyingToTextContainer: {
|
||||||
|
flex: 1,
|
||||||
|
flexDirection: 'row',
|
||||||
|
height: 34,
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
replyingToText: {
|
||||||
|
flex: 1,
|
||||||
|
color: colors.gray5,
|
||||||
|
},
|
||||||
layout: {
|
layout: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
import {Animated, StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
||||||
import Animated, {
|
|
||||||
useSharedValue,
|
|
||||||
useAnimatedStyle,
|
|
||||||
withDelay,
|
|
||||||
withTiming,
|
|
||||||
interpolate,
|
|
||||||
} from 'react-native-reanimated'
|
|
||||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||||
import {UpIcon, UpIconSolid} from '../../lib/icons'
|
import {UpIcon, UpIconSolid} from '../../lib/icons'
|
||||||
import {s, colors} from '../../lib/styles'
|
import {s, colors} from '../../lib/styles'
|
||||||
|
import {useAnimatedValue} from '../../lib/useAnimatedValue'
|
||||||
|
|
||||||
interface PostCtrlsOpts {
|
interface PostCtrlsOpts {
|
||||||
big?: boolean
|
big?: boolean
|
||||||
@@ -28,31 +22,71 @@ const sRedgray = {color: redgray}
|
|||||||
const HITSLOP = {top: 10, left: 10, bottom: 10, right: 10}
|
const HITSLOP = {top: 10, left: 10, bottom: 10, right: 10}
|
||||||
|
|
||||||
export function PostCtrls(opts: PostCtrlsOpts) {
|
export function PostCtrls(opts: PostCtrlsOpts) {
|
||||||
const interp1 = useSharedValue<number>(0)
|
const interp1 = useAnimatedValue(0)
|
||||||
const interp2 = useSharedValue<number>(0)
|
const interp2 = useAnimatedValue(0)
|
||||||
|
|
||||||
const anim1Style = useAnimatedStyle(() => ({
|
const anim1Style = {
|
||||||
transform: [{scale: interpolate(interp1.value, [0, 1.0], [1.0, 4.0])}],
|
transform: [
|
||||||
opacity: interpolate(interp1.value, [0, 1.0], [1.0, 0.0]),
|
{
|
||||||
}))
|
scale: interp1.interpolate({
|
||||||
const anim2Style = useAnimatedStyle(() => ({
|
inputRange: [0, 1.0],
|
||||||
transform: [{scale: interpolate(interp2.value, [0, 1.0], [1.0, 4.0])}],
|
outputRange: [1.0, 4.0],
|
||||||
opacity: interpolate(interp2.value, [0, 1.0], [1.0, 0.0]),
|
}),
|
||||||
}))
|
},
|
||||||
|
],
|
||||||
|
opacity: interp1.interpolate({
|
||||||
|
inputRange: [0, 1.0],
|
||||||
|
outputRange: [1.0, 0.0],
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
const anim2Style = {
|
||||||
|
transform: [
|
||||||
|
{
|
||||||
|
scale: interp2.interpolate({
|
||||||
|
inputRange: [0, 1.0],
|
||||||
|
outputRange: [1.0, 4.0],
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
opacity: interp2.interpolate({
|
||||||
|
inputRange: [0, 1.0],
|
||||||
|
outputRange: [1.0, 0.0],
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
|
||||||
const onPressToggleRepostWrapper = () => {
|
const onPressToggleRepostWrapper = () => {
|
||||||
if (!opts.isReposted) {
|
if (!opts.isReposted) {
|
||||||
interp1.value = withTiming(1, {duration: 400}, () => {
|
Animated.sequence([
|
||||||
interp1.value = withDelay(100, withTiming(0, {duration: 20}))
|
Animated.timing(interp1, {
|
||||||
})
|
toValue: 1,
|
||||||
|
duration: 400,
|
||||||
|
useNativeDriver: true,
|
||||||
|
}),
|
||||||
|
Animated.delay(100),
|
||||||
|
Animated.timing(interp1, {
|
||||||
|
toValue: 0,
|
||||||
|
duration: 20,
|
||||||
|
useNativeDriver: true,
|
||||||
|
}),
|
||||||
|
]).start()
|
||||||
}
|
}
|
||||||
opts.onPressToggleRepost()
|
opts.onPressToggleRepost()
|
||||||
}
|
}
|
||||||
const onPressToggleUpvoteWrapper = () => {
|
const onPressToggleUpvoteWrapper = () => {
|
||||||
if (!opts.isUpvoted) {
|
if (!opts.isUpvoted) {
|
||||||
interp2.value = withTiming(1, {duration: 400}, () => {
|
Animated.sequence([
|
||||||
interp2.value = withDelay(100, withTiming(0, {duration: 20}))
|
Animated.timing(interp2, {
|
||||||
})
|
toValue: 1,
|
||||||
|
duration: 400,
|
||||||
|
useNativeDriver: true,
|
||||||
|
}),
|
||||||
|
Animated.delay(100),
|
||||||
|
Animated.timing(interp2, {
|
||||||
|
toValue: 0,
|
||||||
|
duration: 20,
|
||||||
|
useNativeDriver: true,
|
||||||
|
}),
|
||||||
|
]).start()
|
||||||
}
|
}
|
||||||
opts.onPressToggleUpvote()
|
opts.onPressToggleUpvote()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export function UserAvatar({
|
|||||||
size: number
|
size: number
|
||||||
handle: string
|
handle: string
|
||||||
displayName: string | undefined
|
displayName: string | undefined
|
||||||
userAvatar: string | null
|
userAvatar?: string | null
|
||||||
setUserAvatar?: React.Dispatch<React.SetStateAction<string | null>>
|
setUserAvatar?: React.Dispatch<React.SetStateAction<string | null>>
|
||||||
}) {
|
}) {
|
||||||
const initials = getInitials(displayName || handle)
|
const initials = getInitials(displayName || handle)
|
||||||
@@ -92,7 +92,7 @@ export function UserAvatar({
|
|||||||
// setUserAvatar is only passed as prop on the EditProfile component
|
// setUserAvatar is only passed as prop on the EditProfile component
|
||||||
return setUserAvatar != null && IMAGES_ENABLED ? (
|
return setUserAvatar != null && IMAGES_ENABLED ? (
|
||||||
<TouchableOpacity onPress={handleEditAvatar}>
|
<TouchableOpacity onPress={handleEditAvatar}>
|
||||||
{userAvatar != null ? (
|
{userAvatar ? (
|
||||||
<Image style={styles.avatarImage} source={{uri: userAvatar}} />
|
<Image style={styles.avatarImage} source={{uri: userAvatar}} />
|
||||||
) : (
|
) : (
|
||||||
renderSvg(size, initials)
|
renderSvg(size, initials)
|
||||||
@@ -105,7 +105,7 @@ export function UserAvatar({
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
) : userAvatar != null ? (
|
) : userAvatar ? (
|
||||||
<Image
|
<Image
|
||||||
style={styles.avatarImage}
|
style={styles.avatarImage}
|
||||||
resizeMode="stretch"
|
resizeMode="stretch"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function UserBanner({
|
|||||||
setUserBanner,
|
setUserBanner,
|
||||||
}: {
|
}: {
|
||||||
handle: string
|
handle: string
|
||||||
userBanner: string | null
|
userBanner?: string | null
|
||||||
setUserBanner?: React.Dispatch<React.SetStateAction<string | null>>
|
setUserBanner?: React.Dispatch<React.SetStateAction<string | null>>
|
||||||
}) {
|
}) {
|
||||||
const gradient = getGradient(handle)
|
const gradient = getGradient(handle)
|
||||||
@@ -81,7 +81,7 @@ export function UserBanner({
|
|||||||
// setUserBanner is only passed as prop on the EditProfile component
|
// setUserBanner is only passed as prop on the EditProfile component
|
||||||
return setUserBanner != null && IMAGES_ENABLED ? (
|
return setUserBanner != null && IMAGES_ENABLED ? (
|
||||||
<TouchableOpacity onPress={handleEditBanner}>
|
<TouchableOpacity onPress={handleEditBanner}>
|
||||||
{userBanner != null ? (
|
{userBanner ? (
|
||||||
<Image style={styles.bannerImage} source={{uri: userBanner}} />
|
<Image style={styles.bannerImage} source={{uri: userBanner}} />
|
||||||
) : (
|
) : (
|
||||||
renderSvg()
|
renderSvg()
|
||||||
@@ -94,7 +94,7 @@ export function UserBanner({
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
) : userBanner != null ? (
|
) : userBanner ? (
|
||||||
<Image
|
<Image
|
||||||
style={styles.bannerImage}
|
style={styles.bannerImage}
|
||||||
resizeMode="stretch"
|
resizeMode="stretch"
|
||||||
|
|||||||
@@ -68,6 +68,9 @@ export const s = StyleSheet.create({
|
|||||||
light: {fontWeight: '300'},
|
light: {fontWeight: '300'},
|
||||||
fw200: {fontWeight: '200'},
|
fw200: {fontWeight: '200'},
|
||||||
|
|
||||||
|
// text decoration
|
||||||
|
underline: {textDecorationLine: 'underline'},
|
||||||
|
|
||||||
// font sizes
|
// font sizes
|
||||||
f9: {fontSize: 9},
|
f9: {fontSize: 9},
|
||||||
f10: {fontSize: 10},
|
f10: {fontSize: 10},
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import * as React from 'react'
|
||||||
|
import {Animated} from 'react-native'
|
||||||
|
|
||||||
|
export function useAnimatedValue(initialValue: number) {
|
||||||
|
const lazyRef = React.useRef<Animated.Value>()
|
||||||
|
|
||||||
|
if (lazyRef.current === undefined) {
|
||||||
|
lazyRef.current = new Animated.Value(initialValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
return lazyRef.current as Animated.Value
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
|||||||
import * as EmailValidator from 'email-validator'
|
import * as EmailValidator from 'email-validator'
|
||||||
import {observer} from 'mobx-react-lite'
|
import {observer} from 'mobx-react-lite'
|
||||||
import {Picker} from '../com/util/Picker'
|
import {Picker} from '../com/util/Picker'
|
||||||
|
import {TextLink} from '../com/util/Link'
|
||||||
import {s, colors} from '../lib/styles'
|
import {s, colors} from '../lib/styles'
|
||||||
import {
|
import {
|
||||||
makeValidHandle,
|
makeValidHandle,
|
||||||
@@ -370,6 +371,55 @@ const CreateAccount = ({onPressBack}: {onPressBack: () => void}) => {
|
|||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const Policies = () => {
|
||||||
|
if (!serviceDescription) {
|
||||||
|
return <View />
|
||||||
|
}
|
||||||
|
const tos = validWebLink(serviceDescription.links?.termsOfService)
|
||||||
|
const pp = validWebLink(serviceDescription.links?.privacyPolicy)
|
||||||
|
if (!tos && !pp) {
|
||||||
|
return (
|
||||||
|
<View style={styles.policies}>
|
||||||
|
<View style={[styles.errorIcon, s.mt2]}>
|
||||||
|
<FontAwesomeIcon icon="exclamation" style={s.white} size={10} />
|
||||||
|
</View>
|
||||||
|
<Text style={[s.white, s.pl5, s.flex1]}>
|
||||||
|
This service has not provided terms of service or a privacy policy.
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
const els = []
|
||||||
|
if (tos) {
|
||||||
|
els.push(
|
||||||
|
<TextLink
|
||||||
|
href={tos}
|
||||||
|
text="Terms of Service"
|
||||||
|
style={[s.white, s.underline]}
|
||||||
|
/>,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (pp) {
|
||||||
|
els.push(
|
||||||
|
<TextLink
|
||||||
|
href={pp}
|
||||||
|
text="Privacy Policy"
|
||||||
|
style={[s.white, s.underline]}
|
||||||
|
/>,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (els.length === 2) {
|
||||||
|
els.splice(1, 0, <Text style={s.white}> and </Text>)
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<View style={styles.policies}>
|
||||||
|
<Text style={s.white}>
|
||||||
|
By creating an account you agree to the {els}.
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView style={{flex: 1}}>
|
<ScrollView style={{flex: 1}}>
|
||||||
<KeyboardAvoidingView behavior="padding" style={{flex: 1}}>
|
<KeyboardAvoidingView behavior="padding" style={{flex: 1}}>
|
||||||
@@ -510,6 +560,7 @@ const CreateAccount = ({onPressBack}: {onPressBack: () => void}) => {
|
|||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
<Policies />
|
||||||
<View style={[s.flexRow, s.pl20, s.pr20, {paddingBottom: 200}]}>
|
<View style={[s.flexRow, s.pl20, s.pr20, {paddingBottom: 200}]}>
|
||||||
<TouchableOpacity onPress={onPressBack}>
|
<TouchableOpacity onPress={onPressBack}>
|
||||||
<Text style={[s.white, s.f18, s.pl5]}>Back</Text>
|
<Text style={[s.white, s.f18, s.pl5]}>Back</Text>
|
||||||
@@ -567,6 +618,12 @@ export const Login = observer(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
function validWebLink(url?: string): string | undefined {
|
||||||
|
return url && (url.startsWith('http://') || url.startsWith('https://'))
|
||||||
|
? url
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
outer: {
|
outer: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
@@ -692,6 +749,12 @@ const styles = StyleSheet.create({
|
|||||||
pickerIcon: {
|
pickerIcon: {
|
||||||
color: colors.white,
|
color: colors.white,
|
||||||
},
|
},
|
||||||
|
policies: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'flex-start',
|
||||||
|
paddingHorizontal: 20,
|
||||||
|
paddingBottom: 20,
|
||||||
|
},
|
||||||
error: {
|
error: {
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderColor: colors.red5,
|
borderColor: colors.red5,
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ import {
|
|||||||
View,
|
View,
|
||||||
ViewStyle,
|
ViewStyle,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import {colors} from '../lib/styles'
|
import VersionNumber from 'react-native-version-number'
|
||||||
|
import {s, colors} from '../lib/styles'
|
||||||
import {ScreenParams} from '../routes'
|
import {ScreenParams} from '../routes'
|
||||||
import {useStores} from '../../state'
|
import {useStores} from '../../state'
|
||||||
import {
|
import {
|
||||||
@@ -171,6 +172,12 @@ export const Menu = ({navIdx, visible}: ScreenParams) => {
|
|||||||
))
|
))
|
||||||
: undefined}
|
: undefined}
|
||||||
</View>
|
</View>
|
||||||
|
<View style={styles.footer}>
|
||||||
|
<Text style={s.gray4}>
|
||||||
|
Build version {VersionNumber.appVersion} ({VersionNumber.buildVersion}
|
||||||
|
)
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -243,4 +250,9 @@ const styles = StyleSheet.create({
|
|||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
color: colors.white,
|
color: colors.white,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
footer: {
|
||||||
|
paddingHorizontal: 14,
|
||||||
|
paddingVertical: 18,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -147,7 +147,13 @@ export const Profile = observer(({navIdx, visible, params}: ScreenParams) => {
|
|||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
renderItem = () => <Text style={styles.loading}>No posts yet!</Text>
|
renderItem = () => (
|
||||||
|
<EmptyState
|
||||||
|
icon={['far', 'message']}
|
||||||
|
message="No posts yet!"
|
||||||
|
style={{paddingVertical: 40}}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (uiState.selectedView === Sections.Scenes) {
|
} else if (uiState.selectedView === Sections.Scenes) {
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
import React, {useEffect} from 'react'
|
import React, {useEffect} from 'react'
|
||||||
import {observer} from 'mobx-react-lite'
|
import {observer} from 'mobx-react-lite'
|
||||||
import {StyleSheet, View} from 'react-native'
|
import {Animated, Easing, StyleSheet, View} from 'react-native'
|
||||||
import Animated, {
|
|
||||||
useSharedValue,
|
|
||||||
useAnimatedStyle,
|
|
||||||
withTiming,
|
|
||||||
interpolate,
|
|
||||||
Easing,
|
|
||||||
} from 'react-native-reanimated'
|
|
||||||
import {ComposePost} from '../../com/composer/ComposePost'
|
import {ComposePost} from '../../com/composer/ComposePost'
|
||||||
import {ComposerOpts} from '../../../state/models/shell-ui'
|
import {ComposerOpts} from '../../../state/models/shell-ui'
|
||||||
|
import {useAnimatedValue} from '../../lib/useAnimatedValue'
|
||||||
|
|
||||||
export const Composer = observer(
|
export const Composer = observer(
|
||||||
({
|
({
|
||||||
@@ -25,21 +19,30 @@ export const Composer = observer(
|
|||||||
onPost?: ComposerOpts['onPost']
|
onPost?: ComposerOpts['onPost']
|
||||||
onClose: () => void
|
onClose: () => void
|
||||||
}) => {
|
}) => {
|
||||||
const initInterp = useSharedValue<number>(0)
|
const initInterp = useAnimatedValue(0)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (active) {
|
if (active) {
|
||||||
initInterp.value = withTiming(1, {
|
Animated.timing(initInterp, {
|
||||||
|
toValue: 1,
|
||||||
duration: 300,
|
duration: 300,
|
||||||
easing: Easing.out(Easing.exp),
|
easing: Easing.out(Easing.exp),
|
||||||
})
|
useNativeDriver: true,
|
||||||
|
}).start()
|
||||||
} else {
|
} else {
|
||||||
initInterp.value = 0
|
initInterp.setValue(0)
|
||||||
}
|
}
|
||||||
}, [initInterp, active])
|
}, [initInterp, active])
|
||||||
const wrapperAnimStyle = useAnimatedStyle(() => ({
|
const wrapperAnimStyle = {
|
||||||
top: interpolate(initInterp.value, [0, 1.0], [winHeight, 0]),
|
transform: [
|
||||||
}))
|
{
|
||||||
|
translateY: initInterp.interpolate({
|
||||||
|
inputRange: [0, 1],
|
||||||
|
outputRange: [winHeight, 0],
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
// events
|
// events
|
||||||
// =
|
// =
|
||||||
|
|||||||
@@ -10377,6 +10377,11 @@ react-native-url-polyfill@^1.3.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
whatwg-url-without-unicode "8.0.0-3"
|
whatwg-url-without-unicode "8.0.0-3"
|
||||||
|
|
||||||
|
react-native-version-number@^0.3.6:
|
||||||
|
version "0.3.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/react-native-version-number/-/react-native-version-number-0.3.6.tgz#dd8b1435fc217df0a166d7e4a61fdc993f3e7437"
|
||||||
|
integrity sha512-TdyXiK90NiwmSbmAUlUBOV6WI1QGoqtvZZzI5zQY4fKl67B3ZrZn/h+Wy/OYIKKFMfePSiyfeIs8LtHGOZ/NgA==
|
||||||
|
|
||||||
react-native-web@^0.17.7:
|
react-native-web@^0.17.7:
|
||||||
version "0.17.7"
|
version "0.17.7"
|
||||||
resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.17.7.tgz#038899dbc94467a0ca0be214b88a30e0c117b176"
|
resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.17.7.tgz#038899dbc94467a0ca0be214b88a30e0c117b176"
|
||||||
|
|||||||
Reference in New Issue
Block a user