Developer
TypeScript Types
Drop-in types for all DummifAI API response shapes. Zero dependencies.
dummify.d.ts
// DummifAI API — TypeScript Types v1.5.0
// Updated: 2026-04-19
// ── Shared ────────────────────────────────────────────────
export interface ApiMeta {
version: string;
status: 'success';
timestamp: string;
count: number;
seed: string | null;
pagination: { limit: number; offset: number; total: number };
}
export interface ApiResponse<T> {
meta: ApiMeta;
data: T[];
}
// ── Stock ─────────────────────────────────────────────────
export interface StockQuote {
symbol: string;
name: string;
exchange: string;
price: number;
open: number;
high: number;
low: number;
previousClose: number;
change: number;
changePercent: number;
volume: number;
marketCap: number;
peRatio: number | null;
dividendYield: number | null;
week52High: number;
week52Low: number;
updatedAt: string;
}
// ── Crypto ────────────────────────────────────────────────
export interface CryptoAsset {
id: string;
symbol: string;
name: string;
price: number;
change24h: number;
changePercent24h: number;
volume24h: number;
marketCap: number;
circulatingSupply: number;
allTimeHigh: number;
rank: number;
updatedAt: string;
}
// ── Person ────────────────────────────────────────────────
export interface Person {
id: string;
firstName: string;
lastName: string;
fullName: string;
email: string;
phone: string;
age: number;
gender: string;
locale: string;
address: Address;
avatar: string;
createdAt: string;
}
// ── Address ───────────────────────────────────────────────
export interface Address {
id?: string;
street: string;
city: string;
state: string;
zip: string;
country: string;
countryCode: string;
formatted?: string;
}
// ── Company ───────────────────────────────────────────────
export interface Company {
id: string;
name: string;
domain: string;
industry: string;
size: string;
founded: number;
description: string;
address: Address;
}
// ── Product ───────────────────────────────────────────────
export interface Product {
id: string;
name: string;
sku: string;
category: string;
price: number;
currency: string;
inStock: boolean;
inventory: number;
description: string;
imageUrl: string;
}
// ── Job ───────────────────────────────────────────────────
export interface Job {
id: string;
title: string;
company: string;
location: string;
remote: boolean;
type: string;
level: string;
salary: { min: number; max: number; currency: string };
equity: string | null;
visaSponsorship: boolean;
description: string;
requirements: string[];
postedAt: string;
applyUrl: string;
}
// ── Weather ───────────────────────────────────────────────
export interface WeatherForecastDay {
day: string;
high: number;
low: number;
condition: string;
}
export interface WeatherData {
city: string;
country: string;
coordinates: { lat: number; lon: number };
current: {
condition: string;
tempC: number;
tempF: number;
feelsLikeC: number;
humidity: number;
windKph: number;
windDirection: string;
uvIndex: number;
visibilityKm: number;
pressureHpa: number;
dewPointC: number;
};
forecast: WeatherForecastDay[];
updatedAt: string;
}
// ── Order ─────────────────────────────────────────────────
export interface OrderItem {
productId: string;
name: string;
category: string;
sku: string;
quantity: number;
unitPrice: number;
total: number;
}
export interface Order {
id: string;
status: 'pending' | 'processing' | 'shipped' | 'delivered' | 'cancelled' | 'refunded';
customer: { id: string; email: string; name: string };
items: OrderItem[];
subtotal: number;
tax: number;
shipping: number;
total: number;
currency: string;
paymentMethod: string;
paymentStatus: string;
shippingAddress: Address;
tracking: { carrier: string; number: string; estimatedDelivery: string } | null;
createdAt: string;
updatedAt: string;
}
// ── Invoice ───────────────────────────────────────────────
export interface InvoiceLineItem {
description: string;
quantity: number;
unit: string;
unitPrice: number;
amount: number;
}
export interface Invoice {
id: string;
number: string;
status: 'draft' | 'sent' | 'paid' | 'overdue' | 'cancelled';
currency: string;
from: { name: string; email: string; address: string };
to: { name: string; email: string; address: string };
lineItems: InvoiceLineItem[];
subtotal: number;
taxRate: number;
tax: number;
total: number;
notes: string;
issuedAt: string;
dueDate: string;
paidAt: string | null;
}
// ── Social ────────────────────────────────────────────────
export interface SocialPost {
id: string;
platform: 'twitter' | 'linkedin' | 'mastodon';
author: {
id: string;
username: string;
displayName: string;
followers: number;
verified: boolean;
};
content: string;
hashtags: string[];
metrics: {
likes: number;
reposts: number;
replies: number;
views: number;
bookmarks: number;
};
media: { type: string; url: string } | null;
postedAt: string;
url: string;
}
// ── Bank ──────────────────────────────────────────────────
export interface BankTransaction {
id: string;
date: string;
description: string;
amount: number;
type: 'debit' | 'credit';
category: string;
balance: number;
}
export interface BankAccount {
id: string;
accountHolder: string;
iban: string;
bic: string;
type: 'checking' | 'savings' | 'business' | 'investment';
currency: string;
balance: number;
availableBalance: number;
transactions: BankTransaction[];
createdAt: string;
}
// ── Reviews ───────────────────────────────────────────────
export interface ReviewReply {
author: string;
body: string;
date: string;
}
export interface Review {
id: string;
productId: string;
productName: string;
rating: 1 | 2 | 3 | 4 | 5;
title: string;
body: string;
author: {
name: string;
verified: boolean;
};
helpful: number;
reply: ReviewReply | null;
createdAt: string;
}
// ── Logs ──────────────────────────────────────────────────
export type LogLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR';
export interface LogEntry {
id: string;
timestamp: string;
level: LogLevel;
service: string;
message: string;
http: {
method: string;
path: string;
status: number;
latencyMs: number;
} | null;
traceId: string;
userId: string | null;
stackTrace: string | null;
meta: Record<string, unknown>;
}
// ── SSE Stream ────────────────────────────────────────────
export interface StreamTick {
event: number;
total: number;
timestamp: string;
data: {
symbol: string;
price: number;
change: number;
changePercent: number;
volume: number;
};
}
export interface StreamDoneEvent {
event: 'done';
total: number;
}
// ── Webhooks ──────────────────────────────────────────────
export type WebhookEventType =
| 'order.created' | 'order.shipped' | 'order.delivered' | 'order.cancelled'
| 'payment.succeeded' | 'payment.failed' | 'payment.refunded'
| 'invoice.paid' | 'invoice.overdue'
| 'user.created' | 'user.updated'
| 'subscription.created' | 'subscription.cancelled'
| 'review.submitted' | 'stock.price_alert' | 'crypto.price_alert';
export interface WebhookSubscription {
id: string;
url: string;
eventType: WebhookEventType;
isActive: boolean;
secret: string; // whsec_... — store securely, used to verify signatures
lastFiredAt: string | null;
totalFired: number;
totalFailed: number;
createdAt: string;
}
export interface WebhookDelivery {
id: string;
webhookId: string;
statusCode: number | null;
success: boolean;
responseMs: number | null;
error: string | null;
firedAt: string;
}
export interface WebhookPayload<T = unknown> {
id: string;
type: WebhookEventType;
timestamp: string;
webhookId: string;
data: T;
}
Install via npm
Coming soon as @dummify/typesOpenAPI Spec
/api/v1/openapi.jsonVersion
v1.5.0 · Updated 2026-04-19