import type { ApiClient } from "@promobase/sdk-runtime"; import { Cursor } from "@promobase/sdk-runtime"; import { metaPagination } from "../../pagination.ts"; import type { BusinessFields } from "./business.ts"; import type { IGUpcomingEventFields } from "./ig-upcoming-event.ts"; import type { ShopFields } from "./shop.ts"; export interface InstagramUserFields { follow_count: number; followed_by_count: number; has_profile_picture: boolean; id: string; ig_user_id: string; is_private: boolean; is_published: boolean; media_count: number; mini_shop_storefront: ShopFields; owner_business: BusinessFields; profile_pic: string; username: string; } export function instagramUserNode(client: ApiClient, id: string) { return { __path: id, __brand: undefined as unknown as InstagramUserFields, get: (opts: { fields: F; params?: Record }) => client.get>(`${id}`, opts), upcomingEvents: (opts: { fields: F; params?: Record }) => new Cursor>(client, `${id}/upcoming_events`, opts as { fields: readonly string[]; params?: Record }, metaPagination()), }; }