UNPKG

react-native-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS

210 lines (187 loc) 5.42 kB
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from native/schemas/analytics/Analytics.yaml import { ToJsonConfiguration } from '../utils/json/JsonSerializationTypes'; import { DeepPartial, PartiallyConstructible } from '../utils/utils'; /** The feature that is being tracked. */ export class AnalyticsFeature extends PartiallyConstructible { /** @param source {@displayType `DeepPartial<AnalyticsFeature>`} */ public constructor(source: DeepPartial<AnalyticsFeature> = {}) { super(); } public serialize( config: ToJsonConfiguration = new ToJsonConfiguration() ): DeepPartial<AnalyticsFeature> { return {}; } } export namespace AnalyticsFeature { /** The document scanner feature. Default is "rtuui_document_scanner" */ export const documentScanner: string = 'rtuui_document_scanner'; } /** The category that is being tracked. */ export class AnalyticsCategory extends PartiallyConstructible { /** @param source {@displayType `DeepPartial<AnalyticsCategory>`} */ public constructor(source: DeepPartial<AnalyticsCategory> = {}) { super(); } public serialize( config: ToJsonConfiguration = new ToJsonConfiguration() ): DeepPartial<AnalyticsCategory> { return {}; } } export namespace AnalyticsCategory { /** The acknowledge category. Default is "acknowledge" */ export const acknowledge: string = 'acknowledge'; } /** The event that is being tracked. */ export class AnalyticsEvent extends PartiallyConstructible { /** The feature associated with the event. */ public feature: string; /** The category of the event. */ public category: string; /** The name of the event. */ public name: string; /** The value associated with the event. */ public values: string[] = []; /** @param source {@displayType `DeepPartial<AnalyticsEvent>`} */ public constructor(source: DeepPartial<AnalyticsEvent> = {}) { super(); if (source.feature !== undefined) { this.feature = source.feature; } else { throw new Error('feature must be present in constructor argument'); } if (source.category !== undefined) { this.category = source.category; } else { throw new Error('category must be present in constructor argument'); } if (source.name !== undefined) { this.name = source.name; } else { throw new Error('name must be present in constructor argument'); } if (source.values !== undefined) { this.values = source.values.map((it: any) => { return it; }); } } public serialize( config: ToJsonConfiguration = new ToJsonConfiguration() ): DeepPartial<AnalyticsEvent> { return { feature: this.feature, category: this.category, name: this.name, values: this.values.map((it: any) => { return it; }), }; } } /** The name of the event. */ export class AnalyticsEventName extends PartiallyConstructible { /** @param source {@displayType `DeepPartial<AnalyticsEventName>`} */ public constructor(source: DeepPartial<AnalyticsEventName> = {}) { super(); } public serialize( config: ToJsonConfiguration = new ToJsonConfiguration() ): DeepPartial<AnalyticsEventName> { return {}; } } export namespace AnalyticsEventName { /** The image quality result event for imported page. Default is "imported_image_quality_result" */ export const importedImageQualityResult: string = 'imported_image_quality_result'; /** The image quality result event for scanned page. Default is "scanned_image_quality_result" */ export const scannedImageQualityResult: string = 'scanned_image_quality_result'; /** The proceed event. Default is "proceed_with_image" */ export const proceedImage: string = 'proceed_with_image'; /** The retake event. Default is "retake_image" */ export const retakeImage: string = 'retake_image'; } /** A predefined analytics event. */ export class AnalyticsEventFactory extends PartiallyConstructible { /** @param source {@displayType `DeepPartial<AnalyticsEventFactory>`} */ public constructor(source: DeepPartial<AnalyticsEventFactory> = {}) { super(); } public serialize( config: ToJsonConfiguration = new ToJsonConfiguration() ): DeepPartial<AnalyticsEventFactory> { return {}; } } export namespace AnalyticsEventFactory { /** A predefined analytics event. */ export const scannedImageQualityResult: AnalyticsEvent = new AnalyticsEvent({ feature: 'rtuui_document_scanner', category: 'acknowledge', name: 'scanned_image_quality_result', }); /** A predefined analytics event. */ export const importedImageQualityResult: AnalyticsEvent = new AnalyticsEvent({ feature: 'rtuui_document_scanner', category: 'acknowledge', name: 'imported_image_quality_result', }); /** A predefined analytics event. */ export const proceedWithImage: AnalyticsEvent = new AnalyticsEvent({ feature: 'rtuui_document_scanner', category: 'acknowledge', name: 'proceed_with_image', }); /** A predefined analytics event. */ export const retakeImage: AnalyticsEvent = new AnalyticsEvent({ feature: 'rtuui_document_scanner', category: 'acknowledge', name: 'retake_image', }); }