react-native-cliqit 0.0.1 → 0.0.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 MindRoots
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -17,14 +17,6 @@ npm install git+https://github.com/mindrootstech/react-native-cliqit.git#v2.0.6
17
17
  cd ios && pod install && cd ..
18
18
  ```
19
19
 
20
- `package.json`:
21
-
22
- ```json
23
- "dependencies": {
24
- "react-native-cliqit": "git+https://github.com/mindrootstech/react-native-cliqit.git#v2.0.6"
25
- }
26
- ```
27
-
28
20
  ## Usage
29
21
 
30
22
  All APIs use a `{ result, error }` callback object.
@@ -32,9 +24,9 @@ All APIs use a `{ result, error }` callback object.
32
24
  Register listeners **before** `configure` — deferred match can finish very fast.
33
25
 
34
26
  ```js
35
- import { useEffect } from 'react';
36
- import { Linking } from 'react-native';
37
- import CliqIt from 'react-native-cliqit';
27
+ import { useEffect } from "react";
28
+ import { Linking } from "react-native";
29
+ import CliqIt from "react-native-cliqit";
38
30
 
39
31
  useEffect(() => {
40
32
  // onDeepLink — runs when the app should navigate:
@@ -42,7 +34,7 @@ useEffect(() => {
42
34
  // • Deferred: after a successful first-open match, SDK delivers the path (isDeferred: true)
43
35
  const offDeepLink = CliqIt.onDeepLink(({ result, error }) => {
44
36
  if (error) return;
45
- console.log('deep link', result.path, result.isDeferred);
37
+ console.log("deep link", result.path, result.isDeferred);
46
38
  });
47
39
 
48
40
  // onDeferredMatch — runs once on cold start / configure (first install attribution):
@@ -50,8 +42,8 @@ useEffect(() => {
50
42
  // Does NOT mean "navigate by itself" — if matched, onDeepLink usually fires next.
51
43
  const offMatch = CliqIt.onDeferredMatch(({ result, error }) => {
52
44
  if (error) return;
53
- if (result?.status === 'matched') {
54
- console.log('deferred', result.destinationPath);
45
+ if (result?.status === "matched") {
46
+ console.log("deferred", result.destinationPath);
55
47
  }
56
48
  });
57
49
 
@@ -59,17 +51,17 @@ useEffect(() => {
59
51
  // Not used for pure deferred-only first open (unless a URL was also handled).
60
52
  const offLookup = CliqIt.onLinkLookup(({ result, error }) => {
61
53
  if (error) return;
62
- console.log('link lookup', result?.resolvedPath ?? result?.slug);
54
+ console.log("link lookup", result?.resolvedPath ?? result?.slug);
63
55
  });
64
56
 
65
57
  // onVerify — runs after configure (background): API key + package/bundle (/ SHA) identity check.
66
58
  const offVerify = CliqIt.onVerify(({ result, error }) => {
67
- console.log('verify', error || result?.status);
59
+ console.log("verify", error || result?.status);
68
60
  });
69
61
 
70
62
  // configure — call once at startup (after listeners). Starts verify + deferred match.
71
- CliqIt.configure({ apiKey: 'pk_live_…' }, ({ result, error }) => {
72
- console.log('configured', result, error);
63
+ CliqIt.configure({ apiKey: "pk_live_…" }, ({ result, error }) => {
64
+ console.log("configured", result, error);
73
65
  });
74
66
 
75
67
  // handleUrl — pass Universal Links / App Links / custom-scheme URLs into the SDK.
@@ -77,7 +69,7 @@ useEffect(() => {
77
69
  Linking.getInitialURL().then((url) => {
78
70
  if (url) CliqIt.handleUrl({ url }, ({ error }) => {});
79
71
  });
80
- const linkSub = Linking.addEventListener('url', ({ url }) => {
72
+ const linkSub = Linking.addEventListener("url", ({ url }) => {
81
73
  CliqIt.handleUrl({ url });
82
74
  });
83
75
 
@@ -91,7 +83,6 @@ useEffect(() => {
91
83
  }, []);
92
84
  ```
93
85
 
94
-
95
86
  ## Callback results
96
87
 
97
88
  Every listener / action callback receives:
@@ -105,20 +96,20 @@ Every listener / action callback receives:
105
96
 
106
97
  ### `configure({ apiKey }, cb)`
107
98
 
108
- | Field | Type | Notes |
109
- |-------|------|--------|
99
+ | Field | Type | Notes |
100
+ | ----------- | --------- | ------------------------------------------ |
110
101
  | `result.ok` | `boolean` | `true` when configure was accepted locally |
111
- | `error` | `string` | Missing `apiKey`, or native throw |
102
+ | `error` | `string` | Missing `apiKey`, or native throw |
112
103
 
113
104
  Starts background **verify** + **deferred match** (listeners should be registered first).
114
105
 
115
106
  ### `handleUrl({ url }, cb)`
116
107
 
117
- | Field | Type | Notes |
118
- |-------|------|--------|
119
- | `result.ok` | `boolean` | URL was passed into the native SDK |
120
- | `result.url` | `string` | Same URL you passed |
121
- | `error` | `string` | Missing / invalid `url` |
108
+ | Field | Type | Notes |
109
+ | ------------ | --------- | ---------------------------------- |
110
+ | `result.ok` | `boolean` | URL was passed into the native SDK |
111
+ | `result.url` | `string` | Same URL you passed |
112
+ | `error` | `string` | Missing / invalid `url` |
122
113
 
123
114
  Use for Universal Links / App Links / custom schemes (cold start + warm).
124
115
 
@@ -126,30 +117,30 @@ Use for Universal Links / App Links / custom schemes (cold start + warm).
126
117
 
127
118
  Navigation payload — **direct** opens and **deferred delivery**.
128
119
 
129
- | Field | Type | Notes |
130
- |-------|------|--------|
131
- | `result.url` | `string` | Original or synthetic URL |
132
- | `result.path` | `string` | In-app path (usually starts with `/`) |
133
- | `result.pathComponents` | `string[]` | Path segments |
134
- | `result.query` | `object` | Query key → value |
135
- | `result.source` | `string` | e.g. `deferred`, `universalLink`, `customScheme` |
136
- | `result.isDeferred` | `boolean` | `true` if from deferred match delivery |
137
- | `error` | `string` | Rare bridge/payload issues |
120
+ | Field | Type | Notes |
121
+ | ----------------------- | ---------- | ------------------------------------------------ |
122
+ | `result.url` | `string` | Original or synthetic URL |
123
+ | `result.path` | `string` | In-app path (usually starts with `/`) |
124
+ | `result.pathComponents` | `string[]` | Path segments |
125
+ | `result.query` | `object` | Query key → value |
126
+ | `result.source` | `string` | e.g. `deferred`, `universalLink`, `customScheme` |
127
+ | `result.isDeferred` | `boolean` | `true` if from deferred match delivery |
128
+ | `error` | `string` | Rare bridge/payload issues |
138
129
 
139
130
  ### `onDeferredMatch(({ result, error }) => …)`
140
131
 
141
132
  First-open **attribution** only (not navigation by itself).
142
133
 
143
- | Field | Type | When |
144
- |-------|------|------|
145
- | `result.status` | `string` | `matched` \| `notMatched` \| `alreadyReported` |
134
+ | Field | Type | When |
135
+ | ------------------------ | --------- | ------------------------------------------------- |
136
+ | `result.status` | `string` | `matched` \| `notMatched` \| `alreadyReported` |
146
137
  | `result.destinationPath` | `string?` | Matched in-app destination (may omit leading `/`) |
147
- | `result.slug` | `string?` | SmartLink slug |
148
- | `result.score` | `number?` | Match score |
149
- | `result.tier` | `string?` | e.g. `probabilistic` |
150
- | `result.confidence` | `string?` | e.g. `medium` |
151
- | `result.note` | `string?` | Present when `alreadyReported` |
152
- | `error` | `string` | Match request / decode failure (`status: failed`) |
138
+ | `result.slug` | `string?` | SmartLink slug |
139
+ | `result.score` | `number?` | Match score |
140
+ | `result.tier` | `string?` | e.g. `probabilistic` |
141
+ | `result.confidence` | `string?` | e.g. `medium` |
142
+ | `result.note` | `string?` | Present when `alreadyReported` |
143
+ | `error` | `string` | Match request / decode failure (`status: failed`) |
153
144
 
154
145
  If `status === 'matched'`, `onDeepLink` usually fires next with `isDeferred: true`.
155
146
 
@@ -157,22 +148,22 @@ If `status === 'matched'`, `onDeepLink` usually fires next with `isDeferred: tru
157
148
 
158
149
  Direct SmartLink **slug → destination** API resolve.
159
150
 
160
- | Field | Type | Notes |
161
- |-------|------|--------|
162
- | `result.status` | `string` | `resolved` on success |
163
- | `result.resolvedPath` | `string?` | Platform path (`iosDestination` / `androidDestination` / `destination`) |
164
- | `result.slug` | `string?` | Link slug |
165
- | `result.destination` | `string?` | Default destination |
166
- | `result.iosDestination` | `string?` | iOS-specific path |
167
- | `result.androidDestination` | `string?` | Android-specific path |
168
- | `result.ogTitle` / `ogDescription` / `ogImage` / `ogUrl` | `string?` | Open Graph fields |
169
- | `result.webFallback` | `string?` | Web fallback URL |
170
- | `result.showInterstitial` | `string?` | `"true"` / `"false"` when present |
171
- | `result.isDeepLink` | `string?` | `"true"` / `"false"` when present |
172
- | `result.appleTeamId` | `string?` | iOS team id |
173
- | `result.iosBundleId` | `string?` | Expected iOS bundle |
174
- | `result.androidPackageName` | `string?` | Expected Android package |
175
- | `error` | `string` | Lookup failed |
151
+ | Field | Type | Notes |
152
+ | -------------------------------------------------------- | --------- | ----------------------------------------------------------------------- |
153
+ | `result.status` | `string` | `resolved` on success |
154
+ | `result.resolvedPath` | `string?` | Platform path (`iosDestination` / `androidDestination` / `destination`) |
155
+ | `result.slug` | `string?` | Link slug |
156
+ | `result.destination` | `string?` | Default destination |
157
+ | `result.iosDestination` | `string?` | iOS-specific path |
158
+ | `result.androidDestination` | `string?` | Android-specific path |
159
+ | `result.ogTitle` / `ogDescription` / `ogImage` / `ogUrl` | `string?` | Open Graph fields |
160
+ | `result.webFallback` | `string?` | Web fallback URL |
161
+ | `result.showInterstitial` | `string?` | `"true"` / `"false"` when present |
162
+ | `result.isDeepLink` | `string?` | `"true"` / `"false"` when present |
163
+ | `result.appleTeamId` | `string?` | iOS team id |
164
+ | `result.iosBundleId` | `string?` | Expected iOS bundle |
165
+ | `result.androidPackageName` | `string?` | Expected Android package |
166
+ | `error` | `string` | Lookup failed |
176
167
 
177
168
  Prefer `CliqIt.LinkField.resolvedPath` (and other `LinkField` keys) instead of raw strings.
178
169
 
@@ -180,26 +171,28 @@ Prefer `CliqIt.LinkField.resolvedPath` (and other `LinkField` keys) instead of r
180
171
 
181
172
  Runs after `configure` — API key / app identity check.
182
173
 
183
- | Field | Type | Notes |
184
- |-------|------|--------|
185
- | `result.status` | `string` | `ok` \| `mismatch` |
186
- | `result.ok` | `boolean` | Same as server `ok` |
187
- | `result.appId` | `string?` | App id from admin |
188
- | `result.appName` | `string?` | App display name |
189
- | `result.message` | `string?` | Human-readable summary |
190
- | `result.checks` | `object?` | Per-field `{ actual, expected, match }` (bundle / package / SHA) |
191
- | `result.raw` | `string?` | Raw JSON body (if provided by native) |
192
- | `error` | `string` | Network / decode / failed verify transport |
174
+ | Field | Type | Notes |
175
+ | ---------------- | --------- | ---------------------------------------------------------------- |
176
+ | `result.status` | `string` | `ok` \| `mismatch` |
177
+ | `result.ok` | `boolean` | Same as server `ok` |
178
+ | `result.appId` | `string?` | App id from admin |
179
+ | `result.appName` | `string?` | App display name |
180
+ | `result.message` | `string?` | Human-readable summary |
181
+ | `result.checks` | `object?` | Per-field `{ actual, expected, match }` (bundle / package / SHA) |
182
+ | `result.raw` | `string?` | Raw JSON body (if provided by native) |
183
+ | `error` | `string` | Network / decode / failed verify transport |
193
184
 
194
185
  `mismatch` stays in `result` (identity problem, not a dropped callback). Transport failures use `error`.
195
186
 
196
187
  ## App setup
197
188
 
198
189
  ### iOS
190
+
199
191
  - Associated Domains: `applinks:<your-smartlink-domain>`
200
192
  - iOS 15+
201
193
 
202
194
  ### Android
195
+
203
196
  - App Links intent-filter for your SmartLink host
204
197
  - Autolinking registers `CliqItPackage` (RN 0.60+)
205
198
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-cliqit",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "React Native bridge for CliqIt deferred deep linking (iOS + Android).",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -12,7 +12,8 @@
12
12
  "android",
13
13
  "react-native-cliqit.podspec",
14
14
  "react-native.config.js",
15
- "README.md"
15
+ "README.md",
16
+ "LICENSE"
16
17
  ],
17
18
  "keywords": [
18
19
  "react-native",
@@ -35,7 +36,7 @@
35
36
  "android"
36
37
  ],
37
38
  "author": "MindRoots",
38
- "license": "UNLICENSED",
39
+ "license": "MIT",
39
40
  "homepage": "https://github.com/mindrootstech/react-native-cliqit",
40
41
  "repository": {
41
42
  "type": "git",
@@ -7,7 +7,7 @@ Pod::Spec.new do |s|
7
7
  s.version = package['version']
8
8
  s.summary = package['description']
9
9
  s.homepage = 'https://github.com/mindrootstech/react-native-cliqit'
10
- s.license = { :type => 'UNLICENSED' }
10
+ s.license = { :type => package['license'], :file => 'LICENSE' }
11
11
  s.authors = { 'MindRoots' => 'info@mindroots.com' }
12
12
  s.source = { :git => 'https://github.com/mindrootstech/react-native-cliqit.git', :tag => "v#{s.version}" }
13
13