feat: add FacebookMarketplaceItem interface
This commit is contained in:
106
src/facebook.ts
106
src/facebook.ts
@@ -68,6 +68,112 @@ interface FacebookRequireData {
|
|||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface FacebookMarketplaceItem {
|
||||||
|
// Basic identification
|
||||||
|
id: string;
|
||||||
|
__typename: "GroupCommerceProductItem";
|
||||||
|
|
||||||
|
// Listing content
|
||||||
|
marketplace_listing_title: string;
|
||||||
|
redacted_description?: {
|
||||||
|
text: string;
|
||||||
|
};
|
||||||
|
custom_title?: string;
|
||||||
|
|
||||||
|
// Pricing
|
||||||
|
formatted_price?: {
|
||||||
|
text: string;
|
||||||
|
};
|
||||||
|
listing_price?: {
|
||||||
|
amount: string;
|
||||||
|
currency: string;
|
||||||
|
amount_with_offset: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Location
|
||||||
|
location_text?: {
|
||||||
|
text: string;
|
||||||
|
};
|
||||||
|
location?: {
|
||||||
|
latitude: number;
|
||||||
|
longitude: number;
|
||||||
|
reverse_geocode_detailed?: {
|
||||||
|
country_alpha_two: string;
|
||||||
|
postal_code_trimmed: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Status flags
|
||||||
|
is_live?: boolean;
|
||||||
|
is_sold?: boolean;
|
||||||
|
is_pending?: boolean;
|
||||||
|
is_hidden?: boolean;
|
||||||
|
is_draft?: boolean;
|
||||||
|
|
||||||
|
// Timing
|
||||||
|
creation_time?: number;
|
||||||
|
|
||||||
|
// Seller information
|
||||||
|
marketplace_listing_seller?: {
|
||||||
|
__typename: "User";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
profile_picture?: {
|
||||||
|
uri: string;
|
||||||
|
};
|
||||||
|
join_time?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Vehicle-specific fields (for automotive listings)
|
||||||
|
vehicle_make_display_name?: string;
|
||||||
|
vehicle_model_display_name?: string;
|
||||||
|
vehicle_odometer_data?: {
|
||||||
|
unit: "KILOMETERS" | "MILES";
|
||||||
|
value: number;
|
||||||
|
};
|
||||||
|
vehicle_transmission_type?: "AUTOMATIC" | "MANUAL";
|
||||||
|
vehicle_exterior_color?: string;
|
||||||
|
vehicle_interior_color?: string;
|
||||||
|
vehicle_condition?: "EXCELLENT" | "GOOD" | "FAIR" | "POOR";
|
||||||
|
vehicle_fuel_type?: string;
|
||||||
|
vehicle_trim_display_name?: string;
|
||||||
|
|
||||||
|
// Category and commerce
|
||||||
|
marketplace_listing_category_id?: string;
|
||||||
|
condition?: string;
|
||||||
|
|
||||||
|
// Commerce features
|
||||||
|
delivery_types?: string[];
|
||||||
|
is_shipping_offered?: boolean;
|
||||||
|
is_buy_now_enabled?: boolean;
|
||||||
|
can_buyer_make_checkout_offer?: boolean;
|
||||||
|
|
||||||
|
// Communication
|
||||||
|
messaging_enabled?: boolean;
|
||||||
|
first_message_suggested_value?: string;
|
||||||
|
|
||||||
|
// Metadata
|
||||||
|
logging_id?: string;
|
||||||
|
reportable_ent_id?: string;
|
||||||
|
|
||||||
|
// Related listings (for part-out sellers)
|
||||||
|
marketplace_listing_sets?: {
|
||||||
|
edges: Array<{
|
||||||
|
node: {
|
||||||
|
canonical_listing: {
|
||||||
|
id: string;
|
||||||
|
marketplace_listing_title: string;
|
||||||
|
is_live: boolean;
|
||||||
|
is_sold: boolean;
|
||||||
|
formatted_price: { text: string };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
|
||||||
|
[k: string]: unknown;
|
||||||
|
}
|
||||||
|
|
||||||
type ListingDetails = {
|
type ListingDetails = {
|
||||||
url: string;
|
url: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user