import type { Identifier } from "typeforge"; import type { DeepLinkAppsFlyerFormat, DeepLinkRobloxProtocolFormat, DeepLinkRobloxUrlFormat } from "./deepLinkHelpers.types"; type AnyDeepLink = DeepLinkAppsFlyerFormat | DeepLinkRobloxProtocolFormat | DeepLinkRobloxUrlFormat; type ExtractDataFromDeepLink = (DeepLink extends `${string}placeId=${infer PlaceId}&${string}` ? [[PlaceId], [true]] : DeepLink extends `${string}placeId=${infer PlaceId}` ? [[PlaceId], [false]] : DeepLink extends `ro.blox.com/Ebh5?af_dp=roblox%3A%2F%2FplaceId%3D${infer PlaceIdA}%26launchData%3D${string}&af_web_dp=https%3A%2F%2Fwww.roblox.com%2Fgames%2Fstart%3FplaceId%3D${infer PlaceIdB}%26launchData%3D${string}` ? [[PlaceIdA, PlaceIdB], [true, true]] : DeepLink extends `ro.blox.com/Ebh5?af_dp=roblox%3A%2F%2FplaceId%3D${infer PlaceIdA}&af_web_dp=https%3A%2F%2Fwww.roblox.com%2Fgames%2Fstart%3FplaceId%3D${infer PlaceIdB}%26launchData%3D${string}` ? [[PlaceIdA, PlaceIdB], [false, true]] : DeepLink extends `ro.blox.com/Ebh5?af_dp=roblox%3A%2F%2FplaceId%3D${infer PlaceIdA}%26launchData%3D${string}&af_web_dp=https%3A%2F%2Fwww.roblox.com%2Fgames%2Fstart%3FplaceId%3D${infer PlaceIdB}` ? [[PlaceIdA, PlaceIdB], [true, false]] : DeepLink extends `ro.blox.com/Ebh5?af_dp=roblox%3A%2F%2FplaceId%3D${infer PlaceIdA}&af_web_dp=https%3A%2F%2Fwww.roblox.com%2Fgames%2Fstart%3FplaceId%3D${infer PlaceIdB}` ? [[PlaceIdA, PlaceIdB], [false, false]] : never); type DeepLinkParseReturns = (DeepLink extends AnyDeepLink ? PlaceId extends string[] ? PlaceId["length"] extends 2 ? [ { placeId: PlaceId[0]; launchData: LaunchData[0] extends true ? string | Record : null; }, { placeId: PlaceId[1]; launchData: LaunchData[1] extends true ? string | Record : null; } ] : [{ placeId: PlaceId[0]; launchData: LaunchData[0] extends true ? string | Record : null; }] : never : { placeIds: `${number}`[]; launchData: null | string | Record; }[]); export declare const deepLinkParse: : never, PlaceIds_1 extends ExtractedData extends [infer PlaceIds, boolean[]] ? PlaceIds : never, LaunchData extends ExtractedData extends [string[], infer HasLaunchData] ? HasLaunchData : never>(deepLink: DeepLink, decodeBase64?: boolean) => DeepLinkParseReturns; export {};