@lastshotlabs/slingshot-deep-links
npm install @lastshotlabs/slingshot-deep-links
Functions
Section titled “Functions”ANDROID_ASSETLINKS_PATH
Section titled “ANDROID_ASSETLINKS_PATH”Canonical Apple AASA route path.
Source: packages/slingshot-deep-links/src/routes.ts
androidAppLinkSchema
Section titled “androidAppLinkSchema”Apple universal-links entry schema.
Config Fields
Section titled “Config Fields”| Field | Description |
|---|---|
packageName | Reverse-DNS Android package name for the app-link target app. |
sha256Fingerprints | SHA-256 certificate fingerprints trusted for the Android package. |
Source: packages/slingshot-deep-links/src/config.ts
APPLE_AASA_PATH
Section titled “APPLE_AASA_PATH”Canonical Apple AASA route path.
Source: packages/slingshot-deep-links/src/routes.ts
appleAppLinkSchema
Section titled “appleAppLinkSchema”Apple universal-links entry schema.
Config Fields
Section titled “Config Fields”| Field | Description |
|---|---|
bundleId | Reverse-DNS iOS bundle identifier for the universal-link target app. |
paths | URL path patterns the iOS app is allowed to open. |
teamId | Apple Team ID for the iOS app that should claim the universal links. |
Source: packages/slingshot-deep-links/src/config.ts
buildAppleAasaBody
Section titled “buildAppleAasaBody”Apple App Site Association response body.
function buildAppleAasaBody(apple: readonly AppleAppLink[] | undefined,): AppleAasaBody | nullSource: packages/slingshot-deep-links/src/aasa.ts
buildAssetlinksBody
Section titled “buildAssetlinksBody”One entry in Android’s assetlinks.json response body.
function buildAssetlinksBody(android: AndroidAppLink | undefined): AssetLinksEntry[] | nullSource: packages/slingshot-deep-links/src/assetlinks.ts
compileDeepLinksConfig
Section titled “compileDeepLinksConfig”Apple universal-links entry schema.
function compileDeepLinksConfig(input: DeepLinksConfigInput): DeepLinksConfigSource: packages/slingshot-deep-links/src/config.ts
createDeepLinksPlugin
Section titled “createDeepLinksPlugin”Create the deep-links plugin.
Validates and compiles input via compileDeepLinksConfig, pre-serializes
the AASA and assetlinks JSON bodies once at plugin construction time, and
mounts the well-known routes during setupRoutes. Path collision warnings
are emitted in setupPost after all other plugins have registered their routes.
The plugin declares both well-known paths in publicPaths so auth middleware
skips them automatically — no manual exclusion is needed.
function createDeepLinksPlugin(input: DeepLinksConfigInput): SlingshotPluginSource: packages/slingshot-deep-links/src/plugin.ts
DEEP_LINKS_PUBLIC_PATHS
Section titled “DEEP_LINKS_PUBLIC_PATHS”Canonical Apple AASA route path.
Source: packages/slingshot-deep-links/src/routes.ts
deepLinksConfigSchema
Section titled “deepLinksConfigSchema”Apple universal-links entry schema.
Source: packages/slingshot-deep-links/src/config.ts
expandFallback
Section titled “expandFallback”Expand a configured fallback redirect.
function expandFallback(source: string, target: string, actualPath: string): string | nullSource: packages/slingshot-deep-links/src/fallback.ts
mountDeepLinkRoutes
Section titled “mountDeepLinkRoutes”Canonical Apple AASA route path.
function mountDeepLinkRoutes(app: Hono<AppEnv>, aasaBody: string | null, assetlinksBody: string | null, config: DeepLinksConfig,): voidSource: packages/slingshot-deep-links/src/routes.ts
serializeAppleAasaBody
Section titled “serializeAppleAasaBody”Apple App Site Association response body.
function serializeAppleAasaBody(apple: readonly AppleAppLink[] | undefined): string | nullSource: packages/slingshot-deep-links/src/aasa.ts
serializeAssetlinksBody
Section titled “serializeAssetlinksBody”One entry in Android’s assetlinks.json response body.
function serializeAssetlinksBody(android: AndroidAppLink | undefined): string | nullSource: packages/slingshot-deep-links/src/assetlinks.ts
Constants
Section titled “Constants”DEEP_LINKS_PLUGIN_STATE_KEY
Section titled “DEEP_LINKS_PLUGIN_STATE_KEY”Stable plugin-state key used in ctx.pluginState.
Source: packages/slingshot-deep-links/src/stateKey.ts
Interfaces
Section titled “Interfaces”AppleAasaBody
Section titled “AppleAasaBody”Apple App Site Association response body.
Source: packages/slingshot-deep-links/src/aasa.ts
AssetLinksEntry
Section titled “AssetLinksEntry”One entry in Android’s assetlinks.json response body.
Source: packages/slingshot-deep-links/src/assetlinks.ts
DeepLinksConfig
Section titled “DeepLinksConfig”Apple universal-links entry schema.
Source: packages/slingshot-deep-links/src/config.ts
DeepLinksPluginState
Section titled “DeepLinksPluginState”Runtime state published by createDeepLinksPlugin().
Source: packages/slingshot-deep-links/src/state.ts
AndroidAppLink
Section titled “AndroidAppLink”Apple universal-links entry schema.
Source: packages/slingshot-deep-links/src/config.ts
AppleAppLink
Section titled “AppleAppLink”Apple universal-links entry schema.
Source: packages/slingshot-deep-links/src/config.ts
DeepLinksConfigInput
Section titled “DeepLinksConfigInput”Apple universal-links entry schema.
Source: packages/slingshot-deep-links/src/config.ts
DeepLinksPluginConfig
Section titled “DeepLinksPluginConfig”Apple universal-links entry schema.
Source: packages/slingshot-deep-links/src/config.ts
DeepLinksPluginConfigInput
Section titled “DeepLinksPluginConfigInput”Apple universal-links entry schema.
Source: packages/slingshot-deep-links/src/config.ts
DeepLinksPluginStateKey
Section titled “DeepLinksPluginStateKey”Stable plugin-state key used in ctx.pluginState.
Source: packages/slingshot-deep-links/src/stateKey.ts