@jaak.ai/stamps 2.2.0-dev.6 → 2.2.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 (30) hide show
  1. package/README.md +188 -8
  2. package/dist/cjs/jaak-stamps.cjs.entry.js +657 -3118
  3. package/dist/cjs/jaak-stamps.cjs.entry.js.map +1 -1
  4. package/dist/cjs/jaak-stamps.entry.cjs.js.map +1 -1
  5. package/dist/collection/components/my-component/my-component.css +23 -2
  6. package/dist/collection/components/my-component/my-component.js +42 -16
  7. package/dist/collection/components/my-component/my-component.js.map +1 -1
  8. package/dist/collection/services/CameraService.js +41 -9
  9. package/dist/collection/services/CameraService.js.map +1 -1
  10. package/dist/collection/services/LicenseValidationService.js +2 -2
  11. package/dist/collection/services/LicenseValidationService.js.map +1 -1
  12. package/dist/collection/services/TracingService.js +130 -78
  13. package/dist/collection/services/TracingService.js.map +1 -1
  14. package/dist/collection/services/interfaces/ITracingService.js.map +1 -1
  15. package/dist/components/jaak-stamps.js +657 -3118
  16. package/dist/components/jaak-stamps.js.map +1 -1
  17. package/dist/esm/jaak-stamps.entry.js +657 -3118
  18. package/dist/esm/jaak-stamps.entry.js.map +1 -1
  19. package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js +1 -1
  20. package/dist/jaak-stamps-webcomponent/jaak-stamps.entry.esm.js.map +1 -1
  21. package/dist/jaak-stamps-webcomponent/p-34bcebb1.entry.js +7 -0
  22. package/dist/jaak-stamps-webcomponent/p-34bcebb1.entry.js.map +1 -0
  23. package/dist/types/components/my-component/my-component.d.ts +2 -1
  24. package/dist/types/components.d.ts +2 -2
  25. package/dist/types/services/LicenseValidationService.d.ts +1 -1
  26. package/dist/types/services/TracingService.d.ts +6 -1
  27. package/dist/types/services/interfaces/ITracingService.d.ts +5 -0
  28. package/package.json +1 -1
  29. package/dist/jaak-stamps-webcomponent/p-8c49893d.entry.js +0 -7
  30. package/dist/jaak-stamps-webcomponent/p-8c49893d.entry.js.map +0 -1
@@ -22,7 +22,7 @@ export declare class JaakStamps {
22
22
  propagateTraceHeaderCorsUrls?: string;
23
23
  metricsExportIntervalMillis?: number;
24
24
  license?: string;
25
- licenseEnvironment?: 'dev' | 'qa' | 'staging' | 'prod';
25
+ licenseEnvironment?: 'dev' | 'qa' | 'sandbox' | 'prod';
26
26
  traceId?: string;
27
27
  appId?: string;
28
28
  captureCompleted: EventEmitter<any>;
@@ -112,6 +112,7 @@ export declare class JaakStamps {
112
112
  private readonly MAX_FAILURES;
113
113
  private lastInferenceTime;
114
114
  private readonly MIN_INFERENCE_INTERVAL;
115
+ private readonly MOBILE_MIN_INFERENCE_INTERVAL;
115
116
  private performanceHistory;
116
117
  private readonly PERFORMANCE_HISTORY_SIZE;
117
118
  private readonly PERFORMANCE_THRESHOLD_MS;
@@ -59,7 +59,7 @@ export namespace Components {
59
59
  /**
60
60
  * @default 'prod'
61
61
  */
62
- "licenseEnvironment"?: 'dev' | 'qa' | 'staging' | 'prod';
62
+ "licenseEnvironment"?: 'dev' | 'qa' | 'sandbox' | 'prod';
63
63
  /**
64
64
  * @default 90
65
65
  */
@@ -175,7 +175,7 @@ declare namespace LocalJSX {
175
175
  /**
176
176
  * @default 'prod'
177
177
  */
178
- "licenseEnvironment"?: 'dev' | 'qa' | 'staging' | 'prod';
178
+ "licenseEnvironment"?: 'dev' | 'qa' | 'sandbox' | 'prod';
179
179
  /**
180
180
  * @default 90
181
181
  */
@@ -2,7 +2,7 @@
2
2
  * License Validation Service
3
3
  * Handles license validation for the jaak-stamps webcomponent
4
4
  */
5
- export type Environment = 'dev' | 'qa' | 'staging' | 'prod';
5
+ export type Environment = 'dev' | 'qa' | 'sandbox' | 'prod';
6
6
  export interface LicenseValidationRequest {
7
7
  license: string;
8
8
  origin: string;
@@ -22,7 +22,6 @@ export declare class TracingService implements ITracingService {
22
22
  private readonly customerId?;
23
23
  private readonly tenantId?;
24
24
  private readonly environment?;
25
- private readonly propagateTraceHeaderCorsUrls;
26
25
  private readonly enableAutoInstrumentation;
27
26
  private spanProcessor;
28
27
  private parser;
@@ -55,6 +54,12 @@ export declare class TracingService implements ITracingService {
55
54
  recordException(span: Span, error: Error): void;
56
55
  setSpanAttribute(span: Span, key: string, value: any): void;
57
56
  trace<T>(name: string, fn: () => T | Promise<T>, attributes?: Record<string, any>): Promise<T>;
57
+ traceAsync<T>(name: string, fn: () => Promise<T>, attributes?: Record<string, any>): Promise<T>;
58
+ /**
59
+ * Flush all pending spans to the collector
60
+ * Call this when capture/process is complete to send all traces
61
+ */
62
+ flush(): Promise<void>;
58
63
  cleanup(): Promise<void>;
59
64
  /**
60
65
  * Get the current trace ID (useful for logging correlation)
@@ -43,6 +43,11 @@ export interface ITracingService {
43
43
  * @param attributes - Optional attributes
44
44
  */
45
45
  trace<T>(name: string, fn: () => T | Promise<T>, attributes?: Record<string, any>): Promise<T>;
46
+ /**
47
+ * Flushes all pending spans to the collector
48
+ * Call this when capture/process is complete
49
+ */
50
+ flush(): Promise<void>;
46
51
  /**
47
52
  * Cleans up resources
48
53
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaak.ai/stamps",
3
- "version": "2.2.0-dev.6",
3
+ "version": "2.2.0",
4
4
  "description": "Jaak Document Identifier",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",