wip: add sample data and types
This commit is contained in:
88
frontend/src/network/sample-data.ts
Normal file
88
frontend/src/network/sample-data.ts
Normal file
@@ -0,0 +1,88 @@
|
||||
import type { DataArray } from "./types";
|
||||
|
||||
export const sampleData: DataArray = [
|
||||
{
|
||||
type: "Event",
|
||||
data: {
|
||||
title: "Startup Mixer",
|
||||
dateTime: {
|
||||
start: "2025-06-01T19:00:00+01:00",
|
||||
end: "2025-06-01T23:00:00+01:00",
|
||||
},
|
||||
location: "The Kings Arms, 27 Ropemaker St, London EC2Y 9LY",
|
||||
description:
|
||||
"Casual networking event for tech entrepreneurs and investors in London.",
|
||||
organizer: {
|
||||
name: "London Startup Network",
|
||||
email: "events@londonstartupnetwork.co.uk",
|
||||
},
|
||||
attendees: ["Alex Smith", "Sofia Rodriguez"],
|
||||
category: "Networking",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "Contact",
|
||||
data: {
|
||||
name: "João Silva",
|
||||
phoneNumber: "+351 912 345 678",
|
||||
emailAddress: "joao.silva@example.pt",
|
||||
address: "Rua do Carmo 12, 1200-161 Lisboa, Portugal",
|
||||
organization: "PortoTech Solutions",
|
||||
title: "Marketing Manager",
|
||||
notes: "Met at Web Summit Lisbon 2024",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "Location",
|
||||
data: {
|
||||
name: "Barman Dictat",
|
||||
address: "14 Khreshchatyk St., Kyiv, Ukraine",
|
||||
category: "Bar",
|
||||
description:
|
||||
"Stylish cocktail bar in the heart of Kyiv with an extensive menu of craft cocktails and a sophisticated atmosphere",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "Note",
|
||||
data: {
|
||||
title: "Q2 2025 Marketing Strategy",
|
||||
keywords: ["strategy", "digital marketing", "Q2", "2025"],
|
||||
content:
|
||||
"## Executive Summary\n\nOur Q2 2025 marketing strategy focuses on expanding our digital presence and increasing customer engagement across all platforms. We will leverage AI-driven personalization to enhance user experience and implement a multi-channel approach to reach our target demographics more effectively.\n\n### Key Objectives\n\n1. Increase website traffic by 30% through SEO optimization and content marketing.\n2. Boost social media engagement rates by 25% using interactive campaigns and influencer partnerships.\n3. Implement a new customer loyalty program to improve retention rates by 15%.\n\nBy aligning our marketing efforts with emerging trends and customer preferences, we aim to solidify our market position and drive sustainable growth throughout Q2 and beyond.",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "Website",
|
||||
data: {
|
||||
url: "https://www.attio.com",
|
||||
title: "Attio",
|
||||
description:
|
||||
"Attio is the AI-native CRM that builds, scales and grows your company to the next level.",
|
||||
category: "SaaS",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "Receipt",
|
||||
data: {
|
||||
receiptDate: "2025-03-12T20:15:30+01:00",
|
||||
orderNumber: "ORD12345",
|
||||
amount: 49.99,
|
||||
currency: "GBP",
|
||||
vendor: "Zara Online Store",
|
||||
items: [
|
||||
{
|
||||
name: "Slim Fit Dress Shirt",
|
||||
quantity: 1,
|
||||
price: 49.99,
|
||||
currency: "GBP",
|
||||
},
|
||||
],
|
||||
paymentMethod: "Visa",
|
||||
shippingAddress: {
|
||||
name: "Alex Smith",
|
||||
address: "123 High St, London, EC2A 3AZ",
|
||||
},
|
||||
category: "Online Shopping",
|
||||
},
|
||||
},
|
||||
];
|
||||
103
frontend/src/network/types.ts
Normal file
103
frontend/src/network/types.ts
Normal file
@@ -0,0 +1,103 @@
|
||||
interface DateTime {
|
||||
start: string;
|
||||
end: string;
|
||||
}
|
||||
|
||||
interface Address {
|
||||
name: string;
|
||||
address: string;
|
||||
}
|
||||
|
||||
interface Organizer {
|
||||
name: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
interface ReceiptItem {
|
||||
name: string;
|
||||
quantity: number;
|
||||
price: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
interface DataItemType<T extends string, D> {
|
||||
type: T;
|
||||
data: D;
|
||||
}
|
||||
|
||||
interface EventData {
|
||||
title: string;
|
||||
dateTime: DateTime;
|
||||
location: string;
|
||||
description: string;
|
||||
organizer: Organizer;
|
||||
attendees: string[];
|
||||
category: string;
|
||||
}
|
||||
|
||||
interface ContactData {
|
||||
name: string;
|
||||
phoneNumber: string;
|
||||
emailAddress: string;
|
||||
address: string;
|
||||
organization: string;
|
||||
title: string;
|
||||
notes: string;
|
||||
}
|
||||
|
||||
interface LocationData {
|
||||
name: string;
|
||||
address: string;
|
||||
category: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
interface NoteData {
|
||||
title: string;
|
||||
keywords: string[];
|
||||
content: string;
|
||||
}
|
||||
|
||||
interface WebsiteData {
|
||||
url: string;
|
||||
title: string;
|
||||
description: string;
|
||||
category: string;
|
||||
}
|
||||
|
||||
interface ReceiptData {
|
||||
receiptDate: string;
|
||||
orderNumber: string;
|
||||
amount: number;
|
||||
currency: string;
|
||||
vendor: string;
|
||||
items: ReceiptItem[];
|
||||
paymentMethod: string;
|
||||
shippingAddress: Address;
|
||||
category: string;
|
||||
}
|
||||
|
||||
type Event = DataItemType<"Event", EventData>;
|
||||
type Contact = DataItemType<"Contact", ContactData>;
|
||||
type Location = DataItemType<"Location", LocationData>;
|
||||
type Note = DataItemType<"Note", NoteData>;
|
||||
type Website = DataItemType<"Website", WebsiteData>;
|
||||
type Receipt = DataItemType<"Receipt", ReceiptData>;
|
||||
|
||||
type DataItem = Event | Contact | Location | Note | Website | Receipt;
|
||||
type DataArray = DataItem[];
|
||||
|
||||
export type {
|
||||
DateTime,
|
||||
Address,
|
||||
Organizer,
|
||||
ReceiptItem,
|
||||
Event,
|
||||
Contact,
|
||||
Location,
|
||||
Note,
|
||||
Website,
|
||||
Receipt,
|
||||
DataItem,
|
||||
DataArray,
|
||||
};
|
||||
Reference in New Issue
Block a user