rn-prodeeplinks 0.0.5 → 0.0.7
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/README.md +1 -1
- package/lib/api.js +6 -8
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> ⚠️ **License Required**: This package requires a valid license key purchased from our portal. Without a license key, the package will not function.
|
|
6
6
|
|
|
7
|
-
> ℹ️ **Versioning**: Current version is 0.0.
|
|
7
|
+
> ℹ️ **Versioning**: Current version is 0.0.6 (in-progress). It will move to 1.x after stable.
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
package/lib/api.js
CHANGED
|
@@ -7,8 +7,9 @@ exports.validateLicenseInit = validateLicenseInit;
|
|
|
7
7
|
exports.matchFingerprintCustom = matchFingerprintCustom;
|
|
8
8
|
exports.trackCustomDeepLinkEvent = trackCustomDeepLinkEvent;
|
|
9
9
|
const license_1 = require("./license");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const BASE_API_URL = 'https://api.prodeeplinks.com';
|
|
11
|
+
const DEFAULT_API_ENDPOINT = `${BASE_API_URL}/v1/deeplink`;
|
|
12
|
+
const ANALYTICS_ENDPOINT = `${BASE_API_URL}/custom-deep-link/track/event`;
|
|
12
13
|
/**
|
|
13
14
|
* Call API to get deep link URL
|
|
14
15
|
* This function sends device fingerprint and license key to server
|
|
@@ -24,13 +25,9 @@ async function fetchDeepLinkUrl(licenseKey, fingerprint, apiEndpoint, timeout =
|
|
|
24
25
|
error: validation.message || 'Invalid license key',
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
|
-
const PACKAGE_NAME = 'react-native-pro-deeplink';
|
|
28
|
-
const PACKAGE_VERSION = '0.0.5';
|
|
29
28
|
const payload = {
|
|
30
29
|
licenseKey,
|
|
31
30
|
fingerprint: fingerprint,
|
|
32
|
-
packageName: PACKAGE_NAME,
|
|
33
|
-
packageVersion: PACKAGE_VERSION,
|
|
34
31
|
timestamp: Date.now(),
|
|
35
32
|
};
|
|
36
33
|
// Make API call with timeout
|
|
@@ -150,7 +147,7 @@ async function validateLicenseCustom(licenseKey, opts) {
|
|
|
150
147
|
}
|
|
151
148
|
async function validateLicenseInit(licenseKey) {
|
|
152
149
|
try {
|
|
153
|
-
const endpoint = `${
|
|
150
|
+
const endpoint = `${BASE_API_URL}/custom-deep-link/license/validate`;
|
|
154
151
|
const res = await fetch(endpoint, {
|
|
155
152
|
method: 'POST',
|
|
156
153
|
headers: {
|
|
@@ -179,7 +176,8 @@ async function validateLicenseInit(licenseKey) {
|
|
|
179
176
|
}
|
|
180
177
|
async function matchFingerprintCustom(payload, baseUrl, licenseKey) {
|
|
181
178
|
try {
|
|
182
|
-
const
|
|
179
|
+
const base = (baseUrl || BASE_API_URL).trim().replace(/\/+$/, '');
|
|
180
|
+
const endpoint = `${base}/custom-deep-link/fingerprint/match`;
|
|
183
181
|
const res = await fetch(endpoint, {
|
|
184
182
|
method: 'POST',
|
|
185
183
|
headers: {
|
package/lib/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const react_native_1 = require("react-native");
|
|
|
13
13
|
// Global state to store license key and configuration
|
|
14
14
|
let storedLicenseKey = null;
|
|
15
15
|
let isInitialized = false;
|
|
16
|
-
const DEFAULT_API_ENDPOINT = 'https://api.
|
|
16
|
+
const DEFAULT_API_ENDPOINT = 'https://api.prodeeplinks.com/v1/deeplink';
|
|
17
17
|
/**
|
|
18
18
|
* Initialize the deep link package with license key
|
|
19
19
|
* This must be called before using getDeepLink()
|
package/package.json
CHANGED