rn-prodeeplinks 0.0.4 → 0.0.5

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 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.4 (in-progress). It will move to 1.x after stable.
7
+ > ℹ️ **Versioning**: Current version is 0.0.5 (in-progress). It will move to 1.x after stable.
8
8
 
9
9
  ## Features
10
10
 
package/lib/api.js CHANGED
@@ -8,8 +8,7 @@ exports.matchFingerprintCustom = matchFingerprintCustom;
8
8
  exports.trackCustomDeepLinkEvent = trackCustomDeepLinkEvent;
9
9
  const license_1 = require("./license");
10
10
  const DEFAULT_API_ENDPOINT = 'https://api.prodeeplink.com/v1/deeplink';
11
- const CUSTOM_API_BASE_URL = 'https://api.prodeeplinks.com';
12
- const ANALYTICS_ENDPOINT = 'https://s.finprim.com/custom-deep-link/track/event';
11
+ const ANALYTICS_ENDPOINT = `${DEFAULT_API_ENDPOINT}/custom-deep-link/track/event`;
13
12
  /**
14
13
  * Call API to get deep link URL
15
14
  * This function sends device fingerprint and license key to server
@@ -26,7 +25,7 @@ async function fetchDeepLinkUrl(licenseKey, fingerprint, apiEndpoint, timeout =
26
25
  };
27
26
  }
28
27
  const PACKAGE_NAME = 'react-native-pro-deeplink';
29
- const PACKAGE_VERSION = '0.0.4';
28
+ const PACKAGE_VERSION = '0.0.5';
30
29
  const payload = {
31
30
  licenseKey,
32
31
  fingerprint: fingerprint,
@@ -38,14 +37,10 @@ async function fetchDeepLinkUrl(licenseKey, fingerprint, apiEndpoint, timeout =
38
37
  const controller = new AbortController();
39
38
  const timeoutId = setTimeout(() => controller.abort(), timeout);
40
39
  try {
41
- const PACKAGE_NAME = 'react-native-pro-deeplink';
42
- const PACKAGE_VERSION = '0.0.4';
43
40
  const response = await fetch(endpoint, {
44
41
  method: 'POST',
45
42
  headers: {
46
43
  'Content-Type': 'application/json',
47
- 'X-Package-Name': PACKAGE_NAME,
48
- 'X-Package-Version': PACKAGE_VERSION,
49
44
  'x-license-key': licenseKey,
50
45
  },
51
46
  body: JSON.stringify(payload),
@@ -155,7 +150,7 @@ async function validateLicenseCustom(licenseKey, opts) {
155
150
  }
156
151
  async function validateLicenseInit(licenseKey) {
157
152
  try {
158
- const endpoint = `${CUSTOM_API_BASE_URL}/custom-deep-link/license/validate`;
153
+ const endpoint = `${DEFAULT_API_ENDPOINT}/custom-deep-link/license/validate`;
159
154
  const res = await fetch(endpoint, {
160
155
  method: 'POST',
161
156
  headers: {
@@ -184,8 +179,7 @@ async function validateLicenseInit(licenseKey) {
184
179
  }
185
180
  async function matchFingerprintCustom(payload, baseUrl, licenseKey) {
186
181
  try {
187
- const base = (baseUrl || CUSTOM_API_BASE_URL).trim().replace(/\/+$/, '');
188
- const endpoint = `${base}/custom-deep-link/fingerprint/match`;
182
+ const endpoint = `${DEFAULT_API_ENDPOINT}/custom-deep-link/fingerprint/match`;
189
183
  const res = await fetch(endpoint, {
190
184
  method: 'POST',
191
185
  headers: {
package/lib/index.js CHANGED
@@ -13,7 +13,6 @@ 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
- // Hardcoded API endpoint - user doesn't need to know about this
17
16
  const DEFAULT_API_ENDPOINT = 'https://api.prodeeplink.com/v1/deeplink';
18
17
  /**
19
18
  * Initialize the deep link package with license key
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rn-prodeeplinks",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Secure deep linking package with license key validation and device fingerprinting for React Native",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",