Skip to content

@lastshotlabs/slingshot-deep-links

npm install @lastshotlabs/slingshot-deep-links

Canonical Android asset links route path.

Source: packages/slingshot-deep-links/src/routes.ts

Android Digital Asset Links entry schema.

FieldDescription
packageNameReverse-DNS Android package name for the app-link target app.
sha256FingerprintsSHA-256 certificate fingerprints trusted for the Android package.

Source: packages/slingshot-deep-links/src/config.ts

Canonical Apple AASA route path.

Source: packages/slingshot-deep-links/src/routes.ts

Apple universal-links entry schema.

FieldDescription
bundleIdReverse-DNS iOS bundle identifier for the universal-link target app.
pathsURL path patterns the iOS app is allowed to open.
teamIdApple Team ID for the iOS app that should claim the universal links.

Source: packages/slingshot-deep-links/src/config.ts

Build the Apple App Site Association response body.

function buildAppleAasaBody(apple: readonly AppleAppLink[] | undefined,): AppleAasaBody | null

Source: packages/slingshot-deep-links/src/aasa.ts

Build the Android Digital Asset Links response body.

function buildAssetlinksBody(android: AndroidAppLink | undefined): AssetLinksEntry[] | null

Source: packages/slingshot-deep-links/src/assetlinks.ts

Validate, normalize, and deeply freeze deep-links config input.

function compileDeepLinksConfig(input: DeepLinksConfigInput): DeepLinksConfig

Source: packages/slingshot-deep-links/src/config.ts

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): SlingshotPlugin

Source: packages/slingshot-deep-links/src/plugin.ts

Public well-known routes served by the deep-links plugin.

Source: packages/slingshot-deep-links/src/routes.ts

Config schema for createDeepLinksPlugin.

Source: packages/slingshot-deep-links/src/config.ts

Expand a configured fallback redirect.

function expandFallback(source: string, target: string, actualPath: string): string | null

Source: packages/slingshot-deep-links/src/fallback.ts

Mount every route owned by the deep-links plugin.

Calls mountAppleAasaRoute, mountAndroidAssetlinksRoute, and mountFallbackRoutes in order. Routes are only registered when the corresponding config section is present (non-null body / non-empty map).

function mountDeepLinkRoutes(app: Hono<AppEnv>, aasaBody: string | null, assetlinksBody: string | null, config: DeepLinksConfig,): void

Source: packages/slingshot-deep-links/src/routes.ts

Serialize the Apple App Site Association body once for reuse on every request.

function serializeAppleAasaBody(apple: readonly AppleAppLink[] | undefined): string | null

Source: packages/slingshot-deep-links/src/aasa.ts

Serialize the Android Digital Asset Links body once for reuse on every request.

function serializeAssetlinksBody(android: AndroidAppLink | undefined): string | null

Source: packages/slingshot-deep-links/src/assetlinks.ts

Stable plugin-state key used in ctx.pluginState.

Source: packages/slingshot-deep-links/src/stateKey.ts

Apple App Site Association response body.

Source: packages/slingshot-deep-links/src/aasa.ts

One entry in Android’s assetlinks.json response body.

Source: packages/slingshot-deep-links/src/assetlinks.ts

Normalized and deeply frozen deep-links config.

Source: packages/slingshot-deep-links/src/config.ts

Runtime state published by createDeepLinksPlugin().

Source: packages/slingshot-deep-links/src/state.ts

Android Digital Asset Links application mapping.

Source: packages/slingshot-deep-links/src/config.ts

One Apple universal-links application mapping.

Source: packages/slingshot-deep-links/src/config.ts

Raw config input accepted by createDeepLinksPlugin().

Source: packages/slingshot-deep-links/src/config.ts

Canonical normalized plugin configuration name.

Source: packages/slingshot-deep-links/src/config.ts

Canonical raw plugin configuration input.

Source: packages/slingshot-deep-links/src/config.ts

Type of the stable deep-links plugin-state key.

Source: packages/slingshot-deep-links/src/stateKey.ts