@incodetech/core 0.0.0-dev-20260402-682edb5 → 0.0.0-dev-20260402-7cf9db4
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/dist/Actor-phIcsUhv.d.ts +2 -0
- package/dist/BaseWasmProvider-BFXU7jj8.esm.js +1536 -0
- package/dist/BrowserEnvironmentProvider-DApG6lNu.esm.js +89 -0
- package/dist/BrowserTimerProvider-CRhCvln7.esm.js +22 -0
- package/dist/Manager-BndLda4_.d.ts +19 -0
- package/dist/{events-Cc1xUUgF.esm.js → Manager-D_DMzMWz.esm.js} +114 -11
- package/dist/{warmup-CzfSiaMj.d.ts → StateMachine-CGAi8x_b.d.ts} +4 -1
- package/dist/StreamCanvasCapture-9VAzOfOv.esm.js +410 -0
- package/dist/WasmUtilProvider-DctESPCy.esm.js +114 -0
- package/dist/{addressSearch-DzOdaNEA.esm.js → addressSearch-CYGzuJJ3.esm.js} +3 -3
- package/dist/authentication.d.ts +9 -7
- package/dist/authentication.esm.js +12 -10
- package/dist/{authenticationManager-TaI12wf3.d.ts → authenticationManager-B5Yv9bDw.d.ts} +2 -2
- package/dist/{authenticationManager-CBSPCdJc.esm.js → authenticationManager-C9iQ1d2a.esm.js} +5 -5
- package/dist/{backCameraStream-BGAbuvw1.esm.js → backCameraStream-BJwEXNl4.esm.js} +2 -1
- package/dist/camera-D-MPXRbZ.esm.js +22 -0
- package/dist/camera-Dv2WEhGe.d.ts +4 -0
- package/dist/consent.d.ts +55 -54
- package/dist/consent.esm.js +2 -3
- package/dist/curp-validation.d.ts +5 -3
- package/dist/curp-validation.esm.js +2 -3
- package/dist/deepsightLoader-D2MKmB5z.esm.js +48 -0
- package/dist/{deepsightService-DxA--87N.d.ts → deepsightService-CWnhwXLw.d.ts} +223 -17
- package/dist/document-capture.d.ts +58 -56
- package/dist/document-capture.esm.js +5 -4
- package/dist/document-upload.d.ts +47 -45
- package/dist/document-upload.esm.js +5 -4
- package/dist/ekyb.d.ts +3 -2
- package/dist/ekyb.esm.js +8 -7
- package/dist/ekyc.d.ts +3 -2
- package/dist/ekyc.esm.js +133 -123
- package/dist/email.d.ts +3 -2
- package/dist/email.esm.js +4 -4
- package/dist/{emailManager-DN_q_zxy.d.ts → emailManager-BIq6pJa8.d.ts} +11 -4
- package/dist/{emailManager-DSR9gQLX.esm.js → emailManager-C5GCSw78.esm.js} +43 -23
- package/dist/extensibility.d.ts +45 -43
- package/dist/extensibility.esm.js +26 -15
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -3
- package/dist/{faceCaptureManagerFactory-CGpkO_S3.d.ts → faceCaptureManagerFactory-CN5-GRxP.d.ts} +89 -142
- package/dist/{faceCaptureSetup-Rr7LUbBm.esm.js → faceCaptureSetup-DYRykM5Y.esm.js} +413 -7
- package/dist/flow.d.ts +6 -5
- package/dist/flow.esm.js +7 -7
- package/dist/{flowCompletionService-Bkaerugt.esm.js → flowCompletionService-CBvXiMKa.esm.js} +1 -1
- package/dist/{flowServices-Bt6lMLUI.esm.js → flowServices-CQ3rTJLE.esm.js} +2 -2
- package/dist/geolocation.d.ts +2 -1
- package/dist/geolocation.esm.js +16 -3
- package/dist/government-validation.d.ts +2 -1
- package/dist/government-validation.esm.js +3 -3
- package/dist/id.d.ts +9 -6
- package/dist/id.esm.js +14 -11
- package/dist/{idCaptureManager-Dc2NJMy_.d.ts → idCaptureManager-B1RWflj0.d.ts} +15 -12
- package/dist/{idCaptureManager-QyM4nIKM.esm.js → idCaptureManager-D5rjCu9r.esm.js} +178 -8
- package/dist/index.d.ts +68 -21
- package/dist/index.esm.js +440 -11
- package/dist/mandatory-consent.d.ts +58 -56
- package/dist/mandatory-consent.esm.js +2 -3
- package/dist/phone.d.ts +3 -2
- package/dist/phone.esm.js +4 -4
- package/dist/{phoneManager-D2A0hXXq.d.ts → phoneManager-Ba66ysK2.d.ts} +9 -2
- package/dist/{phoneManager-D2nZtu-b.esm.js → phoneManager-CQJim-Ky.esm.js} +32 -21
- package/dist/platform-B3nGssGZ.esm.js +83 -0
- package/dist/redirect-to-mobile.d.ts +2 -1
- package/dist/redirect-to-mobile.esm.js +3 -3
- package/dist/selfie.d.ts +9 -7
- package/dist/selfie.esm.js +12 -10
- package/dist/{selfieManager-B4Nnp7ws.d.ts → selfieManager-BnfnTPcx.d.ts} +2 -2
- package/dist/{selfieManager-CvE35L72.esm.js → selfieManager-DYW1C2GP.esm.js} +4 -3
- package/dist/session-TBPhHmyy.esm.js +3130 -0
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +2 -2
- package/dist/signature.d.ts +3 -3
- package/dist/signature.esm.js +3 -4
- package/dist/{stats-D0m3TvIg.esm.js → stats-D4C7iDy1.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{types-oveF7RrS.d.ts → types-BWGxcjiZ.d.ts} +1 -1
- package/dist/{types-mQLzH6uw.d.ts → types-BX1ZlbSR.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/deepsightLoader-B93Oa9pS.esm.js +0 -24
- package/dist/deepsightService-CLUMQ5ee.esm.js +0 -235
- package/dist/index-BTaLQSj9.d.ts +0 -219
- package/dist/recordingsRepository-Djt_In2b.esm.js +0 -122
- package/dist/session-CUy9-Yzi.esm.js +0 -250
- package/dist/src-8rn6DoH7.esm.js +0 -6554
- /package/dist/{api-G4JA8CXK.esm.js → api-3fZO5bmj.esm.js} +0 -0
- /package/dist/{browserSimulation-C8gNnn5p.esm.js → browserSimulation-zWJAZ1vA.esm.js} +0 -0
- /package/dist/{displayErrors-BgtBHbfb.d.ts → displayErrors-DzzB3fcR.d.ts} +0 -0
- /package/dist/{flowCompletionService-De8JDo87.d.ts → flowCompletionService-C_CShl_d.d.ts} +0 -0
- /package/dist/{id-B30uqGbp.esm.js → id-Dv0it9CY.esm.js} +0 -0
- /package/dist/{index-LKrIp3Oo.d.ts → index-CuY8tqBC.d.ts} +0 -0
- /package/dist/{lib-qeMam2F_.esm.js → lib-B5byelWf.esm.js} +0 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { r as
|
|
1
|
+
import { n as isDesktop } from "./platform-B3nGssGZ.esm.js";
|
|
2
|
+
import { d as IdCaptureModelType, i as IncodeCanvas, l as mlWasmJSApi_default, o as getWindowDimensions, t as BaseWasmProvider, u as WasmPipelineType } from "./BaseWasmProvider-BFXU7jj8.esm.js";
|
|
3
|
+
import { c as requestPermission, d as flagIdManualReview, f as BrowserStorageProvider, i as stopRecording$1, l as StreamCanvasProcessingSession, n as createRecordingSession, o as OpenViduRecordingProvider, p as getDeviceClass, r as startRecording, s as checkPermission, t as StreamCanvasCapture } from "./StreamCanvasCapture-9VAzOfOv.esm.js";
|
|
4
|
+
import { r as getToken, t as api } from "./api-3fZO5bmj.esm.js";
|
|
5
|
+
import { C as fromPromise, S as fromCallback, b as setup, c as getDefaultManagerScreenName, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, w as createActor, x as assign, y as revokeObjectURL } from "./Manager-D_DMzMWz.esm.js";
|
|
6
6
|
import { t as endpoints } from "./endpoints-CCuj1KZH.esm.js";
|
|
7
|
-
import { t as getDisableIpify } from "./session-
|
|
8
|
-
import { t as
|
|
7
|
+
import { t as getDisableIpify } from "./session-TBPhHmyy.esm.js";
|
|
8
|
+
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-CRhCvln7.esm.js";
|
|
9
|
+
import { t as addDeviceStats } from "./stats-D4C7iDy1.esm.js";
|
|
10
|
+
import { t as getBackCameraStream } from "./backCameraStream-BJwEXNl4.esm.js";
|
|
9
11
|
|
|
10
12
|
//#region src/modules/id/idCaptureHelpers.ts
|
|
11
13
|
/**
|
|
@@ -51,6 +53,174 @@ const ID_ERROR_CODES = {
|
|
|
51
53
|
SERVER: "SERVER_ERROR"
|
|
52
54
|
};
|
|
53
55
|
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ../infra/src/wasm/idCaptureDefaults.ts
|
|
58
|
+
/**
|
|
59
|
+
* Default WASM thresholds for ID capture quality checks.
|
|
60
|
+
* Based on legacy pipelinesConfig.ts values.
|
|
61
|
+
*/
|
|
62
|
+
const DEFAULT_ID_CAPTURE_THRESHOLDS = {
|
|
63
|
+
blurThreshold: .2,
|
|
64
|
+
blurChangeThreshold: .2,
|
|
65
|
+
glareThreshold: .3,
|
|
66
|
+
clsThreshold: .98,
|
|
67
|
+
sideThreshold: .8,
|
|
68
|
+
iouThreshold: .8,
|
|
69
|
+
idDetectedTimeout: 1e4,
|
|
70
|
+
autocaptureTimeout: 5e3,
|
|
71
|
+
framesAggregationInterval: 3e3,
|
|
72
|
+
minFaceIdQualityScore: .62
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Default model version for ID capture.
|
|
76
|
+
*/
|
|
77
|
+
const DEFAULT_ID_CAPTURE_MODEL_VERSION = "v2";
|
|
78
|
+
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region ../infra/src/providers/wasm/IdCaptureProvider.ts
|
|
81
|
+
var IdCaptureProvider = class extends BaseWasmProvider {
|
|
82
|
+
constructor() {
|
|
83
|
+
super(WasmPipelineType.IdBlurGlarePipeline);
|
|
84
|
+
this.lastProcessResult = null;
|
|
85
|
+
this.capturedCanvas = null;
|
|
86
|
+
this.originalCapturedCanvas = null;
|
|
87
|
+
}
|
|
88
|
+
async initialize(config) {
|
|
89
|
+
await this.initializeBase(config, "idCapture");
|
|
90
|
+
}
|
|
91
|
+
setCallbacks(callbacks) {
|
|
92
|
+
this.ensureInitialized();
|
|
93
|
+
const onCaptureWrapper = () => {
|
|
94
|
+
callbacks.onCapture?.();
|
|
95
|
+
};
|
|
96
|
+
mlWasmJSApi_default.setIdCaptureCallbacks(this.getPipelineType(), callbacks.onFarAway ?? (() => {}), callbacks.onDetectionStarted ?? (() => {}), callbacks.onMaskChange ? (show, mask, top, orientation) => callbacks.onMaskChange?.(show, mask, top, orientation) : () => {}, callbacks.onBlur ?? (() => {}), callbacks.onGlare ?? (() => {}), callbacks.onCapturing ?? (() => {}), callbacks.onCapture ? onCaptureWrapper : () => {}, callbacks.onBestFrame ? (blur, glare, orientation) => callbacks.onBestFrame?.(blur, glare, orientation) : () => {}, callbacks.onIdNotDetected ?? (() => {}), callbacks.onSwitchToManualCapture ?? (() => {}), callbacks.onIdTypeChange ? (idType) => callbacks.onIdTypeChange?.(idType) : () => {}, callbacks.onIdSideChange ? (side) => callbacks.onIdSideChange?.(side) : () => {}, callbacks.onCapturingCounterValueChange ? (value) => callbacks.onCapturingCounterValueChange?.(value) : () => {});
|
|
97
|
+
}
|
|
98
|
+
setThresholds(thresholds) {
|
|
99
|
+
this.ensureInitialized();
|
|
100
|
+
mlWasmJSApi_default.setIdCaptureThresholds(this.getPipelineType(), thresholds.blurThreshold, thresholds.blurChangeThreshold, thresholds.glareThreshold, thresholds.clsThreshold, thresholds.sideThreshold, thresholds.iouThreshold, thresholds.idDetectedTimeout, thresholds.autocaptureTimeout, thresholds.framesAggregationInterval, thresholds.minFaceIdQualityScore);
|
|
101
|
+
}
|
|
102
|
+
setGeometry(geometry) {
|
|
103
|
+
this.ensureInitialized();
|
|
104
|
+
mlWasmJSApi_default.setIdCaptureGeometryParams(this.getPipelineType(), geometry.areaDown, geometry.areaUp, geometry.areaIOSPassportUp, geometry.areaIOSPassportDown, geometry.widthIOSUp, geometry.widthIOSDown, geometry.widthDown, geometry.widthUp, geometry.windowOuterWidth, geometry.windowOuterHeight, geometry.windowInnerWidth, geometry.windowInnerHeight);
|
|
105
|
+
}
|
|
106
|
+
setSettings(settings) {
|
|
107
|
+
this.ensureInitialized();
|
|
108
|
+
mlWasmJSApi_default.setIdCaptureConfigParams(this.getPipelineType(), settings.isFixedMask, settings.isIPhone14OrHigher, settings.idType, settings.blurCheckEnabled, settings.glareCheckEnabled, settings.faceQualityCheckEnabled, settings.iouCheckEnabled, settings.fpsLimitEnabled);
|
|
109
|
+
}
|
|
110
|
+
setModelType(modelType) {
|
|
111
|
+
this.ensureInitialized();
|
|
112
|
+
let wasmModelType;
|
|
113
|
+
switch (modelType) {
|
|
114
|
+
case "v1":
|
|
115
|
+
wasmModelType = IdCaptureModelType.IdCaptureV1x;
|
|
116
|
+
break;
|
|
117
|
+
case "v2":
|
|
118
|
+
wasmModelType = IdCaptureModelType.IdCaptureV2x;
|
|
119
|
+
break;
|
|
120
|
+
case "v3":
|
|
121
|
+
wasmModelType = IdCaptureModelType.IdCaptureV3x;
|
|
122
|
+
break;
|
|
123
|
+
default: throw new Error(`Unknown model type: ${modelType}`);
|
|
124
|
+
}
|
|
125
|
+
mlWasmJSApi_default.setIdCaptureModelType(this.getPipelineType(), wasmModelType);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Processes a frame through the WASM pipeline and stores the result.
|
|
129
|
+
*/
|
|
130
|
+
async processFrame(image) {
|
|
131
|
+
const result = await this.processFrameWasm(image);
|
|
132
|
+
const pipelineType = this.getPipelineType();
|
|
133
|
+
if (result && pipelineType === WasmPipelineType.IdBlurGlarePipeline) this.lastProcessResult = result;
|
|
134
|
+
else this.lastProcessResult = null;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Gets the last process result from the most recent frame processing.
|
|
138
|
+
* @returns The last process result with quad coordinates, or null if not available
|
|
139
|
+
*/
|
|
140
|
+
getLastProcessResult() {
|
|
141
|
+
return this.lastProcessResult;
|
|
142
|
+
}
|
|
143
|
+
transformPerspective(canvas, frameRect) {
|
|
144
|
+
this.ensureInitialized();
|
|
145
|
+
const originalWidth = canvas.width();
|
|
146
|
+
const originalHeight = canvas.height();
|
|
147
|
+
try {
|
|
148
|
+
const imageData = canvas.getImageData();
|
|
149
|
+
if (!imageData) return canvas;
|
|
150
|
+
const transformedCanvas = mlWasmJSApi_default.IdPerspectiveTransform(imageData, frameRect);
|
|
151
|
+
if (transformedCanvas) {
|
|
152
|
+
const wrappedCanvas = new IncodeCanvas(transformedCanvas);
|
|
153
|
+
const wrappedWidth = wrappedCanvas.width();
|
|
154
|
+
const wrappedHeight = wrappedCanvas.height();
|
|
155
|
+
if (wrappedWidth === originalWidth && wrappedHeight === originalHeight) {
|
|
156
|
+
const croppedCanvas = this.cropCanvasToRect(wrappedCanvas, {
|
|
157
|
+
x: Math.round(frameRect.x),
|
|
158
|
+
y: Math.round(frameRect.y),
|
|
159
|
+
w: Math.round(frameRect.w),
|
|
160
|
+
h: Math.round(frameRect.h)
|
|
161
|
+
});
|
|
162
|
+
if (croppedCanvas) return croppedCanvas;
|
|
163
|
+
}
|
|
164
|
+
return wrappedCanvas;
|
|
165
|
+
}
|
|
166
|
+
return canvas;
|
|
167
|
+
} catch (_error) {
|
|
168
|
+
return canvas;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Crops a canvas to the specified rectangle region.
|
|
173
|
+
* @param canvas - The canvas to crop
|
|
174
|
+
* @param rect - The rectangle to crop to (x, y, w, h)
|
|
175
|
+
* @returns A new IncodeCanvas with the cropped region, or null if cropping fails
|
|
176
|
+
*/
|
|
177
|
+
cropCanvasToRect(canvas, rect) {
|
|
178
|
+
const canvasWidth = canvas.width();
|
|
179
|
+
const canvasHeight = canvas.height();
|
|
180
|
+
if (!canvasWidth || !canvasHeight) return null;
|
|
181
|
+
const x = Math.max(0, Math.min(rect.x, canvasWidth));
|
|
182
|
+
const y = Math.max(0, Math.min(rect.y, canvasHeight));
|
|
183
|
+
const w = Math.max(1, Math.min(rect.w, canvasWidth - x));
|
|
184
|
+
const h = Math.max(1, Math.min(rect.h, canvasHeight - y));
|
|
185
|
+
const croppedCanvasElement = document.createElement("canvas");
|
|
186
|
+
croppedCanvasElement.width = w;
|
|
187
|
+
croppedCanvasElement.height = h;
|
|
188
|
+
const ctx = croppedCanvasElement.getContext("2d");
|
|
189
|
+
if (!ctx) return null;
|
|
190
|
+
ctx.drawImage(canvas.canvas, x, y, w, h, 0, 0, w, h);
|
|
191
|
+
return new IncodeCanvas(croppedCanvasElement);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Gets the captured canvas (transformed for preview).
|
|
195
|
+
* @returns The captured canvas, or null if not available
|
|
196
|
+
*/
|
|
197
|
+
getCapturedCanvas() {
|
|
198
|
+
return this.capturedCanvas;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Gets the original captured canvas (full frame for upload).
|
|
202
|
+
* @returns The original captured canvas, or null if not available
|
|
203
|
+
*/
|
|
204
|
+
getOriginalCapturedCanvas() {
|
|
205
|
+
return this.originalCapturedCanvas;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Sets the captured canvases (original and transformed).
|
|
209
|
+
* @param original - The original full-frame canvas (for upload)
|
|
210
|
+
* @param transformed - The transformed canvas (for preview)
|
|
211
|
+
*/
|
|
212
|
+
setCapturedCanvases(original, transformed) {
|
|
213
|
+
this.originalCapturedCanvas = original;
|
|
214
|
+
this.capturedCanvas = transformed;
|
|
215
|
+
}
|
|
216
|
+
reset() {
|
|
217
|
+
super.reset();
|
|
218
|
+
this.lastProcessResult = null;
|
|
219
|
+
this.capturedCanvas = null;
|
|
220
|
+
this.originalCapturedCanvas = null;
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
|
|
54
224
|
//#endregion
|
|
55
225
|
//#region src/internal/analytics/deviceStats.ts
|
|
56
226
|
async function postDeviceStats(stats) {
|
|
@@ -608,7 +778,7 @@ const checkMotionSensorActor = fromCallback(({ input, sendBack }) => {
|
|
|
608
778
|
});
|
|
609
779
|
const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
|
|
610
780
|
if (!input.dependencies) return;
|
|
611
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
781
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-D2MKmB5z.esm.js");
|
|
612
782
|
return loadDeepsightSession({
|
|
613
783
|
ds: input.ds,
|
|
614
784
|
storage: input.dependencies.storage,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
7
|
-
import "./
|
|
1
|
+
import { a as WasmPipeline, i as WarmupConfig, o as warmupWasm } from "./StateMachine-CGAi8x_b.js";
|
|
2
|
+
import "./Actor-phIcsUhv.js";
|
|
3
|
+
import { c as PermissionResult, l as PermissionStatus } from "./deepsightService-CWnhwXLw.js";
|
|
4
|
+
import { A as IdCaptureEvent, B as UploadIdResponse, C as CapturedImage, D as IdCaptureConfig, E as ID_ERROR_CODES, F as IdDocumentType, H as IdCaptureSettings, I as IdError, L as IdErrorCode, M as IdCaptureInput, N as IdCaptureMode, O as IdCaptureContext, P as IdCaptureThresholds, R as IdFlowStep, S as CaptureIdResponse, T as DetectionStatus, V as DetectionOrientation, _ as CreateIdCaptureActorOptions, a as IdCaptureInitResult, b as IdCaptureMachine, c as UploadIdImageParams, d as processId, f as startRecordingSession, g as validateUploadResponse, h as uploadIdImage, j as IdCaptureGeometry, k as IdCaptureDependencies, l as ValidationError, m as stopStream, n as IdCaptureState, o as InitializeIdCaptureParams, p as stopRecording, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as initializeIdCapture, v as IdCaptureActor, w as DetectionArea, x as idCaptureMachine, y as createIdCaptureActor, z as RecordingSession } from "./idCaptureManager-B1RWflj0.js";
|
|
5
|
+
import { t as CameraStream } from "./camera-Dv2WEhGe.js";
|
|
6
|
+
import "./types-BWGxcjiZ.js";
|
|
7
|
+
import { i as RegulationTypes } from "./types-BX1ZlbSR.js";
|
|
8
|
+
import "./Manager-BndLda4_.js";
|
|
9
|
+
import "./index-CuY8tqBC.js";
|
|
8
10
|
|
|
11
|
+
//#region ../infra/src/wasm/wasmDefaults.d.ts
|
|
12
|
+
/** The WASM version bundled and tested with this SDK release. */
|
|
13
|
+
declare const DEFAULT_WASM_VERSION = "v2.12.84";
|
|
14
|
+
/** Builds the standard WarmupConfig from the Incode CDN. */
|
|
15
|
+
declare function buildDefaultWasmConfig(): WarmupConfig;
|
|
16
|
+
/**
|
|
17
|
+
* Merges optional WASM path overrides with CDN defaults. Explicit non-blank
|
|
18
|
+
* paths take precedence. Blank override strings log a warning and fall back to defaults.
|
|
19
|
+
*/
|
|
20
|
+
declare function resolveWasmConfig(overrides?: Partial<WarmupConfig>): WarmupConfig;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region ../infra/src/http/types.d.ts
|
|
23
|
+
type CreateApiConfig = {
|
|
24
|
+
apiURL: string;
|
|
25
|
+
customHeaders?: Record<string, string>;
|
|
26
|
+
timeout?: number;
|
|
27
|
+
};
|
|
28
|
+
type RequestConfig = {
|
|
29
|
+
method?: string;
|
|
30
|
+
url: string;
|
|
31
|
+
headers?: Record<string, string>;
|
|
32
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
33
|
+
params?: Record<string, string | number | boolean | undefined>;
|
|
34
|
+
body?: unknown;
|
|
35
|
+
signal?: AbortSignal;
|
|
36
|
+
timeout?: number;
|
|
37
|
+
parse?: 'json' | 'text' | 'blob' | 'arrayBuffer' | 'response';
|
|
38
|
+
onUploadProgress?: (progress: number) => void;
|
|
39
|
+
};
|
|
40
|
+
type HttpResponse<T = unknown> = {
|
|
41
|
+
ok: boolean;
|
|
42
|
+
status: number;
|
|
43
|
+
statusText: string;
|
|
44
|
+
url: string;
|
|
45
|
+
headers: Record<string, string>;
|
|
46
|
+
data: T;
|
|
47
|
+
};
|
|
48
|
+
type HttpClient = {
|
|
49
|
+
defaults: {
|
|
50
|
+
baseURL: string;
|
|
51
|
+
headers: Record<string, string>;
|
|
52
|
+
};
|
|
53
|
+
request<T = unknown>(config: RequestConfig): Promise<HttpResponse<T>>;
|
|
54
|
+
get<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
|
|
55
|
+
post<T = unknown>(url: string, body?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'body'>): Promise<HttpResponse<T>>;
|
|
56
|
+
put<T = unknown>(url: string, body?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'body'>): Promise<HttpResponse<T>>;
|
|
57
|
+
patch<T = unknown>(url: string, body?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'body'>): Promise<HttpResponse<T>>;
|
|
58
|
+
delete<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
|
|
59
|
+
head<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
|
|
60
|
+
options<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
|
|
61
|
+
setHeader(name: string, value: string): void;
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region ../infra/src/http/createApi.d.ts
|
|
65
|
+
declare const createApi: (config: CreateApiConfig) => HttpClient;
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region ../infra/src/capabilities/platform.d.ts
|
|
68
|
+
declare function isIPad(userAgent?: string): boolean;
|
|
69
|
+
//#endregion
|
|
9
70
|
//#region ../infra/src/capabilities/IScreenOrientationCapability.d.ts
|
|
10
71
|
type ScreenOrientationState = 'portrait' | 'landscape';
|
|
11
72
|
type IScreenOrientationCapability = {
|
|
@@ -14,9 +75,6 @@ type IScreenOrientationCapability = {
|
|
|
14
75
|
cleanup(): void;
|
|
15
76
|
};
|
|
16
77
|
//#endregion
|
|
17
|
-
//#region ../infra/src/capabilities/platform.d.ts
|
|
18
|
-
declare function isIPad(userAgent?: string): boolean;
|
|
19
|
-
//#endregion
|
|
20
78
|
//#region ../infra/src/providers/browser/ScreenOrientationProvider.d.ts
|
|
21
79
|
declare class ScreenOrientationProvider implements IScreenOrientationCapability {
|
|
22
80
|
private _current;
|
|
@@ -34,17 +92,6 @@ declare class ScreenOrientationProvider implements IScreenOrientationCapability
|
|
|
34
92
|
private updateState;
|
|
35
93
|
}
|
|
36
94
|
//#endregion
|
|
37
|
-
//#region ../infra/src/wasm/wasmDefaults.d.ts
|
|
38
|
-
/** The WASM version bundled and tested with this SDK release. */
|
|
39
|
-
declare const DEFAULT_WASM_VERSION = "v2.12.84";
|
|
40
|
-
/** Builds the standard WarmupConfig from the Incode CDN. */
|
|
41
|
-
declare function buildDefaultWasmConfig(): WarmupConfig;
|
|
42
|
-
/**
|
|
43
|
-
* Merges optional WASM path overrides with CDN defaults. Explicit non-blank
|
|
44
|
-
* paths take precedence. Blank override strings log a warning and fall back to defaults.
|
|
45
|
-
*/
|
|
46
|
-
declare function resolveWasmConfig(overrides?: Partial<WarmupConfig>): WarmupConfig;
|
|
47
|
-
//#endregion
|
|
48
95
|
//#region src/internal/device/getBrowser.d.ts
|
|
49
96
|
type Browser = 'chrome' | 'firefox' | 'safari' | 'edge' | 'opera' | 'other' | 'samsung_browser';
|
|
50
97
|
declare function getBrowser(): Browser;
|