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-safe-area-context (from `../node_modules/react-native-safe-area-context`)
|
||||
- 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-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
|
||||
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
|
||||
@@ -481,6 +482,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/react-native-safe-area-context"
|
||||
react-native-splash-screen:
|
||||
:path: "../node_modules/react-native-splash-screen"
|
||||
react-native-version-number:
|
||||
:path: "../node_modules/react-native-version-number"
|
||||
React-perflogger:
|
||||
:path: "../node_modules/react-native/ReactCommon/reactperflogger"
|
||||
React-RCTActionSheet:
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
"react-native-svg": "^12.4.0",
|
||||
"react-native-tab-view": "^3.3.0",
|
||||
"react-native-url-polyfill": "^1.3.0",
|
||||
"react-native-version-number": "^0.3.6",
|
||||
"react-native-web": "^0.17.7",
|
||||
"tlds": "^1.234.0"
|
||||
},
|
||||
|
||||
@@ -21,7 +21,7 @@ export function doPolyfill() {
|
||||
export async function post(
|
||||
store: RootStoreModel,
|
||||
text: string,
|
||||
replyTo?: Post.PostRef,
|
||||
replyTo?: Post.ReplyRef,
|
||||
knownHandles?: Set<string>,
|
||||
) {
|
||||
let reply
|
||||
@@ -43,6 +43,14 @@ export async function post(
|
||||
}
|
||||
}
|
||||
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(
|
||||
{did: store.me.did || ''},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
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 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 {RootStoreModel} from './root-store'
|
||||
import * as apilib from '../lib/api'
|
||||
@@ -43,10 +45,6 @@ export class FeedItemModel implements GetTimeline.FeedItem {
|
||||
repostedBy?: GetTimeline.Actor
|
||||
trendedBy?: GetTimeline.Actor
|
||||
record: Record<string, unknown> = {}
|
||||
embed?:
|
||||
| GetTimeline.RecordEmbed
|
||||
| GetTimeline.ExternalEmbed
|
||||
| GetTimeline.UnknownEmbed
|
||||
replyCount: number = 0
|
||||
repostCount: number = 0
|
||||
upvoteCount: number = 0
|
||||
@@ -54,6 +52,9 @@ export class FeedItemModel implements GetTimeline.FeedItem {
|
||||
indexedAt: string = ''
|
||||
myState = new FeedItemMyStateModel()
|
||||
|
||||
// additional data
|
||||
additionalParentPost?: PostThreadViewModel
|
||||
|
||||
constructor(
|
||||
public rootStore: RootStoreModel,
|
||||
reactKey: string,
|
||||
@@ -73,7 +74,6 @@ export class FeedItemModel implements GetTimeline.FeedItem {
|
||||
this.repostedBy = v.repostedBy
|
||||
this.trendedBy = v.trendedBy
|
||||
this.record = v.record
|
||||
this.embed = v.embed
|
||||
this.replyCount = v.replyCount
|
||||
this.repostCount = v.repostCount
|
||||
this.upvoteCount = v.upvoteCount
|
||||
@@ -156,6 +156,29 @@ export class FeedItemModel implements GetTimeline.FeedItem {
|
||||
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 {
|
||||
@@ -345,7 +368,7 @@ export class FeedModel {
|
||||
this._xLoading(isRefreshing)
|
||||
try {
|
||||
const res = await this._getFeed({limit: PAGE_SIZE})
|
||||
this._replaceAll(res)
|
||||
await this._replaceAll(res)
|
||||
this._xIdle()
|
||||
} catch (e: any) {
|
||||
this._xIdle(e.toString())
|
||||
@@ -356,7 +379,7 @@ export class FeedModel {
|
||||
this._xLoading()
|
||||
try {
|
||||
const res = await this._getFeed({limit: PAGE_SIZE})
|
||||
this._prependAll(res)
|
||||
await this._prependAll(res)
|
||||
this._xIdle()
|
||||
} catch (e: any) {
|
||||
this._xIdle(e.toString())
|
||||
@@ -373,7 +396,7 @@ export class FeedModel {
|
||||
before: this.loadMoreCursor,
|
||||
limit: PAGE_SIZE,
|
||||
})
|
||||
this._appendAll(res)
|
||||
await this._appendAll(res)
|
||||
this._xIdle()
|
||||
} catch (e: any) {
|
||||
this._xIdle(`Failed to load feed: ${e.toString()}`)
|
||||
@@ -407,13 +430,17 @@ export class FeedModel {
|
||||
}
|
||||
}
|
||||
|
||||
private _replaceAll(res: GetTimeline.Response | GetAuthorFeed.Response) {
|
||||
this.feed.length = 0
|
||||
private async _replaceAll(
|
||||
res: GetTimeline.Response | GetAuthorFeed.Response,
|
||||
) {
|
||||
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.hasMore = !!this.loadMoreCursor
|
||||
let counter = this.feed.length
|
||||
@@ -428,40 +455,64 @@ export class FeedModel {
|
||||
// -prf
|
||||
const reorgedFeed = preprocessFeed(res.data.feed, this.feedType === 'home')
|
||||
|
||||
const promises = []
|
||||
const toAppend: FeedItemModel[] = []
|
||||
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(
|
||||
keyId: number,
|
||||
item: GetTimeline.FeedItem | GetAuthorFeed.FeedItem,
|
||||
private async _prependAll(
|
||||
res: GetTimeline.Response | GetAuthorFeed.Response,
|
||||
) {
|
||||
// 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
|
||||
let counter = this.feed.length
|
||||
const toPrepend = []
|
||||
|
||||
const promises = []
|
||||
const toPrepend: FeedItemModel[] = []
|
||||
for (const item of res.data.feed) {
|
||||
if (this.feed.find(item2 => item2.uri === item.uri)) {
|
||||
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(
|
||||
keyId: number,
|
||||
item: GetTimeline.FeedItem | GetAuthorFeed.FeedItem,
|
||||
) {
|
||||
// TODO: validate .record
|
||||
this.feed.unshift(new FeedItemModel(this.rootStore, `item-${keyId}`, 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 _prependAll()', e)
|
||||
}),
|
||||
)
|
||||
}
|
||||
toPrepend.push(itemModel)
|
||||
}
|
||||
await Promise.all(promises)
|
||||
runInAction(() => {
|
||||
this.feed = toPrepend.concat(this.feed)
|
||||
})
|
||||
}
|
||||
|
||||
private _updateAll(res: GetTimeline.Response | GetAuthorFeed.Response) {
|
||||
|
||||
@@ -81,6 +81,10 @@ export class NotificationsViewItemModel implements GroupedNotification {
|
||||
return this.reason === 'trend'
|
||||
}
|
||||
|
||||
get isMention() {
|
||||
return this.reason === 'mention'
|
||||
}
|
||||
|
||||
get isReply() {
|
||||
return this.reason === 'reply'
|
||||
}
|
||||
@@ -94,7 +98,13 @@ export class NotificationsViewItemModel implements GroupedNotification {
|
||||
}
|
||||
|
||||
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 false
|
||||
@@ -124,7 +134,7 @@ export class NotificationsViewItemModel implements GroupedNotification {
|
||||
return
|
||||
}
|
||||
let postUri
|
||||
if (this.isReply) {
|
||||
if (this.isReply || this.isMention) {
|
||||
postUri = this.uri
|
||||
} else if (this.isUpvote || this.isRead || this.isTrend) {
|
||||
postUri = this.subjectUri
|
||||
|
||||
Vendored
+3543
-11386
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 AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline';
|
||||
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 AppBskyFeedRepost from './types/app/bsky/feed/repost';
|
||||
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 ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords';
|
||||
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 ComAtprotoSessionCreate from './types/com/atproto/session/create';
|
||||
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 AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions';
|
||||
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 AppBskyActorSearchTypeahead from './types/app/bsky/actor/searchTypeahead';
|
||||
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 AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread';
|
||||
export * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy';
|
||||
export * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline';
|
||||
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 AppBskyFeedRepost from './types/app/bsky/feed/repost';
|
||||
export * as AppBskyFeedSetVote from './types/app/bsky/feed/setVote';
|
||||
export * as AppBskyFeedTrend from './types/app/bsky/feed/trend';
|
||||
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 AppBskyGraphConfirmation from './types/app/bsky/graph/confirmation';
|
||||
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 AppBskyNotificationList from './types/app/bsky/notification/list';
|
||||
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 declare const APP_BSKY_GRAPH: {
|
||||
AssertCreator: string;
|
||||
@@ -235,7 +241,6 @@ export declare class ProfileRecord {
|
||||
}
|
||||
export declare class FeedNS {
|
||||
_service: ServiceClient;
|
||||
mediaEmbed: MediaEmbedRecord;
|
||||
post: PostRecord;
|
||||
repost: RepostRecord;
|
||||
trend: TrendRecord;
|
||||
@@ -248,27 +253,6 @@ export declare class FeedNS {
|
||||
getVotes(params?: AppBskyFeedGetVotes.QueryParams, opts?: AppBskyFeedGetVotes.CallOptions): Promise<AppBskyFeedGetVotes.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 {
|
||||
_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 * as AppBskySystemDeclRef from '../system/declRef';
|
||||
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 {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
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 {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||
export interface QueryParams {
|
||||
actor: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
did: string;
|
||||
declaration: Declaration;
|
||||
declaration: AppBskySystemDeclRef.Main;
|
||||
handle: string;
|
||||
creator: string;
|
||||
displayName?: string;
|
||||
@@ -19,14 +15,11 @@ export interface OutputSchema {
|
||||
followsCount: number;
|
||||
membersCount: number;
|
||||
postsCount: number;
|
||||
myState?: {
|
||||
follow?: string;
|
||||
member?: string;
|
||||
};
|
||||
myState?: MyState;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Declaration {
|
||||
cid: string;
|
||||
actorType: ActorKnown | ActorUnknown;
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
@@ -34,3 +27,8 @@ export interface Response {
|
||||
data: OutputSchema;
|
||||
}
|
||||
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 * as AppBskySystemDeclRef from '../system/declRef';
|
||||
export interface QueryParams {
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
cursor?: string;
|
||||
actors: {
|
||||
did: string;
|
||||
declaration: Declaration;
|
||||
handle: string;
|
||||
displayName?: string;
|
||||
description?: string;
|
||||
indexedAt?: string;
|
||||
myState?: {
|
||||
follow?: string;
|
||||
};
|
||||
}[];
|
||||
actors: Actor[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Declaration {
|
||||
cid: string;
|
||||
actorType: ActorKnown | ActorUnknown;
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
@@ -33,3 +19,17 @@ export interface Response {
|
||||
data: OutputSchema;
|
||||
}
|
||||
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 * as AppBskySystemDeclRef from '../system/declRef';
|
||||
export interface QueryParams {
|
||||
term: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
cursor?: string;
|
||||
users: {
|
||||
did: string;
|
||||
declaration: Declaration;
|
||||
handle: string;
|
||||
displayName?: string;
|
||||
description?: string;
|
||||
indexedAt?: string;
|
||||
}[];
|
||||
users: User[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Declaration {
|
||||
cid: string;
|
||||
actorType: ActorKnown | ActorUnknown;
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
@@ -31,3 +20,12 @@ export interface Response {
|
||||
data: OutputSchema;
|
||||
}
|
||||
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 * as AppBskySystemDeclRef from '../system/declRef';
|
||||
export interface QueryParams {
|
||||
term: string;
|
||||
limit?: number;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
users: User[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
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';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
did?: string;
|
||||
displayName?: string;
|
||||
description?: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
cid: string;
|
||||
record: {};
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface Response {
|
||||
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 * as AppBskyActorRef from '../actor/ref';
|
||||
import * as AppBskyFeedEmbed from './embed';
|
||||
export interface QueryParams {
|
||||
author: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
cursor?: string;
|
||||
feed: FeedItem[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface FeedItem {
|
||||
uri: string;
|
||||
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 CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
@@ -64,3 +21,25 @@ export interface Response {
|
||||
data: OutputSchema;
|
||||
}
|
||||
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 * as AppBskyActorRef from '../actor/ref';
|
||||
import * as AppBskyFeedEmbed from './embed';
|
||||
export interface QueryParams {
|
||||
uri: string;
|
||||
depth?: number;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
thread: Post | NotFoundPost | {
|
||||
$type: string;
|
||||
[k: string]: unknown;
|
||||
};
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
@@ -65,3 +25,36 @@ export declare class NotFoundError extends XRPCError {
|
||||
constructor(src: XRPCError);
|
||||
}
|
||||
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 * as AppBskySystemDeclRef from '../system/declRef';
|
||||
export interface QueryParams {
|
||||
uri: string;
|
||||
cid?: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
uri: string;
|
||||
cid?: string;
|
||||
cursor?: string;
|
||||
repostedBy: {
|
||||
did: string;
|
||||
declaration: Declaration;
|
||||
handle: string;
|
||||
displayName?: string;
|
||||
createdAt?: string;
|
||||
indexedAt: string;
|
||||
}[];
|
||||
repostedBy: RepostedBy[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Declaration {
|
||||
cid: string;
|
||||
actorType: ActorKnown | ActorUnknown;
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
@@ -34,3 +23,12 @@ export interface Response {
|
||||
data: OutputSchema;
|
||||
}
|
||||
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 * as AppBskyActorRef from '../actor/ref';
|
||||
import * as AppBskyFeedEmbed from './embed';
|
||||
export interface QueryParams {
|
||||
algorithm?: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
cursor?: string;
|
||||
feed: FeedItem[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface FeedItem {
|
||||
uri: string;
|
||||
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 CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
@@ -65,3 +21,25 @@ export interface Response {
|
||||
data: OutputSchema;
|
||||
}
|
||||
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 * as AppBskyActorRef from '../actor/ref';
|
||||
export interface QueryParams {
|
||||
uri: string;
|
||||
cid?: string;
|
||||
@@ -6,32 +7,16 @@ export interface QueryParams {
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
uri: string;
|
||||
cid?: string;
|
||||
cursor?: string;
|
||||
votes: {
|
||||
direction: 'up' | 'down';
|
||||
indexedAt: string;
|
||||
createdAt: string;
|
||||
actor: Actor;
|
||||
}[];
|
||||
votes: Vote[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Actor {
|
||||
did: string;
|
||||
declaration: Declaration;
|
||||
handle: string;
|
||||
displayName?: string;
|
||||
}
|
||||
export interface Declaration {
|
||||
cid: string;
|
||||
actorType: ActorKnown | ActorUnknown;
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
@@ -39,3 +24,10 @@ export interface Response {
|
||||
data: OutputSchema;
|
||||
}
|
||||
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[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface MediaEmbed {
|
||||
alt?: string;
|
||||
thumb?: MediaEmbedBlob;
|
||||
original: MediaEmbedBlob;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface MediaEmbedBlob {
|
||||
mimeType: string;
|
||||
blobId: string;
|
||||
thumb?: {
|
||||
cid: string;
|
||||
mimeType: string;
|
||||
[k: string]: unknown;
|
||||
};
|
||||
original: {
|
||||
cid: string;
|
||||
mimeType: string;
|
||||
[k: string]: unknown;
|
||||
};
|
||||
[k: string]: unknown;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
||||
export interface Record {
|
||||
text: string;
|
||||
entities?: Entity[];
|
||||
reply?: {
|
||||
root: PostRef;
|
||||
parent: PostRef;
|
||||
[k: string]: unknown;
|
||||
};
|
||||
reply?: ReplyRef;
|
||||
createdAt: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface ReplyRef {
|
||||
root: ComAtprotoRepoStrongRef.Main;
|
||||
parent: ComAtprotoRepoStrongRef.Main;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Entity {
|
||||
index: TextSlice;
|
||||
type: string;
|
||||
@@ -20,8 +22,3 @@ export interface TextSlice {
|
||||
end: number;
|
||||
[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 {
|
||||
subject: Subject;
|
||||
subject: ComAtprotoRepoStrongRef.Main;
|
||||
createdAt: string;
|
||||
[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 * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
||||
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 {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
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 {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
||||
export interface Record {
|
||||
subject: Subject;
|
||||
subject: ComAtprotoRepoStrongRef.Main;
|
||||
createdAt: string;
|
||||
[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 {
|
||||
subject: Subject;
|
||||
subject: ComAtprotoRepoStrongRef.Main;
|
||||
direction: 'up' | 'down';
|
||||
createdAt: string;
|
||||
[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 {
|
||||
assertion: string;
|
||||
subject: {
|
||||
did: string;
|
||||
declarationCid: string;
|
||||
[k: string]: unknown;
|
||||
};
|
||||
subject: AppBskyActorRef.Main;
|
||||
createdAt: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
import * as AppBskyActorRef from '../actor/ref';
|
||||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
||||
export interface Record {
|
||||
originator: {
|
||||
did: string;
|
||||
declarationCid: string;
|
||||
[k: string]: unknown;
|
||||
};
|
||||
assertion: {
|
||||
uri: string;
|
||||
cid: string;
|
||||
[k: string]: unknown;
|
||||
};
|
||||
originator: AppBskyActorRef.Main;
|
||||
assertion: ComAtprotoRepoStrongRef.Main;
|
||||
createdAt: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import * as AppBskyActorRef from '../actor/ref';
|
||||
export interface Record {
|
||||
subject: {
|
||||
did: string;
|
||||
declarationCid: string;
|
||||
[k: string]: unknown;
|
||||
};
|
||||
subject: AppBskyActorRef.Main;
|
||||
createdAt: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
import * as AppBskyActorRef from '../actor/ref';
|
||||
export interface QueryParams {
|
||||
author?: string;
|
||||
subject?: string;
|
||||
@@ -7,40 +8,14 @@ export interface QueryParams {
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
cursor?: string;
|
||||
assertions: {
|
||||
uri: string;
|
||||
cid: string;
|
||||
assertion: string;
|
||||
confirmation?: Confirmation;
|
||||
author: Actor;
|
||||
subject: Actor;
|
||||
indexedAt: string;
|
||||
createdAt: string;
|
||||
}[];
|
||||
assertions: Assertion[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Confirmation {
|
||||
uri: string;
|
||||
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 CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
@@ -48,3 +23,21 @@ export interface Response {
|
||||
data: OutputSchema;
|
||||
}
|
||||
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 * as AppBskySystemDeclRef from '../system/declRef';
|
||||
export interface QueryParams {
|
||||
user: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
subject: Subject;
|
||||
cursor?: string;
|
||||
followers: Follower[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
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 * as AppBskyActorRef from '../actor/ref';
|
||||
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||
export interface QueryParams {
|
||||
user: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
subject: AppBskyActorRef.WithInfo;
|
||||
cursor?: string;
|
||||
follows: Follow[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
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 * as AppBskyActorRef from '../actor/ref';
|
||||
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||
export interface QueryParams {
|
||||
actor: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
subject: AppBskyActorRef.WithInfo;
|
||||
cursor?: string;
|
||||
members: Member[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
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 * as AppBskyActorRef from '../actor/ref';
|
||||
import * as AppBskySystemDeclRef from '../system/declRef';
|
||||
export interface QueryParams {
|
||||
actor: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
subject: AppBskyActorRef.WithInfo;
|
||||
cursor?: string;
|
||||
memberships: Membership[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
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';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
count: number;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
|
||||
@@ -1,36 +1,17 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
import * as AppBskyActorRef from '../actor/ref';
|
||||
export interface QueryParams {
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
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 {
|
||||
cursor?: string;
|
||||
notifications: Notification[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Notification {
|
||||
uri: string;
|
||||
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 CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
@@ -38,3 +19,14 @@ export interface Response {
|
||||
data: OutputSchema;
|
||||
}
|
||||
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';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface InputSchema {
|
||||
seenAt: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
seenAt: string;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
export declare function toKnownErr(e: any): any;
|
||||
|
||||
@@ -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 {
|
||||
actorType: ActorKnown | ActorUnknown;
|
||||
actorType: 'app.bsky.system.actorUser' | 'app.bsky.system.actorScene' | (string & {});
|
||||
[k: string]: unknown;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
import { Headers, XRPCError } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
email: string;
|
||||
handle: string;
|
||||
inviteCode?: string;
|
||||
password: string;
|
||||
recoveryKey?: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
accessJwt: string;
|
||||
refreshJwt: string;
|
||||
handle: string;
|
||||
did: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
|
||||
+8
-6
@@ -1,17 +1,19 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface InputSchema {
|
||||
useCount: number;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
code: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
useCount: number;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
code: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: '';
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
export declare function toKnownErr(e: any): any;
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
export declare function toKnownErr(e: any): any;
|
||||
|
||||
+4
-6
@@ -1,19 +1,17 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface InputSchema {
|
||||
email: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
email: string;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
export declare function toKnownErr(e: any): any;
|
||||
|
||||
+5
-7
@@ -1,21 +1,19 @@
|
||||
import { Headers, XRPCError } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface InputSchema {
|
||||
token: string;
|
||||
password: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
token: string;
|
||||
password: string;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
export declare class ExpiredTokenError extends XRPCError {
|
||||
constructor(src: XRPCError);
|
||||
|
||||
@@ -2,12 +2,13 @@ import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
handle?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
did: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
|
||||
@@ -1,36 +1,39 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface InputSchema {
|
||||
did: string;
|
||||
validate?: boolean;
|
||||
writes: (Create | Update | Delete)[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
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 {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
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';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
did: string;
|
||||
collection: string;
|
||||
validate?: boolean;
|
||||
record: {};
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
cid: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface InputSchema {
|
||||
did: string;
|
||||
collection: string;
|
||||
rkey: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
did: string;
|
||||
collection: string;
|
||||
rkey: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
|
||||
@@ -2,9 +2,6 @@ import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
user: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
handle: string;
|
||||
@@ -12,6 +9,10 @@ export interface OutputSchema {
|
||||
didDoc: {};
|
||||
collections: string[];
|
||||
handleIsCorrect: boolean;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
|
||||
@@ -5,14 +5,15 @@ export interface QueryParams {
|
||||
rkey: string;
|
||||
cid?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
cid?: string;
|
||||
value: {};
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
|
||||
@@ -7,17 +7,14 @@ export interface QueryParams {
|
||||
after?: string;
|
||||
reverse?: boolean;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
cursor?: string;
|
||||
records: {
|
||||
uri: string;
|
||||
cid: string;
|
||||
value: {};
|
||||
}[];
|
||||
records: Record[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
@@ -25,3 +22,9 @@ export interface Response {
|
||||
data: OutputSchema;
|
||||
}
|
||||
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';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
did: string;
|
||||
collection: string;
|
||||
rkey: string;
|
||||
validate?: boolean;
|
||||
record: {};
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
cid: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface Response {
|
||||
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';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
inviteCodeRequired?: boolean;
|
||||
availableUserDomains: string[];
|
||||
links?: Links;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
@@ -15,3 +17,8 @@ export interface Response {
|
||||
data: OutputSchema;
|
||||
}
|
||||
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';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
handle: string;
|
||||
password: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
accessJwt: string;
|
||||
refreshJwt: string;
|
||||
handle: string;
|
||||
did: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
||||
export declare function toKnownErr(e: any): any;
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
handle: string;
|
||||
did: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
accessJwt: string;
|
||||
refreshJwt: string;
|
||||
handle: string;
|
||||
did: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
|
||||
@@ -3,10 +3,10 @@ export interface QueryParams {
|
||||
did: string;
|
||||
from?: string;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
headers: Headers;
|
||||
|
||||
@@ -2,12 +2,13 @@ import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
root: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
|
||||
@@ -2,12 +2,12 @@ import { Headers } from '@atproto/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
}
|
||||
export declare type InputSchema = string | Uint8Array;
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
qp?: QueryParams;
|
||||
encoding: 'application/cbor';
|
||||
}
|
||||
export declare type InputSchema = string | Uint8Array;
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
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 {
|
||||
useWindowDimensions,
|
||||
Animated,
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
StyleSheet,
|
||||
useWindowDimensions,
|
||||
} from 'react-native'
|
||||
import Animated, {
|
||||
useSharedValue,
|
||||
useAnimatedStyle,
|
||||
withTiming,
|
||||
interpolate,
|
||||
} from 'react-native-reanimated'
|
||||
import {useAnimatedValue} from '../../lib/useAnimatedValue'
|
||||
import {colors} from '../../lib/styles'
|
||||
|
||||
interface AutocompleteItem {
|
||||
@@ -28,23 +24,22 @@ export function Autocomplete({
|
||||
onSelect: (item: string) => void
|
||||
}) {
|
||||
const winDim = useWindowDimensions()
|
||||
const positionInterp = useSharedValue<number>(0)
|
||||
const positionInterp = useAnimatedValue(0)
|
||||
|
||||
useEffect(() => {
|
||||
if (active) {
|
||||
positionInterp.value = withTiming(1, {duration: 250})
|
||||
} else {
|
||||
positionInterp.value = withTiming(0, {duration: 250})
|
||||
}
|
||||
Animated.timing(positionInterp, {
|
||||
toValue: active ? 1 : 0,
|
||||
duration: 200,
|
||||
useNativeDriver: false,
|
||||
}).start()
|
||||
}, [positionInterp, active])
|
||||
|
||||
const topAnimStyle = useAnimatedStyle(() => ({
|
||||
top: interpolate(
|
||||
positionInterp.value,
|
||||
[0, 1.0],
|
||||
[winDim.height, winDim.height / 4],
|
||||
),
|
||||
}))
|
||||
const topAnimStyle = {
|
||||
top: positionInterp.interpolate({
|
||||
inputRange: [0, 1],
|
||||
outputRange: [winDim.height, winDim.height / 4],
|
||||
}),
|
||||
}
|
||||
return (
|
||||
<Animated.View style={[styles.outer, topAnimStyle]}>
|
||||
{items.map((item, i) => (
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
import React from 'react'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {View, FlatList} from 'react-native'
|
||||
import {
|
||||
NotificationsViewModel,
|
||||
NotificationsViewItemModel,
|
||||
} from '../../../state/models/notifications-view'
|
||||
import {NotificationsViewModel} from '../../../state/models/notifications-view'
|
||||
import {FeedItem} from './FeedItem'
|
||||
import {NotificationFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||
import {ErrorMessage} from '../util/ErrorMessage'
|
||||
import {EmptyState} from '../util/EmptyState'
|
||||
|
||||
const EMPTY_FEED_ITEM = {_reactKey: '__empty__'}
|
||||
|
||||
export const Feed = observer(function Feed({
|
||||
view,
|
||||
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
|
||||
// renderItem function renders components that follow React performance best practices
|
||||
// like PureComponent, shouldComponentUpdate, etc
|
||||
const renderItem = ({item}: {item: NotificationsViewItemModel}) => (
|
||||
<FeedItem item={item} />
|
||||
)
|
||||
const renderItem = ({item}: {item: any}) => {
|
||||
if (item === EMPTY_FEED_ITEM) {
|
||||
return (
|
||||
<EmptyState
|
||||
icon="bell"
|
||||
message="No notifications yet!"
|
||||
style={{paddingVertical: 40}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
return <FeedItem item={item} />
|
||||
}
|
||||
const onRefresh = () => {
|
||||
view.refresh().catch(err => console.error('Failed to refresh', err))
|
||||
}
|
||||
const onEndReached = () => {
|
||||
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 (
|
||||
<View style={{flex: 1}}>
|
||||
{view.isLoading && !view.isRefreshing && !view.hasContent && (
|
||||
<NotificationFeedLoadingPlaceholder />
|
||||
)}
|
||||
{view.isLoading && !data && <NotificationFeedLoadingPlaceholder />}
|
||||
{view.hasError && (
|
||||
<ErrorMessage
|
||||
dark
|
||||
@@ -43,9 +57,9 @@ export const Feed = observer(function Feed({
|
||||
onPressTryAgain={onPressTryAgain}
|
||||
/>
|
||||
)}
|
||||
{view.hasLoaded && (
|
||||
{data && (
|
||||
<FlatList
|
||||
data={view.notifications}
|
||||
data={data}
|
||||
keyExtractor={item => item._reactKey}
|
||||
renderItem={renderItem}
|
||||
refreshing={view.isRefreshing}
|
||||
@@ -53,9 +67,6 @@ export const Feed = observer(function Feed({
|
||||
onEndReached={onEndReached}
|
||||
/>
|
||||
)}
|
||||
{view.hasLoaded && view.isEmpty && (
|
||||
<EmptyState icon="bell" message="No notifications yet!" />
|
||||
)}
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
@@ -48,7 +48,7 @@ export const FeedItem = observer(function FeedItem({
|
||||
return <View />
|
||||
}
|
||||
|
||||
if (item.isReply) {
|
||||
if (item.isReply || item.isMention) {
|
||||
return (
|
||||
<Link href={itemHref} title={itemTitle}>
|
||||
<Post
|
||||
|
||||
+23
-13
@@ -4,11 +4,12 @@ import {View, FlatList, StyleProp, ViewStyle} from 'react-native'
|
||||
import {PostFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||
import {EmptyState} from '../util/EmptyState'
|
||||
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 {ComposePrompt} from '../composer/Prompt'
|
||||
|
||||
const COMPOSE_PROMPT_ITEM = {_reactKey: '__prompt__'}
|
||||
const EMPTY_FEED_ITEM = {_reactKey: '__empty__'}
|
||||
|
||||
export const Feed = observer(function 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
|
||||
// renderItem function renders components that follow React performance best practices
|
||||
// like PureComponent, shouldComponentUpdate, etc
|
||||
const renderItem = ({item}: {item: FeedItemModel}) => {
|
||||
const renderItem = ({item}: {item: any}) => {
|
||||
if (item === COMPOSE_PROMPT_ITEM) {
|
||||
return <ComposePrompt onPressCompose={onPressCompose} />
|
||||
} else if (item === EMPTY_FEED_ITEM) {
|
||||
return (
|
||||
<EmptyState
|
||||
icon="bars"
|
||||
message="This feed is empty!"
|
||||
style={{paddingVertical: 40}}
|
||||
/>
|
||||
)
|
||||
} else {
|
||||
return <FeedItem item={item} />
|
||||
}
|
||||
@@ -40,11 +49,18 @@ export const Feed = observer(function Feed({
|
||||
const onEndReached = () => {
|
||||
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 (
|
||||
<View style={style}>
|
||||
{feed.isLoading && !feed.isRefreshing && !feed.hasContent && (
|
||||
<PostFeedLoadingPlaceholder />
|
||||
)}
|
||||
{!data && <ComposePrompt onPressCompose={onPressCompose} />}
|
||||
{feed.isLoading && !data && <PostFeedLoadingPlaceholder />}
|
||||
{feed.hasError && (
|
||||
<ErrorMessage
|
||||
dark
|
||||
@@ -53,10 +69,10 @@ export const Feed = observer(function Feed({
|
||||
onPressTryAgain={onPressTryAgain}
|
||||
/>
|
||||
)}
|
||||
{feed.hasContent && (
|
||||
{feed.hasLoaded && data && (
|
||||
<FlatList
|
||||
ref={scrollElRef}
|
||||
data={[COMPOSE_PROMPT_ITEM].concat(feed.feed.slice())}
|
||||
data={data}
|
||||
keyExtractor={item => item._reactKey}
|
||||
renderItem={renderItem}
|
||||
refreshing={feed.isRefreshing}
|
||||
@@ -65,12 +81,6 @@ export const Feed = observer(function Feed({
|
||||
onEndReached={onEndReached}
|
||||
/>
|
||||
)}
|
||||
{feed.isEmpty && (
|
||||
<View>
|
||||
<ComposePrompt onPressCompose={onPressCompose} />
|
||||
<EmptyState icon="bars" message="This feed is empty!" />
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
@@ -18,6 +18,7 @@ import {s, colors} from '../../lib/styles'
|
||||
import {useStores} from '../../../state'
|
||||
|
||||
const TOP_REPLY_LINE_LENGTH = 12
|
||||
const REPLYING_TO_LINE_LENGTH = 8
|
||||
|
||||
export const FeedItem = observer(function FeedItem({
|
||||
item,
|
||||
@@ -129,6 +130,25 @@ export const FeedItem = observer(function FeedItem({
|
||||
</Text>
|
||||
</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.layoutAvi}>
|
||||
<Link
|
||||
@@ -237,6 +257,35 @@ const styles = StyleSheet.create({
|
||||
marginRight: 4,
|
||||
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: {
|
||||
flexDirection: 'row',
|
||||
},
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
import React from 'react'
|
||||
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
||||
import Animated, {
|
||||
useSharedValue,
|
||||
useAnimatedStyle,
|
||||
withDelay,
|
||||
withTiming,
|
||||
interpolate,
|
||||
} from 'react-native-reanimated'
|
||||
import {Animated, StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {UpIcon, UpIconSolid} from '../../lib/icons'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {useAnimatedValue} from '../../lib/useAnimatedValue'
|
||||
|
||||
interface PostCtrlsOpts {
|
||||
big?: boolean
|
||||
@@ -28,31 +22,71 @@ const sRedgray = {color: redgray}
|
||||
const HITSLOP = {top: 10, left: 10, bottom: 10, right: 10}
|
||||
|
||||
export function PostCtrls(opts: PostCtrlsOpts) {
|
||||
const interp1 = useSharedValue<number>(0)
|
||||
const interp2 = useSharedValue<number>(0)
|
||||
const interp1 = useAnimatedValue(0)
|
||||
const interp2 = useAnimatedValue(0)
|
||||
|
||||
const anim1Style = useAnimatedStyle(() => ({
|
||||
transform: [{scale: interpolate(interp1.value, [0, 1.0], [1.0, 4.0])}],
|
||||
opacity: interpolate(interp1.value, [0, 1.0], [1.0, 0.0]),
|
||||
}))
|
||||
const anim2Style = useAnimatedStyle(() => ({
|
||||
transform: [{scale: interpolate(interp2.value, [0, 1.0], [1.0, 4.0])}],
|
||||
opacity: interpolate(interp2.value, [0, 1.0], [1.0, 0.0]),
|
||||
}))
|
||||
const anim1Style = {
|
||||
transform: [
|
||||
{
|
||||
scale: interp1.interpolate({
|
||||
inputRange: [0, 1.0],
|
||||
outputRange: [1.0, 4.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 = () => {
|
||||
if (!opts.isReposted) {
|
||||
interp1.value = withTiming(1, {duration: 400}, () => {
|
||||
interp1.value = withDelay(100, withTiming(0, {duration: 20}))
|
||||
})
|
||||
Animated.sequence([
|
||||
Animated.timing(interp1, {
|
||||
toValue: 1,
|
||||
duration: 400,
|
||||
useNativeDriver: true,
|
||||
}),
|
||||
Animated.delay(100),
|
||||
Animated.timing(interp1, {
|
||||
toValue: 0,
|
||||
duration: 20,
|
||||
useNativeDriver: true,
|
||||
}),
|
||||
]).start()
|
||||
}
|
||||
opts.onPressToggleRepost()
|
||||
}
|
||||
const onPressToggleUpvoteWrapper = () => {
|
||||
if (!opts.isUpvoted) {
|
||||
interp2.value = withTiming(1, {duration: 400}, () => {
|
||||
interp2.value = withDelay(100, withTiming(0, {duration: 20}))
|
||||
})
|
||||
Animated.sequence([
|
||||
Animated.timing(interp2, {
|
||||
toValue: 1,
|
||||
duration: 400,
|
||||
useNativeDriver: true,
|
||||
}),
|
||||
Animated.delay(100),
|
||||
Animated.timing(interp2, {
|
||||
toValue: 0,
|
||||
duration: 20,
|
||||
useNativeDriver: true,
|
||||
}),
|
||||
]).start()
|
||||
}
|
||||
opts.onPressToggleUpvote()
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export function UserAvatar({
|
||||
size: number
|
||||
handle: string
|
||||
displayName: string | undefined
|
||||
userAvatar: string | null
|
||||
userAvatar?: string | null
|
||||
setUserAvatar?: React.Dispatch<React.SetStateAction<string | null>>
|
||||
}) {
|
||||
const initials = getInitials(displayName || handle)
|
||||
@@ -92,7 +92,7 @@ export function UserAvatar({
|
||||
// setUserAvatar is only passed as prop on the EditProfile component
|
||||
return setUserAvatar != null && IMAGES_ENABLED ? (
|
||||
<TouchableOpacity onPress={handleEditAvatar}>
|
||||
{userAvatar != null ? (
|
||||
{userAvatar ? (
|
||||
<Image style={styles.avatarImage} source={{uri: userAvatar}} />
|
||||
) : (
|
||||
renderSvg(size, initials)
|
||||
@@ -105,7 +105,7 @@ export function UserAvatar({
|
||||
/>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
) : userAvatar != null ? (
|
||||
) : userAvatar ? (
|
||||
<Image
|
||||
style={styles.avatarImage}
|
||||
resizeMode="stretch"
|
||||
|
||||
@@ -17,7 +17,7 @@ export function UserBanner({
|
||||
setUserBanner,
|
||||
}: {
|
||||
handle: string
|
||||
userBanner: string | null
|
||||
userBanner?: string | null
|
||||
setUserBanner?: React.Dispatch<React.SetStateAction<string | null>>
|
||||
}) {
|
||||
const gradient = getGradient(handle)
|
||||
@@ -81,7 +81,7 @@ export function UserBanner({
|
||||
// setUserBanner is only passed as prop on the EditProfile component
|
||||
return setUserBanner != null && IMAGES_ENABLED ? (
|
||||
<TouchableOpacity onPress={handleEditBanner}>
|
||||
{userBanner != null ? (
|
||||
{userBanner ? (
|
||||
<Image style={styles.bannerImage} source={{uri: userBanner}} />
|
||||
) : (
|
||||
renderSvg()
|
||||
@@ -94,7 +94,7 @@ export function UserBanner({
|
||||
/>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
) : userBanner != null ? (
|
||||
) : userBanner ? (
|
||||
<Image
|
||||
style={styles.bannerImage}
|
||||
resizeMode="stretch"
|
||||
|
||||
@@ -68,6 +68,9 @@ export const s = StyleSheet.create({
|
||||
light: {fontWeight: '300'},
|
||||
fw200: {fontWeight: '200'},
|
||||
|
||||
// text decoration
|
||||
underline: {textDecorationLine: 'underline'},
|
||||
|
||||
// font sizes
|
||||
f9: {fontSize: 9},
|
||||
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 {observer} from 'mobx-react-lite'
|
||||
import {Picker} from '../com/util/Picker'
|
||||
import {TextLink} from '../com/util/Link'
|
||||
import {s, colors} from '../lib/styles'
|
||||
import {
|
||||
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 (
|
||||
<ScrollView style={{flex: 1}}>
|
||||
<KeyboardAvoidingView behavior="padding" style={{flex: 1}}>
|
||||
@@ -510,6 +560,7 @@ const CreateAccount = ({onPressBack}: {onPressBack: () => void}) => {
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<Policies />
|
||||
<View style={[s.flexRow, s.pl20, s.pr20, {paddingBottom: 200}]}>
|
||||
<TouchableOpacity onPress={onPressBack}>
|
||||
<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({
|
||||
outer: {
|
||||
flex: 1,
|
||||
@@ -692,6 +749,12 @@ const styles = StyleSheet.create({
|
||||
pickerIcon: {
|
||||
color: colors.white,
|
||||
},
|
||||
policies: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'flex-start',
|
||||
paddingHorizontal: 20,
|
||||
paddingBottom: 20,
|
||||
},
|
||||
error: {
|
||||
borderWidth: 1,
|
||||
borderColor: colors.red5,
|
||||
|
||||
@@ -7,7 +7,8 @@ import {
|
||||
View,
|
||||
ViewStyle,
|
||||
} 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 {useStores} from '../../state'
|
||||
import {
|
||||
@@ -171,6 +172,12 @@ export const Menu = ({navIdx, visible}: ScreenParams) => {
|
||||
))
|
||||
: undefined}
|
||||
</View>
|
||||
<View style={styles.footer}>
|
||||
<Text style={s.gray4}>
|
||||
Build version {VersionNumber.appVersion} ({VersionNumber.buildVersion}
|
||||
)
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
@@ -243,4 +250,9 @@ const styles = StyleSheet.create({
|
||||
fontWeight: 'bold',
|
||||
color: colors.white,
|
||||
},
|
||||
|
||||
footer: {
|
||||
paddingHorizontal: 14,
|
||||
paddingVertical: 18,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -147,7 +147,13 @@ export const Profile = observer(({navIdx, visible, params}: ScreenParams) => {
|
||||
/>
|
||||
)
|
||||
} 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) {
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
import React, {useEffect} from 'react'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {StyleSheet, View} from 'react-native'
|
||||
import Animated, {
|
||||
useSharedValue,
|
||||
useAnimatedStyle,
|
||||
withTiming,
|
||||
interpolate,
|
||||
Easing,
|
||||
} from 'react-native-reanimated'
|
||||
import {Animated, Easing, StyleSheet, View} from 'react-native'
|
||||
import {ComposePost} from '../../com/composer/ComposePost'
|
||||
import {ComposerOpts} from '../../../state/models/shell-ui'
|
||||
import {useAnimatedValue} from '../../lib/useAnimatedValue'
|
||||
|
||||
export const Composer = observer(
|
||||
({
|
||||
@@ -25,21 +19,30 @@ export const Composer = observer(
|
||||
onPost?: ComposerOpts['onPost']
|
||||
onClose: () => void
|
||||
}) => {
|
||||
const initInterp = useSharedValue<number>(0)
|
||||
const initInterp = useAnimatedValue(0)
|
||||
|
||||
useEffect(() => {
|
||||
if (active) {
|
||||
initInterp.value = withTiming(1, {
|
||||
Animated.timing(initInterp, {
|
||||
toValue: 1,
|
||||
duration: 300,
|
||||
easing: Easing.out(Easing.exp),
|
||||
})
|
||||
useNativeDriver: true,
|
||||
}).start()
|
||||
} else {
|
||||
initInterp.value = 0
|
||||
initInterp.setValue(0)
|
||||
}
|
||||
}, [initInterp, active])
|
||||
const wrapperAnimStyle = useAnimatedStyle(() => ({
|
||||
top: interpolate(initInterp.value, [0, 1.0], [winHeight, 0]),
|
||||
}))
|
||||
const wrapperAnimStyle = {
|
||||
transform: [
|
||||
{
|
||||
translateY: initInterp.interpolate({
|
||||
inputRange: [0, 1],
|
||||
outputRange: [winHeight, 0],
|
||||
}),
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
// events
|
||||
// =
|
||||
|
||||
@@ -10377,6 +10377,11 @@ react-native-url-polyfill@^1.3.0:
|
||||
dependencies:
|
||||
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:
|
||||
version "0.17.7"
|
||||
resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.17.7.tgz#038899dbc94467a0ca0be214b88a30e0c117b176"
|
||||
|
||||
Reference in New Issue
Block a user