@encorekit/web-sdk 1.1.21 → 2.0.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.
@@ -317,6 +317,8 @@ export interface paths {
317
317
  * @description SDUI variant ID from frontend config fetch. If provided, filters creatives by variant assignment. If not provided, no variant filtering is applied.
318
318
  */
319
319
  variantId?: string;
320
+ /** @description Publisher-defined surface label for where the offer is shown (e.g. 'paywall', 'onboarding', 'settings'). Best-effort analytics context: when supplied it is stamped onto the sdk_offer_requested event so publisher analytics can break the funnel out by placement. Max 64 chars; omit for auto-generated/absent ids (they bucket as '(unlabeled)'). */
321
+ placementId?: string;
320
322
  /** @description Strict unlock mode: only include campaigns whose postback latency is less than or equal to this value (in milliseconds). Omit for no filtering. Bounded 1000..120000. */
321
323
  maxPostbackTimeMs?: number;
322
324
  };
@@ -1083,6 +1085,11 @@ export interface paths {
1083
1085
  "application/json": {
1084
1086
  campaignId: string;
1085
1087
  userId: string;
1088
+ /**
1089
+ * @description Which Encore surface the user claimed from. Persisted on the transaction so the server-side completion — which is built from that row alone and carries no client context — can be split by use case, along with the payout booked on it. Absent means 'churn-intervention'.
1090
+ * @enum {string}
1091
+ */
1092
+ useCase?: "churn-intervention" | "post-action-reward";
1086
1093
  };
1087
1094
  };
1088
1095
  };
@@ -2216,7 +2223,7 @@ export interface paths {
2216
2223
  path?: never;
2217
2224
  cookie?: never;
2218
2225
  };
2219
- /** @description Get unified SDK configuration including SDUI, entitlements, experiments, and remote config. This endpoint replaces /ui-config with a cleaner structure. Entitlement mode is implicit: if entitlements.iap.productId exists, use IAP mode; otherwise use Native mode. */
2226
+ /** @description Get unified SDK configuration including SDUI, entitlements, experiments, and remote config. This endpoint replaces /ui-config with a cleaner structure. Entitlement mode is implicit: if entitlements.iap.productId exists, use IAP mode; otherwise use Native mode. Pass `useCase` to configure a surface other than churn-intervention; the response echoes it as ui.useCase. Requesting a surface is all it takes to be served it — no setup call is required. A surface Encore has explicitly switched off for this app, or one with no variant available, returns ui.template: null — clients must no-op, never reuse another use case's template. */
2220
2227
  get: {
2221
2228
  parameters: {
2222
2229
  query: {
@@ -2226,6 +2233,8 @@ export interface paths {
2226
2233
  sdkVersion: string;
2227
2234
  /** @description Optional language hint (e.g. 'es'). Overrides the Accept-Language header; region subtags are stripped. */
2228
2235
  language?: string;
2236
+ /** @description Which Encore surface is being configured. Omit for today's behaviour. Requesting a surface is all it takes to be served it — no setup call is required. A surface Encore has explicitly switched off for this app, or one with no variant available, resolves to template: null — it NEVER falls back to another use case's template. */
2237
+ useCase?: "churn-intervention" | "post-action-reward";
2229
2238
  };
2230
2239
  header?: never;
2231
2240
  path?: never;
@@ -2243,6 +2252,11 @@ export interface paths {
2243
2252
  success: boolean;
2244
2253
  /** @description UI configuration: template + values */
2245
2254
  ui: {
2255
+ /**
2256
+ * @description The Encore surface this UI config is for
2257
+ * @enum {string}
2258
+ */
2259
+ useCase: "churn-intervention" | "post-action-reward";
2246
2260
  /**
2247
2261
  * Format: uuid
2248
2262
  * @description Selected variant ID
@@ -2286,6 +2300,10 @@ export interface paths {
2286
2300
  customHeadline?: string | null;
2287
2301
  /** @description Custom subheadline text for SDUI variant (falls back to subtitle) */
2288
2302
  customSubheadline?: string | null;
2303
+ /** @description Headline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward' — the template references ${rewardHeadline} unconditionally and the substitution engine leaves an unresolved token visible on screen. Resolution: app_use_cases.headline, else the shipped default. */
2304
+ rewardHeadline?: string | null;
2305
+ /** @description Subheadline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward', for the same reason as rewardHeadline — the template references ${rewardSubheadline} unconditionally. Resolution: app_use_cases.subheadline, else the shipped default. */
2306
+ rewardSubheadline?: string | null;
2289
2307
  };
2290
2308
  /** @description Appearance values */
2291
2309
  appearance: {
@@ -2306,6 +2324,141 @@ export interface paths {
2306
2324
  };
2307
2325
  };
2308
2326
  };
2327
+ /** @description NEW, additive. Default variant for every OTHER use case this app is enabled for, so the SDK can cache them at identify(). `ui` is unchanged; un-upgraded decoders ignore this key. */
2328
+ useCases: {
2329
+ "churn-intervention"?: {
2330
+ /**
2331
+ * Format: uuid
2332
+ * @description Default variant ID for this use case; null when the app is enabled for the surface but no default is eligible for it.
2333
+ */
2334
+ variantId: string | null;
2335
+ /** @description Default variant name; null alongside a null variantId. */
2336
+ variantName: string | null;
2337
+ /** @description The default variant's SDUI template. NULL means 'enabled, but nothing to render' — the SDK must no-op on this surface. It must NEVER substitute another use case's template. */
2338
+ template: {
2339
+ [key: string]: unknown;
2340
+ } | null;
2341
+ /** @description Values to substitute into this use case's template. Always present, even when template is null — the copy is resolved from app_use_cases regardless. */
2342
+ values: {
2343
+ /** @description Text values for template substitution */
2344
+ text: {
2345
+ /** @description App name for ${appName} substitution */
2346
+ appName?: string | null;
2347
+ /** @description Main title text */
2348
+ title?: string | null;
2349
+ /** @description Subtitle text */
2350
+ subtitle?: string | null;
2351
+ /** @description Offer description text */
2352
+ offerDescription?: string | null;
2353
+ /** @description Instructions title */
2354
+ instructionsTitle?: string | null;
2355
+ /** @description Last step header text */
2356
+ lastStepHeader?: string | null;
2357
+ /** @description Last step description */
2358
+ lastStepDescription?: string | null;
2359
+ /** @description Credit claimed title */
2360
+ creditClaimedTitle?: string | null;
2361
+ /** @description Credit claimed subtitle */
2362
+ creditClaimedSubtitle?: string | null;
2363
+ /** @description Apply credits button text */
2364
+ applyCreditsButton?: string | null;
2365
+ /** @description Accent title text */
2366
+ accentTitle?: string | null;
2367
+ /** @description Custom headline text for SDUI variant (falls back to title) */
2368
+ customHeadline?: string | null;
2369
+ /** @description Custom subheadline text for SDUI variant (falls back to subtitle) */
2370
+ customSubheadline?: string | null;
2371
+ /** @description Headline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward' — the template references ${rewardHeadline} unconditionally and the substitution engine leaves an unresolved token visible on screen. Resolution: app_use_cases.headline, else the shipped default. */
2372
+ rewardHeadline?: string | null;
2373
+ /** @description Subheadline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward', for the same reason as rewardHeadline — the template references ${rewardSubheadline} unconditionally. Resolution: app_use_cases.subheadline, else the shipped default. */
2374
+ rewardSubheadline?: string | null;
2375
+ };
2376
+ /** @description Appearance values */
2377
+ appearance: {
2378
+ /**
2379
+ * @description Appearance mode
2380
+ * @enum {string|null}
2381
+ */
2382
+ mode?: "light" | "dark" | "auto" | null;
2383
+ /** @description Primary accent color (hex) */
2384
+ accentColor?: string | null;
2385
+ /** @description Accent title color (hex) */
2386
+ accentTitleColor?: string | null;
2387
+ };
2388
+ /** @description Media values (imagery URLs) */
2389
+ media: {
2390
+ /** @description App icon URL (App Store artwork for mobile apps, fetched favicon for web apps). Web SDK uses it as the default host logo when display.logoUrl is not set. */
2391
+ appstoreIcon: string | null;
2392
+ };
2393
+ };
2394
+ };
2395
+ "post-action-reward"?: {
2396
+ /**
2397
+ * Format: uuid
2398
+ * @description Default variant ID for this use case; null when the app is enabled for the surface but no default is eligible for it.
2399
+ */
2400
+ variantId: string | null;
2401
+ /** @description Default variant name; null alongside a null variantId. */
2402
+ variantName: string | null;
2403
+ /** @description The default variant's SDUI template. NULL means 'enabled, but nothing to render' — the SDK must no-op on this surface. It must NEVER substitute another use case's template. */
2404
+ template: {
2405
+ [key: string]: unknown;
2406
+ } | null;
2407
+ /** @description Values to substitute into this use case's template. Always present, even when template is null — the copy is resolved from app_use_cases regardless. */
2408
+ values: {
2409
+ /** @description Text values for template substitution */
2410
+ text: {
2411
+ /** @description App name for ${appName} substitution */
2412
+ appName?: string | null;
2413
+ /** @description Main title text */
2414
+ title?: string | null;
2415
+ /** @description Subtitle text */
2416
+ subtitle?: string | null;
2417
+ /** @description Offer description text */
2418
+ offerDescription?: string | null;
2419
+ /** @description Instructions title */
2420
+ instructionsTitle?: string | null;
2421
+ /** @description Last step header text */
2422
+ lastStepHeader?: string | null;
2423
+ /** @description Last step description */
2424
+ lastStepDescription?: string | null;
2425
+ /** @description Credit claimed title */
2426
+ creditClaimedTitle?: string | null;
2427
+ /** @description Credit claimed subtitle */
2428
+ creditClaimedSubtitle?: string | null;
2429
+ /** @description Apply credits button text */
2430
+ applyCreditsButton?: string | null;
2431
+ /** @description Accent title text */
2432
+ accentTitle?: string | null;
2433
+ /** @description Custom headline text for SDUI variant (falls back to title) */
2434
+ customHeadline?: string | null;
2435
+ /** @description Custom subheadline text for SDUI variant (falls back to subtitle) */
2436
+ customSubheadline?: string | null;
2437
+ /** @description Headline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward' — the template references ${rewardHeadline} unconditionally and the substitution engine leaves an unresolved token visible on screen. Resolution: app_use_cases.headline, else the shipped default. */
2438
+ rewardHeadline?: string | null;
2439
+ /** @description Subheadline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward', for the same reason as rewardHeadline — the template references ${rewardSubheadline} unconditionally. Resolution: app_use_cases.subheadline, else the shipped default. */
2440
+ rewardSubheadline?: string | null;
2441
+ };
2442
+ /** @description Appearance values */
2443
+ appearance: {
2444
+ /**
2445
+ * @description Appearance mode
2446
+ * @enum {string|null}
2447
+ */
2448
+ mode?: "light" | "dark" | "auto" | null;
2449
+ /** @description Primary accent color (hex) */
2450
+ accentColor?: string | null;
2451
+ /** @description Accent title color (hex) */
2452
+ accentTitleColor?: string | null;
2453
+ };
2454
+ /** @description Media values (imagery URLs) */
2455
+ media: {
2456
+ /** @description App icon URL (App Store artwork for mobile apps, fetched favicon for web apps). Web SDK uses it as the default host logo when display.logoUrl is not set. */
2457
+ appstoreIcon: string | null;
2458
+ };
2459
+ };
2460
+ };
2461
+ };
2309
2462
  /** @description Entitlement configuration (IAP or Native mode) */
2310
2463
  entitlements: {
2311
2464
  /** @description IAP config. If productId exists → IAP mode. */
@@ -3650,6 +3803,256 @@ export interface paths {
3650
3803
  patch?: never;
3651
3804
  trace?: never;
3652
3805
  };
3806
+ "/publisher/sdk/v1/creators/links": {
3807
+ parameters: {
3808
+ query?: never;
3809
+ header?: never;
3810
+ path?: never;
3811
+ cookie?: never;
3812
+ };
3813
+ get?: never;
3814
+ put?: never;
3815
+ /** @description Mint the creator's shareable affiliate links: one stable branded short link per campaign your app is entitled to serve (every enabled campaign, regardless of geo). Idempotent — the same creatorId always returns the same link per campaign. Each link is a single URL clickable by many people; every distinct click is an independent claim tracked as its own transaction. Authentication: publishable key (X-API-Key: pk_live_* / pk_test_*). */
3816
+ post: {
3817
+ parameters: {
3818
+ query?: never;
3819
+ header?: never;
3820
+ path?: never;
3821
+ cookie?: never;
3822
+ };
3823
+ requestBody: {
3824
+ content: {
3825
+ "application/json": {
3826
+ /** @description Publisher-supplied stable identifier for the creator (opaque to Encore). */
3827
+ creatorId: string;
3828
+ };
3829
+ };
3830
+ };
3831
+ responses: {
3832
+ /** @description Default Response */
3833
+ 200: {
3834
+ headers: {
3835
+ [name: string]: unknown;
3836
+ };
3837
+ content: {
3838
+ "application/json": {
3839
+ creatorId: string;
3840
+ links: {
3841
+ name: string;
3842
+ /** @description User-facing value proposition, e.g., "3 months of Hulu free". Rendered in the deal email. */
3843
+ perk: string | null;
3844
+ /**
3845
+ * @description Constrained promo badge for in-app offer cards: free_trial | discount. Drives the card pill display AND client-side free-trial-vs-discount logic. Clients map the enum to display text + free-trial boolean. NULL means no badge.
3846
+ * @enum {string|null}
3847
+ */
3848
+ badgeLabel: "free_trial" | "discount" | null;
3849
+ /** @description Original price before discount */
3850
+ oldPrice: string | null;
3851
+ /** @description New/discounted price for the offer */
3852
+ newPrice: string | null;
3853
+ targetCountries: string[];
3854
+ /** @description Campaign the link points to. */
3855
+ campaignId: string;
3856
+ /**
3857
+ * Format: uri
3858
+ * @description The shareable branded short link (https://<host>/<slug>).
3859
+ */
3860
+ linkUrl: string;
3861
+ payout: {
3862
+ /** @description Publisher's payout per completion: campaign payout × the app's payout split (raw campaign payout when no split is set). */
3863
+ amount: number;
3864
+ /** @description ISO-4217 currency. Always USD. */
3865
+ currency: string;
3866
+ /**
3867
+ * @description Campaign payout model (CPA / CPC / CPI / CPM).
3868
+ * @enum {string}
3869
+ */
3870
+ model: "CPA" | "CPC" | "CPI" | "CPM";
3871
+ };
3872
+ /** @description The campaign's categories (for offer-wall filter tabs). Empty when the campaign has none. */
3873
+ categories: {
3874
+ id: string;
3875
+ name: string;
3876
+ }[];
3877
+ organization?: {
3878
+ /** Format: uuid */
3879
+ id: string;
3880
+ name: string;
3881
+ description: string | null;
3882
+ url: string | null;
3883
+ logoUrl: string | null;
3884
+ };
3885
+ creatives?: {
3886
+ /** Format: uuid */
3887
+ id: string;
3888
+ title: string;
3889
+ subtitle: string | null;
3890
+ description: string | null;
3891
+ /** Format: uri */
3892
+ primaryImageUrl: string;
3893
+ /** Format: uri */
3894
+ logoUrl: string | null;
3895
+ additionalImages: string[] | null;
3896
+ ctaText: string;
3897
+ /** @description Platforms this creative supports (empty = all platforms) */
3898
+ supportedPlatforms: ("android" | "ios" | "web")[] | null;
3899
+ }[];
3900
+ }[];
3901
+ };
3902
+ };
3903
+ };
3904
+ /** @description Default Response */
3905
+ 400: {
3906
+ headers: {
3907
+ [name: string]: unknown;
3908
+ };
3909
+ content: {
3910
+ "application/json": {
3911
+ error: string;
3912
+ details?: unknown;
3913
+ };
3914
+ };
3915
+ };
3916
+ /** @description Default Response */
3917
+ 401: {
3918
+ headers: {
3919
+ [name: string]: unknown;
3920
+ };
3921
+ content: {
3922
+ "application/json": {
3923
+ error: string;
3924
+ details?: unknown;
3925
+ };
3926
+ };
3927
+ };
3928
+ /** @description Default Response */
3929
+ 500: {
3930
+ headers: {
3931
+ [name: string]: unknown;
3932
+ };
3933
+ content: {
3934
+ "application/json": {
3935
+ error: string;
3936
+ details?: unknown;
3937
+ };
3938
+ };
3939
+ };
3940
+ };
3941
+ };
3942
+ delete?: never;
3943
+ options?: never;
3944
+ head?: never;
3945
+ patch?: never;
3946
+ trace?: never;
3947
+ };
3948
+ "/publisher/sdk/v1/creators/{creatorId}/stats": {
3949
+ parameters: {
3950
+ query?: never;
3951
+ header?: never;
3952
+ path?: never;
3953
+ cookie?: never;
3954
+ };
3955
+ /** @description Real-time performance for a creator's links, per campaign and per day: clicks (each click = one claim), completions (verified/final-granted conversions), and earnings (after your app's payout split; USD). Returns rolled-up totals plus a per-day series (`daily`). Optional `startDate`/`endDate` (YYYY-MM-DD, UTC, inclusive; start must be <= end) filter everything; absent = all-time. Clicks attribute by transaction date; completions + earnings by completion date. An unknown creatorId returns 200 with empty campaigns/daily and zeroed totals. Authentication: publishable key (X-API-Key: pk_live_* / pk_test_*). */
3956
+ get: {
3957
+ parameters: {
3958
+ query?: {
3959
+ startDate?: string;
3960
+ endDate?: string;
3961
+ };
3962
+ header?: never;
3963
+ path: {
3964
+ creatorId: string;
3965
+ };
3966
+ cookie?: never;
3967
+ };
3968
+ requestBody?: never;
3969
+ responses: {
3970
+ /** @description Default Response */
3971
+ 200: {
3972
+ headers: {
3973
+ [name: string]: unknown;
3974
+ };
3975
+ content: {
3976
+ "application/json": {
3977
+ creatorId: string;
3978
+ /** @description ISO-4217 currency for every `earnings` figure. Always USD. */
3979
+ currency: string;
3980
+ /** @description Echoed applied range start (YYYY-MM-DD), present only when supplied. */
3981
+ startDate?: string;
3982
+ /** @description Echoed applied range end (YYYY-MM-DD), present only when supplied. */
3983
+ endDate?: string;
3984
+ campaigns: {
3985
+ campaignId: string;
3986
+ campaignTitle: string;
3987
+ /** @description Distinct clicks in range (each click mints one transaction). */
3988
+ clicks: number;
3989
+ /** @description Clicks whose transaction reached a completed status (verified / final_granted) in range. */
3990
+ completions: number;
3991
+ /** @description Creator/publisher's earnings for this campaign in `currency`, after the app's payout split (raw payout sum if no split is set). */
3992
+ earnings: number;
3993
+ }[];
3994
+ totals: {
3995
+ clicks: number;
3996
+ completions: number;
3997
+ earnings: number;
3998
+ };
3999
+ /** @description Per-day series across all campaigns, ascending; days with no activity are omitted. Clicks attributed by transaction created_at (UTC); completions + earnings by completion timestamp (UTC). */
4000
+ daily: {
4001
+ /** @description UTC calendar date (YYYY-MM-DD). */
4002
+ date: string;
4003
+ clicks: number;
4004
+ completions: number;
4005
+ earnings: number;
4006
+ }[];
4007
+ };
4008
+ };
4009
+ };
4010
+ /** @description Default Response */
4011
+ 400: {
4012
+ headers: {
4013
+ [name: string]: unknown;
4014
+ };
4015
+ content: {
4016
+ "application/json": {
4017
+ error: string;
4018
+ details?: unknown;
4019
+ };
4020
+ };
4021
+ };
4022
+ /** @description Default Response */
4023
+ 401: {
4024
+ headers: {
4025
+ [name: string]: unknown;
4026
+ };
4027
+ content: {
4028
+ "application/json": {
4029
+ error: string;
4030
+ details?: unknown;
4031
+ };
4032
+ };
4033
+ };
4034
+ /** @description Default Response */
4035
+ 500: {
4036
+ headers: {
4037
+ [name: string]: unknown;
4038
+ };
4039
+ content: {
4040
+ "application/json": {
4041
+ error: string;
4042
+ details?: unknown;
4043
+ };
4044
+ };
4045
+ };
4046
+ };
4047
+ };
4048
+ put?: never;
4049
+ post?: never;
4050
+ delete?: never;
4051
+ options?: never;
4052
+ head?: never;
4053
+ patch?: never;
4054
+ trace?: never;
4055
+ };
3653
4056
  "/v1/events": {
3654
4057
  parameters: {
3655
4058
  query?: never;
@@ -3768,6 +4171,11 @@ export interface components {
3768
4171
  success: boolean;
3769
4172
  /** @description UI configuration: template + values */
3770
4173
  ui: {
4174
+ /**
4175
+ * @description The Encore surface this UI config is for
4176
+ * @enum {string}
4177
+ */
4178
+ useCase: "churn-intervention" | "post-action-reward";
3771
4179
  /**
3772
4180
  * Format: uuid
3773
4181
  * @description Selected variant ID
@@ -3811,6 +4219,10 @@ export interface components {
3811
4219
  customHeadline?: string | null;
3812
4220
  /** @description Custom subheadline text for SDUI variant (falls back to subtitle) */
3813
4221
  customSubheadline?: string | null;
4222
+ /** @description Headline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward' — the template references ${rewardHeadline} unconditionally and the substitution engine leaves an unresolved token visible on screen. Resolution: app_use_cases.headline, else the shipped default. */
4223
+ rewardHeadline?: string | null;
4224
+ /** @description Subheadline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward', for the same reason as rewardHeadline — the template references ${rewardSubheadline} unconditionally. Resolution: app_use_cases.subheadline, else the shipped default. */
4225
+ rewardSubheadline?: string | null;
3814
4226
  };
3815
4227
  /** @description Appearance values */
3816
4228
  appearance: {
@@ -3831,6 +4243,141 @@ export interface components {
3831
4243
  };
3832
4244
  };
3833
4245
  };
4246
+ /** @description NEW, additive. Default variant for every OTHER use case this app is enabled for, so the SDK can cache them at identify(). `ui` is unchanged; un-upgraded decoders ignore this key. */
4247
+ useCases: {
4248
+ "churn-intervention"?: {
4249
+ /**
4250
+ * Format: uuid
4251
+ * @description Default variant ID for this use case; null when the app is enabled for the surface but no default is eligible for it.
4252
+ */
4253
+ variantId: string | null;
4254
+ /** @description Default variant name; null alongside a null variantId. */
4255
+ variantName: string | null;
4256
+ /** @description The default variant's SDUI template. NULL means 'enabled, but nothing to render' — the SDK must no-op on this surface. It must NEVER substitute another use case's template. */
4257
+ template: {
4258
+ [key: string]: unknown;
4259
+ } | null;
4260
+ /** @description Values to substitute into this use case's template. Always present, even when template is null — the copy is resolved from app_use_cases regardless. */
4261
+ values: {
4262
+ /** @description Text values for template substitution */
4263
+ text: {
4264
+ /** @description App name for ${appName} substitution */
4265
+ appName?: string | null;
4266
+ /** @description Main title text */
4267
+ title?: string | null;
4268
+ /** @description Subtitle text */
4269
+ subtitle?: string | null;
4270
+ /** @description Offer description text */
4271
+ offerDescription?: string | null;
4272
+ /** @description Instructions title */
4273
+ instructionsTitle?: string | null;
4274
+ /** @description Last step header text */
4275
+ lastStepHeader?: string | null;
4276
+ /** @description Last step description */
4277
+ lastStepDescription?: string | null;
4278
+ /** @description Credit claimed title */
4279
+ creditClaimedTitle?: string | null;
4280
+ /** @description Credit claimed subtitle */
4281
+ creditClaimedSubtitle?: string | null;
4282
+ /** @description Apply credits button text */
4283
+ applyCreditsButton?: string | null;
4284
+ /** @description Accent title text */
4285
+ accentTitle?: string | null;
4286
+ /** @description Custom headline text for SDUI variant (falls back to title) */
4287
+ customHeadline?: string | null;
4288
+ /** @description Custom subheadline text for SDUI variant (falls back to subtitle) */
4289
+ customSubheadline?: string | null;
4290
+ /** @description Headline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward' — the template references ${rewardHeadline} unconditionally and the substitution engine leaves an unresolved token visible on screen. Resolution: app_use_cases.headline, else the shipped default. */
4291
+ rewardHeadline?: string | null;
4292
+ /** @description Subheadline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward', for the same reason as rewardHeadline — the template references ${rewardSubheadline} unconditionally. Resolution: app_use_cases.subheadline, else the shipped default. */
4293
+ rewardSubheadline?: string | null;
4294
+ };
4295
+ /** @description Appearance values */
4296
+ appearance: {
4297
+ /**
4298
+ * @description Appearance mode
4299
+ * @enum {string|null}
4300
+ */
4301
+ mode?: "light" | "dark" | "auto" | null;
4302
+ /** @description Primary accent color (hex) */
4303
+ accentColor?: string | null;
4304
+ /** @description Accent title color (hex) */
4305
+ accentTitleColor?: string | null;
4306
+ };
4307
+ /** @description Media values (imagery URLs) */
4308
+ media: {
4309
+ /** @description App icon URL (App Store artwork for mobile apps, fetched favicon for web apps). Web SDK uses it as the default host logo when display.logoUrl is not set. */
4310
+ appstoreIcon: string | null;
4311
+ };
4312
+ };
4313
+ };
4314
+ "post-action-reward"?: {
4315
+ /**
4316
+ * Format: uuid
4317
+ * @description Default variant ID for this use case; null when the app is enabled for the surface but no default is eligible for it.
4318
+ */
4319
+ variantId: string | null;
4320
+ /** @description Default variant name; null alongside a null variantId. */
4321
+ variantName: string | null;
4322
+ /** @description The default variant's SDUI template. NULL means 'enabled, but nothing to render' — the SDK must no-op on this surface. It must NEVER substitute another use case's template. */
4323
+ template: {
4324
+ [key: string]: unknown;
4325
+ } | null;
4326
+ /** @description Values to substitute into this use case's template. Always present, even when template is null — the copy is resolved from app_use_cases regardless. */
4327
+ values: {
4328
+ /** @description Text values for template substitution */
4329
+ text: {
4330
+ /** @description App name for ${appName} substitution */
4331
+ appName?: string | null;
4332
+ /** @description Main title text */
4333
+ title?: string | null;
4334
+ /** @description Subtitle text */
4335
+ subtitle?: string | null;
4336
+ /** @description Offer description text */
4337
+ offerDescription?: string | null;
4338
+ /** @description Instructions title */
4339
+ instructionsTitle?: string | null;
4340
+ /** @description Last step header text */
4341
+ lastStepHeader?: string | null;
4342
+ /** @description Last step description */
4343
+ lastStepDescription?: string | null;
4344
+ /** @description Credit claimed title */
4345
+ creditClaimedTitle?: string | null;
4346
+ /** @description Credit claimed subtitle */
4347
+ creditClaimedSubtitle?: string | null;
4348
+ /** @description Apply credits button text */
4349
+ applyCreditsButton?: string | null;
4350
+ /** @description Accent title text */
4351
+ accentTitle?: string | null;
4352
+ /** @description Custom headline text for SDUI variant (falls back to title) */
4353
+ customHeadline?: string | null;
4354
+ /** @description Custom subheadline text for SDUI variant (falls back to subtitle) */
4355
+ customSubheadline?: string | null;
4356
+ /** @description Headline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward' — the template references ${rewardHeadline} unconditionally and the substitution engine leaves an unresolved token visible on screen. Resolution: app_use_cases.headline, else the shipped default. */
4357
+ rewardHeadline?: string | null;
4358
+ /** @description Subheadline for the reward template. NON-NULL whenever ui.useCase is 'post-action-reward', for the same reason as rewardHeadline — the template references ${rewardSubheadline} unconditionally. Resolution: app_use_cases.subheadline, else the shipped default. */
4359
+ rewardSubheadline?: string | null;
4360
+ };
4361
+ /** @description Appearance values */
4362
+ appearance: {
4363
+ /**
4364
+ * @description Appearance mode
4365
+ * @enum {string|null}
4366
+ */
4367
+ mode?: "light" | "dark" | "auto" | null;
4368
+ /** @description Primary accent color (hex) */
4369
+ accentColor?: string | null;
4370
+ /** @description Accent title color (hex) */
4371
+ accentTitleColor?: string | null;
4372
+ };
4373
+ /** @description Media values (imagery URLs) */
4374
+ media: {
4375
+ /** @description App icon URL (App Store artwork for mobile apps, fetched favicon for web apps). Web SDK uses it as the default host logo when display.logoUrl is not set. */
4376
+ appstoreIcon: string | null;
4377
+ };
4378
+ };
4379
+ };
4380
+ };
3834
4381
  /** @description Entitlement configuration (IAP or Native mode) */
3835
4382
  entitlements: {
3836
4383
  /** @description IAP config. If productId exists → IAP mode. */