type Decrement = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; export interface BaseEdgeOptions { after?: string; before?: string; since?: number; until?: number; } export interface EdgeOptions extends BaseEdgeOptions { limit?: number; order?: ORDER; } export type FbFieldSelector = { [K in keyof T]?: D extends 0 ? true : NonNullable extends CollectionOf ? { options?: O; fields: FbFieldSelector; } | true : NonNullable extends object ? FbFieldSelector, Decrement[D]> | true : true; }; type TrueKeysOf = { [K in keyof O]: O[K] extends true ? K : never; }[keyof O]; type CollectionExtras = Omit, "data" | "paging" | "_edgeOptions">; type CleanCollection = { data: Data[]; paging: Paging; } & (Exclude extends { options: infer O; } ? Required, Extract, TrueKeysOf>>> : unknown); export type FbPickDeep = { [K in keyof T as K extends keyof F ? K : never]: NonNullable extends CollectionOf ? Exclude extends { fields: infer NF; } ? CleanCollection, F[K & keyof F]> : CleanCollection : Exclude extends true ? T[K] : NonNullable extends object ? FbPickDeep, Exclude> : T[K]; }; export type Collection = { data: FbPickDeep[]; paging: P; }; export type CollectionOf = { data: T[]; paging: P; _edgeOptions?: O; }; type StripTrue = Exclude; export type DeepStrict = { [K in keyof Inferred]: K extends keyof StripTrue ? StripTrue[K] extends boolean | undefined ? StripTrue[K] : Inferred[K] extends object ? DeepStrict[K], Inferred[K]> : StripTrue[K] : never; }; export type Fields = F extends DeepStrict, F> ? F : DeepStrict, F>; export type ListEdge = >(query: { fields: Fields; options?: O; }) => BatchableRequest>; export type GetNode = >(fields: Fields) => BatchableRequest>; export declare enum ORDER { OLDEST = "chronological", NEWEST = "reverse_chronological" } export interface FacebookApiError { code: number; message?: string; } export interface Paging { cursors: { before: string; after: string; }; next?: string; } export interface PictureData { height: number; is_silhouette: boolean; url: string; width: number; } export interface BatchableRequest { readonly method: string; readonly relative_url: string; transform(fn: (raw: T) => U): BatchableRequest; then(onFulfilled?: ((value: T) => R1 | PromiseLike) | null, onRejected?: ((reason: any) => R2 | PromiseLike) | null): Promise; catch(onRejected?: ((reason: any) => R | PromiseLike) | null): Promise; } export interface BatchSubRequest { method: string; relative_url: string; body?: string; _transform?: (raw: any) => any; } export interface BatchSubResponse { code: number; body: string; } export {}; //# sourceMappingURL=shared.d.ts.map