chore: monorepo
This commit is contained in:
155
packages/types/index.d.ts
vendored
Normal file
155
packages/types/index.d.ts
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
import {
|
||||
type NDKEvent,
|
||||
NDKRelayList,
|
||||
type NDKUserProfile,
|
||||
} from "@nostr-dev-kit/ndk";
|
||||
|
||||
export interface RichContent {
|
||||
parsed: string;
|
||||
images: string[];
|
||||
videos: string[];
|
||||
links: string[];
|
||||
notes: string[];
|
||||
}
|
||||
|
||||
export interface Account {
|
||||
id: string;
|
||||
pubkey: string;
|
||||
is_active: number;
|
||||
contacts: string[];
|
||||
relayList: NDKRelayList;
|
||||
}
|
||||
|
||||
export interface WidgetGroup {
|
||||
title: string;
|
||||
data: WidgetGroupItem[];
|
||||
}
|
||||
|
||||
export interface WidgetGroupItem {
|
||||
title: string;
|
||||
description: string;
|
||||
content: string;
|
||||
kind: number;
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
export interface WidgetProps {
|
||||
id?: string;
|
||||
account_id?: number;
|
||||
kind: number;
|
||||
title: string;
|
||||
content: string;
|
||||
}
|
||||
|
||||
export interface Chats {
|
||||
id: string;
|
||||
event_id?: string;
|
||||
receiver_pubkey: string;
|
||||
sender_pubkey: string;
|
||||
content: string;
|
||||
tags: string[][];
|
||||
created_at: number;
|
||||
new_messages?: number;
|
||||
}
|
||||
|
||||
export interface Relays {
|
||||
id?: string;
|
||||
account_id?: number;
|
||||
relay: string;
|
||||
purpose?: string;
|
||||
}
|
||||
|
||||
export interface Opengraph {
|
||||
url: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
image?: string;
|
||||
}
|
||||
|
||||
export interface NDKEventWithReplies extends NDKEvent {
|
||||
replies: Array<NDKEvent>;
|
||||
}
|
||||
|
||||
export interface NostrBuildResponse {
|
||||
ok: boolean;
|
||||
data?: {
|
||||
message: string;
|
||||
status: string;
|
||||
data: Array<{
|
||||
blurhash: string;
|
||||
dimensions: {
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
mime: string;
|
||||
name: string;
|
||||
sha256: string;
|
||||
size: number;
|
||||
url: string;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface Resource {
|
||||
id: string;
|
||||
title: string;
|
||||
image: string;
|
||||
}
|
||||
|
||||
export interface Resources {
|
||||
title: string;
|
||||
data: Array<Resource>;
|
||||
}
|
||||
|
||||
export interface NDKCacheUser {
|
||||
pubkey: string;
|
||||
profile: string | NDKUserProfile;
|
||||
createdAt: number;
|
||||
}
|
||||
|
||||
export interface NDKCacheUserProfile extends NDKUserProfile {
|
||||
pubkey: string;
|
||||
}
|
||||
|
||||
export interface NDKCacheEvent {
|
||||
id: string;
|
||||
pubkey: string;
|
||||
content: string;
|
||||
kind: number;
|
||||
createdAt: number;
|
||||
relay: string;
|
||||
event: string;
|
||||
}
|
||||
|
||||
export interface NDKCacheEventTag {
|
||||
id: string;
|
||||
eventId: string;
|
||||
tag: string;
|
||||
value: string;
|
||||
tagValue: string;
|
||||
}
|
||||
|
||||
export interface NIP11 {
|
||||
name: string;
|
||||
description: string;
|
||||
pubkey: string;
|
||||
contact: string;
|
||||
supported_nips: number[];
|
||||
software: string;
|
||||
version: string;
|
||||
limitation: {
|
||||
[key: string]: string | number | boolean;
|
||||
};
|
||||
relay_countries: string[];
|
||||
language_tags: string[];
|
||||
tags: string[];
|
||||
posting_policy: string;
|
||||
payments_url: string;
|
||||
icon: string[];
|
||||
}
|
||||
|
||||
export interface NIP05 {
|
||||
names: {
|
||||
[key: string]: string;
|
||||
};
|
||||
}
|
||||
16
packages/types/package.json
Normal file
16
packages/types/package.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "@lume/types",
|
||||
"version": "0.0.0",
|
||||
"types": "./index.d.ts",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nostr-dev-kit/ndk": "^2.3.1"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user