@linkforty/core 1.25.4 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llms.txt CHANGED
@@ -102,6 +102,18 @@ interface ServerOptions {
102
102
  origin: string | string[];
103
103
  };
104
104
  logger?: boolean; // Enable Fastify logger
105
+ trustProxy?: boolean | number; // Trust X-Forwarded-For behind a proxy
106
+ redirect?: {
107
+ abuseReportUrl?: string; // Linked from the link-safety warning page
108
+ launchpad?: {
109
+ // Richer content for the launchpad page (see Redirect Flow). Return null
110
+ // for the default. `heroHtml` is inserted unescaped — render it yourself.
111
+ resolveContent?: (link, settings) => Promise<LaunchpadContent | null>;
112
+ // Receives `{ linkId, event }` beacons ("view", "cta_ios", "cta_android",
113
+ // "cta_open") from the page. Unset = the page sends nothing.
114
+ beaconUrl?: string;
115
+ };
116
+ };
105
117
  }
106
118
  ```
107
119
 
@@ -178,6 +190,7 @@ interface Link {
178
190
  og_description?: string;
179
191
  og_image_url?: string;
180
192
  og_type?: string;
193
+ launchpad_mode?: 'inherit' | 'on' | 'off'; // Launchpad page override
181
194
 
182
195
  // Lifecycle
183
196
  attribution_window_hours?: number; // Default: 168 (7 days)
@@ -226,6 +239,7 @@ interface CreateLinkRequest {
226
239
  ogDescription?: string;
227
240
  ogImageUrl?: string;
228
241
  ogType?: string;
242
+ launchpadMode?: 'inherit' | 'on' | 'off';
229
243
  attributionWindowHours?: number; // 1-2160
230
244
  customCode?: string; // Custom short code (auto-generated if omitted)
231
245
  expiresAt?: string; // ISO 8601 datetime
@@ -590,6 +604,8 @@ When a user clicks a short link (e.g., `https://go.yourdomain.com/abc123`):
590
604
  6. Append UTM parameters to destination URL
591
605
  7. Return 302 redirect
592
606
 
607
+ **Launchpad page.** A desktop visitor to a link that resolves no web destination (link → template → workspace `appConfig`) gets a hosted landing page instead of an error: title/description/image from the link's `og_*` fields (falling back to `title`/`description`), the app's icon and name, App Store / Google Play buttons, and a QR code to continue on a phone. `noindex`, `Cache-Control: no-store`, nonce-based CSP, no automatic navigation. Controlled by `organizations.settings.launchpad` — `{ desktop: "no-destination" | "always" | "off", mobile: "store" | "page", appName, appIconUrl, accentColor }` — and per link by `links.launchpad_mode` (`launchpadMode` on the API: `inherit` | `on` | `off`; the link wins). Default: served only where the alternative is nothing. With `off`, the plain "This link opens in an app" page is served instead. With `mobile: "page"`, a phone visitor whose platform has no Universal Link / App Link on the link gets the page too — "Open in app" as a tap-only button (fragment appended on tap), their own store button, and the web fallback as a "Continue on the web" link (which keeps the Universal Link second chance inside in-app browsers) — instead of the store redirect or scheme interstitial; Universal Link / App Link links keep their 302. Exported helpers: `renderLaunchpadPage()`, `defaultLaunchpadContent()`, `shouldServeLaunchpadOnDesktop()`, `shouldServeLaunchpadOnMobile()`, `readLaunchpadSettings()`.
608
+
593
609
  ## Fingerprint Attribution
594
610
 
595
611
  When a mobile SDK reports an install, Core matches it to a previous click using probabilistic fingerprinting:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linkforty/core",
3
- "version": "1.25.4",
3
+ "version": "1.27.0",
4
4
  "type": "module",
5
5
  "description": "Open-source deeplink management engine with device detection and analytics",
6
6
  "main": "dist/index.js",