@capawesome/capacitor-singular 0.0.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.
- package/CapawesomeCapacitorSingular.podspec +19 -0
- package/LICENSE +21 -0
- package/Package.swift +26 -0
- package/README.md +1262 -0
- package/android/build.gradle +61 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/Singular.java +443 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/SingularHelper.java +53 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/SingularPlugin.java +336 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/CustomException.java +20 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/CustomExceptions.java +34 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/events/DeviceAttributionInfoReceivedEvent.java +48 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/events/SdidReceivedEvent.java +23 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/events/SdidSetEvent.java +23 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/events/SingularLinkResolvedEvent.java +44 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/options/CreateReferrerShortLinkOptions.java +61 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/options/InitializeOptions.java +168 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/options/SetCustomUserIdOptions.java +24 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/options/SetDeviceTokenOptions.java +24 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/options/SetGlobalPropertyOptions.java +44 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/options/SetLimitAdvertisingIdentifiersOptions.java +22 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/options/SetLimitDataSharingOptions.java +22 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/options/TrackAdRevenueOptions.java +157 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/options/TrackEventOptions.java +35 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/options/TrackRevenueOptions.java +56 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/options/UnsetGlobalPropertyOptions.java +24 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/results/CreateReferrerShortLinkResult.java +23 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/results/GetGlobalPropertiesResult.java +31 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/results/GetLimitDataSharingResult.java +22 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/classes/results/IsAllTrackingStoppedResult.java +22 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/interfaces/Callback.java +5 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/interfaces/EmptyCallback.java +5 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/interfaces/NonEmptyResultCallback.java +7 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/singular/interfaces/Result.java +7 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +2014 -0
- package/dist/esm/definitions.d.ts +925 -0
- package/dist/esm/definitions.js +39 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +27 -0
- package/dist/esm/web.js +73 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +126 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +129 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/Classes/Events/DeviceAttributionInfoReceivedEvent.swift +43 -0
- package/ios/Plugin/Classes/Events/SdidReceivedEvent.swift +16 -0
- package/ios/Plugin/Classes/Events/SdidSetEvent.swift +16 -0
- package/ios/Plugin/Classes/Events/SingularLinkResolvedEvent.swift +28 -0
- package/ios/Plugin/Classes/Events/SkanConversionValueUpdatedEvent.swift +30 -0
- package/ios/Plugin/Classes/Options/CreateReferrerShortLinkOptions.swift +25 -0
- package/ios/Plugin/Classes/Options/InitializeOptions.swift +44 -0
- package/ios/Plugin/Classes/Options/SetCustomUserIdOptions.swift +13 -0
- package/ios/Plugin/Classes/Options/SetDeviceTokenOptions.swift +30 -0
- package/ios/Plugin/Classes/Options/SetGlobalPropertyOptions.swift +20 -0
- package/ios/Plugin/Classes/Options/SetLimitAdvertisingIdentifiersOptions.swift +13 -0
- package/ios/Plugin/Classes/Options/SetLimitDataSharingOptions.swift +13 -0
- package/ios/Plugin/Classes/Options/SkanUpdateConversionValueOptions.swift +27 -0
- package/ios/Plugin/Classes/Options/TrackAdRevenueOptions.swift +47 -0
- package/ios/Plugin/Classes/Options/TrackEventOptions.swift +15 -0
- package/ios/Plugin/Classes/Options/TrackRevenueOptions.swift +22 -0
- package/ios/Plugin/Classes/Options/UnsetGlobalPropertyOptions.swift +13 -0
- package/ios/Plugin/Classes/Results/CreateReferrerShortLinkResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetGlobalPropertiesResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetLimitDataSharingResult.swift +16 -0
- package/ios/Plugin/Classes/Results/IsAllTrackingStoppedResult.swift +16 -0
- package/ios/Plugin/Classes/Results/SkanGetConversionValueResult.swift +20 -0
- package/ios/Plugin/Enums/CustomError.swift +88 -0
- package/ios/Plugin/Enums/SkanCoarseConversionValue.swift +31 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/Protocols/Result.swift +6 -0
- package/ios/Plugin/Singular.swift +341 -0
- package/ios/Plugin/SingularHelper.swift +40 -0
- package/ios/Plugin/SingularPlugin.swift +340 -0
- package/package.json +102 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 0.1.0
|
|
3
|
+
*/
|
|
4
|
+
export var ErrorCode;
|
|
5
|
+
(function (ErrorCode) {
|
|
6
|
+
/**
|
|
7
|
+
* The initialization of the SDK failed.
|
|
8
|
+
*
|
|
9
|
+
* @since 0.1.0
|
|
10
|
+
*/
|
|
11
|
+
ErrorCode["InitializationFailed"] = "INITIALIZATION_FAILED";
|
|
12
|
+
/**
|
|
13
|
+
* The plugin has not been initialized yet.
|
|
14
|
+
*
|
|
15
|
+
* Call `initialize(...)` before calling any other method.
|
|
16
|
+
*
|
|
17
|
+
* @since 0.1.0
|
|
18
|
+
*/
|
|
19
|
+
ErrorCode["NotInitialized"] = "NOT_INITIALIZED";
|
|
20
|
+
})(ErrorCode || (ErrorCode = {}));
|
|
21
|
+
/**
|
|
22
|
+
* @since 0.1.0
|
|
23
|
+
*/
|
|
24
|
+
export var SkanCoarseConversionValue;
|
|
25
|
+
(function (SkanCoarseConversionValue) {
|
|
26
|
+
/**
|
|
27
|
+
* @since 0.1.0
|
|
28
|
+
*/
|
|
29
|
+
SkanCoarseConversionValue["High"] = "HIGH";
|
|
30
|
+
/**
|
|
31
|
+
* @since 0.1.0
|
|
32
|
+
*/
|
|
33
|
+
SkanCoarseConversionValue["Low"] = "LOW";
|
|
34
|
+
/**
|
|
35
|
+
* @since 0.1.0
|
|
36
|
+
*/
|
|
37
|
+
SkanCoarseConversionValue["Medium"] = "MEDIUM";
|
|
38
|
+
})(SkanCoarseConversionValue || (SkanCoarseConversionValue = {}));
|
|
39
|
+
//# sourceMappingURL=definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAs6BA;;GAEG;AACH,MAAM,CAAN,IAAY,SAeX;AAfD,WAAY,SAAS;IACnB;;;;OAIG;IACH,2DAA8C,CAAA;IAC9C;;;;;;OAMG;IACH,+CAAkC,CAAA;AACpC,CAAC,EAfW,SAAS,KAAT,SAAS,QAepB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,yBAaX;AAbD,WAAY,yBAAyB;IACnC;;OAEG;IACH,0CAAa,CAAA;IACb;;OAEG;IACH,wCAAW,CAAA;IACX;;OAEG;IACH,8CAAiB,CAAA;AACnB,CAAC,EAbW,yBAAyB,KAAzB,yBAAyB,QAapC","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface SingularPlugin {\n /**\n * Remove all global properties.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n clearGlobalProperties(): Promise<void>;\n /**\n * Create a short link that attributes installs to a referring user.\n *\n * The short link expires after 30 days.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n createReferrerShortLink(\n options: CreateReferrerShortLinkOptions,\n ): Promise<CreateReferrerShortLinkResult>;\n /**\n * Get all global properties.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n getGlobalProperties(): Promise<GetGlobalPropertiesResult>;\n /**\n * Get whether data sharing is limited.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n getLimitDataSharing(): Promise<GetLimitDataSharingResult>;\n /**\n * Initialize the Singular SDK and start the first session.\n *\n * This method must be called before any other method.\n * Add your listeners before calling this method so that no\n * deferred deep link or attribution event is missed.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n initialize(options: InitializeOptions): Promise<void>;\n /**\n * Get whether all tracking has been stopped via `stopAllTracking()`.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n isAllTrackingStopped(): Promise<IsAllTrackingStoppedResult>;\n /**\n * Resume all tracking after it was stopped via `stopAllTracking()`.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n resumeAllTracking(): Promise<void>;\n /**\n * Set the custom user ID that is attached to all sessions and events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n setCustomUserId(options: SetCustomUserIdOptions): Promise<void>;\n /**\n * Set the push notification device token used for uninstall tracking.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n setDeviceToken(options: SetDeviceTokenOptions): Promise<void>;\n /**\n * Set a global property that is attached to all events.\n *\n * At most 5 global properties can be set.\n * The call is rejected if the property could not be set.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n setGlobalProperty(options: SetGlobalPropertyOptions): Promise<void>;\n /**\n * Set whether the SDK is allowed to collect advertising identifiers\n * (e.g. the Google Advertising ID or the IDFA).\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n setLimitAdvertisingIdentifiers(\n options: SetLimitAdvertisingIdentifiersOptions,\n ): Promise<void>;\n /**\n * Set whether data sharing with third parties is limited\n * (e.g. after the user opted out under CCPA).\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n setLimitDataSharing(options: SetLimitDataSharingOptions): Promise<void>;\n /**\n * Get the current SKAdNetwork conversion value.\n *\n * Only available on iOS.\n *\n * @since 0.1.0\n */\n skanGetConversionValue(): Promise<SkanGetConversionValueResult>;\n /**\n * Register the app for SKAdNetwork attribution.\n *\n * Only required if `iosManualSkanConversionManagement` is enabled.\n *\n * Only available on iOS.\n *\n * @since 0.1.0\n */\n skanRegisterAppForAdNetworkAttribution(): Promise<void>;\n /**\n * Update the SKAdNetwork conversion value.\n *\n * Only required if `iosManualSkanConversionManagement` is enabled.\n * The call is rejected if the conversion value could not be updated.\n *\n * Only available on iOS.\n *\n * @since 0.1.0\n */\n skanUpdateConversionValue(\n options: SkanUpdateConversionValueOptions,\n ): Promise<void>;\n /**\n * Stop all tracking.\n *\n * This setting persists across app restarts until `resumeAllTracking()` is called.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n stopAllTracking(): Promise<void>;\n /**\n * Track ad revenue.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n trackAdRevenue(options: TrackAdRevenueOptions): Promise<void>;\n /**\n * Track an event.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n trackEvent(options: TrackEventOptions): Promise<void>;\n /**\n * Track a revenue event.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n trackRevenue(options: TrackRevenueOptions): Promise<void>;\n /**\n * Notify the SDK that the user has opted in to tracking (e.g. under GDPR).\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n trackingOptIn(): Promise<void>;\n /**\n * Notify the SDK that the user is under 13 years old\n * so that the SDK does not collect advertising identifiers.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n trackingUnder13(): Promise<void>;\n /**\n * Remove the custom user ID.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n unsetCustomUserId(): Promise<void>;\n /**\n * Remove a global property.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n unsetGlobalProperty(options: UnsetGlobalPropertyOptions): Promise<void>;\n /**\n * Add a listener for when the device attribution information is received.\n *\n * The event is emitted once after the first session, and only if\n * device attribution is enabled for your Singular account.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n addListener(\n eventName: 'deviceAttributionInfoReceived',\n listenerFunc: (event: DeviceAttributionInfoReceivedEvent) => void,\n ): Promise<PluginListenerHandle>;\n /**\n * Add a listener for when the Singular Device ID (SDID) is received.\n *\n * The event is emitted after the first session and on every\n * subsequent launch with the stored SDID.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n addListener(\n eventName: 'sdidReceived',\n listenerFunc: (event: SdidReceivedEvent) => void,\n ): Promise<PluginListenerHandle>;\n /**\n * Add a listener for when a custom Singular Device ID (SDID) has been stored.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n addListener(\n eventName: 'sdidSet',\n listenerFunc: (event: SdidSetEvent) => void,\n ): Promise<PluginListenerHandle>;\n /**\n * Add a listener for when a Singular Link is resolved.\n *\n * This includes deferred deep links after an install.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n addListener(\n eventName: 'singularLinkResolved',\n listenerFunc: (event: SingularLinkResolvedEvent) => void,\n ): Promise<PluginListenerHandle>;\n /**\n * Add a listener for when the SDK updates the SKAdNetwork conversion value.\n *\n * Only available on iOS.\n *\n * @since 0.1.0\n */\n addListener(\n eventName: 'skanConversionValueUpdated',\n listenerFunc: (event: SkanConversionValueUpdatedEvent) => void,\n ): Promise<PluginListenerHandle>;\n /**\n * Remove all listeners for this plugin.\n *\n * @since 0.1.0\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface CreateReferrerShortLinkOptions {\n /**\n * The Singular Link to shorten.\n *\n * @since 0.1.0\n * @example 'https://myapp.sng.link/A1b2c/d3e4'\n */\n baseLink: string;\n /**\n * Additional parameters that are passed through to the installed app.\n *\n * @since 0.1.0\n */\n passthroughParameters?: Record<string, string>;\n /**\n * The unique identifier of the referring user.\n *\n * @since 0.1.0\n */\n referrerId: string;\n /**\n * The name of the referring user.\n *\n * @since 0.1.0\n */\n referrerName: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface CreateReferrerShortLinkResult {\n /**\n * The generated short link.\n *\n * @since 0.1.0\n */\n link: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface DeviceAttributionInfoReceivedEvent {\n /**\n * The identifier of the campaign.\n *\n * @since 0.1.0\n */\n campaignId?: string;\n /**\n * The name of the campaign.\n *\n * @since 0.1.0\n */\n campaignName?: string;\n /**\n * The timestamp of the attributed click in milliseconds since the Unix epoch.\n *\n * @since 0.1.0\n */\n clickTimestamp?: number;\n /**\n * The identifier of the creative.\n *\n * @since 0.1.0\n */\n creativeId?: string;\n /**\n * The name of the creative.\n *\n * @since 0.1.0\n */\n creativeName?: string;\n /**\n * The type of the attribution match.\n *\n * @since 0.1.0\n */\n matchType?: string;\n /**\n * The name of the attributed network.\n *\n * @since 0.1.0\n * @example 'Organic'\n */\n network: string;\n /**\n * The passthrough parameters of the attributed link.\n *\n * @since 0.1.0\n */\n passthrough?: string;\n /**\n * The identifier of the sub campaign.\n *\n * @since 0.1.0\n */\n subcampaignId?: string;\n /**\n * The name of the sub campaign.\n *\n * @since 0.1.0\n */\n subcampaignName?: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface GetGlobalPropertiesResult {\n /**\n * The global properties.\n *\n * @since 0.1.0\n */\n properties: Record<string, string>;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface GetLimitDataSharingResult {\n /**\n * Whether data sharing is limited.\n *\n * @since 0.1.0\n */\n limit: boolean;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface InitializeOptions {\n /**\n * The Facebook App ID used for Meta Install Referrer attribution.\n *\n * Only available on Android.\n *\n * @since 0.1.0\n */\n androidFacebookAppId?: string;\n /**\n * The SDK key of your Singular account.\n *\n * @since 0.1.0\n */\n apiKey: string;\n /**\n * The branded domains that should be resolved as Singular Links.\n *\n * @since 0.1.0\n * @example ['links.myapp.com']\n */\n brandedDomains?: string[];\n /**\n * A custom Singular Device ID (SDID) that is used instead of the one\n * generated by Singular.\n *\n * @since 0.1.0\n */\n customSdid?: string;\n /**\n * The custom user ID that is attached to all sessions and events.\n *\n * @since 0.1.0\n */\n customUserId?: string;\n /**\n * The email service provider domains that should be resolved as Singular Links.\n *\n * @since 0.1.0\n * @example ['click.myapp.com']\n */\n espDomains?: string[];\n /**\n * Global properties that are attached to all events.\n *\n * Existing global properties with the same key are overridden.\n * At most 5 global properties can be set.\n *\n * @since 0.1.0\n */\n globalProperties?: Record<string, string>;\n /**\n * Whether the SKAdNetwork conversion value is managed by your app\n * instead of by the SDK.\n *\n * Only available on iOS.\n *\n * @since 0.1.0\n * @default false\n */\n iosManualSkanConversionManagement?: boolean;\n /**\n * Whether SKAdNetwork support is enabled.\n *\n * Only available on iOS.\n *\n * @since 0.1.0\n * @default true\n */\n iosSkAdNetworkEnabled?: boolean;\n /**\n * The number of seconds the SDK waits for the App Tracking Transparency\n * authorization before sending the first session.\n *\n * Set this to a value greater than `0` if you request the tracking\n * authorization right after the app launch.\n *\n * Only available on iOS.\n *\n * @since 0.1.0\n * @default 0\n */\n iosWaitForTrackingAuthorizationTimeout?: number;\n /**\n * Whether the SDK is not allowed to collect advertising identifiers\n * (e.g. the Google Advertising ID or the IDFA).\n *\n * @since 0.1.0\n * @default false\n */\n limitAdvertisingIdentifiers?: boolean;\n /**\n * Whether data sharing with third parties is limited.\n *\n * @since 0.1.0\n * @default false\n */\n limitDataSharing?: boolean;\n /**\n * Whether debug logging is enabled.\n *\n * @since 0.1.0\n * @default false\n */\n loggingEnabled?: boolean;\n /**\n * The SDK secret of your Singular account.\n *\n * @since 0.1.0\n */\n secret: string;\n /**\n * The number of seconds the app can stay in the background\n * before a new session is started.\n *\n * @since 0.1.0\n * @default 60\n */\n sessionTimeout?: number;\n /**\n * The number of seconds the SDK waits for a short link to be resolved.\n *\n * @since 0.1.0\n * @default 10\n */\n shortLinkResolveTimeout?: number;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface IsAllTrackingStoppedResult {\n /**\n * Whether all tracking has been stopped.\n *\n * @since 0.1.0\n */\n stopped: boolean;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SdidReceivedEvent {\n /**\n * The Singular Device ID.\n *\n * @since 0.1.0\n */\n sdid: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SdidSetEvent {\n /**\n * The Singular Device ID.\n *\n * @since 0.1.0\n */\n sdid: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SetCustomUserIdOptions {\n /**\n * The custom user ID.\n *\n * @since 0.1.0\n */\n customUserId: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SetDeviceTokenOptions {\n /**\n * The push notification device token.\n *\n * On Android, this is the FCM registration token.\n * On iOS, this is the hex-encoded APNs device token.\n *\n * @since 0.1.0\n */\n token: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SetGlobalPropertyOptions {\n /**\n * The key of the global property.\n *\n * @since 0.1.0\n */\n key: string;\n /**\n * Whether an existing global property with the same key is overridden.\n *\n * @since 0.1.0\n * @default true\n */\n overrideExisting?: boolean;\n /**\n * The value of the global property.\n *\n * @since 0.1.0\n */\n value: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SetLimitAdvertisingIdentifiersOptions {\n /**\n * Whether the SDK is not allowed to collect advertising identifiers.\n *\n * @since 0.1.0\n */\n limit: boolean;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SetLimitDataSharingOptions {\n /**\n * Whether data sharing with third parties is limited.\n *\n * @since 0.1.0\n */\n limit: boolean;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SingularLinkResolvedEvent {\n /**\n * The deep link value of the Singular Link.\n *\n * @since 0.1.0\n */\n deepLink: string | null;\n /**\n * Whether the link is a deferred deep link (i.e. resolved after an install).\n *\n * @since 0.1.0\n */\n isDeferred: boolean;\n /**\n * The passthrough value of the Singular Link.\n *\n * @since 0.1.0\n */\n passthrough: string | null;\n /**\n * The query parameters of the Singular Link.\n *\n * @since 0.1.0\n */\n urlParameters: Record<string, string>;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SkanConversionValueUpdatedEvent {\n /**\n * The coarse conversion value.\n *\n * Only available on iOS 16.1+.\n *\n * @since 0.1.0\n */\n coarseValue: SkanCoarseConversionValue | null;\n /**\n * Whether the conversion window is locked.\n *\n * Only available on iOS 16.1+.\n *\n * @since 0.1.0\n */\n lockWindow: boolean;\n /**\n * The fine-grained conversion value (`0` - `63`).\n *\n * @since 0.1.0\n */\n value: number | null;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SkanGetConversionValueResult {\n /**\n * The fine-grained conversion value (`0` - `63`)\n * or `null` if no value has been set yet.\n *\n * @since 0.1.0\n */\n value: number | null;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SkanUpdateConversionValueOptions {\n /**\n * The coarse conversion value.\n *\n * Only available on iOS 16.1+.\n *\n * @since 0.1.0\n */\n coarseValue?: SkanCoarseConversionValue;\n /**\n * Whether the conversion window should be locked.\n *\n * Only available on iOS 16.1+.\n *\n * @since 0.1.0\n * @default false\n */\n lockWindow?: boolean;\n /**\n * The fine-grained conversion value (`0` - `63`).\n *\n * @since 0.1.0\n */\n value: number;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface TrackAdRevenueOptions {\n /**\n * The identifier of the ad group.\n *\n * @since 0.1.0\n */\n adGroupId?: string;\n /**\n * The name of the ad group.\n *\n * @since 0.1.0\n */\n adGroupName?: string;\n /**\n * The priority of the ad group.\n *\n * @since 0.1.0\n */\n adGroupPriority?: string;\n /**\n * The type of the ad group.\n *\n * @since 0.1.0\n */\n adGroupType?: string;\n /**\n * The name of the ad placement.\n *\n * @since 0.1.0\n */\n adPlacementName?: string;\n /**\n * The ad mediation platform that reported the revenue.\n *\n * @since 0.1.0\n * @example 'AdMob'\n */\n adPlatform: string;\n /**\n * The type of the ad.\n *\n * @since 0.1.0\n * @example 'Rewarded'\n */\n adType?: string;\n /**\n * The identifier of the ad unit.\n *\n * @since 0.1.0\n */\n adUnitId?: string;\n /**\n * The name of the ad unit.\n *\n * @since 0.1.0\n */\n adUnitName?: string;\n /**\n * The currency of the revenue as ISO 4217 code.\n *\n * @since 0.1.0\n * @example 'USD'\n */\n currency: string;\n /**\n * The identifier of the ad impression.\n *\n * @since 0.1.0\n */\n impressionId?: string;\n /**\n * The name of the ad network that served the ad.\n *\n * @since 0.1.0\n */\n networkName?: string;\n /**\n * The identifier of the placement.\n *\n * @since 0.1.0\n */\n placementId?: string;\n /**\n * The precision of the reported revenue.\n *\n * @since 0.1.0\n * @example 'estimated'\n */\n precision?: string;\n /**\n * The revenue amount.\n *\n * @since 0.1.0\n * @example 0.05\n */\n revenue: number;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface TrackEventOptions {\n /**\n * The attributes of the event.\n *\n * Attribute keys and values are limited to 500 characters.\n *\n * @since 0.1.0\n * @example { level: 3, character: 'warrior' }\n */\n attributes?: Record<string, string | number | boolean>;\n /**\n * The name of the event.\n *\n * Can be a standard event name (e.g. `sng_login`, `sng_tutorial_complete`)\n * or a custom event name. Limited to 32 characters.\n *\n * @since 0.1.0\n * @example 'sng_login'\n */\n name: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface TrackRevenueOptions {\n /**\n * The revenue amount.\n *\n * @since 0.1.0\n * @example 9.99\n */\n amount: number;\n /**\n * The attributes of the event.\n *\n * @since 0.1.0\n */\n attributes?: Record<string, string | number | boolean>;\n /**\n * The currency of the revenue as ISO 4217 code.\n *\n * @since 0.1.0\n * @example 'USD'\n */\n currency: string;\n /**\n * The name of the event.\n *\n * If provided, a custom revenue event with this name is tracked\n * instead of the default revenue event.\n *\n * @since 0.1.0\n * @example 'subscription_purchase'\n */\n eventName?: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface UnsetGlobalPropertyOptions {\n /**\n * The key of the global property.\n *\n * @since 0.1.0\n */\n key: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport enum ErrorCode {\n /**\n * The initialization of the SDK failed.\n *\n * @since 0.1.0\n */\n InitializationFailed = 'INITIALIZATION_FAILED',\n /**\n * The plugin has not been initialized yet.\n *\n * Call `initialize(...)` before calling any other method.\n *\n * @since 0.1.0\n */\n NotInitialized = 'NOT_INITIALIZED',\n}\n\n/**\n * @since 0.1.0\n */\nexport enum SkanCoarseConversionValue {\n /**\n * @since 0.1.0\n */\n High = 'HIGH',\n /**\n * @since 0.1.0\n */\n Low = 'LOW',\n /**\n * @since 0.1.0\n */\n Medium = 'MEDIUM',\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,QAAQ,GAAG,cAAc,CAAiB,UAAU,EAAE;IAC1D,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;CAC1D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { SingularPlugin } from './definitions';\n\nconst Singular = registerPlugin<SingularPlugin>('Singular', {\n web: () => import('./web').then(m => new m.SingularWeb()),\n});\n\nexport * from './definitions';\nexport { Singular };\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
import type { CreateReferrerShortLinkResult, GetGlobalPropertiesResult, GetLimitDataSharingResult, IsAllTrackingStoppedResult, SingularPlugin, SkanGetConversionValueResult } from './definitions';
|
|
3
|
+
export declare class SingularWeb extends WebPlugin implements SingularPlugin {
|
|
4
|
+
clearGlobalProperties(): Promise<void>;
|
|
5
|
+
createReferrerShortLink(): Promise<CreateReferrerShortLinkResult>;
|
|
6
|
+
getGlobalProperties(): Promise<GetGlobalPropertiesResult>;
|
|
7
|
+
getLimitDataSharing(): Promise<GetLimitDataSharingResult>;
|
|
8
|
+
initialize(): Promise<void>;
|
|
9
|
+
isAllTrackingStopped(): Promise<IsAllTrackingStoppedResult>;
|
|
10
|
+
resumeAllTracking(): Promise<void>;
|
|
11
|
+
setCustomUserId(): Promise<void>;
|
|
12
|
+
setDeviceToken(): Promise<void>;
|
|
13
|
+
setGlobalProperty(): Promise<void>;
|
|
14
|
+
setLimitAdvertisingIdentifiers(): Promise<void>;
|
|
15
|
+
setLimitDataSharing(): Promise<void>;
|
|
16
|
+
skanGetConversionValue(): Promise<SkanGetConversionValueResult>;
|
|
17
|
+
skanRegisterAppForAdNetworkAttribution(): Promise<void>;
|
|
18
|
+
skanUpdateConversionValue(): Promise<void>;
|
|
19
|
+
stopAllTracking(): Promise<void>;
|
|
20
|
+
trackAdRevenue(): Promise<void>;
|
|
21
|
+
trackEvent(): Promise<void>;
|
|
22
|
+
trackRevenue(): Promise<void>;
|
|
23
|
+
trackingOptIn(): Promise<void>;
|
|
24
|
+
trackingUnder13(): Promise<void>;
|
|
25
|
+
unsetCustomUserId(): Promise<void>;
|
|
26
|
+
unsetGlobalProperty(): Promise<void>;
|
|
27
|
+
}
|
package/dist/esm/web.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
export class SingularWeb extends WebPlugin {
|
|
3
|
+
async clearGlobalProperties() {
|
|
4
|
+
throw this.unimplemented('Not implemented on web.');
|
|
5
|
+
}
|
|
6
|
+
async createReferrerShortLink() {
|
|
7
|
+
throw this.unimplemented('Not implemented on web.');
|
|
8
|
+
}
|
|
9
|
+
async getGlobalProperties() {
|
|
10
|
+
throw this.unimplemented('Not implemented on web.');
|
|
11
|
+
}
|
|
12
|
+
async getLimitDataSharing() {
|
|
13
|
+
throw this.unimplemented('Not implemented on web.');
|
|
14
|
+
}
|
|
15
|
+
async initialize() {
|
|
16
|
+
throw this.unimplemented('Not implemented on web.');
|
|
17
|
+
}
|
|
18
|
+
async isAllTrackingStopped() {
|
|
19
|
+
throw this.unimplemented('Not implemented on web.');
|
|
20
|
+
}
|
|
21
|
+
async resumeAllTracking() {
|
|
22
|
+
throw this.unimplemented('Not implemented on web.');
|
|
23
|
+
}
|
|
24
|
+
async setCustomUserId() {
|
|
25
|
+
throw this.unimplemented('Not implemented on web.');
|
|
26
|
+
}
|
|
27
|
+
async setDeviceToken() {
|
|
28
|
+
throw this.unimplemented('Not implemented on web.');
|
|
29
|
+
}
|
|
30
|
+
async setGlobalProperty() {
|
|
31
|
+
throw this.unimplemented('Not implemented on web.');
|
|
32
|
+
}
|
|
33
|
+
async setLimitAdvertisingIdentifiers() {
|
|
34
|
+
throw this.unimplemented('Not implemented on web.');
|
|
35
|
+
}
|
|
36
|
+
async setLimitDataSharing() {
|
|
37
|
+
throw this.unimplemented('Not implemented on web.');
|
|
38
|
+
}
|
|
39
|
+
async skanGetConversionValue() {
|
|
40
|
+
throw this.unimplemented('Not implemented on web.');
|
|
41
|
+
}
|
|
42
|
+
async skanRegisterAppForAdNetworkAttribution() {
|
|
43
|
+
throw this.unimplemented('Not implemented on web.');
|
|
44
|
+
}
|
|
45
|
+
async skanUpdateConversionValue() {
|
|
46
|
+
throw this.unimplemented('Not implemented on web.');
|
|
47
|
+
}
|
|
48
|
+
async stopAllTracking() {
|
|
49
|
+
throw this.unimplemented('Not implemented on web.');
|
|
50
|
+
}
|
|
51
|
+
async trackAdRevenue() {
|
|
52
|
+
throw this.unimplemented('Not implemented on web.');
|
|
53
|
+
}
|
|
54
|
+
async trackEvent() {
|
|
55
|
+
throw this.unimplemented('Not implemented on web.');
|
|
56
|
+
}
|
|
57
|
+
async trackRevenue() {
|
|
58
|
+
throw this.unimplemented('Not implemented on web.');
|
|
59
|
+
}
|
|
60
|
+
async trackingOptIn() {
|
|
61
|
+
throw this.unimplemented('Not implemented on web.');
|
|
62
|
+
}
|
|
63
|
+
async trackingUnder13() {
|
|
64
|
+
throw this.unimplemented('Not implemented on web.');
|
|
65
|
+
}
|
|
66
|
+
async unsetCustomUserId() {
|
|
67
|
+
throw this.unimplemented('Not implemented on web.');
|
|
68
|
+
}
|
|
69
|
+
async unsetGlobalProperty() {
|
|
70
|
+
throw this.unimplemented('Not implemented on web.');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAW5C,MAAM,OAAO,WAAY,SAAQ,SAAS;IACxC,KAAK,CAAC,qBAAqB;QACzB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KA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;QAC7B,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,UAAU;QACd,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,mBAAmB;QACvB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n CreateReferrerShortLinkResult,\n GetGlobalPropertiesResult,\n GetLimitDataSharingResult,\n IsAllTrackingStoppedResult,\n SingularPlugin,\n SkanGetConversionValueResult,\n} from './definitions';\n\nexport class SingularWeb extends WebPlugin implements SingularPlugin {\n async clearGlobalProperties(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async createReferrerShortLink(): Promise<CreateReferrerShortLinkResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async getGlobalProperties(): Promise<GetGlobalPropertiesResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async getLimitDataSharing(): Promise<GetLimitDataSharingResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async initialize(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async isAllTrackingStopped(): Promise<IsAllTrackingStoppedResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async resumeAllTracking(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async setCustomUserId(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async setDeviceToken(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async setGlobalProperty(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async setLimitAdvertisingIdentifiers(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async setLimitDataSharing(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async skanGetConversionValue(): Promise<SkanGetConversionValueResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async skanRegisterAppForAdNetworkAttribution(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async skanUpdateConversionValue(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async stopAllTracking(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async trackAdRevenue(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async trackEvent(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async trackRevenue(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async trackingOptIn(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async trackingUnder13(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async unsetCustomUserId(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async unsetGlobalProperty(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"]}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@capacitor/core');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @since 0.1.0
|
|
7
|
+
*/
|
|
8
|
+
exports.ErrorCode = void 0;
|
|
9
|
+
(function (ErrorCode) {
|
|
10
|
+
/**
|
|
11
|
+
* The initialization of the SDK failed.
|
|
12
|
+
*
|
|
13
|
+
* @since 0.1.0
|
|
14
|
+
*/
|
|
15
|
+
ErrorCode["InitializationFailed"] = "INITIALIZATION_FAILED";
|
|
16
|
+
/**
|
|
17
|
+
* The plugin has not been initialized yet.
|
|
18
|
+
*
|
|
19
|
+
* Call `initialize(...)` before calling any other method.
|
|
20
|
+
*
|
|
21
|
+
* @since 0.1.0
|
|
22
|
+
*/
|
|
23
|
+
ErrorCode["NotInitialized"] = "NOT_INITIALIZED";
|
|
24
|
+
})(exports.ErrorCode || (exports.ErrorCode = {}));
|
|
25
|
+
/**
|
|
26
|
+
* @since 0.1.0
|
|
27
|
+
*/
|
|
28
|
+
exports.SkanCoarseConversionValue = void 0;
|
|
29
|
+
(function (SkanCoarseConversionValue) {
|
|
30
|
+
/**
|
|
31
|
+
* @since 0.1.0
|
|
32
|
+
*/
|
|
33
|
+
SkanCoarseConversionValue["High"] = "HIGH";
|
|
34
|
+
/**
|
|
35
|
+
* @since 0.1.0
|
|
36
|
+
*/
|
|
37
|
+
SkanCoarseConversionValue["Low"] = "LOW";
|
|
38
|
+
/**
|
|
39
|
+
* @since 0.1.0
|
|
40
|
+
*/
|
|
41
|
+
SkanCoarseConversionValue["Medium"] = "MEDIUM";
|
|
42
|
+
})(exports.SkanCoarseConversionValue || (exports.SkanCoarseConversionValue = {}));
|
|
43
|
+
|
|
44
|
+
const Singular = core.registerPlugin('Singular', {
|
|
45
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.SingularWeb()),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
class SingularWeb extends core.WebPlugin {
|
|
49
|
+
async clearGlobalProperties() {
|
|
50
|
+
throw this.unimplemented('Not implemented on web.');
|
|
51
|
+
}
|
|
52
|
+
async createReferrerShortLink() {
|
|
53
|
+
throw this.unimplemented('Not implemented on web.');
|
|
54
|
+
}
|
|
55
|
+
async getGlobalProperties() {
|
|
56
|
+
throw this.unimplemented('Not implemented on web.');
|
|
57
|
+
}
|
|
58
|
+
async getLimitDataSharing() {
|
|
59
|
+
throw this.unimplemented('Not implemented on web.');
|
|
60
|
+
}
|
|
61
|
+
async initialize() {
|
|
62
|
+
throw this.unimplemented('Not implemented on web.');
|
|
63
|
+
}
|
|
64
|
+
async isAllTrackingStopped() {
|
|
65
|
+
throw this.unimplemented('Not implemented on web.');
|
|
66
|
+
}
|
|
67
|
+
async resumeAllTracking() {
|
|
68
|
+
throw this.unimplemented('Not implemented on web.');
|
|
69
|
+
}
|
|
70
|
+
async setCustomUserId() {
|
|
71
|
+
throw this.unimplemented('Not implemented on web.');
|
|
72
|
+
}
|
|
73
|
+
async setDeviceToken() {
|
|
74
|
+
throw this.unimplemented('Not implemented on web.');
|
|
75
|
+
}
|
|
76
|
+
async setGlobalProperty() {
|
|
77
|
+
throw this.unimplemented('Not implemented on web.');
|
|
78
|
+
}
|
|
79
|
+
async setLimitAdvertisingIdentifiers() {
|
|
80
|
+
throw this.unimplemented('Not implemented on web.');
|
|
81
|
+
}
|
|
82
|
+
async setLimitDataSharing() {
|
|
83
|
+
throw this.unimplemented('Not implemented on web.');
|
|
84
|
+
}
|
|
85
|
+
async skanGetConversionValue() {
|
|
86
|
+
throw this.unimplemented('Not implemented on web.');
|
|
87
|
+
}
|
|
88
|
+
async skanRegisterAppForAdNetworkAttribution() {
|
|
89
|
+
throw this.unimplemented('Not implemented on web.');
|
|
90
|
+
}
|
|
91
|
+
async skanUpdateConversionValue() {
|
|
92
|
+
throw this.unimplemented('Not implemented on web.');
|
|
93
|
+
}
|
|
94
|
+
async stopAllTracking() {
|
|
95
|
+
throw this.unimplemented('Not implemented on web.');
|
|
96
|
+
}
|
|
97
|
+
async trackAdRevenue() {
|
|
98
|
+
throw this.unimplemented('Not implemented on web.');
|
|
99
|
+
}
|
|
100
|
+
async trackEvent() {
|
|
101
|
+
throw this.unimplemented('Not implemented on web.');
|
|
102
|
+
}
|
|
103
|
+
async trackRevenue() {
|
|
104
|
+
throw this.unimplemented('Not implemented on web.');
|
|
105
|
+
}
|
|
106
|
+
async trackingOptIn() {
|
|
107
|
+
throw this.unimplemented('Not implemented on web.');
|
|
108
|
+
}
|
|
109
|
+
async trackingUnder13() {
|
|
110
|
+
throw this.unimplemented('Not implemented on web.');
|
|
111
|
+
}
|
|
112
|
+
async unsetCustomUserId() {
|
|
113
|
+
throw this.unimplemented('Not implemented on web.');
|
|
114
|
+
}
|
|
115
|
+
async unsetGlobalProperty() {
|
|
116
|
+
throw this.unimplemented('Not implemented on web.');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
121
|
+
__proto__: null,
|
|
122
|
+
SingularWeb: SingularWeb
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
exports.Singular = Singular;
|
|
126
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * @since 0.1.0\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n /**\n * The initialization of the SDK failed.\n *\n * @since 0.1.0\n */\n ErrorCode[\"InitializationFailed\"] = \"INITIALIZATION_FAILED\";\n /**\n * The plugin has not been initialized yet.\n *\n * Call `initialize(...)` before calling any other method.\n *\n * @since 0.1.0\n */\n ErrorCode[\"NotInitialized\"] = \"NOT_INITIALIZED\";\n})(ErrorCode || (ErrorCode = {}));\n/**\n * @since 0.1.0\n */\nexport var SkanCoarseConversionValue;\n(function (SkanCoarseConversionValue) {\n /**\n * @since 0.1.0\n */\n SkanCoarseConversionValue[\"High\"] = \"HIGH\";\n /**\n * @since 0.1.0\n */\n SkanCoarseConversionValue[\"Low\"] = \"LOW\";\n /**\n * @since 0.1.0\n */\n SkanCoarseConversionValue[\"Medium\"] = \"MEDIUM\";\n})(SkanCoarseConversionValue || (SkanCoarseConversionValue = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst Singular = registerPlugin('Singular', {\n web: () => import('./web').then(m => new m.SingularWeb()),\n});\nexport * from './definitions';\nexport { Singular };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SingularWeb extends WebPlugin {\n async clearGlobalProperties() {\n throw this.unimplemented('Not implemented on web.');\n }\n async createReferrerShortLink() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getGlobalProperties() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getLimitDataSharing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async initialize() {\n throw this.unimplemented('Not implemented on web.');\n }\n async isAllTrackingStopped() {\n throw this.unimplemented('Not implemented on web.');\n }\n async resumeAllTracking() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setCustomUserId() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setDeviceToken() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setGlobalProperty() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setLimitAdvertisingIdentifiers() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setLimitDataSharing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async skanGetConversionValue() {\n throw this.unimplemented('Not implemented on web.');\n }\n async skanRegisterAppForAdNetworkAttribution() {\n throw this.unimplemented('Not implemented on web.');\n }\n async skanUpdateConversionValue() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stopAllTracking() {\n throw this.unimplemented('Not implemented on web.');\n }\n async trackAdRevenue() {\n throw this.unimplemented('Not implemented on web.');\n }\n async trackEvent() {\n throw this.unimplemented('Not implemented on web.');\n }\n async trackRevenue() {\n throw this.unimplemented('Not implemented on web.');\n }\n async trackingOptIn() {\n throw this.unimplemented('Not implemented on web.');\n }\n async trackingUnder13() {\n throw this.unimplemented('Not implemented on web.');\n }\n async unsetCustomUserId() {\n throw this.unimplemented('Not implemented on web.');\n }\n async unsetGlobalProperty() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ErrorCode","SkanCoarseConversionValue","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACWA;AACX,CAAC,UAAU,SAAS,EAAE;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,sBAAsB,CAAC,GAAG,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,gBAAgB,CAAC,GAAG,iBAAiB;AACnD,CAAC,EAAEA,iBAAS,KAAKA,iBAAS,GAAG,EAAE,CAAC,CAAC;AACjC;AACA;AACA;AACWC;AACX,CAAC,UAAU,yBAAyB,EAAE;AACtC;AACA;AACA;AACA,IAAI,yBAAyB,CAAC,MAAM,CAAC,GAAG,MAAM;AAC9C;AACA;AACA;AACA,IAAI,yBAAyB,CAAC,KAAK,CAAC,GAAG,KAAK;AAC5C;AACA;AACA;AACA,IAAI,yBAAyB,CAAC,QAAQ,CAAC,GAAG,QAAQ;AAClD,CAAC,EAAEA,iCAAyB,KAAKA,iCAAyB,GAAG,EAAE,CAAC,CAAC;;ACpC5D,MAAC,QAAQ,GAAGC,mBAAc,CAAC,UAAU,EAAE;AAC5C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAC7D,CAAC;;ACFM,MAAM,WAAW,SAASC,cAAS,CAAC;AAC3C,IAAI,MAAM,qBAAqB,GAAG;AAClC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,uBAAuB,GAAG;AACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,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initialization of the SDK failed.
|
|
11
|
+
*
|
|
12
|
+
* @since 0.1.0
|
|
13
|
+
*/
|
|
14
|
+
ErrorCode["InitializationFailed"] = "INITIALIZATION_FAILED";
|
|
15
|
+
/**
|
|
16
|
+
* The plugin has not been initialized yet.
|
|
17
|
+
*
|
|
18
|
+
* Call `initialize(...)` before calling any other method.
|
|
19
|
+
*
|
|
20
|
+
* @since 0.1.0
|
|
21
|
+
*/
|
|
22
|
+
ErrorCode["NotInitialized"] = "NOT_INITIALIZED";
|
|
23
|
+
})(exports.ErrorCode || (exports.ErrorCode = {}));
|
|
24
|
+
/**
|
|
25
|
+
* @since 0.1.0
|
|
26
|
+
*/
|
|
27
|
+
exports.SkanCoarseConversionValue = void 0;
|
|
28
|
+
(function (SkanCoarseConversionValue) {
|
|
29
|
+
/**
|
|
30
|
+
* @since 0.1.0
|
|
31
|
+
*/
|
|
32
|
+
SkanCoarseConversionValue["High"] = "HIGH";
|
|
33
|
+
/**
|
|
34
|
+
* @since 0.1.0
|
|
35
|
+
*/
|
|
36
|
+
SkanCoarseConversionValue["Low"] = "LOW";
|
|
37
|
+
/**
|
|
38
|
+
* @since 0.1.0
|
|
39
|
+
*/
|
|
40
|
+
SkanCoarseConversionValue["Medium"] = "MEDIUM";
|
|
41
|
+
})(exports.SkanCoarseConversionValue || (exports.SkanCoarseConversionValue = {}));
|
|
42
|
+
|
|
43
|
+
const Singular = core.registerPlugin('Singular', {
|
|
44
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.SingularWeb()),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
class SingularWeb extends core.WebPlugin {
|
|
48
|
+
async clearGlobalProperties() {
|
|
49
|
+
throw this.unimplemented('Not implemented on web.');
|
|
50
|
+
}
|
|
51
|
+
async createReferrerShortLink() {
|
|
52
|
+
throw this.unimplemented('Not implemented on web.');
|
|
53
|
+
}
|
|
54
|
+
async getGlobalProperties() {
|
|
55
|
+
throw this.unimplemented('Not implemented on web.');
|
|
56
|
+
}
|
|
57
|
+
async getLimitDataSharing() {
|
|
58
|
+
throw this.unimplemented('Not implemented on web.');
|
|
59
|
+
}
|
|
60
|
+
async initialize() {
|
|
61
|
+
throw this.unimplemented('Not implemented on web.');
|
|
62
|
+
}
|
|
63
|
+
async isAllTrackingStopped() {
|
|
64
|
+
throw this.unimplemented('Not implemented on web.');
|
|
65
|
+
}
|
|
66
|
+
async resumeAllTracking() {
|
|
67
|
+
throw this.unimplemented('Not implemented on web.');
|
|
68
|
+
}
|
|
69
|
+
async setCustomUserId() {
|
|
70
|
+
throw this.unimplemented('Not implemented on web.');
|
|
71
|
+
}
|
|
72
|
+
async setDeviceToken() {
|
|
73
|
+
throw this.unimplemented('Not implemented on web.');
|
|
74
|
+
}
|
|
75
|
+
async setGlobalProperty() {
|
|
76
|
+
throw this.unimplemented('Not implemented on web.');
|
|
77
|
+
}
|
|
78
|
+
async setLimitAdvertisingIdentifiers() {
|
|
79
|
+
throw this.unimplemented('Not implemented on web.');
|
|
80
|
+
}
|
|
81
|
+
async setLimitDataSharing() {
|
|
82
|
+
throw this.unimplemented('Not implemented on web.');
|
|
83
|
+
}
|
|
84
|
+
async skanGetConversionValue() {
|
|
85
|
+
throw this.unimplemented('Not implemented on web.');
|
|
86
|
+
}
|
|
87
|
+
async skanRegisterAppForAdNetworkAttribution() {
|
|
88
|
+
throw this.unimplemented('Not implemented on web.');
|
|
89
|
+
}
|
|
90
|
+
async skanUpdateConversionValue() {
|
|
91
|
+
throw this.unimplemented('Not implemented on web.');
|
|
92
|
+
}
|
|
93
|
+
async stopAllTracking() {
|
|
94
|
+
throw this.unimplemented('Not implemented on web.');
|
|
95
|
+
}
|
|
96
|
+
async trackAdRevenue() {
|
|
97
|
+
throw this.unimplemented('Not implemented on web.');
|
|
98
|
+
}
|
|
99
|
+
async trackEvent() {
|
|
100
|
+
throw this.unimplemented('Not implemented on web.');
|
|
101
|
+
}
|
|
102
|
+
async trackRevenue() {
|
|
103
|
+
throw this.unimplemented('Not implemented on web.');
|
|
104
|
+
}
|
|
105
|
+
async trackingOptIn() {
|
|
106
|
+
throw this.unimplemented('Not implemented on web.');
|
|
107
|
+
}
|
|
108
|
+
async trackingUnder13() {
|
|
109
|
+
throw this.unimplemented('Not implemented on web.');
|
|
110
|
+
}
|
|
111
|
+
async unsetCustomUserId() {
|
|
112
|
+
throw this.unimplemented('Not implemented on web.');
|
|
113
|
+
}
|
|
114
|
+
async unsetGlobalProperty() {
|
|
115
|
+
throw this.unimplemented('Not implemented on web.');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
120
|
+
__proto__: null,
|
|
121
|
+
SingularWeb: SingularWeb
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
exports.Singular = Singular;
|
|
125
|
+
|
|
126
|
+
return exports;
|
|
127
|
+
|
|
128
|
+
})({}, capacitorExports);
|
|
129
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * @since 0.1.0\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n /**\n * The initialization of the SDK failed.\n *\n * @since 0.1.0\n */\n ErrorCode[\"InitializationFailed\"] = \"INITIALIZATION_FAILED\";\n /**\n * The plugin has not been initialized yet.\n *\n * Call `initialize(...)` before calling any other method.\n *\n * @since 0.1.0\n */\n ErrorCode[\"NotInitialized\"] = \"NOT_INITIALIZED\";\n})(ErrorCode || (ErrorCode = {}));\n/**\n * @since 0.1.0\n */\nexport var SkanCoarseConversionValue;\n(function (SkanCoarseConversionValue) {\n /**\n * @since 0.1.0\n */\n SkanCoarseConversionValue[\"High\"] = \"HIGH\";\n /**\n * @since 0.1.0\n */\n SkanCoarseConversionValue[\"Low\"] = \"LOW\";\n /**\n * @since 0.1.0\n */\n SkanCoarseConversionValue[\"Medium\"] = \"MEDIUM\";\n})(SkanCoarseConversionValue || (SkanCoarseConversionValue = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst Singular = registerPlugin('Singular', {\n web: () => import('./web').then(m => new m.SingularWeb()),\n});\nexport * from './definitions';\nexport { Singular };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SingularWeb extends WebPlugin {\n async clearGlobalProperties() {\n throw this.unimplemented('Not implemented on web.');\n }\n async createReferrerShortLink() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getGlobalProperties() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getLimitDataSharing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async initialize() {\n throw this.unimplemented('Not implemented on web.');\n }\n async isAllTrackingStopped() {\n throw this.unimplemented('Not implemented on web.');\n }\n async resumeAllTracking() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setCustomUserId() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setDeviceToken() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setGlobalProperty() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setLimitAdvertisingIdentifiers() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setLimitDataSharing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async skanGetConversionValue() {\n throw this.unimplemented('Not implemented on web.');\n }\n async skanRegisterAppForAdNetworkAttribution() {\n throw this.unimplemented('Not implemented on web.');\n }\n async skanUpdateConversionValue() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stopAllTracking() {\n throw this.unimplemented('Not implemented on web.');\n }\n async trackAdRevenue() {\n throw this.unimplemented('Not implemented on web.');\n }\n async trackEvent() {\n throw this.unimplemented('Not implemented on web.');\n }\n async trackRevenue() {\n throw this.unimplemented('Not implemented on web.');\n }\n async trackingOptIn() {\n throw this.unimplemented('Not implemented on web.');\n }\n async trackingUnder13() {\n throw this.unimplemented('Not implemented on web.');\n }\n async unsetCustomUserId() {\n throw this.unimplemented('Not implemented on web.');\n }\n async unsetGlobalProperty() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ErrorCode","SkanCoarseConversionValue","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;AACWA;IACX,CAAC,UAAU,SAAS,EAAE;IACtB;IACA;IACA;IACA;IACA;IACA,IAAI,SAAS,CAAC,sBAAsB,CAAC,GAAG,uBAAuB;IAC/D;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,SAAS,CAAC,gBAAgB,CAAC,GAAG,iBAAiB;IACnD,CAAC,EAAEA,iBAAS,KAAKA,iBAAS,GAAG,EAAE,CAAC,CAAC;IACjC;IACA;IACA;AACWC;IACX,CAAC,UAAU,yBAAyB,EAAE;IACtC;IACA;IACA;IACA,IAAI,yBAAyB,CAAC,MAAM,CAAC,GAAG,MAAM;IAC9C;IACA;IACA;IACA,IAAI,yBAAyB,CAAC,KAAK,CAAC,GAAG,KAAK;IAC5C;IACA;IACA;IACA,IAAI,yBAAyB,CAAC,QAAQ,CAAC,GAAG,QAAQ;IAClD,CAAC,EAAEA,iCAAyB,KAAKA,iCAAyB,GAAG,EAAE,CAAC,CAAC;;ACpC5D,UAAC,QAAQ,GAAGC,mBAAc,CAAC,UAAU,EAAE;IAC5C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7D,CAAC;;ICFM,MAAM,WAAW,SAASC,cAAS,CAAC;IAC3C,IAAI,MAAM,qBAAqB,GAAG;IAClC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,uBAAuB,GAAG;IACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,mBAAmB,GAAG;IAChC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC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Aa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,eAAe,GAAG;IAC5B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,cAAc,GAAG;IAC3B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,YAAY,GAAG;IACzB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,aAAa,GAAG;IAC1B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,eAAe,GAAG;IAC5B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,mBAAmB,GAAG;IAChC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class DeviceAttributionInfoReceivedEvent: NSObject, Result {
|
|
5
|
+
private let info: [AnyHashable: Any]
|
|
6
|
+
|
|
7
|
+
init(info: [AnyHashable: Any]) {
|
|
8
|
+
self.info = info
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@objc public func toJSObject() -> AnyObject {
|
|
12
|
+
var result = JSObject()
|
|
13
|
+
if let campaignId = info["campaign_id"] as? String {
|
|
14
|
+
result["campaignId"] = campaignId
|
|
15
|
+
}
|
|
16
|
+
if let campaignName = info["campaign_name"] as? String {
|
|
17
|
+
result["campaignName"] = campaignName
|
|
18
|
+
}
|
|
19
|
+
if let clickTimestamp = info["click_timestamp"] as? NSNumber {
|
|
20
|
+
result["clickTimestamp"] = Int(clickTimestamp.int64Value / 1000)
|
|
21
|
+
}
|
|
22
|
+
if let creativeId = info["creative_id"] as? String {
|
|
23
|
+
result["creativeId"] = creativeId
|
|
24
|
+
}
|
|
25
|
+
if let creativeName = info["creative_name"] as? String {
|
|
26
|
+
result["creativeName"] = creativeName
|
|
27
|
+
}
|
|
28
|
+
if let matchType = info["match_type"] as? String {
|
|
29
|
+
result["matchType"] = matchType
|
|
30
|
+
}
|
|
31
|
+
result["network"] = info["network"] as? String ?? ""
|
|
32
|
+
if let passthrough = info["passthrough"] as? String {
|
|
33
|
+
result["passthrough"] = passthrough
|
|
34
|
+
}
|
|
35
|
+
if let subcampaignId = info["subcampaign_id"] as? String {
|
|
36
|
+
result["subcampaignId"] = subcampaignId
|
|
37
|
+
}
|
|
38
|
+
if let subcampaignName = info["subcampaign_name"] as? String {
|
|
39
|
+
result["subcampaignName"] = subcampaignName
|
|
40
|
+
}
|
|
41
|
+
return result as AnyObject
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class SdidReceivedEvent: NSObject, Result {
|
|
5
|
+
private let sdid: String
|
|
6
|
+
|
|
7
|
+
init(sdid: String) {
|
|
8
|
+
self.sdid = sdid
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@objc public func toJSObject() -> AnyObject {
|
|
12
|
+
var result = JSObject()
|
|
13
|
+
result["sdid"] = sdid
|
|
14
|
+
return result as AnyObject
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class SdidSetEvent: NSObject, Result {
|
|
5
|
+
private let sdid: String
|
|
6
|
+
|
|
7
|
+
init(sdid: String) {
|
|
8
|
+
self.sdid = sdid
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@objc public func toJSObject() -> AnyObject {
|
|
12
|
+
var result = JSObject()
|
|
13
|
+
result["sdid"] = sdid
|
|
14
|
+
return result as AnyObject
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
import Singular
|
|
4
|
+
|
|
5
|
+
@objc public class SingularLinkResolvedEvent: NSObject, Result {
|
|
6
|
+
private let params: SingularLinkParams
|
|
7
|
+
|
|
8
|
+
init(params: SingularLinkParams) {
|
|
9
|
+
self.params = params
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@objc public func toJSObject() -> AnyObject {
|
|
13
|
+
var result = JSObject()
|
|
14
|
+
if let deepLink = params.getDeepLink() {
|
|
15
|
+
result["deepLink"] = deepLink
|
|
16
|
+
} else {
|
|
17
|
+
result["deepLink"] = NSNull()
|
|
18
|
+
}
|
|
19
|
+
result["isDeferred"] = params.isDeferred()
|
|
20
|
+
if let passthrough = params.getPassthrough() {
|
|
21
|
+
result["passthrough"] = passthrough
|
|
22
|
+
} else {
|
|
23
|
+
result["passthrough"] = NSNull()
|
|
24
|
+
}
|
|
25
|
+
result["urlParameters"] = SingularHelper.createStringJSObjectFromHashMap(params.getUrlParameters())
|
|
26
|
+
return result as AnyObject
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class SkanConversionValueUpdatedEvent: NSObject, Result {
|
|
5
|
+
private let coarseValue: NSNumber?
|
|
6
|
+
private let lockWindow: Bool
|
|
7
|
+
private let value: NSNumber?
|
|
8
|
+
|
|
9
|
+
init(value: NSNumber?, coarseValue: NSNumber?, lockWindow: Bool) {
|
|
10
|
+
self.value = value
|
|
11
|
+
self.coarseValue = coarseValue
|
|
12
|
+
self.lockWindow = lockWindow
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@objc public func toJSObject() -> AnyObject {
|
|
16
|
+
var result = JSObject()
|
|
17
|
+
if let coarseValue = coarseValue, let value = SkanCoarseConversionValue(skanValue: coarseValue.intValue) {
|
|
18
|
+
result["coarseValue"] = value.rawValue
|
|
19
|
+
} else {
|
|
20
|
+
result["coarseValue"] = NSNull()
|
|
21
|
+
}
|
|
22
|
+
result["lockWindow"] = lockWindow
|
|
23
|
+
if let value = value {
|
|
24
|
+
result["value"] = value.intValue
|
|
25
|
+
} else {
|
|
26
|
+
result["value"] = NSNull()
|
|
27
|
+
}
|
|
28
|
+
return result as AnyObject
|
|
29
|
+
}
|
|
30
|
+
}
|