@incodetech/core 2.0.0-alpha.8 → 2.0.0-rc.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.
Files changed (184) hide show
  1. package/dist/Actor-CI32dTbG.d.ts +2 -0
  2. package/dist/BaseWasmProvider-C_DLEI40.esm.js +1118 -0
  3. package/dist/BrowserStorageProvider-CuOW1Er2.esm.js +55 -0
  4. package/dist/BrowserTimerProvider-DhNc_x02.esm.js +22 -0
  5. package/dist/ITimerCapability-C67ZRskg.esm.js +7 -0
  6. package/dist/IpifyProvider-D7jx52AL.esm.js +139 -0
  7. package/dist/MotionSensorProvider-4v7xkqAp.esm.js +254 -0
  8. package/dist/OpenViduRecordingProvider-CMu6XVdc.esm.js +87 -0
  9. package/dist/StateMachine-BCQrZJhf.d.ts +2 -0
  10. package/dist/WasmUtilProvider-j98OJf-S.esm.js +114 -0
  11. package/dist/addressSearch-BpTbTWCa.esm.js +430 -0
  12. package/dist/ae-signature-DDDZmWXj.esm.js +12 -0
  13. package/dist/ae-signature.d.ts +25 -0
  14. package/dist/ae-signature.esm.js +8 -0
  15. package/dist/antifraud.d.ts +57 -0
  16. package/dist/antifraud.esm.js +45 -0
  17. package/dist/antifraudStateMachine-O0TMf6yc.esm.js +39 -0
  18. package/dist/api-CESGtpbH.esm.js +53 -0
  19. package/dist/authentication.d.ts +12 -0
  20. package/dist/authentication.esm.js +25 -0
  21. package/dist/authenticationManager-5M-fKzXx.esm.js +67 -0
  22. package/dist/authenticationManager-C83GNIhl.d.ts +66 -0
  23. package/dist/authenticationStateMachine-BMZqatiF.esm.js +139 -0
  24. package/dist/backCameraStream-DMdMeGk2.esm.js +346 -0
  25. package/dist/browserSimulation-gxD8cSpM.esm.js +20 -0
  26. package/dist/camera-DBSxa6ML.d.ts +4 -0
  27. package/dist/camera-PA2Ljri3.esm.js +22 -0
  28. package/dist/camera.d.ts +15 -0
  29. package/dist/camera.esm.js +5 -0
  30. package/dist/consent.d.ts +398 -0
  31. package/dist/consent.esm.js +79 -0
  32. package/dist/consentStateMachine-CCT-B60O.esm.js +151 -0
  33. package/dist/cpf-PPz2Njto.esm.js +38 -0
  34. package/dist/cpf-ocr.d.ts +204 -0
  35. package/dist/cpf-ocr.esm.js +177 -0
  36. package/dist/cross-document-data-match.d.ts +34 -0
  37. package/dist/cross-document-data-match.esm.js +71 -0
  38. package/dist/curp-validation.d.ts +188 -0
  39. package/dist/curp-validation.esm.js +110 -0
  40. package/dist/curpValidationStateMachine-CitWLr2c.esm.js +595 -0
  41. package/dist/custom-fields.d.ts +115 -0
  42. package/dist/custom-fields.esm.js +177 -0
  43. package/dist/custom-watchlist.d.ts +66 -0
  44. package/dist/custom-watchlist.esm.js +86 -0
  45. package/dist/dateUtils-UoN5xswP.esm.js +23 -0
  46. package/dist/deepsightLoader-Cm4JIT_z.esm.js +52 -0
  47. package/dist/deepsightService-CEVxzehb.d.ts +412 -0
  48. package/dist/deepsightService-O74l4Y__.esm.js +489 -0
  49. package/dist/device.d.ts +46 -0
  50. package/dist/device.esm.js +106 -0
  51. package/dist/displayErrors-DqJ_IbsG.d.ts +39 -0
  52. package/dist/document-capture.d.ts +906 -0
  53. package/dist/document-capture.esm.js +156 -0
  54. package/dist/document-upload.d.ts +331 -0
  55. package/dist/document-upload.esm.js +203 -0
  56. package/dist/documentCaptureStateMachine-BqzTDy9k.esm.js +394 -0
  57. package/dist/dynamic-forms.d.ts +178 -0
  58. package/dist/dynamic-forms.esm.js +323 -0
  59. package/dist/ekyb.d.ts +148 -0
  60. package/dist/ekyb.esm.js +127 -0
  61. package/dist/ekybStateMachine-B59rQjgj.esm.js +674 -0
  62. package/dist/ekyc.d.ts +164 -0
  63. package/dist/ekyc.esm.js +104 -0
  64. package/dist/ekycStateMachine-oeO0Iekd.esm.js +10626 -0
  65. package/dist/electronic-signature.d.ts +4 -0
  66. package/dist/electronic-signature.esm.js +7 -0
  67. package/dist/electronicSignatureManager-D9OHzTpG.esm.js +428 -0
  68. package/dist/email.d.ts +3 -263
  69. package/dist/email.esm.js +7 -477
  70. package/dist/emailManager-DIfnS5g1.d.ts +352 -0
  71. package/dist/emailManager-wAV0LE-H.esm.js +238 -0
  72. package/dist/emailStateMachine-DOf4j58N.esm.js +292 -0
  73. package/dist/endpoints-CnN3SyDa.esm.js +87 -0
  74. package/dist/events-D6-e4vok.esm.js +596 -0
  75. package/dist/events.d.ts +265 -0
  76. package/dist/events.esm.js +4 -0
  77. package/dist/extensibility.d.ts +122 -0
  78. package/dist/extensibility.esm.js +43 -0
  79. package/dist/face-match.d.ts +228 -0
  80. package/dist/face-match.esm.js +173 -0
  81. package/dist/faceCaptureManagerFactory-Dh2PdGlF.esm.js +290 -0
  82. package/dist/faceCaptureManagerFactory-yqtpxjnN.d.ts +690 -0
  83. package/dist/faceCaptureSetup-B3faSpYA.esm.js +873 -0
  84. package/dist/faceMatchStateMachine-DNFrxTFS.esm.js +127 -0
  85. package/dist/flow-events.d.ts +6 -0
  86. package/dist/flow-events.esm.js +0 -0
  87. package/dist/flow.d.ts +101 -321
  88. package/dist/flow.esm.js +370 -173
  89. package/dist/flowCompletionService-DhkT4SRY.d.ts +10 -0
  90. package/dist/flowCompletionService-P54yzGvA.esm.js +13 -0
  91. package/dist/flowServices-DTsm-Vf1.esm.js +188 -0
  92. package/dist/geolocation.d.ts +127 -0
  93. package/dist/geolocation.esm.js +89 -0
  94. package/dist/geolocationStateMachine-asasuHY2.esm.js +105 -0
  95. package/dist/getBrowser-BSXUTWXw.esm.js +41 -0
  96. package/dist/getDeviceClass-BSntT9_j.esm.js +14 -0
  97. package/dist/government-validation.d.ts +67 -0
  98. package/dist/government-validation.esm.js +81 -0
  99. package/dist/governmentValidationStateMachine-BDDYrJTo.esm.js +271 -0
  100. package/dist/home.d.ts +99 -0
  101. package/dist/home.esm.js +61 -0
  102. package/dist/http.d.ts +68 -0
  103. package/dist/http.esm.js +3 -0
  104. package/dist/id-ocr.d.ts +635 -0
  105. package/dist/id-ocr.esm.js +86 -0
  106. package/dist/id-verification.d.ts +190 -0
  107. package/dist/id-verification.esm.js +43 -0
  108. package/dist/id.d.ts +24 -0
  109. package/dist/id.esm.js +164 -0
  110. package/dist/idCaptureManager-B9TGA5dq.d.ts +956 -0
  111. package/dist/idCaptureManager-DMK0GIt3.esm.js +581 -0
  112. package/dist/idCaptureStateMachine-Bq0fVZXl.esm.js +2954 -0
  113. package/dist/idOcrStateMachine-YbjjC_Gg.esm.js +388 -0
  114. package/dist/idVerificationStateMachine-xbw9HP1Z.esm.js +71 -0
  115. package/dist/identity-reuse.d.ts +530 -0
  116. package/dist/identity-reuse.esm.js +274 -0
  117. package/dist/index-BLKtMA0g.d.ts +1177 -0
  118. package/dist/index-BcRG8rtJ.d.ts +97 -0
  119. package/dist/index.d.ts +3 -226
  120. package/dist/index.esm.js +11 -154
  121. package/dist/invokeOnCaptureCallback-rc6kBHo5.esm.js +30 -0
  122. package/dist/{lib-Bu9XGMBW.esm.js → lib-BB0B_qQX.esm.js} +801 -2
  123. package/dist/mandatory-consent.d.ts +412 -0
  124. package/dist/mandatory-consent.esm.js +78 -0
  125. package/dist/mandatoryConsentStateMachine-Cnco1jvn.esm.js +126 -0
  126. package/dist/openviduLazy-Cm0XFh_v.esm.js +3 -0
  127. package/dist/openviduLazy-Cok70ZSg.esm.js +12 -0
  128. package/dist/permissionServices-D_i6nzEw.esm.js +50 -0
  129. package/dist/phone.d.ts +3 -291
  130. package/dist/phone.esm.js +7 -548
  131. package/dist/phoneManager-B6M30hKE.d.ts +397 -0
  132. package/dist/phoneManager-DAJbGhlY.esm.js +256 -0
  133. package/dist/phoneStateMachine-CuPARRaT.esm.js +351 -0
  134. package/dist/platform-CfrjKhmi.esm.js +83 -0
  135. package/dist/qe-signature-DFo_Cc-I.esm.js +12 -0
  136. package/dist/qe-signature.d.ts +25 -0
  137. package/dist/qe-signature.esm.js +8 -0
  138. package/dist/recordingService-Ig2UgbLv.esm.js +1003 -0
  139. package/dist/redirect-to-mobile.d.ts +107 -0
  140. package/dist/redirect-to-mobile.esm.js +102 -0
  141. package/dist/redirectToMobileStateMachine-BOEqe46A.esm.js +249 -0
  142. package/dist/runChildModule-CqqwqAkW.esm.js +219 -0
  143. package/dist/selfie.d.ts +21 -754
  144. package/dist/selfie.esm.js +113 -962
  145. package/dist/selfieManager-D0lSgd-J.d.ts +68 -0
  146. package/dist/selfieManager-Duisl7qN.esm.js +60 -0
  147. package/dist/selfieStateMachine-D76whWEf.esm.js +68 -0
  148. package/dist/session-BS-d_vuE.esm.js +3206 -0
  149. package/dist/session.d.ts +217 -0
  150. package/dist/session.esm.js +9 -0
  151. package/dist/setup-Buy-hyj4.esm.js +887 -0
  152. package/dist/setup-C5AITV8m.d.ts +254 -0
  153. package/dist/signature.d.ts +94 -0
  154. package/dist/signature.esm.js +66 -0
  155. package/dist/signatureStateMachine-B5-QVUve.esm.js +132 -0
  156. package/dist/stats-CIfiPzb1.esm.js +16 -0
  157. package/dist/stats.d.ts +16 -0
  158. package/dist/stats.esm.js +4 -0
  159. package/dist/trust-graph.d.ts +54 -0
  160. package/dist/trust-graph.esm.js +56 -0
  161. package/dist/types-B06Ypu2F.d.ts +49 -0
  162. package/dist/types-BP1m8VRw.d.ts +340 -0
  163. package/dist/types-CFV9G_7j.d.ts +24 -0
  164. package/dist/{warmup-CEJTfxQr.d.ts → warmup-CEcppFiS.d.ts} +11 -3
  165. package/dist/wasm.d.ts +15 -0
  166. package/dist/wasm.esm.js +12 -0
  167. package/dist/watchlist-for-business.d.ts +79 -0
  168. package/dist/watchlist-for-business.esm.js +148 -0
  169. package/dist/watchlist.d.ts +62 -0
  170. package/dist/watchlist.esm.js +86 -0
  171. package/dist/watchlistServices-DMbUhkBX.esm.js +12 -0
  172. package/dist/workflow.d.ts +907 -0
  173. package/dist/workflow.esm.js +702 -0
  174. package/dist/{xstate.esm-B_rda9yU.esm.js → xstate.esm-B70JrNqo.esm.js} +144 -1
  175. package/package.json +203 -6
  176. package/dist/OpenViduLogger-BdPfiZO6.esm.js +0 -3
  177. package/dist/OpenViduLogger-CQyDxBvM.esm.js +0 -803
  178. package/dist/StateMachine-DRE1oH2B.d.ts +0 -2
  179. package/dist/addEvent-W0ORK0jT.esm.js +0 -16
  180. package/dist/endpoints-BSTFaHYo.esm.js +0 -1706
  181. package/dist/permissionServices-I6vX6DBy.esm.js +0 -72
  182. /package/dist/{Manager-BGfxEmyv.d.ts → Manager-C8PrhBOx.d.ts} +0 -0
  183. /package/dist/{chunk-C_Yo44FK.esm.js → chunk-CRF6K_H_.esm.js} +0 -0
  184. /package/dist/{types-iZi2rawo.d.ts → types-CAD4va6a.d.ts} +0 -0
@@ -0,0 +1,412 @@
1
+ import { n as WasmPipeline } from "./warmup-CEcppFiS.js";
2
+ import { t as CameraStream } from "./camera-DBSxa6ML.js";
3
+
4
+ //#region ../infra/src/capabilities/IRecordingCapability.d.ts
5
+ type RecordingPublisher = {
6
+ getStreamId: () => string | undefined;
7
+ replaceVideoTrack: (track: MediaStreamTrack) => Promise<void>;
8
+ destroy: () => void;
9
+ };
10
+ type RecordingConnection = {
11
+ sessionId: string | undefined;
12
+ publisher: RecordingPublisher;
13
+ disconnect: () => Promise<void>;
14
+ };
15
+ type RecordingConnectionEvents = {
16
+ onSessionConnected?: (sessionId: string | undefined) => void;
17
+ onSessionDisconnected?: (sessionId: string | undefined) => void;
18
+ onSessionException?: (params: {
19
+ name?: string;
20
+ message?: string;
21
+ sessionId?: string;
22
+ }) => void;
23
+ onPublisherCreated?: (params: {
24
+ streamId?: string;
25
+ sessionId?: string;
26
+ }) => void;
27
+ onPublisherError?: (params: {
28
+ message?: string;
29
+ sessionId?: string;
30
+ streamId?: string;
31
+ }) => void;
32
+ };
33
+ type ConnectRecordingParams = {
34
+ sessionToken: string;
35
+ stream: MediaStream;
36
+ events?: RecordingConnectionEvents;
37
+ };
38
+ type IRecordingCapability = {
39
+ /**
40
+ * Connects to a recording session and publishes the provided media stream.
41
+ * Returns a connection handle that can be disconnected and used to manage the publisher.
42
+ */
43
+ connect: (params: ConnectRecordingParams) => Promise<RecordingConnection>;
44
+ };
45
+ //#endregion
46
+ //#region ../infra/src/capabilities/IStorageCapability.d.ts
47
+ /**
48
+ * Storage capability interface for abstracting storage operations.
49
+ * Enables swapping between browser localStorage and future WASM-based storage.
50
+ */
51
+ interface IStorageCapability {
52
+ /**
53
+ * Retrieves a value from storage.
54
+ * @param key - The storage key
55
+ * @returns The stored value or null if not found
56
+ */
57
+ get<T>(key: string): Promise<T | null>;
58
+ /**
59
+ * Stores a value in storage.
60
+ * @param key - The storage key
61
+ * @param value - The value to store (will be serialized)
62
+ */
63
+ set<T>(key: string, value: T): Promise<void>;
64
+ /**
65
+ * Removes a value from storage.
66
+ * @param key - The storage key to remove
67
+ */
68
+ remove(key: string): Promise<void>;
69
+ /**
70
+ * Clears all values from storage.
71
+ */
72
+ clear(): Promise<void>;
73
+ }
74
+ //#endregion
75
+ //#region ../infra/src/capabilities/IMLProviderCapability.d.ts
76
+ /**
77
+ * Base configuration shared by all ML provider capabilities.
78
+ */
79
+ interface MLProviderConfig {
80
+ /** Path to the WASM binary */
81
+ wasmPath?: string;
82
+ /** Path to the SIMD-optimized WASM binary (optional) */
83
+ wasmSimdPath?: string;
84
+ /** Path to the WASM glue code (paired with `wasmPath`) */
85
+ glueCodePath?: string;
86
+ /**
87
+ * Path to the SIMD-optimized WASM glue code (paired with `wasmSimdPath`).
88
+ * If omitted, defaults to a sibling `.js` derived from `wasmSimdPath`.
89
+ */
90
+ glueCodeSimdPath?: string;
91
+ /** Whether to use SIMD optimizations (default: true) */
92
+ useSimd?: boolean;
93
+ /**
94
+ * Base path for ML model files. Models will be loaded from `${modelsBasePath}/${modelFileName}`.
95
+ * If not provided, models are expected in a 'models' subdirectory relative to the WASM binary.
96
+ */
97
+ modelsBasePath?: string;
98
+ }
99
+ /**
100
+ * Base interface for ML provider capabilities.
101
+ * Provides common lifecycle and frame processing methods shared by
102
+ * FaceDetectionCapability and IdCaptureCapability.
103
+ */
104
+ interface IMLProviderCapability<TConfig extends MLProviderConfig> {
105
+ /**
106
+ * Whether the provider has been initialized and is ready to process frames.
107
+ */
108
+ readonly initialized: boolean;
109
+ /**
110
+ * Initializes the provider with the given configuration.
111
+ * If WASM was already warmed up via `setup()` or `warmupWasm()`, this returns almost instantly.
112
+ * @param config - Provider configuration including WASM paths
113
+ */
114
+ initialize(config: TConfig): Promise<void>;
115
+ /**
116
+ * Processes a frame through the ML pipeline.
117
+ * Callbacks set via `setCallbacks()` will be invoked based on the analysis results.
118
+ * @param image - Image data to process
119
+ * @throws Error if provider is not initialized
120
+ */
121
+ processFrame(image: ImageData): Promise<void>;
122
+ /**
123
+ * Resets the pipeline to its initial state.
124
+ * Safe to call even if not initialized (no-op in that case).
125
+ */
126
+ reset(): void;
127
+ /**
128
+ * Disposes of resources and resets initialization state.
129
+ * Safe to call even if not initialized.
130
+ */
131
+ dispose(): Promise<void>;
132
+ }
133
+ //#endregion
134
+ //#region ../infra/src/capabilities/IWasmUtilCapability.d.ts
135
+ type WasmUtilConfig = MLProviderConfig & {
136
+ pipelines?: WasmPipeline[];
137
+ };
138
+ type VirtualCameraCheckOutput = {
139
+ canvas: HTMLCanvasElement | null;
140
+ itr: boolean | null;
141
+ skipped: boolean | null;
142
+ };
143
+ type IWasmUtilCapability = {
144
+ /**
145
+ * Whether the provider has been initialized and is ready to be used.
146
+ */
147
+ readonly initialized: boolean;
148
+ /**
149
+ * Initializes the provider with the given configuration.
150
+ * If WASM was already warmed up via `warmupWasm()`, this returns almost instantly.
151
+ * @param config - Provider configuration including WASM paths
152
+ */
153
+ initialize(config: WasmUtilConfig): Promise<void>;
154
+ /**
155
+ * Encrypts a base64 image using the WASM utility API.
156
+ * @param image - Base64 image string (no data URL prefix)
157
+ * @returns Encrypted string
158
+ */
159
+ encryptImage(image: string): string;
160
+ setSdkVersion(version: string): void;
161
+ setSdkPlatform(platform: string): void;
162
+ setDeviceInfo(deviceInfo: object, overrideExisting?: boolean): void;
163
+ setBrowserInfo(browserInfo: object, overrideExisting?: boolean): void;
164
+ setCameraInfo(cameraInfo: object, overrideExisting?: boolean): void;
165
+ setMotionStatus(status: string): void;
166
+ setBackgroundMode(backgroundMode: boolean): void;
167
+ setZc(zc: string): void;
168
+ setInspectorOpened(opened: boolean): void;
169
+ getMetadata(): string;
170
+ analyzeFrame(image: ImageData): Promise<void>;
171
+ getCheck(): string;
172
+ /**
173
+ * Gets the current pipeline state. Must be called before setMotionStatus(),
174
+ * getCheck(), setBackgroundMode(), and getMetadata() for proper metadata generation.
175
+ */
176
+ getPipelineState(): string;
177
+ estimatePerformance(): string;
178
+ isVirtualCamera(label: string | null): boolean;
179
+ prc(): Promise<void>;
180
+ poc(output: VirtualCameraCheckOutput): Promise<void>;
181
+ ckvcks(data: ArrayBuffer): void;
182
+ getVersions(): Promise<unknown>;
183
+ /**
184
+ * Disposes of resources and resets initialization state.
185
+ */
186
+ dispose(): Promise<void>;
187
+ };
188
+ //#endregion
189
+ //#region ../infra/src/media/canvas.d.ts
190
+ /**
191
+ * Class representing a canvas element for image capture and manipulation.
192
+ */
193
+ declare class IncodeCanvas {
194
+ canvas: HTMLCanvasElement;
195
+ private base64Image;
196
+ private blobData;
197
+ /**
198
+ * Creates an {@link IncodeCanvas} from a raw {@link ImageData} frame.
199
+ * @param imageData - Frame pixels in RGBA format
200
+ * @returns An {@link IncodeCanvas} containing the provided pixels
201
+ */
202
+ static fromImageData(imageData: ImageData): IncodeCanvas;
203
+ /**
204
+ * Create a new canvas element.
205
+ * @param canvas_ - The canvas element to clone.
206
+ */
207
+ constructor(canvas_: HTMLCanvasElement);
208
+ /**
209
+ * Check if the current canvas is valid.
210
+ */
211
+ private checkCanvas;
212
+ /**
213
+ * Disposes of resources, including revoking object URLs to prevent memory leaks.
214
+ */
215
+ dispose(): void;
216
+ /**
217
+ * Release the data stored by IncodeCanvas.
218
+ */
219
+ release(): void;
220
+ /**
221
+ * Revokes the object URL if one exists, preventing memory leaks.
222
+ * Use this when you no longer need the preview image URL.
223
+ */
224
+ revokeObjectURL(): void;
225
+ /**
226
+ * Get the width of the canvas.
227
+ */
228
+ width(): number | null;
229
+ /**
230
+ * Get the height of the canvas.
231
+ */
232
+ height(): number | null;
233
+ /**
234
+ * Set the width of the canvas.
235
+ */
236
+ setWidth(width: number): void;
237
+ /**
238
+ * Set the height of the canvas.
239
+ */
240
+ setHeight(height: number): void;
241
+ /**
242
+ * Clone the current canvas.
243
+ */
244
+ clone(): IncodeCanvas | null;
245
+ /**
246
+ * Deep clone the current IncodeCanvas including blob data.
247
+ */
248
+ deepClone(): Promise<IncodeCanvas | null>;
249
+ /**
250
+ * Returns the drawing context on the canvas.
251
+ */
252
+ getContext(contextId: '2d', contextAttributes?: CanvasRenderingContext2DSettings): CanvasRenderingContext2D | null;
253
+ /**
254
+ * Retrieves the image data from the canvas.
255
+ */
256
+ getImageData(): ImageData | null;
257
+ /**
258
+ * Updates the base64 representation of the current canvas image.
259
+ */
260
+ updateBase64Image(jpegQuality?: number): void;
261
+ /**
262
+ * Converts the current canvas element to a base64 string.
263
+ */
264
+ getBase64Image(jpegQuality?: number, includeDataURLPrefix?: boolean): string | null;
265
+ /**
266
+ * Sets the base64 representation of the current canvas image.
267
+ */
268
+ setBase64Image(base64Image: string | null): void;
269
+ /**
270
+ * Updates the Blob representation of the current canvas image.
271
+ */
272
+ updateBlob(jpegQuality?: number, includeDataURLPrefix?: boolean): void;
273
+ /**
274
+ * Converts a base64 string to a Blob and creates a URL for it.
275
+ */
276
+ static base64ToBlob(base64: string): {
277
+ blob: Blob;
278
+ url: string;
279
+ } | null;
280
+ /**
281
+ * Retrieves the Blob data and its URL from the current canvas.
282
+ */
283
+ getBlobData(jpegQuality?: number, includeDataURLPrefix?: boolean): {
284
+ blob: Blob;
285
+ url: string;
286
+ } | null;
287
+ /**
288
+ * Sets the Blob data of the current canvas image.
289
+ */
290
+ setBlobData(blobData: {
291
+ blob: Blob;
292
+ url: string;
293
+ }): Promise<void>;
294
+ /**
295
+ * Returns a resized canvas according to video element size.
296
+ */
297
+ getResizedCanvas(videoElementWidth: number, videoElementHeight: number): IncodeCanvas | null;
298
+ }
299
+ //#endregion
300
+ //#region ../infra/src/media/StreamCanvasCapture.d.ts
301
+ type StreamCanvasCaptureOptions = {
302
+ fps?: number;
303
+ width?: number;
304
+ height?: number;
305
+ };
306
+ type StreamCanvasCaptureEventMap = {
307
+ frame: Event;
308
+ };
309
+ declare class StreamCanvasCapture {
310
+ private video;
311
+ private canvas;
312
+ private ctx;
313
+ private rafId;
314
+ private lastFrameTimeSeconds;
315
+ private lastTickTimeMs;
316
+ private hasFrame;
317
+ private disposed;
318
+ private eventTarget;
319
+ constructor(stream: CameraStream, options?: StreamCanvasCaptureOptions);
320
+ addEventListener(type: keyof StreamCanvasCaptureEventMap, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
321
+ removeEventListener(type: keyof StreamCanvasCaptureEventMap, listener: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions): void;
322
+ /**
323
+ * Returns the latest cached frame as an {@link IncodeCanvas}.
324
+ */
325
+ getLatestCanvas(): IncodeCanvas | null;
326
+ /**
327
+ * Returns the latest cached frame as raw {@link ImageData}.
328
+ */
329
+ getLatestFrame(): ImageData | null;
330
+ /**
331
+ * Disposes internal resources and stops the capture loop.
332
+ */
333
+ dispose(): void;
334
+ private rafLoop;
335
+ private tick;
336
+ }
337
+ //#endregion
338
+ //#region ../infra/src/capabilities/IMotionSensorCapability.d.ts
339
+ type MotionStatus = 'PASS' | 'FAIL' | 'UNCLEAR';
340
+ type MotionPermissionState = 'granted' | 'denied' | 'not-required';
341
+ type IMotionSensorCapability = {
342
+ requestPermission(): Promise<MotionPermissionState>;
343
+ start(): Promise<void>;
344
+ stop(): void;
345
+ check(): MotionStatus;
346
+ readonly isRunning: boolean;
347
+ readonly hasPermission: boolean;
348
+ };
349
+ //#endregion
350
+ //#region src/internal/deepsight/metadataService.d.ts
351
+ type MetadataService = {
352
+ initialize(sdkVersion: string, disableIpify?: boolean): Promise<void>;
353
+ updateCameraInfo(videoTrack: MediaStreamTrack): void;
354
+ checkForVirtualCameraByLabel(videoTrack: MediaStreamTrack | null): Promise<boolean>;
355
+ analyzeFrame(imageData: ImageData): Promise<void>;
356
+ setMotionStatus(status: string): void;
357
+ setBackgroundMode(backgroundMode: boolean): void;
358
+ estimatePerformance(): string;
359
+ getMetadata(): string;
360
+ getCheck(): string;
361
+ getPipelineState(): string;
362
+ /**
363
+ * Prepares pipeline state for metadata collection.
364
+ * Must be called before setMotionStatus, getCheck, setBackgroundMode, and getMetadata.
365
+ */
366
+ preparePipelineState(): void;
367
+ };
368
+ //#endregion
369
+ //#region src/internal/deepsight/motionStatusService.d.ts
370
+ type MotionStatusService = {
371
+ requestPermission(): Promise<MotionPermissionState>;
372
+ start(): Promise<void>;
373
+ stop(): void;
374
+ check(): MotionStatus;
375
+ readonly isRunning: boolean;
376
+ readonly hasPermission: boolean;
377
+ };
378
+ //#endregion
379
+ //#region src/internal/virtualCameraCheck.d.ts
380
+ declare const frameSources: {
381
+ readonly front: "FRONT_ID";
382
+ readonly back: "BACK_ID";
383
+ readonly selfie: "SELFIE";
384
+ };
385
+ type FrameSource = (typeof frameSources)[keyof typeof frameSources];
386
+ //#endregion
387
+ //#region src/internal/deepsight/deepsightService.d.ts
388
+ type DeepsightService = {
389
+ readonly metadata: MetadataService;
390
+ readonly motion: MotionStatusService;
391
+ initialize(disableIpify?: boolean): Promise<void>;
392
+ requestMotionPermission(): Promise<'granted' | 'denied' | 'not-required'>;
393
+ startMotionSensors(): Promise<void>;
394
+ stopMotionSensors(): void;
395
+ checkVirtualCamera(videoTrack: MediaStreamTrack): Promise<boolean>;
396
+ performVirtualCameraCheck(sessionToken: string | null, source: FrameSource): Promise<void>;
397
+ /**
398
+ * Runs PRC warmup and stores DS flag using infrastructure providers.
399
+ */
400
+ performPrcCheck(params: DeepsightPrcCheckParams): Promise<void>;
401
+ analyzeFrame(imageData: ImageData): Promise<void>;
402
+ getMetadata(): string;
403
+ getMotionStatus(): string;
404
+ getAnalysisStatus(): string;
405
+ getPipelineState(): string;
406
+ cleanup(): void;
407
+ };
408
+ type DeepsightPrcCheckParams = {
409
+ constraints: MediaStreamConstraints;
410
+ };
411
+ //#endregion
412
+ export { IWasmUtilCapability as a, IMLProviderCapability as c, IRecordingCapability as d, RecordingConnection as f, IncodeCanvas as i, MLProviderConfig as l, IMotionSensorCapability as n, VirtualCameraCheckOutput as o, StreamCanvasCapture as r, WasmUtilConfig as s, DeepsightService as t, IStorageCapability as u };