Replace mock-api with real api
This commit is contained in:
parent
5193a5b48e
commit
aabde2b401
110 changed files with 16045 additions and 3742 deletions
12002
src/third-party/api/index.js
vendored
Normal file
12002
src/third-party/api/index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
src/third-party/api/index.js.map
vendored
Normal file
7
src/third-party/api/index.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
24
src/third-party/api/src/errors.d.ts
vendored
Normal file
24
src/third-party/api/src/errors.d.ts
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
export declare enum ErrorCode {
|
||||
NetworkError = "NetworkError",
|
||||
DidResolutionFailed = "DidResolutionFailed",
|
||||
NameResolutionFailed = "NameResolutionFailed"
|
||||
}
|
||||
export declare class NameResolutionFailed extends Error {
|
||||
code: ErrorCode;
|
||||
constructor(name: string);
|
||||
}
|
||||
export declare class DidResolutionFailed extends Error {
|
||||
code: ErrorCode;
|
||||
constructor(did: string);
|
||||
}
|
||||
export declare class WritePermissionError extends Error {
|
||||
constructor();
|
||||
}
|
||||
export declare class APIResponseError extends Error {
|
||||
httpStatusCode: number;
|
||||
httpStatusText: string;
|
||||
httpHeaders?: Record<string, string> | undefined;
|
||||
httpResponseBody?: any;
|
||||
constructor(httpStatusCode: number, httpStatusText: string, httpHeaders?: Record<string, string> | undefined, httpResponseBody?: any);
|
||||
get code(): ErrorCode;
|
||||
}
|
180
src/third-party/api/src/http-types.d.ts
vendored
Normal file
180
src/third-party/api/src/http-types.d.ts
vendored
Normal file
|
@ -0,0 +1,180 @@
|
|||
import { z } from 'zod';
|
||||
export declare const getRepoRequest: z.ZodObject<{
|
||||
did: z.ZodString;
|
||||
from: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("multiformats/cid").CID, string>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
from?: import("multiformats/cid").CID | undefined;
|
||||
did: string;
|
||||
}, {
|
||||
from?: string | undefined;
|
||||
did: string;
|
||||
}>;
|
||||
export declare type GetRepoRequest = z.infer<typeof getRepoRequest>;
|
||||
export declare const postRepoRequest: z.ZodObject<{
|
||||
did: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
did: string;
|
||||
}, {
|
||||
did: string;
|
||||
}>;
|
||||
export declare type PostRepoRequest = z.infer<typeof postRepoRequest>;
|
||||
export declare const describeRepoParams: z.ZodObject<{
|
||||
confirmName: z.ZodOptional<z.ZodBoolean>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
confirmName?: boolean | undefined;
|
||||
}, {
|
||||
confirmName?: boolean | undefined;
|
||||
}>;
|
||||
export declare type DescribeRepoParams = z.infer<typeof describeRepoParams>;
|
||||
export declare const describeRepoResponse: z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
did: z.ZodString;
|
||||
didDoc: z.ZodAny;
|
||||
collections: z.ZodArray<z.ZodString, "many">;
|
||||
nameIsCorrect: z.ZodOptional<z.ZodBoolean>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
didDoc?: any;
|
||||
nameIsCorrect?: boolean | undefined;
|
||||
name: string;
|
||||
did: string;
|
||||
collections: string[];
|
||||
}, {
|
||||
didDoc?: any;
|
||||
nameIsCorrect?: boolean | undefined;
|
||||
name: string;
|
||||
did: string;
|
||||
collections: string[];
|
||||
}>;
|
||||
export declare type DescribeRepoResponse = z.infer<typeof describeRepoResponse>;
|
||||
export declare const listRecordsParams: z.ZodObject<{
|
||||
limit: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, number, string>]>>;
|
||||
before: z.ZodOptional<z.ZodString>;
|
||||
after: z.ZodOptional<z.ZodString>;
|
||||
reverse: z.ZodOptional<z.ZodEffects<z.ZodString, boolean, string>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
reverse?: boolean | undefined;
|
||||
limit?: number | undefined;
|
||||
before?: string | undefined;
|
||||
after?: string | undefined;
|
||||
}, {
|
||||
reverse?: string | undefined;
|
||||
limit?: string | number | undefined;
|
||||
before?: string | undefined;
|
||||
after?: string | undefined;
|
||||
}>;
|
||||
export declare type ListRecordsParams = z.infer<typeof listRecordsParams>;
|
||||
export declare const listRecordsResponse: z.ZodObject<{
|
||||
records: z.ZodArray<z.ZodObject<{
|
||||
uri: z.ZodString;
|
||||
value: z.ZodAny;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
value?: any;
|
||||
uri: string;
|
||||
}, {
|
||||
value?: any;
|
||||
uri: string;
|
||||
}>, "many">;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
records: {
|
||||
value?: any;
|
||||
uri: string;
|
||||
}[];
|
||||
}, {
|
||||
records: {
|
||||
value?: any;
|
||||
uri: string;
|
||||
}[];
|
||||
}>;
|
||||
export declare type ListRecordsResponse = z.infer<typeof listRecordsResponse>;
|
||||
export declare const getRecordResponse: z.ZodObject<{
|
||||
uri: z.ZodString;
|
||||
value: z.ZodAny;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
value?: any;
|
||||
uri: string;
|
||||
}, {
|
||||
value?: any;
|
||||
uri: string;
|
||||
}>;
|
||||
export declare type GetRecordResponse = z.infer<typeof getRecordResponse>;
|
||||
export declare const batchWriteParams: z.ZodObject<{
|
||||
writes: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
||||
action: z.ZodLiteral<"create">;
|
||||
collection: z.ZodString;
|
||||
value: z.ZodAny;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
value?: any;
|
||||
action: "create";
|
||||
collection: string;
|
||||
}, {
|
||||
value?: any;
|
||||
action: "create";
|
||||
collection: string;
|
||||
}>, z.ZodObject<{
|
||||
action: z.ZodLiteral<"update">;
|
||||
collection: z.ZodString;
|
||||
tid: z.ZodString;
|
||||
value: z.ZodAny;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
value?: any;
|
||||
action: "update";
|
||||
collection: string;
|
||||
tid: string;
|
||||
}, {
|
||||
value?: any;
|
||||
action: "update";
|
||||
collection: string;
|
||||
tid: string;
|
||||
}>, z.ZodObject<{
|
||||
action: z.ZodLiteral<"delete">;
|
||||
collection: z.ZodString;
|
||||
tid: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
action: "delete";
|
||||
collection: string;
|
||||
tid: string;
|
||||
}, {
|
||||
action: "delete";
|
||||
collection: string;
|
||||
tid: string;
|
||||
}>]>, "many">;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
writes: ({
|
||||
value?: any;
|
||||
action: "create";
|
||||
collection: string;
|
||||
} | {
|
||||
value?: any;
|
||||
action: "update";
|
||||
collection: string;
|
||||
tid: string;
|
||||
} | {
|
||||
action: "delete";
|
||||
collection: string;
|
||||
tid: string;
|
||||
})[];
|
||||
}, {
|
||||
writes: ({
|
||||
value?: any;
|
||||
action: "create";
|
||||
collection: string;
|
||||
} | {
|
||||
value?: any;
|
||||
action: "update";
|
||||
collection: string;
|
||||
tid: string;
|
||||
} | {
|
||||
action: "delete";
|
||||
collection: string;
|
||||
tid: string;
|
||||
})[];
|
||||
}>;
|
||||
export declare type BatchWriteParams = z.infer<typeof batchWriteParams>;
|
||||
export declare const createRecordResponse: z.ZodObject<{
|
||||
uri: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
uri: string;
|
||||
}, {
|
||||
uri: string;
|
||||
}>;
|
||||
export declare type CreateRecordResponse = z.infer<typeof createRecordResponse>;
|
239
src/third-party/api/src/index.d.ts
vendored
Normal file
239
src/third-party/api/src/index.d.ts
vendored
Normal file
|
@ -0,0 +1,239 @@
|
|||
import { Client as XrpcClient, ServiceClient as XrpcServiceClient } from '@adxp/xrpc';
|
||||
import * as TodoAdxCreateAccount from './types/todo/adx/createAccount';
|
||||
import * as TodoAdxCreateSession from './types/todo/adx/createSession';
|
||||
import * as TodoAdxDeleteAccount from './types/todo/adx/deleteAccount';
|
||||
import * as TodoAdxDeleteSession from './types/todo/adx/deleteSession';
|
||||
import * as TodoAdxGetAccount from './types/todo/adx/getAccount';
|
||||
import * as TodoAdxGetSession from './types/todo/adx/getSession';
|
||||
import * as TodoAdxRepoBatchWrite from './types/todo/adx/repoBatchWrite';
|
||||
import * as TodoAdxRepoCreateRecord from './types/todo/adx/repoCreateRecord';
|
||||
import * as TodoAdxRepoDeleteRecord from './types/todo/adx/repoDeleteRecord';
|
||||
import * as TodoAdxRepoDescribe from './types/todo/adx/repoDescribe';
|
||||
import * as TodoAdxRepoGetRecord from './types/todo/adx/repoGetRecord';
|
||||
import * as TodoAdxRepoListRecords from './types/todo/adx/repoListRecords';
|
||||
import * as TodoAdxRepoPutRecord from './types/todo/adx/repoPutRecord';
|
||||
import * as TodoAdxResolveName from './types/todo/adx/resolveName';
|
||||
import * as TodoAdxSyncGetRepo from './types/todo/adx/syncGetRepo';
|
||||
import * as TodoAdxSyncGetRoot from './types/todo/adx/syncGetRoot';
|
||||
import * as TodoAdxSyncUpdateRepo from './types/todo/adx/syncUpdateRepo';
|
||||
import * as TodoSocialBadge from './types/todo/social/badge';
|
||||
import * as TodoSocialFollow from './types/todo/social/follow';
|
||||
import * as TodoSocialGetFeed from './types/todo/social/getFeed';
|
||||
import * as TodoSocialGetLikedBy from './types/todo/social/getLikedBy';
|
||||
import * as TodoSocialGetNotifications from './types/todo/social/getNotifications';
|
||||
import * as TodoSocialGetPostThread from './types/todo/social/getPostThread';
|
||||
import * as TodoSocialGetProfile from './types/todo/social/getProfile';
|
||||
import * as TodoSocialGetRepostedBy from './types/todo/social/getRepostedBy';
|
||||
import * as TodoSocialGetUserFollowers from './types/todo/social/getUserFollowers';
|
||||
import * as TodoSocialGetUserFollows from './types/todo/social/getUserFollows';
|
||||
import * as TodoSocialLike from './types/todo/social/like';
|
||||
import * as TodoSocialMediaEmbed from './types/todo/social/mediaEmbed';
|
||||
import * as TodoSocialPost from './types/todo/social/post';
|
||||
import * as TodoSocialProfile from './types/todo/social/profile';
|
||||
import * as TodoSocialRepost from './types/todo/social/repost';
|
||||
export declare class Client {
|
||||
xrpc: XrpcClient;
|
||||
constructor();
|
||||
service(serviceUri: string | URL): ServiceClient;
|
||||
}
|
||||
declare const defaultInst: Client;
|
||||
export default defaultInst;
|
||||
export declare class ServiceClient {
|
||||
_baseClient: Client;
|
||||
xrpc: XrpcServiceClient;
|
||||
todo: TodoNS;
|
||||
constructor(baseClient: Client, xrpcService: XrpcServiceClient);
|
||||
}
|
||||
export declare class TodoNS {
|
||||
_service: ServiceClient;
|
||||
adx: AdxNS;
|
||||
social: SocialNS;
|
||||
constructor(service: ServiceClient);
|
||||
}
|
||||
export declare class AdxNS {
|
||||
_service: ServiceClient;
|
||||
constructor(service: ServiceClient);
|
||||
createAccount(params: TodoAdxCreateAccount.QueryParams, data?: TodoAdxCreateAccount.InputSchema, opts?: TodoAdxCreateAccount.CallOptions): Promise<TodoAdxCreateAccount.Response>;
|
||||
createSession(params: TodoAdxCreateSession.QueryParams, data?: TodoAdxCreateSession.InputSchema, opts?: TodoAdxCreateSession.CallOptions): Promise<TodoAdxCreateSession.Response>;
|
||||
deleteAccount(params: TodoAdxDeleteAccount.QueryParams, data?: TodoAdxDeleteAccount.InputSchema, opts?: TodoAdxDeleteAccount.CallOptions): Promise<TodoAdxDeleteAccount.Response>;
|
||||
deleteSession(params: TodoAdxDeleteSession.QueryParams, data?: TodoAdxDeleteSession.InputSchema, opts?: TodoAdxDeleteSession.CallOptions): Promise<TodoAdxDeleteSession.Response>;
|
||||
getAccount(params: TodoAdxGetAccount.QueryParams, data?: TodoAdxGetAccount.InputSchema, opts?: TodoAdxGetAccount.CallOptions): Promise<TodoAdxGetAccount.Response>;
|
||||
getSession(params: TodoAdxGetSession.QueryParams, data?: TodoAdxGetSession.InputSchema, opts?: TodoAdxGetSession.CallOptions): Promise<TodoAdxGetSession.Response>;
|
||||
repoBatchWrite(params: TodoAdxRepoBatchWrite.QueryParams, data?: TodoAdxRepoBatchWrite.InputSchema, opts?: TodoAdxRepoBatchWrite.CallOptions): Promise<TodoAdxRepoBatchWrite.Response>;
|
||||
repoCreateRecord(params: TodoAdxRepoCreateRecord.QueryParams, data?: TodoAdxRepoCreateRecord.InputSchema, opts?: TodoAdxRepoCreateRecord.CallOptions): Promise<TodoAdxRepoCreateRecord.Response>;
|
||||
repoDeleteRecord(params: TodoAdxRepoDeleteRecord.QueryParams, data?: TodoAdxRepoDeleteRecord.InputSchema, opts?: TodoAdxRepoDeleteRecord.CallOptions): Promise<TodoAdxRepoDeleteRecord.Response>;
|
||||
repoDescribe(params: TodoAdxRepoDescribe.QueryParams, data?: TodoAdxRepoDescribe.InputSchema, opts?: TodoAdxRepoDescribe.CallOptions): Promise<TodoAdxRepoDescribe.Response>;
|
||||
repoGetRecord(params: TodoAdxRepoGetRecord.QueryParams, data?: TodoAdxRepoGetRecord.InputSchema, opts?: TodoAdxRepoGetRecord.CallOptions): Promise<TodoAdxRepoGetRecord.Response>;
|
||||
repoListRecords(params: TodoAdxRepoListRecords.QueryParams, data?: TodoAdxRepoListRecords.InputSchema, opts?: TodoAdxRepoListRecords.CallOptions): Promise<TodoAdxRepoListRecords.Response>;
|
||||
repoPutRecord(params: TodoAdxRepoPutRecord.QueryParams, data?: TodoAdxRepoPutRecord.InputSchema, opts?: TodoAdxRepoPutRecord.CallOptions): Promise<TodoAdxRepoPutRecord.Response>;
|
||||
resolveName(params: TodoAdxResolveName.QueryParams, data?: TodoAdxResolveName.InputSchema, opts?: TodoAdxResolveName.CallOptions): Promise<TodoAdxResolveName.Response>;
|
||||
syncGetRepo(params: TodoAdxSyncGetRepo.QueryParams, data?: TodoAdxSyncGetRepo.InputSchema, opts?: TodoAdxSyncGetRepo.CallOptions): Promise<TodoAdxSyncGetRepo.Response>;
|
||||
syncGetRoot(params: TodoAdxSyncGetRoot.QueryParams, data?: TodoAdxSyncGetRoot.InputSchema, opts?: TodoAdxSyncGetRoot.CallOptions): Promise<TodoAdxSyncGetRoot.Response>;
|
||||
syncUpdateRepo(params: TodoAdxSyncUpdateRepo.QueryParams, data?: TodoAdxSyncUpdateRepo.InputSchema, opts?: TodoAdxSyncUpdateRepo.CallOptions): Promise<TodoAdxSyncUpdateRepo.Response>;
|
||||
}
|
||||
export declare class SocialNS {
|
||||
_service: ServiceClient;
|
||||
badge: BadgeRecord;
|
||||
follow: FollowRecord;
|
||||
like: LikeRecord;
|
||||
mediaEmbed: MediaEmbedRecord;
|
||||
post: PostRecord;
|
||||
profile: ProfileRecord;
|
||||
repost: RepostRecord;
|
||||
constructor(service: ServiceClient);
|
||||
getFeed(params: TodoSocialGetFeed.QueryParams, data?: TodoSocialGetFeed.InputSchema, opts?: TodoSocialGetFeed.CallOptions): Promise<TodoSocialGetFeed.Response>;
|
||||
getLikedBy(params: TodoSocialGetLikedBy.QueryParams, data?: TodoSocialGetLikedBy.InputSchema, opts?: TodoSocialGetLikedBy.CallOptions): Promise<TodoSocialGetLikedBy.Response>;
|
||||
getNotifications(params: TodoSocialGetNotifications.QueryParams, data?: TodoSocialGetNotifications.InputSchema, opts?: TodoSocialGetNotifications.CallOptions): Promise<TodoSocialGetNotifications.Response>;
|
||||
getPostThread(params: TodoSocialGetPostThread.QueryParams, data?: TodoSocialGetPostThread.InputSchema, opts?: TodoSocialGetPostThread.CallOptions): Promise<TodoSocialGetPostThread.Response>;
|
||||
getProfile(params: TodoSocialGetProfile.QueryParams, data?: TodoSocialGetProfile.InputSchema, opts?: TodoSocialGetProfile.CallOptions): Promise<TodoSocialGetProfile.Response>;
|
||||
getRepostedBy(params: TodoSocialGetRepostedBy.QueryParams, data?: TodoSocialGetRepostedBy.InputSchema, opts?: TodoSocialGetRepostedBy.CallOptions): Promise<TodoSocialGetRepostedBy.Response>;
|
||||
getUserFollowers(params: TodoSocialGetUserFollowers.QueryParams, data?: TodoSocialGetUserFollowers.InputSchema, opts?: TodoSocialGetUserFollowers.CallOptions): Promise<TodoSocialGetUserFollowers.Response>;
|
||||
getUserFollows(params: TodoSocialGetUserFollows.QueryParams, data?: TodoSocialGetUserFollows.InputSchema, opts?: TodoSocialGetUserFollows.CallOptions): Promise<TodoSocialGetUserFollows.Response>;
|
||||
}
|
||||
export declare class BadgeRecord {
|
||||
_service: ServiceClient;
|
||||
constructor(service: ServiceClient);
|
||||
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
|
||||
records: {
|
||||
uri: string;
|
||||
value: TodoSocialBadge.Record;
|
||||
}[];
|
||||
}>;
|
||||
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
|
||||
uri: string;
|
||||
value: TodoSocialBadge.Record;
|
||||
}>;
|
||||
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialBadge.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialBadge.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>): Promise<void>;
|
||||
}
|
||||
export declare class FollowRecord {
|
||||
_service: ServiceClient;
|
||||
constructor(service: ServiceClient);
|
||||
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
|
||||
records: {
|
||||
uri: string;
|
||||
value: TodoSocialFollow.Record;
|
||||
}[];
|
||||
}>;
|
||||
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
|
||||
uri: string;
|
||||
value: TodoSocialFollow.Record;
|
||||
}>;
|
||||
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialFollow.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialFollow.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>): Promise<void>;
|
||||
}
|
||||
export declare class LikeRecord {
|
||||
_service: ServiceClient;
|
||||
constructor(service: ServiceClient);
|
||||
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
|
||||
records: {
|
||||
uri: string;
|
||||
value: TodoSocialLike.Record;
|
||||
}[];
|
||||
}>;
|
||||
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
|
||||
uri: string;
|
||||
value: TodoSocialLike.Record;
|
||||
}>;
|
||||
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialLike.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialLike.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>): Promise<void>;
|
||||
}
|
||||
export declare class MediaEmbedRecord {
|
||||
_service: ServiceClient;
|
||||
constructor(service: ServiceClient);
|
||||
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
|
||||
records: {
|
||||
uri: string;
|
||||
value: TodoSocialMediaEmbed.Record;
|
||||
}[];
|
||||
}>;
|
||||
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
|
||||
uri: string;
|
||||
value: TodoSocialMediaEmbed.Record;
|
||||
}>;
|
||||
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialMediaEmbed.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialMediaEmbed.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>): Promise<void>;
|
||||
}
|
||||
export declare class PostRecord {
|
||||
_service: ServiceClient;
|
||||
constructor(service: ServiceClient);
|
||||
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
|
||||
records: {
|
||||
uri: string;
|
||||
value: TodoSocialPost.Record;
|
||||
}[];
|
||||
}>;
|
||||
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
|
||||
uri: string;
|
||||
value: TodoSocialPost.Record;
|
||||
}>;
|
||||
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialPost.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialPost.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>): Promise<void>;
|
||||
}
|
||||
export declare class ProfileRecord {
|
||||
_service: ServiceClient;
|
||||
constructor(service: ServiceClient);
|
||||
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
|
||||
records: {
|
||||
uri: string;
|
||||
value: TodoSocialProfile.Record;
|
||||
}[];
|
||||
}>;
|
||||
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
|
||||
uri: string;
|
||||
value: TodoSocialProfile.Record;
|
||||
}>;
|
||||
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialProfile.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialProfile.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>): Promise<void>;
|
||||
}
|
||||
export declare class RepostRecord {
|
||||
_service: ServiceClient;
|
||||
constructor(service: ServiceClient);
|
||||
list(params: Omit<TodoAdxRepoListRecords.QueryParams, 'type'>): Promise<{
|
||||
records: {
|
||||
uri: string;
|
||||
value: TodoSocialRepost.Record;
|
||||
}[];
|
||||
}>;
|
||||
get(params: Omit<TodoAdxRepoGetRecord.QueryParams, 'type'>): Promise<{
|
||||
uri: string;
|
||||
value: TodoSocialRepost.Record;
|
||||
}>;
|
||||
create(params: Omit<TodoAdxRepoCreateRecord.QueryParams, 'type'>, record: TodoSocialRepost.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
put(params: Omit<TodoAdxRepoPutRecord.QueryParams, 'type'>, record: TodoSocialRepost.Record): Promise<{
|
||||
uri: string;
|
||||
}>;
|
||||
delete(params: Omit<TodoAdxRepoDeleteRecord.QueryParams, 'type'>): Promise<void>;
|
||||
}
|
3
src/third-party/api/src/schemas.d.ts
vendored
Normal file
3
src/third-party/api/src/schemas.d.ts
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
import { MethodSchema, RecordSchema } from '@adxp/lexicon';
|
||||
export declare const methodSchemas: MethodSchema[];
|
||||
export declare const recordSchemas: RecordSchema[];
|
28
src/third-party/api/src/types.d.ts
vendored
Normal file
28
src/third-party/api/src/types.d.ts
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
import { AdxRecordValidator, AdxRecordValidatorDescription } from '@adxp/schemas';
|
||||
import { GetRecordResponse } from './http-types.js';
|
||||
export declare type SchemaOpt = string | string[] | AdxRecordValidator | AdxRecordValidatorDescription | '*';
|
||||
export interface AdxClientOpts {
|
||||
pds?: string;
|
||||
locale?: string;
|
||||
schemas?: any[];
|
||||
}
|
||||
export interface RegisterRepoParams {
|
||||
did: string;
|
||||
username: string;
|
||||
}
|
||||
export interface GetRecordResponseValidated extends GetRecordResponse {
|
||||
valid?: boolean;
|
||||
fullySupported?: boolean;
|
||||
compatible?: boolean;
|
||||
error?: string | undefined;
|
||||
fallbacks?: string[] | undefined;
|
||||
}
|
||||
export interface ListRecordsResponseValidated {
|
||||
records: GetRecordResponseValidated[];
|
||||
}
|
||||
export interface BatchWrite {
|
||||
action: 'create' | 'put' | 'del';
|
||||
collection: string;
|
||||
key?: string;
|
||||
value?: any;
|
||||
}
|
17
src/third-party/api/src/types/todo.adx.createAccount.d.ts
vendored
Normal file
17
src/third-party/api/src/types/todo.adx.createAccount.d.ts
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: 'application/json';
|
||||
data: InputSchema;
|
||||
}
|
||||
export interface InputSchema {
|
||||
username: string;
|
||||
did: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
}
|
20
src/third-party/api/src/types/todo.adx.createSession.d.ts
vendored
Normal file
20
src/third-party/api/src/types/todo.adx.createSession.d.ts
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: '';
|
||||
data: InputSchema;
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
20
src/third-party/api/src/types/todo.adx.deleteAccount.d.ts
vendored
Normal file
20
src/third-party/api/src/types/todo.adx.deleteAccount.d.ts
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: '';
|
||||
data: InputSchema;
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
20
src/third-party/api/src/types/todo.adx.deleteSession.d.ts
vendored
Normal file
20
src/third-party/api/src/types/todo.adx.deleteSession.d.ts
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: '';
|
||||
data: InputSchema;
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
20
src/third-party/api/src/types/todo.adx.getAccount.d.ts
vendored
Normal file
20
src/third-party/api/src/types/todo.adx.getAccount.d.ts
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: '';
|
||||
data: InputSchema;
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
20
src/third-party/api/src/types/todo.adx.getSession.d.ts
vendored
Normal file
20
src/third-party/api/src/types/todo.adx.getSession.d.ts
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: '';
|
||||
data: InputSchema;
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
35
src/third-party/api/src/types/todo.adx.repoBatchWrite.d.ts
vendored
Normal file
35
src/third-party/api/src/types/todo.adx.repoBatchWrite.d.ts
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
validate?: boolean;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: 'application/json';
|
||||
data: InputSchema;
|
||||
}
|
||||
export interface InputSchema {
|
||||
writes: ({
|
||||
action: 'create';
|
||||
collection: string;
|
||||
value: unknown;
|
||||
} | {
|
||||
action: 'update';
|
||||
collection: string;
|
||||
tid: string;
|
||||
value: unknown;
|
||||
} | {
|
||||
action: 'delete';
|
||||
collection: string;
|
||||
tid: string;
|
||||
})[];
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
23
src/third-party/api/src/types/todo.adx.repoCreateRecord.d.ts
vendored
Normal file
23
src/third-party/api/src/types/todo.adx.repoCreateRecord.d.ts
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
type: string;
|
||||
validate?: boolean;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: 'application/json';
|
||||
data: InputSchema;
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
14
src/third-party/api/src/types/todo.adx.repoDeleteRecord.d.ts
vendored
Normal file
14
src/third-party/api/src/types/todo.adx.repoDeleteRecord.d.ts
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
type: string;
|
||||
tid: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
}
|
20
src/third-party/api/src/types/todo.adx.repoDescribe.d.ts
vendored
Normal file
20
src/third-party/api/src/types/todo.adx.repoDescribe.d.ts
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
nameOrDid: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
name: string;
|
||||
did: string;
|
||||
didDoc: {};
|
||||
collections: string[];
|
||||
nameIsCorrect: boolean;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
19
src/third-party/api/src/types/todo.adx.repoGetRecord.d.ts
vendored
Normal file
19
src/third-party/api/src/types/todo.adx.repoGetRecord.d.ts
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
nameOrDid: string;
|
||||
type: string;
|
||||
tid: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
value: {};
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
24
src/third-party/api/src/types/todo.adx.repoListRecords.d.ts
vendored
Normal file
24
src/third-party/api/src/types/todo.adx.repoListRecords.d.ts
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
nameOrDid: string;
|
||||
type: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
after?: string;
|
||||
reverse?: boolean;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
records: {
|
||||
uri: string;
|
||||
value: {};
|
||||
}[];
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
24
src/third-party/api/src/types/todo.adx.repoPutRecord.d.ts
vendored
Normal file
24
src/third-party/api/src/types/todo.adx.repoPutRecord.d.ts
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
type: string;
|
||||
tid: string;
|
||||
validate?: boolean;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: 'application/json';
|
||||
data: InputSchema;
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
16
src/third-party/api/src/types/todo.adx.resolveName.d.ts
vendored
Normal file
16
src/third-party/api/src/types/todo.adx.resolveName.d.ts
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
name: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
did: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
14
src/third-party/api/src/types/todo.adx.syncGetRepo.d.ts
vendored
Normal file
14
src/third-party/api/src/types/todo.adx.syncGetRepo.d.ts
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
from?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: Uint8Array;
|
||||
}
|
16
src/third-party/api/src/types/todo.adx.syncGetRoot.d.ts
vendored
Normal file
16
src/third-party/api/src/types/todo.adx.syncGetRoot.d.ts
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
root: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
14
src/third-party/api/src/types/todo.adx.syncUpdateRepo.d.ts
vendored
Normal file
14
src/third-party/api/src/types/todo.adx.syncUpdateRepo.d.ts
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: 'application/cbor';
|
||||
data: Uint8Array;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
}
|
16
src/third-party/api/src/types/todo/adx/createAccount.d.ts
vendored
Normal file
16
src/third-party/api/src/types/todo/adx/createAccount.d.ts
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
username: string;
|
||||
did: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
}
|
19
src/third-party/api/src/types/todo/adx/createSession.d.ts
vendored
Normal file
19
src/third-party/api/src/types/todo/adx/createSession.d.ts
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: '';
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
19
src/third-party/api/src/types/todo/adx/deleteAccount.d.ts
vendored
Normal file
19
src/third-party/api/src/types/todo/adx/deleteAccount.d.ts
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: '';
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
19
src/third-party/api/src/types/todo/adx/deleteSession.d.ts
vendored
Normal file
19
src/third-party/api/src/types/todo/adx/deleteSession.d.ts
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: '';
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
19
src/third-party/api/src/types/todo/adx/getAccount.d.ts
vendored
Normal file
19
src/third-party/api/src/types/todo/adx/getAccount.d.ts
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: '';
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
19
src/third-party/api/src/types/todo/adx/getSession.d.ts
vendored
Normal file
19
src/third-party/api/src/types/todo/adx/getSession.d.ts
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: '';
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
34
src/third-party/api/src/types/todo/adx/repoBatchWrite.d.ts
vendored
Normal file
34
src/third-party/api/src/types/todo/adx/repoBatchWrite.d.ts
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
validate?: boolean;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
writes: ({
|
||||
action: 'create';
|
||||
collection: string;
|
||||
value: unknown;
|
||||
} | {
|
||||
action: 'update';
|
||||
collection: string;
|
||||
tid: string;
|
||||
value: unknown;
|
||||
} | {
|
||||
action: 'delete';
|
||||
collection: string;
|
||||
tid: string;
|
||||
})[];
|
||||
}
|
||||
export interface OutputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
22
src/third-party/api/src/types/todo/adx/repoCreateRecord.d.ts
vendored
Normal file
22
src/third-party/api/src/types/todo/adx/repoCreateRecord.d.ts
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
type: string;
|
||||
validate?: boolean;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
15
src/third-party/api/src/types/todo/adx/repoDeleteRecord.d.ts
vendored
Normal file
15
src/third-party/api/src/types/todo/adx/repoDeleteRecord.d.ts
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
type: string;
|
||||
tid: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
}
|
21
src/third-party/api/src/types/todo/adx/repoDescribe.d.ts
vendored
Normal file
21
src/third-party/api/src/types/todo/adx/repoDescribe.d.ts
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
nameOrDid: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
name: string;
|
||||
did: string;
|
||||
didDoc: {};
|
||||
collections: string[];
|
||||
nameIsCorrect: boolean;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
20
src/third-party/api/src/types/todo/adx/repoGetRecord.d.ts
vendored
Normal file
20
src/third-party/api/src/types/todo/adx/repoGetRecord.d.ts
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
nameOrDid: string;
|
||||
type: string;
|
||||
tid: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
value: {};
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
25
src/third-party/api/src/types/todo/adx/repoListRecords.d.ts
vendored
Normal file
25
src/third-party/api/src/types/todo/adx/repoListRecords.d.ts
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
nameOrDid: string;
|
||||
type: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
after?: string;
|
||||
reverse?: boolean;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
records: {
|
||||
uri: string;
|
||||
value: {};
|
||||
}[];
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
23
src/third-party/api/src/types/todo/adx/repoPutRecord.d.ts
vendored
Normal file
23
src/third-party/api/src/types/todo/adx/repoPutRecord.d.ts
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
type: string;
|
||||
tid: string;
|
||||
validate?: boolean;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: 'application/json';
|
||||
}
|
||||
export interface InputSchema {
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
17
src/third-party/api/src/types/todo/adx/resolveName.d.ts
vendored
Normal file
17
src/third-party/api/src/types/todo/adx/resolveName.d.ts
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
name?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
did: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
15
src/third-party/api/src/types/todo/adx/syncGetRepo.d.ts
vendored
Normal file
15
src/third-party/api/src/types/todo/adx/syncGetRepo.d.ts
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
from?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: Uint8Array;
|
||||
}
|
17
src/third-party/api/src/types/todo/adx/syncGetRoot.d.ts
vendored
Normal file
17
src/third-party/api/src/types/todo/adx/syncGetRoot.d.ts
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
root: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
14
src/third-party/api/src/types/todo/adx/syncUpdateRepo.d.ts
vendored
Normal file
14
src/third-party/api/src/types/todo/adx/syncUpdateRepo.d.ts
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
did: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
encoding: 'application/cbor';
|
||||
}
|
||||
export declare type InputSchema = string | Uint8Array;
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
}
|
23
src/third-party/api/src/types/todo/social/badge.d.ts
vendored
Normal file
23
src/third-party/api/src/types/todo/social/badge.d.ts
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
export interface Record {
|
||||
assertion: InviteAssertion | EmployeeAssertion | TagAssertion | UnknownAssertion;
|
||||
subject: string;
|
||||
createdAt: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface InviteAssertion {
|
||||
type: 'invite';
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface EmployeeAssertion {
|
||||
type: 'employee';
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface TagAssertion {
|
||||
type: 'tag';
|
||||
tag: string;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface UnknownAssertion {
|
||||
type: string;
|
||||
[k: string]: unknown;
|
||||
}
|
5
src/third-party/api/src/types/todo/social/follow.d.ts
vendored
Normal file
5
src/third-party/api/src/types/todo/social/follow.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export interface Record {
|
||||
subject: string;
|
||||
createdAt: string;
|
||||
[k: string]: unknown;
|
||||
}
|
54
src/third-party/api/src/types/todo/social/getFeed.d.ts
vendored
Normal file
54
src/third-party/api/src/types/todo/social/getFeed.d.ts
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
author?: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
feed: FeedItem[];
|
||||
}
|
||||
export interface FeedItem {
|
||||
uri: string;
|
||||
author: User;
|
||||
repostedBy?: User;
|
||||
record: {};
|
||||
embed?: RecordEmbed | ExternalEmbed | UnknownEmbed;
|
||||
replyCount: number;
|
||||
repostCount: number;
|
||||
likeCount: number;
|
||||
indexedAt: string;
|
||||
myState?: {
|
||||
repost?: string;
|
||||
like?: string;
|
||||
};
|
||||
}
|
||||
export interface User {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
}
|
||||
export interface RecordEmbed {
|
||||
type: 'record';
|
||||
author: User;
|
||||
record: {};
|
||||
}
|
||||
export interface ExternalEmbed {
|
||||
type: 'external';
|
||||
uri: string;
|
||||
title: string;
|
||||
description: string;
|
||||
imageUri: string;
|
||||
}
|
||||
export interface UnknownEmbed {
|
||||
type: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
15
src/third-party/api/src/types/todo/social/getFeedView.d.ts
vendored
Normal file
15
src/third-party/api/src/types/todo/social/getFeedView.d.ts
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
author?: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: Uint8Array;
|
||||
}
|
26
src/third-party/api/src/types/todo/social/getLikedBy.d.ts
vendored
Normal file
26
src/third-party/api/src/types/todo/social/getLikedBy.d.ts
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
uri: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
likedBy: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
createdAt?: string;
|
||||
indexedAt: string;
|
||||
}[];
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
25
src/third-party/api/src/types/todo/social/getLikedByView.d.ts
vendored
Normal file
25
src/third-party/api/src/types/todo/social/getLikedByView.d.ts
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
uri: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
likedBy: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
createdAt?: string;
|
||||
indexedAt: string;
|
||||
}[];
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
29
src/third-party/api/src/types/todo/social/getNotifications.d.ts
vendored
Normal file
29
src/third-party/api/src/types/todo/social/getNotifications.d.ts
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
notifications: Notification[];
|
||||
}
|
||||
export interface Notification {
|
||||
uri: string;
|
||||
author: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName: string;
|
||||
};
|
||||
record: {};
|
||||
isRead: boolean;
|
||||
indexedAt: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
28
src/third-party/api/src/types/todo/social/getNotificationsView.d.ts
vendored
Normal file
28
src/third-party/api/src/types/todo/social/getNotificationsView.d.ts
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
notifications: Notification[];
|
||||
}
|
||||
export interface Notification {
|
||||
uri: string;
|
||||
author: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName: string;
|
||||
};
|
||||
record: {};
|
||||
isRead: boolean;
|
||||
indexedAt: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
54
src/third-party/api/src/types/todo/social/getPostThread.d.ts
vendored
Normal file
54
src/third-party/api/src/types/todo/social/getPostThread.d.ts
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
uri: string;
|
||||
depth?: number;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
thread: Post;
|
||||
}
|
||||
export interface Post {
|
||||
uri: string;
|
||||
author: User;
|
||||
record: {};
|
||||
embed?: RecordEmbed | ExternalEmbed | UnknownEmbed;
|
||||
parent?: Post;
|
||||
replyCount: number;
|
||||
replies?: Post[];
|
||||
likeCount: number;
|
||||
repostCount: number;
|
||||
indexedAt: string;
|
||||
myState?: {
|
||||
repost?: string;
|
||||
like?: string;
|
||||
};
|
||||
}
|
||||
export interface User {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
}
|
||||
export interface RecordEmbed {
|
||||
type: 'record';
|
||||
author: User;
|
||||
record: {};
|
||||
}
|
||||
export interface ExternalEmbed {
|
||||
type: 'external';
|
||||
uri: string;
|
||||
title: string;
|
||||
description: string;
|
||||
imageUri: string;
|
||||
}
|
||||
export interface UnknownEmbed {
|
||||
type: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
53
src/third-party/api/src/types/todo/social/getPostThreadView.d.ts
vendored
Normal file
53
src/third-party/api/src/types/todo/social/getPostThreadView.d.ts
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
uri: string;
|
||||
depth?: number;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
thread: Post;
|
||||
}
|
||||
export interface Post {
|
||||
uri: string;
|
||||
author: User;
|
||||
record: {};
|
||||
embed?: RecordEmbed | ExternalEmbed | UnknownEmbed;
|
||||
parent?: Post;
|
||||
replyCount: number;
|
||||
replies?: Post[];
|
||||
likeCount: number;
|
||||
repostCount: number;
|
||||
indexedAt: string;
|
||||
myState?: {
|
||||
repost?: string;
|
||||
like?: string;
|
||||
};
|
||||
}
|
||||
export interface User {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
}
|
||||
export interface RecordEmbed {
|
||||
type: 'record';
|
||||
author: User;
|
||||
record: {};
|
||||
}
|
||||
export interface ExternalEmbed {
|
||||
type: 'external';
|
||||
uri: string;
|
||||
title: string;
|
||||
description: string;
|
||||
imageUri: string;
|
||||
}
|
||||
export interface UnknownEmbed {
|
||||
type: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
40
src/third-party/api/src/types/todo/social/getProfile.d.ts
vendored
Normal file
40
src/third-party/api/src/types/todo/social/getProfile.d.ts
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
user: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
description?: string;
|
||||
followersCount: number;
|
||||
followsCount: number;
|
||||
postsCount: number;
|
||||
badges: Badge[];
|
||||
myState?: {
|
||||
follow?: string;
|
||||
};
|
||||
}
|
||||
export interface Badge {
|
||||
uri: string;
|
||||
error?: string;
|
||||
issuer?: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName: string;
|
||||
};
|
||||
assertion?: {
|
||||
type: string;
|
||||
};
|
||||
createdAt?: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
39
src/third-party/api/src/types/todo/social/getProfileView.d.ts
vendored
Normal file
39
src/third-party/api/src/types/todo/social/getProfileView.d.ts
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
user: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
description?: string;
|
||||
followersCount: number;
|
||||
followsCount: number;
|
||||
postsCount: number;
|
||||
badges: Badge[];
|
||||
myState?: {
|
||||
follow?: string;
|
||||
};
|
||||
}
|
||||
export interface Badge {
|
||||
uri: string;
|
||||
error?: string;
|
||||
issuer?: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName: string;
|
||||
};
|
||||
assertion?: {
|
||||
type: string;
|
||||
};
|
||||
createdAt?: string;
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
26
src/third-party/api/src/types/todo/social/getRepostedBy.d.ts
vendored
Normal file
26
src/third-party/api/src/types/todo/social/getRepostedBy.d.ts
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
uri: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
repostedBy: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
createdAt?: string;
|
||||
indexedAt: string;
|
||||
}[];
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
25
src/third-party/api/src/types/todo/social/getRepostedByView.d.ts
vendored
Normal file
25
src/third-party/api/src/types/todo/social/getRepostedByView.d.ts
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
uri: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
uri: string;
|
||||
repostedBy: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
createdAt?: string;
|
||||
indexedAt: string;
|
||||
}[];
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
30
src/third-party/api/src/types/todo/social/getUserFollowers.d.ts
vendored
Normal file
30
src/third-party/api/src/types/todo/social/getUserFollowers.d.ts
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
user: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
subject: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
};
|
||||
followers: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
createdAt?: string;
|
||||
indexedAt: string;
|
||||
}[];
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
29
src/third-party/api/src/types/todo/social/getUserFollowersView.d.ts
vendored
Normal file
29
src/third-party/api/src/types/todo/social/getUserFollowersView.d.ts
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
user: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
subject: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
};
|
||||
followers: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
createdAt?: string;
|
||||
indexedAt: string;
|
||||
}[];
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
30
src/third-party/api/src/types/todo/social/getUserFollows.d.ts
vendored
Normal file
30
src/third-party/api/src/types/todo/social/getUserFollows.d.ts
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
user: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export declare type InputSchema = undefined;
|
||||
export interface OutputSchema {
|
||||
subject: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
};
|
||||
follows: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
createdAt?: string;
|
||||
indexedAt: string;
|
||||
}[];
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
29
src/third-party/api/src/types/todo/social/getUserFollowsView.d.ts
vendored
Normal file
29
src/third-party/api/src/types/todo/social/getUserFollowsView.d.ts
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { Headers } from '@adxp/xrpc';
|
||||
export interface QueryParams {
|
||||
user: string;
|
||||
limit?: number;
|
||||
before?: string;
|
||||
}
|
||||
export interface CallOptions {
|
||||
headers?: Headers;
|
||||
}
|
||||
export interface OutputSchema {
|
||||
subject: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
};
|
||||
follows: {
|
||||
did: string;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
createdAt?: string;
|
||||
indexedAt: string;
|
||||
}[];
|
||||
}
|
||||
export interface Response {
|
||||
success: boolean;
|
||||
error: boolean;
|
||||
headers: Headers;
|
||||
data: OutputSchema;
|
||||
}
|
5
src/third-party/api/src/types/todo/social/like.d.ts
vendored
Normal file
5
src/third-party/api/src/types/todo/social/like.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export interface Record {
|
||||
subject: string;
|
||||
createdAt: string;
|
||||
[k: string]: unknown;
|
||||
}
|
15
src/third-party/api/src/types/todo/social/mediaEmbed.d.ts
vendored
Normal file
15
src/third-party/api/src/types/todo/social/mediaEmbed.d.ts
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
export interface Record {
|
||||
media: MediaEmbed[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface MediaEmbed {
|
||||
alt?: string;
|
||||
thumb?: MediaEmbedBlob;
|
||||
original: MediaEmbedBlob;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface MediaEmbedBlob {
|
||||
mimeType: string;
|
||||
blobId: string;
|
||||
[k: string]: unknown;
|
||||
}
|
18
src/third-party/api/src/types/todo/social/post.d.ts
vendored
Normal file
18
src/third-party/api/src/types/todo/social/post.d.ts
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
export declare type TextSlice = [number, number];
|
||||
export declare type Entity = {
|
||||
index: TextSlice;
|
||||
type: string;
|
||||
value: string;
|
||||
[k: string]: unknown;
|
||||
}[];
|
||||
export interface Record {
|
||||
text: string;
|
||||
entities?: Entity;
|
||||
reply?: {
|
||||
root: string;
|
||||
parent?: string;
|
||||
[k: string]: unknown;
|
||||
};
|
||||
createdAt: string;
|
||||
[k: string]: unknown;
|
||||
}
|
10
src/third-party/api/src/types/todo/social/profile.d.ts
vendored
Normal file
10
src/third-party/api/src/types/todo/social/profile.d.ts
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
export interface Record {
|
||||
displayName: string;
|
||||
description?: string;
|
||||
badges?: BadgeRef[];
|
||||
[k: string]: unknown;
|
||||
}
|
||||
export interface BadgeRef {
|
||||
uri: string;
|
||||
[k: string]: unknown;
|
||||
}
|
5
src/third-party/api/src/types/todo/social/repost.d.ts
vendored
Normal file
5
src/third-party/api/src/types/todo/social/repost.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export interface Record {
|
||||
subject: string;
|
||||
createdAt: string;
|
||||
[k: string]: unknown;
|
||||
}
|
1
src/third-party/api/tsconfig.build.tsbuildinfo
vendored
Normal file
1
src/third-party/api/tsconfig.build.tsbuildinfo
vendored
Normal file
File diff suppressed because one or more lines are too long
136
src/third-party/uri/index.js
vendored
Normal file
136
src/third-party/uri/index.js
vendored
Normal file
|
@ -0,0 +1,136 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/index.ts
|
||||
var src_exports = {};
|
||||
__export(src_exports, {
|
||||
ADX_URI_REGEX: () => ADX_URI_REGEX,
|
||||
AdxUri: () => AdxUri
|
||||
});
|
||||
module.exports = __toCommonJS(src_exports);
|
||||
var ADX_URI_REGEX = /^(adx:\/\/)?((?:did:[a-z0-9:%-]+)|(?:[a-z][a-z0-9.:-]*))(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i;
|
||||
var RELATIVE_REGEX = /^(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i;
|
||||
var AdxUri = class {
|
||||
constructor(uri, base) {
|
||||
let parsed;
|
||||
if (base) {
|
||||
parsed = parse(base);
|
||||
if (!parsed) {
|
||||
throw new Error(`Invalid adx uri: ${base}`);
|
||||
}
|
||||
const relativep = parseRelative(uri);
|
||||
if (!relativep) {
|
||||
throw new Error(`Invalid path: ${uri}`);
|
||||
}
|
||||
Object.assign(parsed, relativep);
|
||||
} else {
|
||||
parsed = parse(uri);
|
||||
if (!parsed) {
|
||||
throw new Error(`Invalid adx uri: ${uri}`);
|
||||
}
|
||||
}
|
||||
this.hash = parsed.hash;
|
||||
this.host = parsed.host;
|
||||
this.pathname = parsed.pathname;
|
||||
this.searchParams = parsed.searchParams;
|
||||
}
|
||||
get protocol() {
|
||||
return "adx:";
|
||||
}
|
||||
get origin() {
|
||||
return `adx://${this.host}`;
|
||||
}
|
||||
get hostname() {
|
||||
return this.host;
|
||||
}
|
||||
set hostname(v) {
|
||||
this.host = v;
|
||||
}
|
||||
get search() {
|
||||
return this.searchParams.toString();
|
||||
}
|
||||
set search(v) {
|
||||
this.searchParams = new URLSearchParams(v);
|
||||
}
|
||||
get collection() {
|
||||
return this.pathname.split("/").filter(Boolean)[0] || "";
|
||||
}
|
||||
set collection(v) {
|
||||
const parts = this.pathname.split("/").filter(Boolean);
|
||||
parts[0] = v;
|
||||
this.pathname = parts.join("/");
|
||||
}
|
||||
get recordKey() {
|
||||
return this.pathname.split("/").filter(Boolean)[1] || "";
|
||||
}
|
||||
set recordKey(v) {
|
||||
const parts = this.pathname.split("/").filter(Boolean);
|
||||
if (!parts[0])
|
||||
parts[0] = "undefined";
|
||||
parts[1] = v;
|
||||
this.pathname = parts.join("/");
|
||||
}
|
||||
get href() {
|
||||
return this.toString();
|
||||
}
|
||||
toString() {
|
||||
let path = this.pathname || "/";
|
||||
if (!path.startsWith("/")) {
|
||||
path = `/${path}`;
|
||||
}
|
||||
let qs = this.searchParams.toString();
|
||||
if (qs && !qs.startsWith("?")) {
|
||||
qs = `?${qs}`;
|
||||
}
|
||||
let hash = this.hash;
|
||||
if (hash && !hash.startsWith("#")) {
|
||||
hash = `#${hash}`;
|
||||
}
|
||||
return `adx://${this.host}${path}${qs}${hash}`;
|
||||
}
|
||||
};
|
||||
function parse(str) {
|
||||
const match = ADX_URI_REGEX.exec(str);
|
||||
if (match) {
|
||||
return {
|
||||
hash: match[5] || "",
|
||||
host: match[2] || "",
|
||||
pathname: match[3] || "",
|
||||
searchParams: new URLSearchParams(match[4] || "")
|
||||
};
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
function parseRelative(str) {
|
||||
const match = RELATIVE_REGEX.exec(str);
|
||||
if (match) {
|
||||
return {
|
||||
hash: match[3] || "",
|
||||
pathname: match[1] || "",
|
||||
searchParams: new URLSearchParams(match[2] || "")
|
||||
};
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
ADX_URI_REGEX,
|
||||
AdxUri
|
||||
});
|
||||
//# sourceMappingURL=index.js.map
|
7
src/third-party/uri/index.js.map
vendored
Normal file
7
src/third-party/uri/index.js.map
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/index.ts"],
|
||||
"sourcesContent": ["export const ADX_URI_REGEX =\n // protocol- --did-------------- --name------------- --path---- --query-- --hash--\n /^(adx:\\/\\/)?((?:did:[a-z0-9:%-]+)|(?:[a-z][a-z0-9.:-]*))(\\/[^?#\\s]*)?(\\?[^#\\s]+)?(#[^\\s]+)?$/i\n// --path----- --query-- --hash--\nconst RELATIVE_REGEX = /^(\\/[^?#\\s]*)?(\\?[^#\\s]+)?(#[^\\s]+)?$/i\n\nexport class AdxUri {\n hash: string\n host: string\n pathname: string\n searchParams: URLSearchParams\n\n constructor(uri: string, base?: string) {\n let parsed\n if (base) {\n parsed = parse(base)\n if (!parsed) {\n throw new Error(`Invalid adx uri: ${base}`)\n }\n const relativep = parseRelative(uri)\n if (!relativep) {\n throw new Error(`Invalid path: ${uri}`)\n }\n Object.assign(parsed, relativep)\n } else {\n parsed = parse(uri)\n if (!parsed) {\n throw new Error(`Invalid adx uri: ${uri}`)\n }\n }\n\n this.hash = parsed.hash\n this.host = parsed.host\n this.pathname = parsed.pathname\n this.searchParams = parsed.searchParams\n }\n\n get protocol() {\n return 'adx:'\n }\n\n get origin() {\n return `adx://${this.host}`\n }\n\n get hostname() {\n return this.host\n }\n\n set hostname(v: string) {\n this.host = v\n }\n\n get search() {\n return this.searchParams.toString()\n }\n\n set search(v: string) {\n this.searchParams = new URLSearchParams(v)\n }\n\n get collection() {\n return this.pathname.split('/').filter(Boolean)[0] || ''\n }\n\n set collection(v: string) {\n const parts = this.pathname.split('/').filter(Boolean)\n parts[0] = v\n this.pathname = parts.join('/')\n }\n\n get recordKey() {\n return this.pathname.split('/').filter(Boolean)[1] || ''\n }\n\n set recordKey(v: string) {\n const parts = this.pathname.split('/').filter(Boolean)\n if (!parts[0]) parts[0] = 'undefined'\n parts[1] = v\n this.pathname = parts.join('/')\n }\n\n get href() {\n return this.toString()\n }\n\n toString() {\n let path = this.pathname || '/'\n if (!path.startsWith('/')) {\n path = `/${path}`\n }\n let qs = this.searchParams.toString()\n if (qs && !qs.startsWith('?')) {\n qs = `?${qs}`\n }\n let hash = this.hash\n if (hash && !hash.startsWith('#')) {\n hash = `#${hash}`\n }\n return `adx://${this.host}${path}${qs}${hash}`\n }\n}\n\nfunction parse(str: string) {\n const match = ADX_URI_REGEX.exec(str)\n if (match) {\n return {\n hash: match[5] || '',\n host: match[2] || '',\n pathname: match[3] || '',\n searchParams: new URLSearchParams(match[4] || ''),\n }\n }\n return undefined\n}\n\nfunction parseRelative(str: string) {\n const match = RELATIVE_REGEX.exec(str)\n if (match) {\n return {\n hash: match[3] || '',\n pathname: match[1] || '',\n searchParams: new URLSearchParams(match[2] || ''),\n }\n }\n return undefined\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,gBAEX;AAEF,IAAM,iBAAiB;AAEhB,IAAM,SAAN,MAAa;AAAA,EAMlB,YAAY,KAAa,MAAe;AACtC,QAAI;AACJ,QAAI,MAAM;AACR,eAAS,MAAM,IAAI;AACnB,UAAI,CAAC,QAAQ;AACX,cAAM,IAAI,MAAM,oBAAoB,MAAM;AAAA,MAC5C;AACA,YAAM,YAAY,cAAc,GAAG;AACnC,UAAI,CAAC,WAAW;AACd,cAAM,IAAI,MAAM,iBAAiB,KAAK;AAAA,MACxC;AACA,aAAO,OAAO,QAAQ,SAAS;AAAA,IACjC,OAAO;AACL,eAAS,MAAM,GAAG;AAClB,UAAI,CAAC,QAAQ;AACX,cAAM,IAAI,MAAM,oBAAoB,KAAK;AAAA,MAC3C;AAAA,IACF;AAEA,SAAK,OAAO,OAAO;AACnB,SAAK,OAAO,OAAO;AACnB,SAAK,WAAW,OAAO;AACvB,SAAK,eAAe,OAAO;AAAA,EAC7B;AAAA,EAEA,IAAI,WAAW;AACb,WAAO;AAAA,EACT;AAAA,EAEA,IAAI,SAAS;AACX,WAAO,SAAS,KAAK;AAAA,EACvB;AAAA,EAEA,IAAI,WAAW;AACb,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAI,SAAS,GAAW;AACtB,SAAK,OAAO;AAAA,EACd;AAAA,EAEA,IAAI,SAAS;AACX,WAAO,KAAK,aAAa,SAAS;AAAA,EACpC;AAAA,EAEA,IAAI,OAAO,GAAW;AACpB,SAAK,eAAe,IAAI,gBAAgB,CAAC;AAAA,EAC3C;AAAA,EAEA,IAAI,aAAa;AACf,WAAO,KAAK,SAAS,MAAM,GAAG,EAAE,OAAO,OAAO,EAAE,MAAM;AAAA,EACxD;AAAA,EAEA,IAAI,WAAW,GAAW;AACxB,UAAM,QAAQ,KAAK,SAAS,MAAM,GAAG,EAAE,OAAO,OAAO;AACrD,UAAM,KAAK;AACX,SAAK,WAAW,MAAM,KAAK,GAAG;AAAA,EAChC;AAAA,EAEA,IAAI,YAAY;AACd,WAAO,KAAK,SAAS,MAAM,GAAG,EAAE,OAAO,OAAO,EAAE,MAAM;AAAA,EACxD;AAAA,EAEA,IAAI,UAAU,GAAW;AACvB,UAAM,QAAQ,KAAK,SAAS,MAAM,GAAG,EAAE,OAAO,OAAO;AACrD,QAAI,CAAC,MAAM;AAAI,YAAM,KAAK;AAC1B,UAAM,KAAK;AACX,SAAK,WAAW,MAAM,KAAK,GAAG;AAAA,EAChC;AAAA,EAEA,IAAI,OAAO;AACT,WAAO,KAAK,SAAS;AAAA,EACvB;AAAA,EAEA,WAAW;AACT,QAAI,OAAO,KAAK,YAAY;AAC5B,QAAI,CAAC,KAAK,WAAW,GAAG,GAAG;AACzB,aAAO,IAAI;AAAA,IACb;AACA,QAAI,KAAK,KAAK,aAAa,SAAS;AACpC,QAAI,MAAM,CAAC,GAAG,WAAW,GAAG,GAAG;AAC7B,WAAK,IAAI;AAAA,IACX;AACA,QAAI,OAAO,KAAK;AAChB,QAAI,QAAQ,CAAC,KAAK,WAAW,GAAG,GAAG;AACjC,aAAO,IAAI;AAAA,IACb;AACA,WAAO,SAAS,KAAK,OAAO,OAAO,KAAK;AAAA,EAC1C;AACF;AAEA,SAAS,MAAM,KAAa;AAC1B,QAAM,QAAQ,cAAc,KAAK,GAAG;AACpC,MAAI,OAAO;AACT,WAAO;AAAA,MACL,MAAM,MAAM,MAAM;AAAA,MAClB,MAAM,MAAM,MAAM;AAAA,MAClB,UAAU,MAAM,MAAM;AAAA,MACtB,cAAc,IAAI,gBAAgB,MAAM,MAAM,EAAE;AAAA,IAClD;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,cAAc,KAAa;AAClC,QAAM,QAAQ,eAAe,KAAK,GAAG;AACrC,MAAI,OAAO;AACT,WAAO;AAAA,MACL,MAAM,MAAM,MAAM;AAAA,MAClB,UAAU,MAAM,MAAM;AAAA,MACtB,cAAc,IAAI,gBAAgB,MAAM,MAAM,EAAE;AAAA,IAClD;AAAA,EACF;AACA,SAAO;AACT;",
|
||||
"names": []
|
||||
}
|
20
src/third-party/uri/src/index.d.ts
vendored
Normal file
20
src/third-party/uri/src/index.d.ts
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
export declare const ADX_URI_REGEX: RegExp;
|
||||
export declare class AdxUri {
|
||||
hash: string;
|
||||
host: string;
|
||||
pathname: string;
|
||||
searchParams: URLSearchParams;
|
||||
constructor(uri: string, base?: string);
|
||||
get protocol(): string;
|
||||
get origin(): string;
|
||||
get hostname(): string;
|
||||
set hostname(v: string);
|
||||
get search(): string;
|
||||
set search(v: string);
|
||||
get collection(): string;
|
||||
set collection(v: string);
|
||||
get recordKey(): string;
|
||||
set recordKey(v: string);
|
||||
get href(): string;
|
||||
toString(): string;
|
||||
}
|
1
src/third-party/uri/tsconfig.build.tsbuildinfo
vendored
Normal file
1
src/third-party/uri/tsconfig.build.tsbuildinfo
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue