@dolby-optiview/ads-sdk-core 1.0.0-beta.1

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.
Files changed (187) hide show
  1. package/dist/OptiViewAds.d.ts +190 -0
  2. package/dist/OptiViewAds.js +1 -0
  3. package/dist/config/keys.d.ts +23 -0
  4. package/dist/config/keys.js +1 -0
  5. package/dist/diagnostics/DiagnosticBuffer.d.ts +33 -0
  6. package/dist/diagnostics/DiagnosticBuffer.js +1 -0
  7. package/dist/diagnostics/DiagnosticEvent.d.ts +71 -0
  8. package/dist/diagnostics/DiagnosticEvent.js +1 -0
  9. package/dist/diagnostics/debugLog.d.ts +8 -0
  10. package/dist/diagnostics/debugLog.js +1 -0
  11. package/dist/diagnostics/errorCodes.d.ts +45 -0
  12. package/dist/diagnostics/errorCodes.js +1 -0
  13. package/dist/diagnostics/index.d.ts +6 -0
  14. package/dist/diagnostics/index.js +1 -0
  15. package/dist/diagnostics/playbackErrorContext.d.ts +22 -0
  16. package/dist/diagnostics/playbackErrorContext.js +1 -0
  17. package/dist/generated/diagnosticCodes.d.ts +487 -0
  18. package/dist/generated/diagnosticCodes.js +1 -0
  19. package/dist/generated/version.d.ts +5 -0
  20. package/dist/generated/version.js +1 -0
  21. package/dist/id3/buildId3.d.ts +25 -0
  22. package/dist/id3/buildId3.js +1 -0
  23. package/dist/id3/index.d.ts +3 -0
  24. package/dist/id3/index.js +1 -0
  25. package/dist/id3/parseId3Geob.d.ts +28 -0
  26. package/dist/id3/parseId3Geob.js +1 -0
  27. package/dist/index.d.ts +45 -0
  28. package/dist/index.js +1 -0
  29. package/dist/interfaces/PlayerAdapter.d.ts +163 -0
  30. package/dist/interfaces/PlayerAdapter.js +1 -0
  31. package/dist/internal/index.d.ts +1 -0
  32. package/dist/internal/index.js +1 -0
  33. package/dist/server/index.d.ts +20 -0
  34. package/dist/server/index.js +1 -0
  35. package/dist/services/AdBreakSequencer.d.ts +146 -0
  36. package/dist/services/AdBreakSequencer.js +1 -0
  37. package/dist/services/AdPlayerController.d.ts +495 -0
  38. package/dist/services/AdPlayerController.js +1 -0
  39. package/dist/services/BreakScheduler.d.ts +215 -0
  40. package/dist/services/BreakScheduler.js +1 -0
  41. package/dist/services/BreakTransitionTimer.d.ts +48 -0
  42. package/dist/services/BreakTransitionTimer.js +1 -0
  43. package/dist/services/CmcdAdReporter.d.ts +81 -0
  44. package/dist/services/CmcdAdReporter.js +1 -0
  45. package/dist/services/GamPodAdTracker.d.ts +65 -0
  46. package/dist/services/GamPodAdTracker.js +1 -0
  47. package/dist/services/GamPodUrlBuilder.d.ts +30 -0
  48. package/dist/services/GamPodUrlBuilder.js +1 -0
  49. package/dist/services/GamStreamManager.d.ts +67 -0
  50. package/dist/services/GamStreamManager.js +1 -0
  51. package/dist/services/LensReporter.d.ts +30 -0
  52. package/dist/services/LensReporter.js +1 -0
  53. package/dist/services/ManifestService.d.ts +91 -0
  54. package/dist/services/ManifestService.js +1 -0
  55. package/dist/services/MetadataCueTracker.d.ts +44 -0
  56. package/dist/services/MetadataCueTracker.js +1 -0
  57. package/dist/services/PauseAdController.d.ts +108 -0
  58. package/dist/services/PauseAdController.js +1 -0
  59. package/dist/services/RewindRearm.d.ts +109 -0
  60. package/dist/services/RewindRearm.js +1 -0
  61. package/dist/services/SsaiController.d.ts +59 -0
  62. package/dist/services/SsaiController.js +1 -0
  63. package/dist/services/StitcherUrlBuilder.d.ts +34 -0
  64. package/dist/services/StitcherUrlBuilder.js +1 -0
  65. package/dist/services/VastAdManager.d.ts +89 -0
  66. package/dist/services/VastAdManager.js +1 -0
  67. package/dist/services/adPlayer/AdPlayerEvents.d.ts +39 -0
  68. package/dist/services/adPlayer/AdPlayerEvents.js +1 -0
  69. package/dist/services/adPlayer/AdPlayerState.d.ts +98 -0
  70. package/dist/services/adPlayer/AdPlayerState.js +1 -0
  71. package/dist/services/adPlayer/AdPreloader.d.ts +54 -0
  72. package/dist/services/adPlayer/AdPreloader.js +1 -0
  73. package/dist/services/adPlayer/AdStage.d.ts +57 -0
  74. package/dist/services/adPlayer/AdStage.js +1 -0
  75. package/dist/services/adPlayer/AssetParameterResolver.d.ts +44 -0
  76. package/dist/services/adPlayer/AssetParameterResolver.js +1 -0
  77. package/dist/services/adPlayer/AssetPlayback.d.ts +71 -0
  78. package/dist/services/adPlayer/AssetPlayback.js +1 -0
  79. package/dist/services/adPlayer/BreakSequenceDriver.d.ts +46 -0
  80. package/dist/services/adPlayer/BreakSequenceDriver.js +1 -0
  81. package/dist/services/adPlayer/ContentResumeCoordinator.d.ts +44 -0
  82. package/dist/services/adPlayer/ContentResumeCoordinator.js +1 -0
  83. package/dist/services/adPlayer/ContinueContentPlayout.d.ts +26 -0
  84. package/dist/services/adPlayer/ContinueContentPlayout.js +1 -0
  85. package/dist/services/adPlayer/GamPodBridge.d.ts +66 -0
  86. package/dist/services/adPlayer/GamPodBridge.js +1 -0
  87. package/dist/services/adPlayer/PauseAdPresenter.d.ts +60 -0
  88. package/dist/services/adPlayer/PauseAdPresenter.js +1 -0
  89. package/dist/services/adPlayer/PresentationModeTracker.d.ts +66 -0
  90. package/dist/services/adPlayer/PresentationModeTracker.js +1 -0
  91. package/dist/services/adPlayer/SharedElementBreakPlayer.d.ts +54 -0
  92. package/dist/services/adPlayer/SharedElementBreakPlayer.js +1 -0
  93. package/dist/services/adPlayer/VariantSelector.d.ts +38 -0
  94. package/dist/services/adPlayer/VariantSelector.js +1 -0
  95. package/dist/services/adPlayer/connectPauseAd.d.ts +10 -0
  96. package/dist/services/adPlayer/connectPauseAd.js +1 -0
  97. package/dist/services/adPlayer/liveEdge.d.ts +6 -0
  98. package/dist/services/adPlayer/liveEdge.js +1 -0
  99. package/dist/services/assetParameterMacroTable.d.ts +9 -0
  100. package/dist/services/assetParameterMacroTable.js +1 -0
  101. package/dist/services/assetParameterMacros.d.ts +69 -0
  102. package/dist/services/assetParameterMacros.js +1 -0
  103. package/dist/services/breakTiming.d.ts +60 -0
  104. package/dist/services/breakTiming.js +1 -0
  105. package/dist/services/channelSwitch.d.ts +32 -0
  106. package/dist/services/channelSwitch.js +1 -0
  107. package/dist/services/detectDeviceType.d.ts +15 -0
  108. package/dist/services/detectDeviceType.js +1 -0
  109. package/dist/services/detectInsertionMode.d.ts +38 -0
  110. package/dist/services/detectInsertionMode.js +1 -0
  111. package/dist/services/detectPreloadMode.d.ts +13 -0
  112. package/dist/services/detectPreloadMode.js +1 -0
  113. package/dist/services/ed25519.d.ts +19 -0
  114. package/dist/services/ed25519.js +1 -0
  115. package/dist/services/fetchWithTimeout.d.ts +35 -0
  116. package/dist/services/fetchWithTimeout.js +1 -0
  117. package/dist/services/lensBackend.d.ts +16 -0
  118. package/dist/services/lensBackend.js +1 -0
  119. package/dist/services/lensBackendDevelopment.d.ts +1 -0
  120. package/dist/services/lensBackendDevelopment.js +1 -0
  121. package/dist/services/lensBackendProduction.d.ts +9 -0
  122. package/dist/services/lensBackendProduction.js +1 -0
  123. package/dist/services/manifestSignature.d.ts +43 -0
  124. package/dist/services/manifestSignature.js +1 -0
  125. package/dist/services/manifestTrustedKeys.d.ts +9 -0
  126. package/dist/services/manifestTrustedKeys.js +1 -0
  127. package/dist/services/parseBreakManifest.d.ts +15 -0
  128. package/dist/services/parseBreakManifest.js +1 -0
  129. package/dist/services/parseVastCompanion.d.ts +31 -0
  130. package/dist/services/parseVastCompanion.js +1 -0
  131. package/dist/services/parseVastLinear.d.ts +36 -0
  132. package/dist/services/parseVastLinear.js +1 -0
  133. package/dist/services/pictureInPicture.d.ts +28 -0
  134. package/dist/services/pictureInPicture.js +1 -0
  135. package/dist/services/resolveAssetParameters.d.ts +6 -0
  136. package/dist/services/resolveAssetParameters.js +1 -0
  137. package/dist/services/resolveDeliveryMode.d.ts +54 -0
  138. package/dist/services/resolveDeliveryMode.js +1 -0
  139. package/dist/services/resolveGamVendorConfiguration.d.ts +55 -0
  140. package/dist/services/resolveGamVendorConfiguration.js +1 -0
  141. package/dist/services/resolvePauseResumePoint.d.ts +32 -0
  142. package/dist/services/resolvePauseResumePoint.js +1 -0
  143. package/dist/services/resolvePollingDecision.d.ts +24 -0
  144. package/dist/services/resolvePollingDecision.js +1 -0
  145. package/dist/services/resolveResumePoint.d.ts +38 -0
  146. package/dist/services/resolveResumePoint.js +1 -0
  147. package/dist/services/resolveTargetedUri.d.ts +22 -0
  148. package/dist/services/resolveTargetedUri.js +1 -0
  149. package/dist/services/resolveVastAdmission.d.ts +34 -0
  150. package/dist/services/resolveVastAdmission.js +1 -0
  151. package/dist/services/selectVariant.d.ts +47 -0
  152. package/dist/services/selectVariant.js +1 -0
  153. package/dist/services/urlOrigin.d.ts +23 -0
  154. package/dist/services/urlOrigin.js +1 -0
  155. package/dist/session/AdBreakStatusTracker.d.ts +49 -0
  156. package/dist/session/AdBreakStatusTracker.js +1 -0
  157. package/dist/session/BreakLifecycle.d.ts +62 -0
  158. package/dist/session/BreakLifecycle.js +1 -0
  159. package/dist/session/SessionStarter.d.ts +98 -0
  160. package/dist/session/SessionStarter.js +1 -0
  161. package/dist/session/SessionState.d.ts +37 -0
  162. package/dist/session/SessionState.js +1 -0
  163. package/dist/types/BreakManifest.d.ts +335 -0
  164. package/dist/types/BreakManifest.js +1 -0
  165. package/dist/types/Events.d.ts +245 -0
  166. package/dist/types/Events.js +1 -0
  167. package/dist/types/OptiViewAdsConfig.d.ts +425 -0
  168. package/dist/types/OptiViewAdsConfig.js +1 -0
  169. package/dist/types/VendorAdError.d.ts +12 -0
  170. package/dist/types/VendorAdError.js +1 -0
  171. package/dist/vendor/lens-sdk/THIRD-PARTY-NOTICES.txt +266 -0
  172. package/dist/vendor/lens-sdk/compat.d.ts +9 -0
  173. package/dist/vendor/lens-sdk/encoding-cmcd.d.ts +9 -0
  174. package/dist/vendor/lens-sdk/encoding-json.d.ts +9 -0
  175. package/dist/vendor/lens-sdk/encoding.d.ts +42 -0
  176. package/dist/vendor/lens-sdk/environment.d.ts +35 -0
  177. package/dist/vendor/lens-sdk/index.d.ts +3 -0
  178. package/dist/vendor/lens-sdk/index.js +1 -0
  179. package/dist/vendor/lens-sdk/legacy.d.ts +12 -0
  180. package/dist/vendor/lens-sdk/lens-core-Q5lbQGMC.js +1 -0
  181. package/dist/vendor/lens-sdk/lens-global.d.ts +23 -0
  182. package/dist/vendor/lens-sdk/lens.d.ts +21 -0
  183. package/dist/vendor/lens-sdk/transport.d.ts +46 -0
  184. package/dist/vendor/lens-sdk/types.d.ts +218 -0
  185. package/dist/vendor/lens-sdk/user-id.d.ts +5 -0
  186. package/dist/vendor/lens-sdk/validation.d.ts +30 -0
  187. package/package.json +57 -0
@@ -0,0 +1,218 @@
1
+ /**
2
+ * Join once per integrator instance, at boot: who I am (namespace) and where
3
+ * my events go (destinations). Viewing sessions then start and end through
4
+ * the handle — there is no re-join between sessions.
5
+ */
6
+ export interface LensJoinOptions {
7
+ /**
8
+ * The integrator's product identity ('ads', 'live', …), NOT a session
9
+ * concept: the same namespace spans every session of this handle. Bound at
10
+ * join so no product can emit as another; destination filters key on it.
11
+ */
12
+ namespace: string;
13
+ destinations?: LensDestination[];
14
+ /** Optional — 'granted' by default; integrators that don't need a consent gate can ignore it. */
15
+ consent?: LensConsent;
16
+ /**
17
+ * Emit-path violations (bad custom key or event names) throw when true —
18
+ * for development and CI builds. Default false: the offending key or event
19
+ * is dropped with a console warning, and playback is never at risk. Setup
20
+ * problems (join/startSession arguments) always throw.
21
+ */
22
+ strict?: boolean;
23
+ /**
24
+ * Cadence of the session's liveness report (CMCD `e=t`), which Lens sends
25
+ * on its own — integrators never report it. Spec default 30000 ms; 0 turns
26
+ * it off; otherwise at least 1000 ms.
27
+ */
28
+ heartbeatMs?: number;
29
+ }
30
+ export type LensBackend = 'production' | 'disabled';
31
+ export interface LensConfigureOptions {
32
+ backend: LensBackend;
33
+ /**
34
+ * Automatic flushing at the platform's lifecycle cliff (`pagehide` here),
35
+ * on by default. Turn off only when the host flushes from its own
36
+ * lifecycle via {@link LensHandle.flush}. Each `configure` applies it
37
+ * anew; omitting it restores the default.
38
+ */
39
+ lifecycleFlush?: boolean;
40
+ }
41
+ export interface LensHandle {
42
+ /**
43
+ * Temporary session-control door: the integrator tells Lens when a viewing
44
+ * session starts/ends. Starting while one is active rolls it (new sid).
45
+ * The player-adapter phase will absorb this into automatic session management.
46
+ */
47
+ startSession(options?: LensStartSessionOptions): LensSession;
48
+ endSession(): void;
49
+ /** The active session, or null between sessions. */
50
+ readonly session: LensSession | null;
51
+ /**
52
+ * Report a standard CMCD event. The payload type follows the token:
53
+ * free-form events take {@link LensPayload}; spec-shaped events get
54
+ * compile-checked typed payloads. Dropped when no session is active or
55
+ * consent is denied; registered CMCD names inside `custom` throw.
56
+ */
57
+ emit<P extends LensPayload>(type: LensEventType<P>, payload?: P): void;
58
+ /**
59
+ * Report a custom event — anything the spec has no type for. Lowered to the
60
+ * CMCD custom event (`ce`) with `name` as the custom event name (`cen`) on
61
+ * the wire, unqualified per spec and in-core precedent. `name` must be a
62
+ * simple token (letters, digits, '-', '_'); otherwise the event is dropped.
63
+ * Takes the same {@link LensPayload} shape as free-form standard events.
64
+ */
65
+ emitCustom(name: string, payload?: LensPayload): void;
66
+ /**
67
+ * Attach this integrator's current state to the session's liveness reports:
68
+ * every heartbeat from now on carries these keys, in this handle's namespace
69
+ * either way — keys come and go, the namespace does not. Latest call wins; no
70
+ * argument (or nothing valid left) goes back to a plain liveness report. Sets
71
+ * state only — it never sends and never shifts the cadence. The payload's
72
+ * top level is Lens's; `custom` is yours.
73
+ */
74
+ setHeartbeatPayload(payload?: LensPayload): void;
75
+ /**
76
+ * Change the liveness cadence on a live handle — faster during an ad break,
77
+ * slower in the background. Same rule as `heartbeatMs` at join: `0` is off,
78
+ * anything else is a whole number of milliseconds of at least 1000. A new
79
+ * cadence opens with a report and runs from there, the way a session's does;
80
+ * `0` stops without one, and re-setting the interval already in force does
81
+ * nothing.
82
+ */
83
+ setHeartbeatInterval(ms: number): void;
84
+ setConsent(consent: LensConsent): void;
85
+ /**
86
+ * Send everything pending now. Not needed by a standard integrator —
87
+ * lifecycle flushing already covers the common cliffs; this is for hosts
88
+ * that opted out of it or live outside the observed lifecycles. Does not
89
+ * end the session; no-op after dispose.
90
+ */
91
+ flush(): void;
92
+ dispose(): void;
93
+ }
94
+ /**
95
+ * The one payload shape: custom keys always live under `custom`, so a future
96
+ * spec revision adding typed fields to any event is additive — never a
97
+ * call-site break. Typed events extend this with their spec fields at the
98
+ * top level.
99
+ */
100
+ export interface LensPayload {
101
+ /** Custom keys — short names; registered CMCD names throw at emit. */
102
+ custom?: LensEventKeys;
103
+ }
104
+ declare const payloadType: unique symbol;
105
+ /**
106
+ * A standard CMCD (CTA-5004-B) event type token, carrying the payload type
107
+ * it accepts — grows additively as more of the spec is adopted. v0 ships the
108
+ * ad set ({@link LensPayload}, with {@link LensAdPayload} on the ad-identity
109
+ * events); anything not listed here goes
110
+ * through `emitCustom`. Wire codes are the spec values.
111
+ */
112
+ export interface LensEventType<P extends LensPayload = LensPayload> {
113
+ readonly wireCode: string;
114
+ /** Phantom marker anchoring the payload type invariantly — never set at runtime. */
115
+ readonly [payloadType]?: (payload: P) => P;
116
+ }
117
+ /**
118
+ * Payload for the ad events that carry content identity (CTA-5004-B §8.2.8):
119
+ * `AD_START` swaps the session's `cid` for the ad's until the ad or its break
120
+ * ends; `AD_END`/`AD_SKIP` may carry it to label themselves when arriving out
121
+ * of order — they never re-open a swap. Content-replacing break formats only:
122
+ * overlays are not an ad for `cid` purposes and must not feed this field.
123
+ */
124
+ export interface LensAdPayload extends LensPayload {
125
+ /** The ad's own content ID (1-128 printable ASCII), reported as `cid`. */
126
+ contentId?: string;
127
+ }
128
+ export declare const LensEventType: {
129
+ /** An ad break has started (wire: 'abs'). */
130
+ readonly AD_BREAK_START: LensEventType<LensPayload>;
131
+ /** An ad has started playing (wire: 'as'). */
132
+ readonly AD_START: LensEventType<LensAdPayload>;
133
+ /** An ad has ended (wire: 'ae'). */
134
+ readonly AD_END: LensEventType<LensAdPayload>;
135
+ /** An ad break has ended (wire: 'abe'). */
136
+ readonly AD_BREAK_END: LensEventType<LensPayload>;
137
+ /** An ad was skipped (wire: 'sk'). */
138
+ readonly AD_SKIP: LensEventType<LensAdPayload>;
139
+ };
140
+ /**
141
+ * Marks a custom value that must be emitted as an unquoted structured-field
142
+ * token. The marker avoids inferring token-ness from ordinary enum strings.
143
+ */
144
+ export declare class LensToken {
145
+ readonly value: string;
146
+ constructor(value: string);
147
+ }
148
+ /**
149
+ * Event payload custom keys — CMCD value types plus LensToken, so every key
150
+ * serializes cleanly. Short names everywhere the integrator and the backend
151
+ * look; the CMCD wire hop alone qualifies them with the reverse-DNS prefix (a
152
+ * transport artifact, stripped again on ingest). Registered CMCD key names
153
+ * throw at emit; invalid token values are dropped.
154
+ */
155
+ export type LensEventKeys = Record<string, string | number | boolean | LensToken>;
156
+ export interface LensStartSessionOptions {
157
+ /** Externally steered session id (e.g. injected by discovery); Lens generates a UUID when absent. */
158
+ sessionId?: string;
159
+ /** The main content's ID (1-128 printable ASCII), stamped as `cid` on every report of the session. */
160
+ contentId?: string;
161
+ /** Streaming format (`sf`): 'd' DASH, 'h' HLS, 's' Smooth, 'e' HESP, 'o' other. */
162
+ streamingFormat?: 'd' | 'h' | 's' | 'e' | 'o';
163
+ /** Stream type (`st`): 'v' VOD, 'l' live, 'll' low-latency live. */
164
+ streamType?: 'v' | 'l' | 'll';
165
+ }
166
+ export interface LensDestination {
167
+ url: string;
168
+ filter?: LensDestinationFilter;
169
+ /**
170
+ * Wire format for this destination: 'cmcd' (default) — CMCD key
171
+ * serialization posted as application/cmcd, for CMCD-aware receivers like
172
+ * the OptiView ingest; 'json' — short-keyed reports posted as
173
+ * application/json, for endpoints that don't parse CMCD (customer ad-ops
174
+ * hooks).
175
+ */
176
+ format?: 'cmcd' | 'json';
177
+ /**
178
+ * Whether this destination receives liveness reports (`e=t`).
179
+ * Defaults to true for 'cmcd' — a CMCD event target is what the heartbeat
180
+ * is specified for — and false for every other format, so receivers only
181
+ * get liveness traffic they asked for.
182
+ */
183
+ heartbeat?: boolean;
184
+ /** Delivery hints, consumed by the transport: flush at maxEvents pending, or when the oldest event has waited maxDelayMs (0 = per event). */
185
+ batch?: {
186
+ maxEvents?: number;
187
+ maxDelayMs?: number;
188
+ };
189
+ }
190
+ export interface LensDestinationFilter {
191
+ namespaces?: string[];
192
+ /** Matches the event's wire type — or the custom name for custom events. */
193
+ events?: string[];
194
+ }
195
+ export type LensConsent = 'granted' | 'denied';
196
+ export interface LensSession {
197
+ readonly sessionId: string;
198
+ }
199
+ /** Wire-side only — what destinations receive. Integrators never construct it. */
200
+ export interface LensEvent {
201
+ /** The spec wire code ('abs', 'as', …) — or 'ce' for custom events. */
202
+ type: string;
203
+ /** The custom event name (spec `cen`); present only when type is 'ce'. */
204
+ customName?: string;
205
+ namespace: string;
206
+ /** The event's custom keys (the payload's `custom` map). */
207
+ keys?: LensEventKeys;
208
+ /** Epoch milliseconds. */
209
+ timestamp: number;
210
+ session: LensSession;
211
+ /** The effective content ID (`cid`) at emit time — the ad's during a swap, the session's otherwise. */
212
+ contentId?: string;
213
+ /** Streaming format (`sf`), from the session. */
214
+ streamingFormat?: string;
215
+ /** Stream type (`st`), from the session. */
216
+ streamType?: string;
217
+ }
218
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare function currentUserId(): string;
2
+ /** Consent revoked: the ID is identifying, so it is deleted — a later grant starts fresh. */
3
+ export declare function clearUserId(): void;
4
+ export declare function setUserIdForTesting(next: string | undefined): void;
5
+ export declare function resetUserIdForTesting(): void;
@@ -0,0 +1,30 @@
1
+ import { type LensEventKeys } from './types';
2
+ /** Keys Lens stamps itself — the environment plus the user ID (docs/internals.md). */
3
+ export declare const LENS_RESERVED: Set<string>;
4
+ /**
5
+ * Name problems are contract violations: strict mode throws; by default the
6
+ * offending key is dropped with a warning. Ordinary values pass through
7
+ * untouched; explicit token values are grammar-checked.
8
+ */
9
+ export declare function checkedCustomKeys(custom: LensEventKeys | undefined, strict: boolean): LensEventKeys | undefined;
10
+ /** True when the event may be sent; reports the violation otherwise. */
11
+ export declare function checkedCustomEventName(name: string, strict: boolean): boolean;
12
+ /** Session-start content IDs fail loudly — setup arguments, like requireSetupString. */
13
+ export declare function requireContentId(value: string): void;
14
+ export declare function requireStreamingFormat(value: string): void;
15
+ export declare function requireStreamType(value: string): void;
16
+ /**
17
+ * Ad content IDs arrive on the emit path: strict throws, default warns and
18
+ * drops the field — the event itself still goes out.
19
+ */
20
+ export declare function checkedContentId(value: string | undefined, strict: boolean): string | undefined;
21
+ /** Setup strings fail loudly regardless of mode — they run once, at boot. */
22
+ export declare function requireSetupString(value: string, what: string): void;
23
+ /** Reserved for reports the SDK would send on its own behalf — no integrator may claim it. */
24
+ export declare const LENS_NAMESPACE = "lens";
25
+ export declare function requireNamespace(value: string): void;
26
+ /** The spec's default interval-report cadence (CTA-5004-B Table 1). */
27
+ export declare const DEFAULT_HEARTBEAT_MS = 30000;
28
+ /** Below this a heartbeat is a flood, not a liveness signal. */
29
+ export declare const MIN_HEARTBEAT_MS = 1000;
30
+ export declare function requireHeartbeatMs(value: number): void;
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@dolby-optiview/ads-sdk-core",
3
+ "version": "1.0.0-beta.1",
4
+ "description": "OptiView Ads SDK Core - Player-agnostic ad insertion",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./diagnostics": {
13
+ "types": "./dist/diagnostics/index.d.ts",
14
+ "default": "./dist/diagnostics/index.js"
15
+ },
16
+ "./id3": {
17
+ "types": "./dist/id3/index.d.ts",
18
+ "default": "./dist/id3/index.js"
19
+ },
20
+ "./server": {
21
+ "types": "./dist/server/index.d.ts",
22
+ "default": "./dist/server/index.js"
23
+ },
24
+ "./internal": {
25
+ "types": "./dist/internal/index.d.ts",
26
+ "default": "./dist/internal/index.js"
27
+ }
28
+ },
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "scripts": {
33
+ "build": "tsc -b tsconfig.build.json && node ../../scripts/vendor-lens-web.mjs",
34
+ "test": "jest",
35
+ "test:watch": "jest --watch",
36
+ "clean": "rm -rf dist"
37
+ },
38
+ "keywords": [
39
+ "dolby",
40
+ "ads",
41
+ "sgai",
42
+ "video",
43
+ "advertising"
44
+ ],
45
+ "author": "Dolby",
46
+ "license": "MIT",
47
+ "engines": {
48
+ "node": ">=18.0.0"
49
+ },
50
+ "homepage": "https://ads-sdk.xnappet.live",
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "sideEffects": [
55
+ "dist/vendor/**/*.js"
56
+ ]
57
+ }