@heedkit/sdk-react-native 0.1.0

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 HeedKit
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 ADDED
@@ -0,0 +1,36 @@
1
+ # @heedkit/sdk-react-native
2
+
3
+ React Native SDK for HeedKit.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm i @heedkit/sdk-react-native
9
+ ```
10
+
11
+ ## Quickstart
12
+
13
+ ```tsx
14
+ import { HeedKitProvider, FeedbackButton } from "@heedkit/sdk-react-native";
15
+
16
+ export default function App() {
17
+ return (
18
+ <HeedKitProvider
19
+ projectKey="fh_xxx"
20
+ user={{ externalId: "user-123", email: "you@app.com" }}
21
+ >
22
+ <YourApp />
23
+ <FeedbackButton />
24
+ </HeedKitProvider>
25
+ );
26
+ }
27
+ ```
28
+
29
+ Or imperative:
30
+
31
+ ```tsx
32
+ import { HeedKit } from "@heedkit/sdk-react-native";
33
+
34
+ await HeedKit.init({ projectKey: "fh_xxx", user: { externalId: "u" } });
35
+ const features = await HeedKit.client().list();
36
+ ```
@@ -0,0 +1,207 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.HeedKitClient = void 0;
7
+ exports.setDeviceStorage = setDeviceStorage;
8
+ /// Project configuration returned by /sdk/init (nested under `project`).
9
+
10
+ const DEFAULT_API = "https://api.heedkit.com";
11
+
12
+ /**
13
+ * Optional storage shim for the device id. React Native doesn't ship with a
14
+ * synchronous KV store; pass `@react-native-async-storage/async-storage` (or
15
+ * any equivalent) once at app startup and the client will use it to persist
16
+ * the per-device id across launches.
17
+ *
18
+ * import AsyncStorage from "@react-native-async-storage/async-storage";
19
+ * import { setDeviceStorage } from "@heedkit/sdk-react-native";
20
+ * setDeviceStorage(AsyncStorage);
21
+ *
22
+ * If you don't, an in-memory id is used — fine for a session but resets on
23
+ * cold launch.
24
+ */
25
+
26
+ const DEVICE_ID_KEY = "heedkit.device_id";
27
+ let _storage = null;
28
+ let _memoryDeviceId = null;
29
+ function setDeviceStorage(s) {
30
+ _storage = s;
31
+ }
32
+ async function getOrCreateDeviceId() {
33
+ if (_storage) {
34
+ try {
35
+ const existing = await _storage.getItem(DEVICE_ID_KEY);
36
+ if (existing) return existing;
37
+ const next = _newId();
38
+ await _storage.setItem(DEVICE_ID_KEY, next);
39
+ return next;
40
+ } catch {
41
+ // Storage error — fall through to memory.
42
+ }
43
+ }
44
+ if (!_memoryDeviceId) _memoryDeviceId = _newId();
45
+ return _memoryDeviceId;
46
+ }
47
+ function _newId() {
48
+ // Avoid the crypto.randomUUID polyfill dance on RN — a 16-byte hex is plenty.
49
+ const bytes = new Uint8Array(16);
50
+ for (let i = 0; i < 16; i++) bytes[i] = Math.floor(Math.random() * 256);
51
+ return "dev_" + Array.from(bytes, b => b.toString(16).padStart(2, "0")).join("");
52
+ }
53
+
54
+ /// Map a raw API feature onto the SDK shape (the backend compacts null fields and
55
+ /// exposes the author display name as `author`).
56
+ function normalizeFeature(f) {
57
+ return {
58
+ id: String(f.id),
59
+ title: f.title,
60
+ description: f.description ?? "",
61
+ status: f.status,
62
+ kind: f.kind,
63
+ visibility: f.visibility,
64
+ on_roadmap: f.on_roadmap ?? false,
65
+ tag: f.tag ?? null,
66
+ vote_count: f.vote_count ?? 0,
67
+ voted: f.voted ?? false,
68
+ platform: f.platform ?? null,
69
+ author_name: f.author_name ?? f.author ?? null,
70
+ created_at: f.created_at
71
+ };
72
+ }
73
+ function normalizeComment(c) {
74
+ return {
75
+ id: String(c.id),
76
+ body: c.body,
77
+ author_name: c.author_name ?? c.author ?? null,
78
+ // The SDK endpoint only ever returns public comments.
79
+ is_internal: c.is_internal ?? false,
80
+ created_at: c.created_at
81
+ };
82
+ }
83
+ class HeedKitClient {
84
+ endUserId = null;
85
+ theme = {};
86
+ projectName = "";
87
+ enabledKinds = [];
88
+ kindVisibility = {};
89
+ kindInteractions = {};
90
+ constructor(config) {
91
+ this.apiUrl = config.apiUrl || DEFAULT_API;
92
+ this.projectKey = config.projectKey;
93
+ }
94
+ async init(user = {}) {
95
+ const externalId = user.externalId ?? (await getOrCreateDeviceId());
96
+ const body = {
97
+ external_id: externalId,
98
+ email: user.email,
99
+ name: user.name,
100
+ avatar_url: user.avatarUrl,
101
+ platform: user.platform || "web"
102
+ };
103
+ const res = await this.request("/sdk/init", "POST", body);
104
+ this.endUserId = res.end_user_id;
105
+ // The Rails backend nests project config under `project`; tolerate a flat
106
+ // response from older deployments too.
107
+ const p = res.project ?? res;
108
+ this.theme = p.theme || {};
109
+ this.projectName = p.name ?? p.project_name ?? "";
110
+ this.enabledKinds = p.enabled_kinds || [];
111
+ this.kindVisibility = p.kind_visibility || {};
112
+ this.kindInteractions = p.kind_interactions || {};
113
+ return res;
114
+ }
115
+ getTheme() {
116
+ return this.theme;
117
+ }
118
+ getEnabledKinds() {
119
+ return this.enabledKinds;
120
+ }
121
+ getKindVisibility() {
122
+ return this.kindVisibility;
123
+ }
124
+ getKindInteractions() {
125
+ return this.kindInteractions;
126
+ }
127
+ getProjectName() {
128
+ return this.projectName;
129
+ }
130
+ getEndUserId() {
131
+ return this.endUserId;
132
+ }
133
+
134
+ /// Convenience: which interactions are enabled for a given kind, in stable order.
135
+ getInteractionsFor(kind) {
136
+ const row = this.kindInteractions[kind] || {};
137
+ return ["upvote", "downvote", "plus_one", "like"].filter(i => row[i]);
138
+ }
139
+ async list(opts = {}) {
140
+ this.ensureInit();
141
+ const params = new URLSearchParams({
142
+ end_user_id: this.endUserId
143
+ });
144
+ if (opts.status) params.set("status", opts.status);
145
+ if (opts.kind) params.set("kind", opts.kind);
146
+ if (opts.sort) params.set("sort", opts.sort);
147
+ // Rails returns { features, next_cursor }; tolerate a bare array too.
148
+ const res = await this.request(`/sdk/features?${params}`, "GET");
149
+ const features = Array.isArray(res) ? res : res.features ?? [];
150
+ return features.map(f => normalizeFeature(f));
151
+ }
152
+ async submit(input) {
153
+ this.ensureInit();
154
+ const res = await this.request("/sdk/features", "POST", {
155
+ end_user_id: this.endUserId,
156
+ title: input.title,
157
+ description: input.description || "",
158
+ tag: input.tag || null,
159
+ kind: input.kind || "feature_request"
160
+ });
161
+ return normalizeFeature(res);
162
+ }
163
+ async vote(featureId) {
164
+ this.ensureInit();
165
+ return this.request(`/sdk/features/${featureId}/vote`, "POST", {
166
+ end_user_id: this.endUserId
167
+ });
168
+ }
169
+ async listComments(featureId) {
170
+ // Rails returns { comments: [...] }; tolerate a bare array too.
171
+ const res = await this.request(`/sdk/features/${featureId}/comments`, "GET");
172
+ const comments = Array.isArray(res) ? res : res.comments ?? [];
173
+ return comments.map(c => normalizeComment(c));
174
+ }
175
+ async comment(featureId, body) {
176
+ this.ensureInit();
177
+ const res = await this.request(`/sdk/features/${featureId}/comments`, "POST", {
178
+ end_user_id: this.endUserId,
179
+ body
180
+ });
181
+ return normalizeComment(res);
182
+ }
183
+ ensureInit() {
184
+ if (!this.endUserId) throw new Error("HeedKit not initialized — call init() first");
185
+ }
186
+ async request(path, method, body) {
187
+ const res = await fetch(`${this.apiUrl}${path}`, {
188
+ method,
189
+ headers: {
190
+ "Content-Type": "application/json",
191
+ "X-Project-Key": this.projectKey
192
+ },
193
+ body: body ? JSON.stringify(body) : undefined
194
+ });
195
+ if (!res.ok) {
196
+ let detail = `HTTP ${res.status}`;
197
+ try {
198
+ const j = await res.json();
199
+ detail = j.error || j.detail || detail; // Rails uses `error`; legacy used `detail`.
200
+ } catch {/* non-JSON body */}
201
+ throw new Error(detail);
202
+ }
203
+ return res.json();
204
+ }
205
+ }
206
+ exports.HeedKitClient = HeedKitClient;
207
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DEFAULT_API","DEVICE_ID_KEY","_storage","_memoryDeviceId","setDeviceStorage","s","getOrCreateDeviceId","existing","getItem","next","_newId","setItem","bytes","Uint8Array","i","Math","floor","random","Array","from","b","toString","padStart","join","normalizeFeature","f","id","String","title","description","status","kind","visibility","on_roadmap","tag","vote_count","voted","platform","author_name","author","created_at","normalizeComment","c","body","is_internal","HeedKitClient","endUserId","theme","projectName","enabledKinds","kindVisibility","kindInteractions","constructor","config","apiUrl","projectKey","init","user","externalId","external_id","email","name","avatar_url","avatarUrl","res","request","end_user_id","p","project","project_name","enabled_kinds","kind_visibility","kind_interactions","getTheme","getEnabledKinds","getKindVisibility","getKindInteractions","getProjectName","getEndUserId","getInteractionsFor","row","filter","list","opts","ensureInit","params","URLSearchParams","set","sort","features","isArray","map","submit","input","vote","featureId","listComments","comments","comment","Error","path","method","fetch","headers","JSON","stringify","undefined","ok","detail","j","json","error","exports"],"sourceRoot":"../../src","sources":["client.ts"],"mappings":";;;;;;;AAuEA;;AAkBA,MAAMA,WAAW,GAAG,yBAAyB;;AAE7C;AACA;AACA;AAC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