@appsupportkit/support-sdk 0.3.0 → 0.4.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.
Files changed (208) hide show
  1. package/lib/commonjs/api.js +49 -15
  2. package/lib/commonjs/api.js.map +1 -1
  3. package/lib/commonjs/components/BottomSheet.js +1 -1
  4. package/lib/commonjs/components/BottomSheet.js.map +1 -1
  5. package/lib/commonjs/components/LauncherButton.js +4 -4
  6. package/lib/commonjs/components/LauncherButton.js.map +1 -1
  7. package/lib/commonjs/components/SupportButton.js +123 -97
  8. package/lib/commonjs/components/SupportButton.js.map +1 -1
  9. package/lib/commonjs/components/icons.js +81 -110
  10. package/lib/commonjs/components/icons.js.map +1 -1
  11. package/lib/commonjs/components/primitives.js +0 -153
  12. package/lib/commonjs/components/primitives.js.map +1 -1
  13. package/lib/commonjs/components/screens/ChatScreen.js +487 -0
  14. package/lib/commonjs/components/screens/ChatScreen.js.map +1 -0
  15. package/lib/commonjs/i18n/strings/de.js +3 -0
  16. package/lib/commonjs/i18n/strings/de.js.map +1 -1
  17. package/lib/commonjs/i18n/strings/en.js +3 -0
  18. package/lib/commonjs/i18n/strings/en.js.map +1 -1
  19. package/lib/commonjs/i18n/strings/es.js +3 -0
  20. package/lib/commonjs/i18n/strings/es.js.map +1 -1
  21. package/lib/commonjs/i18n/strings/fr.js +3 -0
  22. package/lib/commonjs/i18n/strings/fr.js.map +1 -1
  23. package/lib/commonjs/i18n/strings/hi.js +3 -0
  24. package/lib/commonjs/i18n/strings/hi.js.map +1 -1
  25. package/lib/commonjs/i18n/strings/it.js +3 -0
  26. package/lib/commonjs/i18n/strings/it.js.map +1 -1
  27. package/lib/commonjs/i18n/strings/ja.js +3 -0
  28. package/lib/commonjs/i18n/strings/ja.js.map +1 -1
  29. package/lib/commonjs/i18n/strings/ko.js +3 -0
  30. package/lib/commonjs/i18n/strings/ko.js.map +1 -1
  31. package/lib/commonjs/i18n/strings/nl.js +3 -0
  32. package/lib/commonjs/i18n/strings/nl.js.map +1 -1
  33. package/lib/commonjs/i18n/strings/pl.js +3 -0
  34. package/lib/commonjs/i18n/strings/pl.js.map +1 -1
  35. package/lib/commonjs/i18n/strings/pt.js +3 -0
  36. package/lib/commonjs/i18n/strings/pt.js.map +1 -1
  37. package/lib/commonjs/i18n/strings/ru.js +3 -0
  38. package/lib/commonjs/i18n/strings/ru.js.map +1 -1
  39. package/lib/commonjs/i18n/strings/tr.js +3 -0
  40. package/lib/commonjs/i18n/strings/tr.js.map +1 -1
  41. package/lib/commonjs/i18n/strings/zh.js +3 -0
  42. package/lib/commonjs/i18n/strings/zh.js.map +1 -1
  43. package/lib/commonjs/index.js +7 -0
  44. package/lib/commonjs/index.js.map +1 -1
  45. package/lib/commonjs/push.js +78 -3
  46. package/lib/commonjs/push.js.map +1 -1
  47. package/lib/commonjs/review.js +54 -0
  48. package/lib/commonjs/review.js.map +1 -0
  49. package/lib/commonjs/theme.js +142 -23
  50. package/lib/commonjs/theme.js.map +1 -1
  51. package/lib/commonjs/types.js +21 -3
  52. package/lib/commonjs/types.js.map +1 -1
  53. package/lib/commonjs/useSupportThreads.js +22 -15
  54. package/lib/commonjs/useSupportThreads.js.map +1 -1
  55. package/lib/commonjs/utils.js +13 -33
  56. package/lib/commonjs/utils.js.map +1 -1
  57. package/lib/commonjs/version.js +13 -0
  58. package/lib/commonjs/version.js.map +1 -0
  59. package/lib/module/api.js +46 -13
  60. package/lib/module/api.js.map +1 -1
  61. package/lib/module/components/BottomSheet.js +1 -1
  62. package/lib/module/components/BottomSheet.js.map +1 -1
  63. package/lib/module/components/LauncherButton.js +5 -5
  64. package/lib/module/components/LauncherButton.js.map +1 -1
  65. package/lib/module/components/SupportButton.js +128 -102
  66. package/lib/module/components/SupportButton.js.map +1 -1
  67. package/lib/module/components/icons.js +80 -107
  68. package/lib/module/components/icons.js.map +1 -1
  69. package/lib/module/components/primitives.js +2 -146
  70. package/lib/module/components/primitives.js.map +1 -1
  71. package/lib/module/components/screens/ChatScreen.js +485 -0
  72. package/lib/module/components/screens/ChatScreen.js.map +1 -0
  73. package/lib/module/i18n/strings/de.js +3 -0
  74. package/lib/module/i18n/strings/de.js.map +1 -1
  75. package/lib/module/i18n/strings/en.js +3 -0
  76. package/lib/module/i18n/strings/en.js.map +1 -1
  77. package/lib/module/i18n/strings/es.js +3 -0
  78. package/lib/module/i18n/strings/es.js.map +1 -1
  79. package/lib/module/i18n/strings/fr.js +3 -0
  80. package/lib/module/i18n/strings/fr.js.map +1 -1
  81. package/lib/module/i18n/strings/hi.js +3 -0
  82. package/lib/module/i18n/strings/hi.js.map +1 -1
  83. package/lib/module/i18n/strings/it.js +3 -0
  84. package/lib/module/i18n/strings/it.js.map +1 -1
  85. package/lib/module/i18n/strings/ja.js +3 -0
  86. package/lib/module/i18n/strings/ja.js.map +1 -1
  87. package/lib/module/i18n/strings/ko.js +3 -0
  88. package/lib/module/i18n/strings/ko.js.map +1 -1
  89. package/lib/module/i18n/strings/nl.js +3 -0
  90. package/lib/module/i18n/strings/nl.js.map +1 -1
  91. package/lib/module/i18n/strings/pl.js +3 -0
  92. package/lib/module/i18n/strings/pl.js.map +1 -1
  93. package/lib/module/i18n/strings/pt.js +3 -0
  94. package/lib/module/i18n/strings/pt.js.map +1 -1
  95. package/lib/module/i18n/strings/ru.js +3 -0
  96. package/lib/module/i18n/strings/ru.js.map +1 -1
  97. package/lib/module/i18n/strings/tr.js +3 -0
  98. package/lib/module/i18n/strings/tr.js.map +1 -1
  99. package/lib/module/i18n/strings/zh.js +3 -0
  100. package/lib/module/i18n/strings/zh.js.map +1 -1
  101. package/lib/module/index.js +1 -0
  102. package/lib/module/index.js.map +1 -1
  103. package/lib/module/push.js +77 -3
  104. package/lib/module/push.js.map +1 -1
  105. package/lib/module/review.js +48 -0
  106. package/lib/module/review.js.map +1 -0
  107. package/lib/module/theme.js +141 -23
  108. package/lib/module/theme.js.map +1 -1
  109. package/lib/module/types.js +21 -3
  110. package/lib/module/types.js.map +1 -1
  111. package/lib/module/useSupportThreads.js +22 -15
  112. package/lib/module/useSupportThreads.js.map +1 -1
  113. package/lib/module/utils.js +12 -32
  114. package/lib/module/utils.js.map +1 -1
  115. package/lib/module/version.js +9 -0
  116. package/lib/module/version.js.map +1 -0
  117. package/lib/typescript/api.d.ts +33 -12
  118. package/lib/typescript/api.d.ts.map +1 -1
  119. package/lib/typescript/components/SupportButton.d.ts +2 -2
  120. package/lib/typescript/components/SupportButton.d.ts.map +1 -1
  121. package/lib/typescript/components/icons.d.ts +5 -14
  122. package/lib/typescript/components/icons.d.ts.map +1 -1
  123. package/lib/typescript/components/primitives.d.ts +0 -31
  124. package/lib/typescript/components/primitives.d.ts.map +1 -1
  125. package/lib/typescript/components/screens/ChatScreen.d.ts +21 -0
  126. package/lib/typescript/components/screens/ChatScreen.d.ts.map +1 -0
  127. package/lib/typescript/i18n/strings/de.d.ts.map +1 -1
  128. package/lib/typescript/i18n/strings/en.d.ts +3 -0
  129. package/lib/typescript/i18n/strings/en.d.ts.map +1 -1
  130. package/lib/typescript/i18n/strings/es.d.ts.map +1 -1
  131. package/lib/typescript/i18n/strings/fr.d.ts.map +1 -1
  132. package/lib/typescript/i18n/strings/hi.d.ts.map +1 -1
  133. package/lib/typescript/i18n/strings/it.d.ts.map +1 -1
  134. package/lib/typescript/i18n/strings/ja.d.ts.map +1 -1
  135. package/lib/typescript/i18n/strings/ko.d.ts.map +1 -1
  136. package/lib/typescript/i18n/strings/nl.d.ts.map +1 -1
  137. package/lib/typescript/i18n/strings/pl.d.ts.map +1 -1
  138. package/lib/typescript/i18n/strings/pt.d.ts.map +1 -1
  139. package/lib/typescript/i18n/strings/ru.d.ts.map +1 -1
  140. package/lib/typescript/i18n/strings/tr.d.ts.map +1 -1
  141. package/lib/typescript/i18n/strings/zh.d.ts.map +1 -1
  142. package/lib/typescript/index.d.ts +3 -2
  143. package/lib/typescript/index.d.ts.map +1 -1
  144. package/lib/typescript/push.d.ts +14 -2
  145. package/lib/typescript/push.d.ts.map +1 -1
  146. package/lib/typescript/review.d.ts +15 -0
  147. package/lib/typescript/review.d.ts.map +1 -0
  148. package/lib/typescript/theme.d.ts +23 -5
  149. package/lib/typescript/theme.d.ts.map +1 -1
  150. package/lib/typescript/types.d.ts +54 -11
  151. package/lib/typescript/types.d.ts.map +1 -1
  152. package/lib/typescript/useSupportThreads.d.ts +9 -3
  153. package/lib/typescript/useSupportThreads.d.ts.map +1 -1
  154. package/lib/typescript/utils.d.ts +3 -2
  155. package/lib/typescript/utils.d.ts.map +1 -1
  156. package/lib/typescript/version.d.ts +7 -0
  157. package/lib/typescript/version.d.ts.map +1 -0
  158. package/package.json +1 -1
  159. package/src/api.ts +59 -30
  160. package/src/components/BottomSheet.tsx +1 -1
  161. package/src/components/LauncherButton.tsx +4 -4
  162. package/src/components/SupportButton.tsx +140 -111
  163. package/src/components/icons.tsx +60 -101
  164. package/src/components/primitives.tsx +1 -163
  165. package/src/components/screens/ChatScreen.tsx +541 -0
  166. package/src/i18n/strings/de.ts +3 -0
  167. package/src/i18n/strings/en.ts +3 -0
  168. package/src/i18n/strings/es.ts +3 -0
  169. package/src/i18n/strings/fr.ts +3 -0
  170. package/src/i18n/strings/hi.ts +3 -0
  171. package/src/i18n/strings/it.ts +3 -0
  172. package/src/i18n/strings/ja.ts +3 -0
  173. package/src/i18n/strings/ko.ts +3 -0
  174. package/src/i18n/strings/nl.ts +3 -0
  175. package/src/i18n/strings/pl.ts +3 -0
  176. package/src/i18n/strings/pt.ts +3 -0
  177. package/src/i18n/strings/ru.ts +3 -0
  178. package/src/i18n/strings/tr.ts +3 -0
  179. package/src/i18n/strings/zh.ts +3 -0
  180. package/src/index.tsx +5 -0
  181. package/src/push.ts +100 -2
  182. package/src/review.ts +54 -0
  183. package/src/theme.ts +182 -28
  184. package/src/types.ts +53 -11
  185. package/src/useSupportThreads.ts +31 -18
  186. package/src/utils.ts +14 -21
  187. package/src/version.ts +6 -0
  188. package/lib/commonjs/components/screens/ComposeScreen.js +0 -219
  189. package/lib/commonjs/components/screens/ComposeScreen.js.map +0 -1
  190. package/lib/commonjs/components/screens/HomeScreen.js +0 -334
  191. package/lib/commonjs/components/screens/HomeScreen.js.map +0 -1
  192. package/lib/commonjs/components/screens/ThreadScreen.js +0 -339
  193. package/lib/commonjs/components/screens/ThreadScreen.js.map +0 -1
  194. package/lib/module/components/screens/ComposeScreen.js +0 -217
  195. package/lib/module/components/screens/ComposeScreen.js.map +0 -1
  196. package/lib/module/components/screens/HomeScreen.js +0 -330
  197. package/lib/module/components/screens/HomeScreen.js.map +0 -1
  198. package/lib/module/components/screens/ThreadScreen.js +0 -337
  199. package/lib/module/components/screens/ThreadScreen.js.map +0 -1
  200. package/lib/typescript/components/screens/ComposeScreen.d.ts +0 -12
  201. package/lib/typescript/components/screens/ComposeScreen.d.ts.map +0 -1
  202. package/lib/typescript/components/screens/HomeScreen.d.ts +0 -19
  203. package/lib/typescript/components/screens/HomeScreen.d.ts.map +0 -1
  204. package/lib/typescript/components/screens/ThreadScreen.d.ts +0 -12
  205. package/lib/typescript/components/screens/ThreadScreen.d.ts.map +0 -1
  206. package/src/components/screens/ComposeScreen.tsx +0 -229
  207. package/src/components/screens/HomeScreen.tsx +0 -346
  208. package/src/components/screens/ThreadScreen.tsx +0 -424
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/en.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EL,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAC;AAExC,oEAAoE;AACpE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/en.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EL,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAC;AAExC,oEAAoE;AACpE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
1
+ {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA6EhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/fr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA2EhB,CAAC"}
1
+ {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/fr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA8EhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hi.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/hi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
1
+ {"version":3,"file":"hi.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/hi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA6EhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/it.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
1
+ {"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/it.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA6EhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/ja.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
1
+ {"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/ja.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA6EhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ko.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/ko.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WAyEhB,CAAC"}
1
+ {"version":3,"file":"ko.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/ko.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA4EhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"nl.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/nl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
1
+ {"version":3,"file":"nl.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/nl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA6EhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/pl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
1
+ {"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/pl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA6EhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/pt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
1
+ {"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/pt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA6EhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/ru.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
1
+ {"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/ru.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA6EhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/tr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
1
+ {"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/tr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA6EhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/zh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WAwEhB,CAAC"}
1
+ {"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/zh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA2EhB,CAAC"}
@@ -1,8 +1,9 @@
1
1
  export { SupportButton } from './components/SupportButton';
2
- export { supportDarkTheme, supportLightTheme, resolveTheme, type SupportTheme, } from './theme';
2
+ export { supportDarkTheme, supportLightTheme, resolveTheme, type SupportColors, type SupportTheme, } from './theme';
3
3
  export { SupportApiError } from './api';
4
+ export { SDK_VERSION } from './version';
4
5
  export { isPushAvailable } from './push';
5
6
  export { DEFAULT_LANGUAGE, deviceLanguage, isSupportedLanguage, LANGUAGE_LABELS, SUPPORTED_LANGUAGES, type Language, } from './i18n/languages';
6
- export type { LauncherVariant, MessageSender, PushPermissionStatus, QueryStatus, QueryType, SupportButtonProps, SupportUser, Thread, ThreadMessage, ThreadsResponse, ThemeName, } from './types';
7
+ export type { AccentColor, LauncherVariant, MessageSender, PushPermissionStatus, QueryStatus, QueryType, SupportButtonProps, SupportUser, Thread, ThreadMessage, ThreadsResponse, ThemeName, ThemePreference, UserPlan, } from './types';
7
8
  export { QUERY_TYPE_LABEL, USER_MESSAGE_MAX, USER_MESSAGE_MIN, } from './types';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,KAAK,YAAY,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,KAAK,QAAQ,GACd,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,MAAM,EACN,aAAa,EACb,eAAe,EACf,SAAS,GACV,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,KAAK,QAAQ,GACd,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,WAAW,EACX,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,MAAM,EACN,aAAa,EACb,eAAe,EACf,SAAS,EACT,eAAe,EACf,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
@@ -9,10 +9,22 @@ export interface PushRegistration {
9
9
  }
10
10
  /**
11
11
  * Ensures notification permission has been requested, and returns the
12
- * outcome plus an Expo push token when one is obtainable.
12
+ * outcome plus an Expo push token when one is obtainable. With
13
+ * `prompt: false` it only reads the current state — for refreshing the token
14
+ * at launch without ever showing the OS prompt outside the support sheet.
13
15
  *
14
16
  * Never throws: any failure resolves to an 'undetermined' registration so
15
17
  * callers can report it and move on.
16
18
  */
17
- export declare function ensurePushPermission(expoProjectId?: string): Promise<PushRegistration>;
19
+ export declare function ensurePushPermission(expoProjectId?: string, { prompt }?: {
20
+ prompt?: boolean;
21
+ }): Promise<PushRegistration>;
22
+ type SupportTapListener = (threadId: string) => void;
23
+ /**
24
+ * Calls `listener` with the thread id whenever the user taps a support-reply
25
+ * notification — including, once, a tap from the last minute that arrived
26
+ * before anything was listening. Returns an unsubscribe function.
27
+ */
28
+ export declare function onSupportNotificationTap(listener: SupportTapListener): () => void;
29
+ export {};
18
30
  //# sourceMappingURL=push.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../src/push.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAuBpD,+DAA+D;AAC/D,eAAO,MAAM,eAAe,SAAyB,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,qEAAqE;IACrE,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAQD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,gBAAgB,CAAC,CAoC3B"}
1
+ {"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../src/push.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAuCpD,+DAA+D;AAC/D,eAAO,MAAM,eAAe,SAAyB,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,qEAAqE;IACrE,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAQD;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,aAAa,CAAC,EAAE,MAAM,EACtB,EAAE,MAAa,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAC3C,OAAO,CAAC,gBAAgB,CAAC,CAoC3B;AAiBD,KAAK,kBAAkB,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;AA0CrD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,kBAAkB,GAC3B,MAAM,IAAI,CAaZ"}
@@ -0,0 +1,15 @@
1
+ import type { StoreListing } from './types';
2
+ interface StoreLinks {
3
+ /** Opens the store app. */
4
+ app: string;
5
+ /** The same page on the web, if the store app won't open. */
6
+ web: string;
7
+ }
8
+ /** Links for this device's store, or null when the team hasn't set one up. */
9
+ export declare function storeLinks(store: StoreListing | null | undefined): StoreLinks | null;
10
+ /** Opens the review page; resolves false if neither link would open. */
11
+ export declare function openStoreReview(links: StoreLinks): Promise<boolean>;
12
+ /** The platform the backend should know this user by, if it's a store one. */
13
+ export declare function storePlatform(): 'ios' | 'android' | undefined;
14
+ export {};
15
+ //# sourceMappingURL=review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/review.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,UAAU,UAAU;IAClB,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAC;CACb;AAED,8EAA8E;AAC9E,wBAAgB,UAAU,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,GAAG,IAAI,CAgBpF;AAED,wEAAwE;AACxE,wBAAsB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAYzE;AAED,8EAA8E;AAC9E,wBAAgB,aAAa,IAAI,KAAK,GAAG,SAAS,GAAG,SAAS,CAE7D"}
@@ -1,6 +1,6 @@
1
1
  import { motion, spacing, type ThemeColors } from '@appsupportkit/design-tokens';
2
2
  import type { ViewStyle } from 'react-native';
3
- import type { ThemeName } from './types';
3
+ import type { AccentColor, ThemeName } from './types';
4
4
  /** Rounder than the dashboard: touch targets read better with more radius. */
5
5
  export declare const supportRadii: {
6
6
  readonly control: 10;
@@ -14,6 +14,16 @@ export declare const supportRadii: {
14
14
  readonly pill: 999;
15
15
  readonly full: 9999;
16
16
  };
17
+ export interface SupportColors extends ThemeColors {
18
+ /** The sheet's own background — the layer every screen is drawn on. */
19
+ sheet: string;
20
+ /**
21
+ * The accent where it is small text — status labels, the "New" divider.
22
+ * The fill color can sit at 3:1; text needs 4.5:1 on the sheet and on the
23
+ * cards over it, so this is the accent nudged as far as that takes.
24
+ */
25
+ accentText: string;
26
+ }
17
27
  export interface SupportShadows {
18
28
  /** Floating launcher button. */
19
29
  launcher: ViewStyle;
@@ -37,7 +47,7 @@ export interface LauncherPalette {
37
47
  }
38
48
  export interface SupportTheme {
39
49
  name: ThemeName;
40
- colors: ThemeColors;
50
+ colors: SupportColors;
41
51
  spacing: typeof spacing;
42
52
  radii: typeof supportRadii;
43
53
  motion: typeof motion;
@@ -47,8 +57,16 @@ export interface SupportTheme {
47
57
  export declare const supportDarkTheme: SupportTheme;
48
58
  export declare const supportLightTheme: SupportTheme;
49
59
  /**
50
- * @param name "light" | "dark" (default dark).
51
- * @param accentColor Optional brand color (hex) replacing the default accent.
60
+ * The theme for one resolved mode. `accent` is the color for this mode
61
+ * (already picked from a light/dark pair), and `adapt` says whether it was a
62
+ * single color that has to be made to work here.
63
+ */
64
+ export declare function themeFor(name: ThemeName, accent: string | undefined, adapt: boolean): SupportTheme;
65
+ /**
66
+ * @param name "light" | "dark" (default dark). SupportButton resolves its
67
+ * "system" default before calling this.
68
+ * @param accentColor Optional brand color: one hex for both modes (adjusted
69
+ * per mode where needed), or a `{ light, dark }` pair used as given.
52
70
  */
53
- export declare function resolveTheme(name: ThemeName | undefined, accentColor?: string): SupportTheme;
71
+ export declare function resolveTheme(name: ThemeName | undefined, accentColor?: AccentColor): SupportTheme;
54
72
  //# sourceMappingURL=theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,MAAM,EAEN,OA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 +1,26 @@
1
1
  import type { StyleProp, ViewStyle } from 'react-native';
2
2
  import type { Language } from './i18n/languages';
3
- export type QueryType = 'feedback' | 'feature_request' | 'bug_report';
3
+ /**
4
+ * 'support' is the single chat (0.4+). The other three are the typed requests
5
+ * older builds file; their conversations still show in the chat.
6
+ */
7
+ export type QueryType = 'feedback' | 'feature_request' | 'bug_report' | 'support';
8
+ /** Shown to the support team, which can filter and message users by it. */
9
+ export type UserPlan = 'free' | 'trial' | 'pro';
4
10
  export type QueryStatus = 'open' | 'resolved';
5
11
  export type MessageSender = 'user' | 'admin';
6
12
  export type ThemeName = 'dark' | 'light';
13
+ /** What the host app asks for. "system" follows the app's light/dark appearance. */
14
+ export type ThemePreference = ThemeName | 'system';
15
+ /**
16
+ * A brand color: one hex for both modes, or a pair. A single color is
17
+ * lightened in dark mode (darkened in light) only as far as it takes to
18
+ * stay visible; a pair is used exactly as given.
19
+ */
20
+ export type AccentColor = string | {
21
+ light: string;
22
+ dark: string;
23
+ };
7
24
  export type PushPermissionStatus = 'undetermined' | 'granted' | 'denied';
8
25
  /**
9
26
  * How the launcher renders:
@@ -15,8 +32,17 @@ export type LauncherVariant = 'solid' | 'soft' | 'minimal';
15
32
  export interface SupportUser {
16
33
  /** Display name shown to the support team. */
17
34
  name: string;
18
- /** Whether the user is on a paid plan. */
19
- isPaid: boolean;
35
+ /**
36
+ * The user's plan: "free", "trial" (in a free trial) or "pro" (paying).
37
+ * With RevenueCat: "trial" when the active entitlement's periodType is
38
+ * TRIAL, "pro" when it is active otherwise, else "free".
39
+ */
40
+ plan?: UserPlan;
41
+ /**
42
+ * @deprecated Pass `plan`, which can also say "trial". Still accepted:
43
+ * true reads as "pro", false as "free". One of the two is required.
44
+ */
45
+ isPaid?: boolean;
20
46
  /** RevenueCat app user id — identifies the user's threads. */
21
47
  revenuecatId: string;
22
48
  /** Host app version, e.g. "2.4.1". */
@@ -35,14 +61,19 @@ export interface SupportButtonProps {
35
61
  * Edge Functions.
36
62
  */
37
63
  supabaseUrl: string;
38
- /** Visual theme. Matches the admin dashboard tokens. Default "dark". */
39
- theme?: ThemeName;
40
64
  /**
41
- * Brand color (hex, e.g. "#FF5A1F") replacing the default accent across
42
- * the launcher, buttons, and the user's own message bubbles. The pressed
43
- * shade, the 12% wash, and a legible foreground are derived from it.
65
+ * Visual theme. Default "system": follows the host app's light/dark
66
+ * appearance (the device setting, unless the app pins one) and switches
67
+ * live when it changes. Pass "light" or "dark" to pin it.
68
+ */
69
+ theme?: ThemePreference;
70
+ /**
71
+ * Brand color replacing the default accent across the launcher, buttons,
72
+ * and the user's own message bubbles: a hex like "#FF5A1F", or
73
+ * `{ light, dark }` for a color per mode. The pressed shade, the 12% wash,
74
+ * a text-safe variant, and a legible foreground are derived from it.
44
75
  */
45
- accentColor?: string;
76
+ accentColor?: AccentColor;
46
77
  /** Launcher style. Default "solid" — the floating action button. */
47
78
  variant?: LauncherVariant;
48
79
  /** Launcher diameter in px (height when `label` is set). Default 52. */
@@ -93,6 +124,16 @@ export interface ThreadMessage {
93
124
  * the UI says so rather than letting it flicker.
94
125
  */
95
126
  translation_pending: boolean;
127
+ /**
128
+ * 'review_request': a support reply that carries a store review button.
129
+ * Absent from servers older than 0.4, where every message is text.
130
+ */
131
+ kind?: 'text' | 'review_request';
132
+ }
133
+ /** Where a review request's button points; set per app in the dashboard. */
134
+ export interface StoreListing {
135
+ app_store_id: string | null;
136
+ play_store_package: string | null;
96
137
  }
97
138
  /**
98
139
  * Note the absence of any admin identity: end users see one support team,
@@ -119,6 +160,8 @@ export interface ThreadsResponse {
119
160
  total_unread: number;
120
161
  /** Null when this user has never picked one — the SDK then asks. */
121
162
  language: string | null;
163
+ /** The app's store listings, for review requests. */
164
+ store?: StoreListing;
122
165
  }
123
166
  /**
124
167
  * English labels, kept for host apps that render their own entry points.
@@ -126,6 +169,6 @@ export interface ThreadsResponse {
126
169
  * follow the user's language.
127
170
  */
128
171
  export declare const QUERY_TYPE_LABEL: Record<QueryType, string>;
129
- export declare const USER_MESSAGE_MIN = 10;
130
- export declare const USER_MESSAGE_MAX = 300;
172
+ export declare const USER_MESSAGE_MIN = 1;
173
+ export declare const USER_MESSAGE_MAX = 1000;
131
174
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,iBAAiB,GAAG,YAAY,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC;AAC9C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,CAAC;AAC7C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AACzC,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3D,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,MAAM,EAAE,OAAO,CAAC;IAChB,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,IAAI,EAAE,WAAW,CAAC;IAClB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,WA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AAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,aAAa,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,IAAI,CAAC;IACT,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,qDAAqD;IACrD,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAKtD,CAAC;AAEF,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,OAAO,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type ApiConfig } from './api';
2
2
  import type { StringKey } from './i18n';
3
- import type { Thread } from './types';
3
+ import type { StoreListing, Thread } from './types';
4
4
  export declare const IDLE_POLL_MS = 60000;
5
5
  export interface SupportThreadsState {
6
6
  /** Server threads with unread counts narrowed by local reads. */
@@ -21,18 +21,24 @@ export interface SupportThreadsState {
21
21
  * answered on another device.
22
22
  */
23
23
  languageLoaded: boolean;
24
+ /** The app's store listings, for review request buttons. */
25
+ store: StoreListing | null;
24
26
  /** User-initiated refresh (pull-to-refresh, retry button). */
25
27
  refresh: () => void;
26
28
  /** Awaited by send/submit handlers so the list reflects the write. */
27
29
  reload: () => Promise<void>;
28
30
  }
29
- export declare function useSupportThreads({ config, revenuecatId, enabled, sheetOpen, activeThreadId, idlePollMs, }: {
31
+ export declare function useSupportThreads({ config, revenuecatId, enabled, sheetOpen, chatVisible, idlePollMs, }: {
30
32
  config: ApiConfig;
31
33
  revenuecatId: string;
32
34
  /** False when props failed validation — no requests are made. */
33
35
  enabled: boolean;
34
36
  sheetOpen: boolean;
35
- activeThreadId: string | null;
37
+ /**
38
+ * The chat is on screen. It shows every conversation at once, so all of
39
+ * them are read while it is — including replies that arrive meanwhile.
40
+ */
41
+ chatVisible: boolean;
36
42
  idlePollMs: number;
37
43
  }): SupportThreadsState;
38
44
  //# sourceMappingURL=useSupportThreads.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSupportThreads.d.ts","sourceRoot":"","sources":["../../src/useSupportThreads.ts"],"names":[],"mappings":"AAgBA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAetC,eAAO,MAAM,YAAY,QAAS,CAAC;AA8CnC,MAAM,WAAW,mBAAmB;IAClC,iEAAiE;IACjE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,OAAO,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,UAAU,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B,iEAAiE;IACjE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,8DAA8D;IAC9D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,sEAAsE;IACtE,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,YAAY,EAC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X,UAAU,GACX,EAAE;IACD,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,mBAAmB,CAiRtB"}
@@ -1,12 +1,13 @@
1
1
  import type { Translator } from './i18n';
2
- /** "2h ago" relative time — mirrors the web dashboard's formatting. */
3
- export declare function relativeTime(iso: string, strings: Translator): string;
2
+ import type { SupportUser, UserPlan } from './types';
4
3
  export declare function formatDate(iso: string, strings: Translator): string;
5
4
  /** "14:32" in the user's locale — shown under a group of messages. */
6
5
  export declare function formatTime(iso: string, strings: Translator): string;
7
6
  export declare function isSameDay(a: string, b: string): boolean;
8
7
  /** Date separator label: Today / Yesterday / "Mon, 5 Jan". */
9
8
  export declare function dayLabel(iso: string, strings: Translator): string;
9
+ /** The user's plan, reading the deprecated `isPaid` when `plan` is absent. */
10
+ export declare function userPlan(user: SupportUser): UserPlan;
10
11
  /** Dev-mode prop validation with actionable messages. */
11
12
  export declare function validateProps(props: {
12
13
  appName?: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAKzC,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,CAerE;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,CAMnE;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,CAKnE;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,M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AAC;CAChB,GAAG,MAAM,GAAG,IAAI,CAiChB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Sent as `x-sdk-version` on every request. The backend uses its presence to
3
+ * tell 0.4+ (one support chat) from older builds still in the App Store, so
4
+ * keep it in step with package.json.
5
+ */
6
+ export declare const SDK_VERSION = "0.4.0";
7
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,WAAW,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsupportkit/support-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "In-app customer support for React Native: feedback, feature requests, and bug reports with two-way threads, in the user's own language.",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/module/index.js",
package/src/api.ts CHANGED
@@ -1,10 +1,7 @@
1
1
  // Thin client for the Supabase Edge Functions. Every call authenticates with
2
2
  // the per-app x-api-key header; no Supabase JS client is needed on-device.
3
- import type {
4
- PushPermissionStatus,
5
- QueryType,
6
- ThreadsResponse,
7
- } from './types';
3
+ import type { PushPermissionStatus, ThreadsResponse, UserPlan } from './types';
4
+ import { SDK_VERSION } from './version';
8
5
 
9
6
  export interface ApiConfig {
10
7
  supabaseUrl: string;
@@ -38,6 +35,8 @@ async function request<T>(
38
35
  headers: {
39
36
  'Content-Type': 'application/json',
40
37
  'x-api-key': config.apiKey,
38
+ // Tells the backend this build speaks the single support chat.
39
+ 'x-sdk-version': SDK_VERSION,
41
40
  ...init.headers,
42
41
  },
43
42
  });
@@ -126,50 +125,80 @@ export function setLanguage(
126
125
  });
127
126
  }
128
127
 
129
- export function submitQuery(
128
+ /** What the backend is told about the current user. */
129
+ export interface ReportedUser {
130
+ name: string;
131
+ plan: UserPlan;
132
+ appVersion: string;
133
+ /** Decides which store a review request opens. */
134
+ platform?: 'ios' | 'android';
135
+ }
136
+
137
+ function reportedUser(user: ReportedUser) {
138
+ return {
139
+ name: user.name,
140
+ plan: user.plan,
141
+ app_version: user.appVersion,
142
+ platform: user.platform,
143
+ };
144
+ }
145
+
146
+ /**
147
+ * Sends one chat message. The server appends it to the user's open
148
+ * conversation, or starts one if none is open (a first message, or the first
149
+ * after a resolve).
150
+ */
151
+ export function sendMessage(
130
152
  config: ApiConfig,
131
153
  input: {
132
- queryType: QueryType;
133
- message: string;
134
- userName: string;
135
- isPaid: boolean;
136
154
  revenuecatId: string;
137
- appVersion: string;
155
+ message: string;
138
156
  language: string;
157
+ user: ReportedUser;
139
158
  },
140
- ): Promise<{ query_id: string }> {
141
- return request(config, 'submit-query', {
159
+ ): Promise<{ query_id: string; message_id: string; started: boolean }> {
160
+ return request(config, 'send-message', {
142
161
  method: 'POST',
143
162
  body: JSON.stringify({
144
163
  app_name: config.appName,
145
- query_type: input.queryType,
146
- message: input.message,
147
- user_name: input.userName,
148
- is_paid: input.isPaid,
149
164
  revenuecat_id: input.revenuecatId,
150
- app_version: input.appVersion,
165
+ message: input.message,
151
166
  // Sent on every write so a lost set-language call self-heals.
152
167
  language: input.language,
168
+ user: reportedUser(input.user),
153
169
  }),
154
170
  });
155
171
  }
156
172
 
157
- export function postMessage(
173
+ /**
174
+ * Records the user in the app's directory, so the team can find and message
175
+ * them before they ever open support. Called on every load.
176
+ */
177
+ export function registerUser(
158
178
  config: ApiConfig,
159
- input: {
160
- queryId: string;
161
- revenuecatId: string;
162
- message: string;
163
- language: string;
164
- },
165
- ): Promise<{ message_id: string }> {
166
- return request(config, 'post-message', {
179
+ input: { revenuecatId: string; user: ReportedUser },
180
+ ): Promise<{ ok: boolean }> {
181
+ return request(config, 'register-user', {
167
182
  method: 'POST',
168
183
  body: JSON.stringify({
169
- query_id: input.queryId,
184
+ app_name: config.appName,
170
185
  revenuecat_id: input.revenuecatId,
171
- message: input.message,
172
- language: input.language,
186
+ user: reportedUser(input.user),
187
+ }),
188
+ });
189
+ }
190
+
191
+ /** Records a tap on a review request's store button, for the dashboard. */
192
+ export function reviewOpened(
193
+ config: ApiConfig,
194
+ input: { revenuecatId: string; messageId: string },
195
+ ): Promise<{ ok: boolean }> {
196
+ return request(config, 'review-opened', {
197
+ method: 'POST',
198
+ body: JSON.stringify({
199
+ app_name: config.appName,
200
+ revenuecat_id: input.revenuecatId,
201
+ message_id: input.messageId,
173
202
  }),
174
203
  });
175
204
  }
@@ -155,7 +155,7 @@ export function BottomSheet({
155
155
  <Animated.View
156
156
  style={{
157
157
  height: sheetHeight,
158
- backgroundColor: theme.colors.bg,
158
+ backgroundColor: theme.colors.sheet,
159
159
  borderTopLeftRadius: theme.radii.sheet,
160
160
  borderTopRightRadius: theme.radii.sheet,
161
161
  borderWidth: 1,
@@ -14,7 +14,7 @@ import {
14
14
  } from 'react-native';
15
15
  import type { SupportTheme } from '../theme';
16
16
  import type { LauncherVariant } from '../types';
17
- import { ChatBubbleMark } from './icons';
17
+ import { ConversationMark } from './icons';
18
18
 
19
19
  const PRESS_SCALE = 0.93;
20
20
 
@@ -87,7 +87,7 @@ export function LauncherButton({
87
87
  : soft
88
88
  ? theme.colors.accent
89
89
  : theme.launcher.minimalMark;
90
- // Dots are punched out of the bubble in whatever sits behind the mark —
90
+ // The gap between the bubbles is cut in whatever sits behind the mark —
91
91
  // the button's own fill, or the app background when there isn't one.
92
92
  const markHoleColor = solid
93
93
  ? theme.colors.accent
@@ -106,7 +106,7 @@ export function LauncherButton({
106
106
  const badgeFg = solid ? theme.colors.accent : theme.colors.accentForeground;
107
107
 
108
108
  const height = label ? Math.max(44, size * 0.84) : size;
109
- const markSize = Math.round(size * (label ? 0.36 : 0.42));
109
+ const markSize = Math.round(size * (label ? 0.4 : 0.46));
110
110
 
111
111
  return (
112
112
  <Animated.View
@@ -167,7 +167,7 @@ export function LauncherButton({
167
167
  ...(variant === 'minimal' ? null : theme.shadows.launcher),
168
168
  }}
169
169
  >
170
- <ChatBubbleMark color={markColor} dotColor={markHoleColor} size={markSize} />
170
+ <ConversationMark color={markColor} holeColor={markHoleColor} size={markSize} />
171
171
  {label !== undefined && (
172
172
  <Text
173
173
  style={{