@hexclave/shared 1.0.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 (1144) hide show
  1. package/LICENSE +7 -0
  2. package/dist/ai/image-limits.d.ts +24 -0
  3. package/dist/ai/image-limits.d.ts.map +1 -0
  4. package/dist/ai/image-limits.js +61 -0
  5. package/dist/ai/image-limits.js.map +1 -0
  6. package/dist/ai/unified-prompts/reminders.d.ts +5 -0
  7. package/dist/ai/unified-prompts/reminders.d.ts.map +1 -0
  8. package/dist/ai/unified-prompts/reminders.js +33 -0
  9. package/dist/ai/unified-prompts/reminders.js.map +1 -0
  10. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts +11 -0
  11. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -0
  12. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +851 -0
  13. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -0
  14. package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.d.ts +5 -0
  15. package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.d.ts.map +1 -0
  16. package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.js +12 -0
  17. package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.js.map +1 -0
  18. package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.d.ts +5 -0
  19. package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.d.ts.map +1 -0
  20. package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.js +12 -0
  21. package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.js.map +1 -0
  22. package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.d.ts +5 -0
  23. package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.d.ts.map +1 -0
  24. package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.js +12 -0
  25. package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.js.map +1 -0
  26. package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.d.ts +5 -0
  27. package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.d.ts.map +1 -0
  28. package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js +12 -0
  29. package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js.map +1 -0
  30. package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.d.ts +5 -0
  31. package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.d.ts.map +1 -0
  32. package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js +12 -0
  33. package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js.map +1 -0
  34. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts +5 -0
  35. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -0
  36. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +64 -0
  37. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -0
  38. package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.d.ts +5 -0
  39. package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.d.ts.map +1 -0
  40. package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +12 -0
  41. package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -0
  42. package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.d.ts +5 -0
  43. package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.d.ts.map +1 -0
  44. package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js +12 -0
  45. package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js.map +1 -0
  46. package/dist/ai/unified-prompts/skill-site-prompt.d.ts +5 -0
  47. package/dist/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -0
  48. package/dist/ai/unified-prompts/skill-site-prompt.js +75 -0
  49. package/dist/ai/unified-prompts/skill-site-prompt.js.map +1 -0
  50. package/dist/apps/apps-config.d.ts +168 -0
  51. package/dist/apps/apps-config.d.ts.map +1 -0
  52. package/dist/apps/apps-config.js +157 -0
  53. package/dist/apps/apps-config.js.map +1 -0
  54. package/dist/apps/apps-ui.d.ts +45 -0
  55. package/dist/apps/apps-ui.d.ts.map +1 -0
  56. package/dist/apps/apps-ui.js +109 -0
  57. package/dist/apps/apps-ui.js.map +1 -0
  58. package/dist/chunk-BE-pF4vm.js +34 -0
  59. package/dist/config/db-sync-mappings.d.ts +193 -0
  60. package/dist/config/db-sync-mappings.d.ts.map +1 -0
  61. package/dist/config/db-sync-mappings.js +2255 -0
  62. package/dist/config/db-sync-mappings.js.map +1 -0
  63. package/dist/config/format.d.ts +61 -0
  64. package/dist/config/format.d.ts.map +1 -0
  65. package/dist/config/format.js +337 -0
  66. package/dist/config/format.js.map +1 -0
  67. package/dist/config/migrate-catalogs-to-product-lines.d.ts +14 -0
  68. package/dist/config/migrate-catalogs-to-product-lines.d.ts.map +1 -0
  69. package/dist/config/migrate-catalogs-to-product-lines.js +379 -0
  70. package/dist/config/migrate-catalogs-to-product-lines.js.map +1 -0
  71. package/dist/config/schema-fuzzer.test.d.ts +1 -0
  72. package/dist/config/schema-fuzzer.test.js +401 -0
  73. package/dist/config/schema-fuzzer.test.js.map +1 -0
  74. package/dist/config/schema.d.ts +2315 -0
  75. package/dist/config/schema.d.ts.map +1 -0
  76. package/dist/config/schema.js +1085 -0
  77. package/dist/config/schema.js.map +1 -0
  78. package/dist/config-authoring.d.ts +12 -0
  79. package/dist/config-authoring.d.ts.map +1 -0
  80. package/dist/config-authoring.js +12 -0
  81. package/dist/config-authoring.js.map +1 -0
  82. package/dist/config-authoring.test.d.ts +1 -0
  83. package/dist/config-authoring.test.js +29 -0
  84. package/dist/config-authoring.test.js.map +1 -0
  85. package/dist/config-rendering.d.ts +17 -0
  86. package/dist/config-rendering.d.ts.map +1 -0
  87. package/dist/config-rendering.js +114 -0
  88. package/dist/config-rendering.js.map +1 -0
  89. package/dist/crud.d.ts +98 -0
  90. package/dist/crud.d.ts.map +1 -0
  91. package/dist/crud.js +129 -0
  92. package/dist/crud.js.map +1 -0
  93. package/dist/esm/ai/image-limits.d.ts +24 -0
  94. package/dist/esm/ai/image-limits.d.ts.map +1 -0
  95. package/dist/esm/ai/image-limits.js +53 -0
  96. package/dist/esm/ai/image-limits.js.map +1 -0
  97. package/dist/esm/ai/unified-prompts/reminders.d.ts +5 -0
  98. package/dist/esm/ai/unified-prompts/reminders.d.ts.map +1 -0
  99. package/dist/esm/ai/unified-prompts/reminders.js +31 -0
  100. package/dist/esm/ai/unified-prompts/reminders.js.map +1 -0
  101. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts +11 -0
  102. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -0
  103. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +843 -0
  104. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -0
  105. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.d.ts +5 -0
  106. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.d.ts.map +1 -0
  107. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.js +10 -0
  108. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.js.map +1 -0
  109. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.d.ts +5 -0
  110. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.d.ts.map +1 -0
  111. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.js +10 -0
  112. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.js.map +1 -0
  113. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.d.ts +5 -0
  114. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.d.ts.map +1 -0
  115. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.js +10 -0
  116. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.js.map +1 -0
  117. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.d.ts +5 -0
  118. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.d.ts.map +1 -0
  119. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js +10 -0
  120. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js.map +1 -0
  121. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.d.ts +5 -0
  122. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.d.ts.map +1 -0
  123. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js +10 -0
  124. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js.map +1 -0
  125. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts +5 -0
  126. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -0
  127. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +61 -0
  128. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -0
  129. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.d.ts +5 -0
  130. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.d.ts.map +1 -0
  131. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +10 -0
  132. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -0
  133. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.d.ts +5 -0
  134. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.d.ts.map +1 -0
  135. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js +10 -0
  136. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js.map +1 -0
  137. package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts +5 -0
  138. package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -0
  139. package/dist/esm/ai/unified-prompts/skill-site-prompt.js +73 -0
  140. package/dist/esm/ai/unified-prompts/skill-site-prompt.js.map +1 -0
  141. package/dist/esm/apps/apps-config.d.ts +168 -0
  142. package/dist/esm/apps/apps-config.d.ts.map +1 -0
  143. package/dist/esm/apps/apps-config.js +154 -0
  144. package/dist/esm/apps/apps-config.js.map +1 -0
  145. package/dist/esm/apps/apps-ui.d.ts +45 -0
  146. package/dist/esm/apps/apps-ui.d.ts.map +1 -0
  147. package/dist/esm/apps/apps-ui.js +104 -0
  148. package/dist/esm/apps/apps-ui.js.map +1 -0
  149. package/dist/esm/config/db-sync-mappings.d.ts +193 -0
  150. package/dist/esm/config/db-sync-mappings.d.ts.map +1 -0
  151. package/dist/esm/config/db-sync-mappings.js +2253 -0
  152. package/dist/esm/config/db-sync-mappings.js.map +1 -0
  153. package/dist/esm/config/format.d.ts +61 -0
  154. package/dist/esm/config/format.d.ts.map +1 -0
  155. package/dist/esm/config/format.js +327 -0
  156. package/dist/esm/config/format.js.map +1 -0
  157. package/dist/esm/config/migrate-catalogs-to-product-lines.d.ts +14 -0
  158. package/dist/esm/config/migrate-catalogs-to-product-lines.d.ts.map +1 -0
  159. package/dist/esm/config/migrate-catalogs-to-product-lines.js +377 -0
  160. package/dist/esm/config/migrate-catalogs-to-product-lines.js.map +1 -0
  161. package/dist/esm/config/schema-fuzzer.test.d.ts +1 -0
  162. package/dist/esm/config/schema-fuzzer.test.js +401 -0
  163. package/dist/esm/config/schema-fuzzer.test.js.map +1 -0
  164. package/dist/esm/config/schema.d.ts +2315 -0
  165. package/dist/esm/config/schema.d.ts.map +1 -0
  166. package/dist/esm/config/schema.js +1065 -0
  167. package/dist/esm/config/schema.js.map +1 -0
  168. package/dist/esm/config-authoring.d.ts +12 -0
  169. package/dist/esm/config-authoring.d.ts.map +1 -0
  170. package/dist/esm/config-authoring.js +9 -0
  171. package/dist/esm/config-authoring.js.map +1 -0
  172. package/dist/esm/config-authoring.test.d.ts +1 -0
  173. package/dist/esm/config-authoring.test.js +29 -0
  174. package/dist/esm/config-authoring.test.js.map +1 -0
  175. package/dist/esm/config-rendering.d.ts +17 -0
  176. package/dist/esm/config-rendering.d.ts.map +1 -0
  177. package/dist/esm/config-rendering.js +108 -0
  178. package/dist/esm/config-rendering.js.map +1 -0
  179. package/dist/esm/crud.d.ts +98 -0
  180. package/dist/esm/crud.d.ts.map +1 -0
  181. package/dist/esm/crud.js +127 -0
  182. package/dist/esm/crud.js.map +1 -0
  183. package/dist/esm/global.d.ts +1 -0
  184. package/dist/esm/helpers/emails.d.ts +69 -0
  185. package/dist/esm/helpers/emails.d.ts.map +1 -0
  186. package/dist/esm/helpers/emails.js +243 -0
  187. package/dist/esm/helpers/emails.js.map +1 -0
  188. package/dist/esm/helpers/init-prompt.d.ts +5 -0
  189. package/dist/esm/helpers/init-prompt.d.ts.map +1 -0
  190. package/dist/esm/helpers/init-prompt.js +40 -0
  191. package/dist/esm/helpers/init-prompt.js.map +1 -0
  192. package/dist/esm/helpers/password.d.ts +7 -0
  193. package/dist/esm/helpers/password.d.ts.map +1 -0
  194. package/dist/esm/helpers/password.js +13 -0
  195. package/dist/esm/helpers/password.js.map +1 -0
  196. package/dist/esm/helpers/production-mode.d.ts +11 -0
  197. package/dist/esm/helpers/production-mode.d.ts.map +1 -0
  198. package/dist/esm/helpers/production-mode.js +46 -0
  199. package/dist/esm/helpers/production-mode.js.map +1 -0
  200. package/dist/esm/helpers/support-sla.d.ts +48 -0
  201. package/dist/esm/helpers/support-sla.d.ts.map +1 -0
  202. package/dist/esm/helpers/support-sla.js +65 -0
  203. package/dist/esm/helpers/support-sla.js.map +1 -0
  204. package/dist/esm/helpers/support-sla.test.d.ts +1 -0
  205. package/dist/esm/helpers/support-sla.test.js +102 -0
  206. package/dist/esm/helpers/support-sla.test.js.map +1 -0
  207. package/dist/esm/helpers/vault/client-side.d.ts +16 -0
  208. package/dist/esm/helpers/vault/client-side.d.ts.map +1 -0
  209. package/dist/esm/helpers/vault/client-side.js +69 -0
  210. package/dist/esm/helpers/vault/client-side.js.map +1 -0
  211. package/dist/esm/helpers/vault/server-side.d.ts +9 -0
  212. package/dist/esm/helpers/vault/server-side.d.ts.map +1 -0
  213. package/dist/esm/helpers/vault/server-side.js +123 -0
  214. package/dist/esm/helpers/vault/server-side.js.map +1 -0
  215. package/dist/esm/hooks/use-async-callback.d.ts +8 -0
  216. package/dist/esm/hooks/use-async-callback.d.ts.map +1 -0
  217. package/dist/esm/hooks/use-async-callback.js +38 -0
  218. package/dist/esm/hooks/use-async-callback.js.map +1 -0
  219. package/dist/esm/hooks/use-async-external-store.d.ts +9 -0
  220. package/dist/esm/hooks/use-async-external-store.d.ts.map +1 -0
  221. package/dist/esm/hooks/use-async-external-store.js +20 -0
  222. package/dist/esm/hooks/use-async-external-store.js.map +1 -0
  223. package/dist/esm/hooks/use-hash.d.ts +5 -0
  224. package/dist/esm/hooks/use-hash.d.ts.map +1 -0
  225. package/dist/esm/hooks/use-hash.js +15 -0
  226. package/dist/esm/hooks/use-hash.js.map +1 -0
  227. package/dist/esm/hooks/use-hover.d.ts +8 -0
  228. package/dist/esm/hooks/use-hover.d.ts.map +1 -0
  229. package/dist/esm/hooks/use-hover.js +59 -0
  230. package/dist/esm/hooks/use-hover.js.map +1 -0
  231. package/dist/esm/hooks/use-strict-memo.d.ts +10 -0
  232. package/dist/esm/hooks/use-strict-memo.d.ts.map +1 -0
  233. package/dist/esm/hooks/use-strict-memo.js +119 -0
  234. package/dist/esm/hooks/use-strict-memo.js.map +1 -0
  235. package/dist/esm/index.d.ts +5 -0
  236. package/dist/esm/index.js +6 -0
  237. package/dist/esm/interface/admin-interface.d.ts +308 -0
  238. package/dist/esm/interface/admin-interface.d.ts.map +1 -0
  239. package/dist/esm/interface/admin-interface.js +463 -0
  240. package/dist/esm/interface/admin-interface.js.map +1 -0
  241. package/dist/esm/interface/admin-metrics.d.ts +597 -0
  242. package/dist/esm/interface/admin-metrics.d.ts.map +1 -0
  243. package/dist/esm/interface/admin-metrics.js +134 -0
  244. package/dist/esm/interface/admin-metrics.js.map +1 -0
  245. package/dist/esm/interface/client-interface.d.ts +447 -0
  246. package/dist/esm/interface/client-interface.d.ts.map +1 -0
  247. package/dist/esm/interface/client-interface.js +1946 -0
  248. package/dist/esm/interface/client-interface.js.map +1 -0
  249. package/dist/esm/interface/client-interface.test.d.ts +1 -0
  250. package/dist/esm/interface/client-interface.test.js +559 -0
  251. package/dist/esm/interface/client-interface.test.js.map +1 -0
  252. package/dist/esm/interface/conversations.d.ts +314 -0
  253. package/dist/esm/interface/conversations.d.ts.map +1 -0
  254. package/dist/esm/interface/conversations.js +108 -0
  255. package/dist/esm/interface/conversations.js.map +1 -0
  256. package/dist/esm/interface/crud/analytics.d.ts +14 -0
  257. package/dist/esm/interface/crud/analytics.d.ts.map +1 -0
  258. package/dist/esm/interface/crud/analytics.js +1 -0
  259. package/dist/esm/interface/crud/connected-accounts.d.ts +69 -0
  260. package/dist/esm/interface/crud/connected-accounts.d.ts.map +1 -0
  261. package/dist/esm/interface/crud/connected-accounts.js +35 -0
  262. package/dist/esm/interface/crud/connected-accounts.js.map +1 -0
  263. package/dist/esm/interface/crud/contact-channels.d.ts +182 -0
  264. package/dist/esm/interface/crud/contact-channels.d.ts.map +1 -0
  265. package/dist/esm/interface/crud/contact-channels.js +68 -0
  266. package/dist/esm/interface/crud/contact-channels.js.map +1 -0
  267. package/dist/esm/interface/crud/current-user.d.ts +286 -0
  268. package/dist/esm/interface/crud/current-user.d.ts.map +1 -0
  269. package/dist/esm/interface/crud/current-user.js +69 -0
  270. package/dist/esm/interface/crud/current-user.js.map +1 -0
  271. package/dist/esm/interface/crud/email-outbox.d.ts +1466 -0
  272. package/dist/esm/interface/crud/email-outbox.d.ts.map +1 -0
  273. package/dist/esm/interface/crud/email-outbox.js +190 -0
  274. package/dist/esm/interface/crud/email-outbox.js.map +1 -0
  275. package/dist/esm/interface/crud/email-templates.d.ts +86 -0
  276. package/dist/esm/interface/crud/email-templates.d.ts.map +1 -0
  277. package/dist/esm/interface/crud/email-templates.js +46 -0
  278. package/dist/esm/interface/crud/email-templates.js.map +1 -0
  279. package/dist/esm/interface/crud/emails.d.ts +42 -0
  280. package/dist/esm/interface/crud/emails.d.ts.map +1 -0
  281. package/dist/esm/interface/crud/emails.js +19 -0
  282. package/dist/esm/interface/crud/emails.js.map +1 -0
  283. package/dist/esm/interface/crud/internal-api-keys.d.ts +141 -0
  284. package/dist/esm/interface/crud/internal-api-keys.d.ts.map +1 -0
  285. package/dist/esm/interface/crud/internal-api-keys.js +49 -0
  286. package/dist/esm/interface/crud/internal-api-keys.js.map +1 -0
  287. package/dist/esm/interface/crud/invoices.d.ts +43 -0
  288. package/dist/esm/interface/crud/invoices.d.ts.map +1 -0
  289. package/dist/esm/interface/crud/invoices.js +25 -0
  290. package/dist/esm/interface/crud/invoices.js.map +1 -0
  291. package/dist/esm/interface/crud/items.d.ts +31 -0
  292. package/dist/esm/interface/crud/items.d.ts.map +1 -0
  293. package/dist/esm/interface/crud/items.js +23 -0
  294. package/dist/esm/interface/crud/items.js.map +1 -0
  295. package/dist/esm/interface/crud/notification-preferences.d.ts +39 -0
  296. package/dist/esm/interface/crud/notification-preferences.d.ts.map +1 -0
  297. package/dist/esm/interface/crud/notification-preferences.js +31 -0
  298. package/dist/esm/interface/crud/notification-preferences.js.map +1 -0
  299. package/dist/esm/interface/crud/oauth-providers.d.ts +187 -0
  300. package/dist/esm/interface/crud/oauth-providers.d.ts.map +1 -0
  301. package/dist/esm/interface/crud/oauth-providers.js +75 -0
  302. package/dist/esm/interface/crud/oauth-providers.js.map +1 -0
  303. package/dist/esm/interface/crud/products.d.ts +182 -0
  304. package/dist/esm/interface/crud/products.d.ts.map +1 -0
  305. package/dist/esm/interface/crud/products.js +29 -0
  306. package/dist/esm/interface/crud/products.js.map +1 -0
  307. package/dist/esm/interface/crud/project-api-keys.d.ts +204 -0
  308. package/dist/esm/interface/crud/project-api-keys.d.ts.map +1 -0
  309. package/dist/esm/interface/crud/project-api-keys.js +72 -0
  310. package/dist/esm/interface/crud/project-api-keys.js.map +1 -0
  311. package/dist/esm/interface/crud/project-permissions.d.ts +162 -0
  312. package/dist/esm/interface/crud/project-permissions.d.ts.map +1 -0
  313. package/dist/esm/interface/crud/project-permissions.js +104 -0
  314. package/dist/esm/interface/crud/project-permissions.js.map +1 -0
  315. package/dist/esm/interface/crud/projects.d.ts +852 -0
  316. package/dist/esm/interface/crud/projects.d.ts.map +1 -0
  317. package/dist/esm/interface/crud/projects.js +193 -0
  318. package/dist/esm/interface/crud/projects.js.map +1 -0
  319. package/dist/esm/interface/crud/session-replays.d.ts +83 -0
  320. package/dist/esm/interface/crud/session-replays.d.ts.map +1 -0
  321. package/dist/esm/interface/crud/session-replays.js +1 -0
  322. package/dist/esm/interface/crud/sessions.d.ts +151 -0
  323. package/dist/esm/interface/crud/sessions.d.ts.map +1 -0
  324. package/dist/esm/interface/crud/sessions.js +56 -0
  325. package/dist/esm/interface/crud/sessions.js.map +1 -0
  326. package/dist/esm/interface/crud/sign-up-rules.d.ts +15 -0
  327. package/dist/esm/interface/crud/sign-up-rules.d.ts.map +1 -0
  328. package/dist/esm/interface/crud/sign-up-rules.js +1 -0
  329. package/dist/esm/interface/crud/svix-token.d.ts +32 -0
  330. package/dist/esm/interface/crud/svix-token.d.ts.map +1 -0
  331. package/dist/esm/interface/crud/svix-token.js +18 -0
  332. package/dist/esm/interface/crud/svix-token.js.map +1 -0
  333. package/dist/esm/interface/crud/team-invitation-details.d.ts +32 -0
  334. package/dist/esm/interface/crud/team-invitation-details.d.ts.map +1 -0
  335. package/dist/esm/interface/crud/team-invitation-details.js +21 -0
  336. package/dist/esm/interface/crud/team-invitation-details.js.map +1 -0
  337. package/dist/esm/interface/crud/team-invitation.d.ts +55 -0
  338. package/dist/esm/interface/crud/team-invitation.d.ts.map +1 -0
  339. package/dist/esm/interface/crud/team-invitation.js +37 -0
  340. package/dist/esm/interface/crud/team-invitation.js.map +1 -0
  341. package/dist/esm/interface/crud/team-member-profiles.d.ts +287 -0
  342. package/dist/esm/interface/crud/team-member-profiles.d.ts.map +1 -0
  343. package/dist/esm/interface/crud/team-member-profiles.js +58 -0
  344. package/dist/esm/interface/crud/team-member-profiles.js.map +1 -0
  345. package/dist/esm/interface/crud/team-memberships.d.ts +76 -0
  346. package/dist/esm/interface/crud/team-memberships.d.ts.map +1 -0
  347. package/dist/esm/interface/crud/team-memberships.js +54 -0
  348. package/dist/esm/interface/crud/team-memberships.js.map +1 -0
  349. package/dist/esm/interface/crud/team-permissions.d.ts +170 -0
  350. package/dist/esm/interface/crud/team-permissions.d.ts.map +1 -0
  351. package/dist/esm/interface/crud/team-permissions.js +105 -0
  352. package/dist/esm/interface/crud/team-permissions.js.map +1 -0
  353. package/dist/esm/interface/crud/teams.d.ts +300 -0
  354. package/dist/esm/interface/crud/teams.d.ts.map +1 -0
  355. package/dist/esm/interface/crud/teams.js +129 -0
  356. package/dist/esm/interface/crud/teams.js.map +1 -0
  357. package/dist/esm/interface/crud/transactions.d.ts +183 -0
  358. package/dist/esm/interface/crud/transactions.d.ts.map +1 -0
  359. package/dist/esm/interface/crud/transactions.js +85 -0
  360. package/dist/esm/interface/crud/transactions.js.map +1 -0
  361. package/dist/esm/interface/crud/users.d.ts +654 -0
  362. package/dist/esm/interface/crud/users.d.ts.map +1 -0
  363. package/dist/esm/interface/crud/users.js +181 -0
  364. package/dist/esm/interface/crud/users.js.map +1 -0
  365. package/dist/esm/interface/handler-urls.d.ts +51 -0
  366. package/dist/esm/interface/handler-urls.d.ts.map +1 -0
  367. package/dist/esm/interface/handler-urls.js +3 -0
  368. package/dist/esm/interface/page-component-versions.d.ts +25 -0
  369. package/dist/esm/interface/page-component-versions.d.ts.map +1 -0
  370. package/dist/esm/interface/page-component-versions.js +1661 -0
  371. package/dist/esm/interface/page-component-versions.js.map +1 -0
  372. package/dist/esm/interface/server-interface.d.ts +255 -0
  373. package/dist/esm/interface/server-interface.d.ts.map +1 -0
  374. package/dist/esm/interface/server-interface.js +459 -0
  375. package/dist/esm/interface/server-interface.js.map +1 -0
  376. package/dist/esm/interface/webhooks.d.ts +326 -0
  377. package/dist/esm/interface/webhooks.d.ts.map +1 -0
  378. package/dist/esm/interface/webhooks.js +22 -0
  379. package/dist/esm/interface/webhooks.js.map +1 -0
  380. package/dist/esm/known-errors.d.ts +575 -0
  381. package/dist/esm/known-errors.d.ts.map +1 -0
  382. package/dist/esm/known-errors.js +791 -0
  383. package/dist/esm/known-errors.js.map +1 -0
  384. package/dist/esm/local-emulator.d.ts +6 -0
  385. package/dist/esm/local-emulator.d.ts.map +1 -0
  386. package/dist/esm/local-emulator.js +7 -0
  387. package/dist/esm/local-emulator.js.map +1 -0
  388. package/dist/esm/payments/payment-methods.d.ts +64 -0
  389. package/dist/esm/payments/payment-methods.d.ts.map +1 -0
  390. package/dist/esm/payments/payment-methods.js +205 -0
  391. package/dist/esm/payments/payment-methods.js.map +1 -0
  392. package/dist/esm/payments/stripe-limits.d.ts +17 -0
  393. package/dist/esm/payments/stripe-limits.d.ts.map +1 -0
  394. package/dist/esm/payments/stripe-limits.js +17 -0
  395. package/dist/esm/payments/stripe-limits.js.map +1 -0
  396. package/dist/esm/plans.d.ts +72 -0
  397. package/dist/esm/plans.d.ts.map +1 -0
  398. package/dist/esm/plans.js +81 -0
  399. package/dist/esm/plans.js.map +1 -0
  400. package/dist/esm/schema-fields.d.ts +472 -0
  401. package/dist/esm/schema-fields.d.ts.map +1 -0
  402. package/dist/esm/schema-fields.js +1009 -0
  403. package/dist/esm/schema-fields.js.map +1 -0
  404. package/dist/esm/sessions.d.ts +165 -0
  405. package/dist/esm/sessions.d.ts.map +1 -0
  406. package/dist/esm/sessions.js +226 -0
  407. package/dist/esm/sessions.js.map +1 -0
  408. package/dist/esm/stack-config-file.d.ts +15 -0
  409. package/dist/esm/stack-config-file.d.ts.map +1 -0
  410. package/dist/esm/stack-config-file.js +76 -0
  411. package/dist/esm/stack-config-file.js.map +1 -0
  412. package/dist/esm/utils/api-keys.d.ts +26 -0
  413. package/dist/esm/utils/api-keys.d.ts.map +1 -0
  414. package/dist/esm/utils/api-keys.js +77 -0
  415. package/dist/esm/utils/api-keys.js.map +1 -0
  416. package/dist/esm/utils/arrays.d.ts +25 -0
  417. package/dist/esm/utils/arrays.d.ts.map +1 -0
  418. package/dist/esm/utils/arrays.js +552 -0
  419. package/dist/esm/utils/arrays.js.map +1 -0
  420. package/dist/esm/utils/auth-methods.d.ts +6 -0
  421. package/dist/esm/utils/auth-methods.d.ts.map +1 -0
  422. package/dist/esm/utils/auth-methods.js +11 -0
  423. package/dist/esm/utils/auth-methods.js.map +1 -0
  424. package/dist/esm/utils/base64.d.ts +6 -0
  425. package/dist/esm/utils/base64.d.ts.map +1 -0
  426. package/dist/esm/utils/base64.js +25 -0
  427. package/dist/esm/utils/base64.js.map +1 -0
  428. package/dist/esm/utils/booleans.d.ts +8 -0
  429. package/dist/esm/utils/booleans.d.ts.map +1 -0
  430. package/dist/esm/utils/booleans.js +35 -0
  431. package/dist/esm/utils/booleans.js.map +1 -0
  432. package/dist/esm/utils/browser-compat.d.ts +10 -0
  433. package/dist/esm/utils/browser-compat.d.ts.map +1 -0
  434. package/dist/esm/utils/browser-compat.js +21 -0
  435. package/dist/esm/utils/browser-compat.js.map +1 -0
  436. package/dist/esm/utils/bytes.d.ts +17 -0
  437. package/dist/esm/utils/bytes.d.ts.map +1 -0
  438. package/dist/esm/utils/bytes.js +290 -0
  439. package/dist/esm/utils/bytes.js.map +1 -0
  440. package/dist/esm/utils/caches.d.ts +102 -0
  441. package/dist/esm/utils/caches.d.ts.map +1 -0
  442. package/dist/esm/utils/caches.js +185 -0
  443. package/dist/esm/utils/caches.js.map +1 -0
  444. package/dist/esm/utils/cel-fields.d.ts +23 -0
  445. package/dist/esm/utils/cel-fields.d.ts.map +1 -0
  446. package/dist/esm/utils/cel-fields.js +99 -0
  447. package/dist/esm/utils/cel-fields.js.map +1 -0
  448. package/dist/esm/utils/compile-time.d.ts +10 -0
  449. package/dist/esm/utils/compile-time.d.ts.map +1 -0
  450. package/dist/esm/utils/compile-time.js +14 -0
  451. package/dist/esm/utils/compile-time.js.map +1 -0
  452. package/dist/esm/utils/country-codes.d.ts +11 -0
  453. package/dist/esm/utils/country-codes.d.ts.map +1 -0
  454. package/dist/esm/utils/country-codes.js +36 -0
  455. package/dist/esm/utils/country-codes.js.map +1 -0
  456. package/dist/esm/utils/crypto.d.ts +48 -0
  457. package/dist/esm/utils/crypto.d.ts.map +1 -0
  458. package/dist/esm/utils/crypto.js +208 -0
  459. package/dist/esm/utils/crypto.js.map +1 -0
  460. package/dist/esm/utils/currencies.d.ts +8 -0
  461. package/dist/esm/utils/currencies.d.ts.map +1 -0
  462. package/dist/esm/utils/currencies.js +50 -0
  463. package/dist/esm/utils/currencies.js.map +1 -0
  464. package/dist/esm/utils/currency-constants.d.ts +39 -0
  465. package/dist/esm/utils/currency-constants.d.ts.map +1 -0
  466. package/dist/esm/utils/currency-constants.js +42 -0
  467. package/dist/esm/utils/currency-constants.js.map +1 -0
  468. package/dist/esm/utils/dates.d.ts +23 -0
  469. package/dist/esm/utils/dates.d.ts.map +1 -0
  470. package/dist/esm/utils/dates.js +167 -0
  471. package/dist/esm/utils/dates.js.map +1 -0
  472. package/dist/esm/utils/dev-env-state-path.d.ts +6 -0
  473. package/dist/esm/utils/dev-env-state-path.d.ts.map +1 -0
  474. package/dist/esm/utils/dev-env-state-path.js +15 -0
  475. package/dist/esm/utils/dev-env-state-path.js.map +1 -0
  476. package/dist/esm/utils/dom.d.ts +5 -0
  477. package/dist/esm/utils/dom.d.ts.map +1 -0
  478. package/dist/esm/utils/dom.js +11 -0
  479. package/dist/esm/utils/dom.js.map +1 -0
  480. package/dist/esm/utils/env.d.ts +25 -0
  481. package/dist/esm/utils/env.d.ts.map +1 -0
  482. package/dist/esm/utils/env.js +78 -0
  483. package/dist/esm/utils/env.js.map +1 -0
  484. package/dist/esm/utils/errors.d.ts +231 -0
  485. package/dist/esm/utils/errors.d.ts.map +1 -0
  486. package/dist/esm/utils/errors.js +385 -0
  487. package/dist/esm/utils/errors.js.map +1 -0
  488. package/dist/esm/utils/esbuild.d.ts +16 -0
  489. package/dist/esm/utils/esbuild.d.ts.map +1 -0
  490. package/dist/esm/utils/esbuild.js +182 -0
  491. package/dist/esm/utils/esbuild.js.map +1 -0
  492. package/dist/esm/utils/featurebase.d.ts +30 -0
  493. package/dist/esm/utils/featurebase.d.ts.map +1 -0
  494. package/dist/esm/utils/featurebase.js +166 -0
  495. package/dist/esm/utils/featurebase.js.map +1 -0
  496. package/dist/esm/utils/fs.d.ts +9 -0
  497. package/dist/esm/utils/fs.d.ts.map +1 -0
  498. package/dist/esm/utils/fs.js +25 -0
  499. package/dist/esm/utils/fs.js.map +1 -0
  500. package/dist/esm/utils/functions.d.ts +6 -0
  501. package/dist/esm/utils/functions.d.ts.map +1 -0
  502. package/dist/esm/utils/functions.js +34 -0
  503. package/dist/esm/utils/functions.js.map +1 -0
  504. package/dist/esm/utils/geo.d.ts +24 -0
  505. package/dist/esm/utils/geo.d.ts.map +1 -0
  506. package/dist/esm/utils/geo.js +16 -0
  507. package/dist/esm/utils/geo.js.map +1 -0
  508. package/dist/esm/utils/globals.d.ts +13 -0
  509. package/dist/esm/utils/globals.d.ts.map +1 -0
  510. package/dist/esm/utils/globals.js +34 -0
  511. package/dist/esm/utils/globals.js.map +1 -0
  512. package/dist/esm/utils/hashes.d.ts +9 -0
  513. package/dist/esm/utils/hashes.d.ts.map +1 -0
  514. package/dist/esm/utils/hashes.js +40 -0
  515. package/dist/esm/utils/hashes.js.map +1 -0
  516. package/dist/esm/utils/html.d.ts +7 -0
  517. package/dist/esm/utils/html.d.ts.map +1 -0
  518. package/dist/esm/utils/html.js +33 -0
  519. package/dist/esm/utils/html.js.map +1 -0
  520. package/dist/esm/utils/http.d.ts +45 -0
  521. package/dist/esm/utils/http.d.ts.map +1 -0
  522. package/dist/esm/utils/http.js +75 -0
  523. package/dist/esm/utils/http.js.map +1 -0
  524. package/dist/esm/utils/ips.d.ts +8 -0
  525. package/dist/esm/utils/ips.d.ts.map +1 -0
  526. package/dist/esm/utils/ips.js +36 -0
  527. package/dist/esm/utils/ips.js.map +1 -0
  528. package/dist/esm/utils/json.d.ts +15 -0
  529. package/dist/esm/utils/json.d.ts.map +1 -0
  530. package/dist/esm/utils/json.js +178 -0
  531. package/dist/esm/utils/json.js.map +1 -0
  532. package/dist/esm/utils/jsx-editable-transpiler.d.ts +68 -0
  533. package/dist/esm/utils/jsx-editable-transpiler.d.ts.map +1 -0
  534. package/dist/esm/utils/jsx-editable-transpiler.js +216 -0
  535. package/dist/esm/utils/jsx-editable-transpiler.js.map +1 -0
  536. package/dist/esm/utils/jsx-editable-transpiler.test.d.ts +1 -0
  537. package/dist/esm/utils/jsx-editable-transpiler.test.js +122 -0
  538. package/dist/esm/utils/jsx-editable-transpiler.test.js.map +1 -0
  539. package/dist/esm/utils/jwt.d.ts +79 -0
  540. package/dist/esm/utils/jwt.d.ts.map +1 -0
  541. package/dist/esm/utils/jwt.js +102 -0
  542. package/dist/esm/utils/jwt.js.map +1 -0
  543. package/dist/esm/utils/locks.d.ts +17 -0
  544. package/dist/esm/utils/locks.d.ts.map +1 -0
  545. package/dist/esm/utils/locks.js +54 -0
  546. package/dist/esm/utils/locks.js.map +1 -0
  547. package/dist/esm/utils/maps.d.ts +61 -0
  548. package/dist/esm/utils/maps.d.ts.map +1 -0
  549. package/dist/esm/utils/maps.js +297 -0
  550. package/dist/esm/utils/maps.js.map +1 -0
  551. package/dist/esm/utils/math.d.ts +8 -0
  552. package/dist/esm/utils/math.d.ts.map +1 -0
  553. package/dist/esm/utils/math.js +21 -0
  554. package/dist/esm/utils/math.js.map +1 -0
  555. package/dist/esm/utils/monkey-patch.d.ts +7 -0
  556. package/dist/esm/utils/monkey-patch.d.ts.map +1 -0
  557. package/dist/esm/utils/monkey-patch.js +21 -0
  558. package/dist/esm/utils/monkey-patch.js.map +1 -0
  559. package/dist/esm/utils/node-http.d.ts +17 -0
  560. package/dist/esm/utils/node-http.d.ts.map +1 -0
  561. package/dist/esm/utils/node-http.js +38 -0
  562. package/dist/esm/utils/node-http.js.map +1 -0
  563. package/dist/esm/utils/numbers.d.ts +7 -0
  564. package/dist/esm/utils/numbers.d.ts.map +1 -0
  565. package/dist/esm/utils/numbers.js +75 -0
  566. package/dist/esm/utils/numbers.js.map +1 -0
  567. package/dist/esm/utils/oauth.d.ts +11 -0
  568. package/dist/esm/utils/oauth.d.ts.map +1 -0
  569. package/dist/esm/utils/oauth.js +27 -0
  570. package/dist/esm/utils/oauth.js.map +1 -0
  571. package/dist/esm/utils/objects.d.ts +59 -0
  572. package/dist/esm/utils/objects.d.ts.map +1 -0
  573. package/dist/esm/utils/objects.js +818 -0
  574. package/dist/esm/utils/objects.js.map +1 -0
  575. package/dist/esm/utils/paginated-lists.d.ts +442 -0
  576. package/dist/esm/utils/paginated-lists.d.ts.map +1 -0
  577. package/dist/esm/utils/paginated-lists.js +411 -0
  578. package/dist/esm/utils/paginated-lists.js.map +1 -0
  579. package/dist/esm/utils/paginated-lists.test.d.ts +1 -0
  580. package/dist/esm/utils/paginated-lists.test.js +1304 -0
  581. package/dist/esm/utils/paginated-lists.test.js.map +1 -0
  582. package/dist/esm/utils/passkey.d.ts +2 -0
  583. package/dist/esm/utils/passkey.js +1 -0
  584. package/dist/esm/utils/promises.d.ts +80 -0
  585. package/dist/esm/utils/promises.d.ts.map +1 -0
  586. package/dist/esm/utils/promises.js +333 -0
  587. package/dist/esm/utils/promises.js.map +1 -0
  588. package/dist/esm/utils/proxies.d.ts +13 -0
  589. package/dist/esm/utils/proxies.d.ts.map +1 -0
  590. package/dist/esm/utils/proxies.js +197 -0
  591. package/dist/esm/utils/proxies.js.map +1 -0
  592. package/dist/esm/utils/react.d.ts +61 -0
  593. package/dist/esm/utils/react.d.ts.map +1 -0
  594. package/dist/esm/utils/react.js +229 -0
  595. package/dist/esm/utils/react.js.map +1 -0
  596. package/dist/esm/utils/redirect-urls.d.ts +30 -0
  597. package/dist/esm/utils/redirect-urls.d.ts.map +1 -0
  598. package/dist/esm/utils/redirect-urls.js +215 -0
  599. package/dist/esm/utils/redirect-urls.js.map +1 -0
  600. package/dist/esm/utils/regex.d.ts +5 -0
  601. package/dist/esm/utils/regex.d.ts.map +1 -0
  602. package/dist/esm/utils/regex.js +13 -0
  603. package/dist/esm/utils/regex.js.map +1 -0
  604. package/dist/esm/utils/results.d.ts +70 -0
  605. package/dist/esm/utils/results.d.ts.map +1 -0
  606. package/dist/esm/utils/results.js +339 -0
  607. package/dist/esm/utils/results.js.map +1 -0
  608. package/dist/esm/utils/sentry.d.ts +13 -0
  609. package/dist/esm/utils/sentry.d.ts.map +1 -0
  610. package/dist/esm/utils/sentry.js +14 -0
  611. package/dist/esm/utils/sentry.js.map +1 -0
  612. package/dist/esm/utils/stores.d.ts +104 -0
  613. package/dist/esm/utils/stores.d.ts.map +1 -0
  614. package/dist/esm/utils/stores.js +175 -0
  615. package/dist/esm/utils/stores.js.map +1 -0
  616. package/dist/esm/utils/strings.d.ts +76 -0
  617. package/dist/esm/utils/strings.d.ts.map +1 -0
  618. package/dist/esm/utils/strings.js +530 -0
  619. package/dist/esm/utils/strings.js.map +1 -0
  620. package/dist/esm/utils/strings.nicify.test.d.ts +1 -0
  621. package/dist/esm/utils/strings.nicify.test.js +243 -0
  622. package/dist/esm/utils/strings.nicify.test.js.map +1 -0
  623. package/dist/esm/utils/telemetry.d.ts +15 -0
  624. package/dist/esm/utils/telemetry.d.ts.map +1 -0
  625. package/dist/esm/utils/telemetry.js +31 -0
  626. package/dist/esm/utils/telemetry.js.map +1 -0
  627. package/dist/esm/utils/turnstile-browser.d.ts +32 -0
  628. package/dist/esm/utils/turnstile-browser.d.ts.map +1 -0
  629. package/dist/esm/utils/turnstile-browser.js +61 -0
  630. package/dist/esm/utils/turnstile-browser.js.map +1 -0
  631. package/dist/esm/utils/turnstile-flow.d.ts +29 -0
  632. package/dist/esm/utils/turnstile-flow.d.ts.map +1 -0
  633. package/dist/esm/utils/turnstile-flow.js +219 -0
  634. package/dist/esm/utils/turnstile-flow.js.map +1 -0
  635. package/dist/esm/utils/turnstile-flow.test.d.ts +1 -0
  636. package/dist/esm/utils/turnstile-flow.test.js +75 -0
  637. package/dist/esm/utils/turnstile-flow.test.js.map +1 -0
  638. package/dist/esm/utils/turnstile.d.ts +17 -0
  639. package/dist/esm/utils/turnstile.d.ts.map +1 -0
  640. package/dist/esm/utils/turnstile.js +25 -0
  641. package/dist/esm/utils/turnstile.js.map +1 -0
  642. package/dist/esm/utils/typed-arrays.d.ts +14 -0
  643. package/dist/esm/utils/typed-arrays.d.ts.map +1 -0
  644. package/dist/esm/utils/typed-arrays.js +20 -0
  645. package/dist/esm/utils/typed-arrays.js.map +1 -0
  646. package/dist/esm/utils/types.d.ts +77 -0
  647. package/dist/esm/utils/types.d.ts.map +1 -0
  648. package/dist/esm/utils/types.js +55 -0
  649. package/dist/esm/utils/types.js.map +1 -0
  650. package/dist/esm/utils/unicode.d.ts +5 -0
  651. package/dist/esm/utils/unicode.d.ts.map +1 -0
  652. package/dist/esm/utils/unicode.js +24 -0
  653. package/dist/esm/utils/unicode.js.map +1 -0
  654. package/dist/esm/utils/urls.d.ts +28 -0
  655. package/dist/esm/utils/urls.d.ts.map +1 -0
  656. package/dist/esm/utils/urls.js +259 -0
  657. package/dist/esm/utils/urls.js.map +1 -0
  658. package/dist/esm/utils/uuids.d.ts +6 -0
  659. package/dist/esm/utils/uuids.d.ts.map +1 -0
  660. package/dist/esm/utils/uuids.js +36 -0
  661. package/dist/esm/utils/uuids.js.map +1 -0
  662. package/dist/global.d.d.ts +0 -0
  663. package/dist/global.d.ts +1 -0
  664. package/dist/helpers/emails.d.ts +69 -0
  665. package/dist/helpers/emails.d.ts.map +1 -0
  666. package/dist/helpers/emails.js +252 -0
  667. package/dist/helpers/emails.js.map +1 -0
  668. package/dist/helpers/init-prompt.d.ts +5 -0
  669. package/dist/helpers/init-prompt.d.ts.map +1 -0
  670. package/dist/helpers/init-prompt.js +42 -0
  671. package/dist/helpers/init-prompt.js.map +1 -0
  672. package/dist/helpers/password.d.ts +6 -0
  673. package/dist/helpers/password.d.ts.map +1 -0
  674. package/dist/helpers/password.js +15 -0
  675. package/dist/helpers/password.js.map +1 -0
  676. package/dist/helpers/production-mode.d.ts +11 -0
  677. package/dist/helpers/production-mode.d.ts.map +1 -0
  678. package/dist/helpers/production-mode.js +48 -0
  679. package/dist/helpers/production-mode.js.map +1 -0
  680. package/dist/helpers/support-sla.d.ts +48 -0
  681. package/dist/helpers/support-sla.d.ts.map +1 -0
  682. package/dist/helpers/support-sla.js +72 -0
  683. package/dist/helpers/support-sla.js.map +1 -0
  684. package/dist/helpers/support-sla.test.d.ts +1 -0
  685. package/dist/helpers/support-sla.test.js +102 -0
  686. package/dist/helpers/support-sla.test.js.map +1 -0
  687. package/dist/helpers/vault/client-side.d.ts +16 -0
  688. package/dist/helpers/vault/client-side.d.ts.map +1 -0
  689. package/dist/helpers/vault/client-side.js +73 -0
  690. package/dist/helpers/vault/client-side.js.map +1 -0
  691. package/dist/helpers/vault/server-side.d.ts +9 -0
  692. package/dist/helpers/vault/server-side.d.ts.map +1 -0
  693. package/dist/helpers/vault/server-side.js +126 -0
  694. package/dist/helpers/vault/server-side.js.map +1 -0
  695. package/dist/hooks/use-async-callback.d.ts +8 -0
  696. package/dist/hooks/use-async-callback.d.ts.map +1 -0
  697. package/dist/hooks/use-async-callback.js +42 -0
  698. package/dist/hooks/use-async-callback.js.map +1 -0
  699. package/dist/hooks/use-async-external-store.d.ts +9 -0
  700. package/dist/hooks/use-async-external-store.d.ts.map +1 -0
  701. package/dist/hooks/use-async-external-store.js +22 -0
  702. package/dist/hooks/use-async-external-store.js.map +1 -0
  703. package/dist/hooks/use-hash.d.ts +5 -0
  704. package/dist/hooks/use-hash.d.ts.map +1 -0
  705. package/dist/hooks/use-hash.js +17 -0
  706. package/dist/hooks/use-hash.js.map +1 -0
  707. package/dist/hooks/use-hover.d.ts +8 -0
  708. package/dist/hooks/use-hover.d.ts.map +1 -0
  709. package/dist/hooks/use-hover.js +61 -0
  710. package/dist/hooks/use-hover.js.map +1 -0
  711. package/dist/hooks/use-strict-memo.d.ts +10 -0
  712. package/dist/hooks/use-strict-memo.d.ts.map +1 -0
  713. package/dist/hooks/use-strict-memo.js +121 -0
  714. package/dist/hooks/use-strict-memo.js.map +1 -0
  715. package/dist/index-D9ysacya.d.ts +153 -0
  716. package/dist/index-D9ysacya.d.ts.map +1 -0
  717. package/dist/index.d.ts +5 -0
  718. package/dist/index.js +37 -0
  719. package/dist/interface/admin-interface.d.ts +308 -0
  720. package/dist/interface/admin-interface.d.ts.map +1 -0
  721. package/dist/interface/admin-interface.js +465 -0
  722. package/dist/interface/admin-interface.js.map +1 -0
  723. package/dist/interface/admin-metrics.d.ts +597 -0
  724. package/dist/interface/admin-metrics.d.ts.map +1 -0
  725. package/dist/interface/admin-metrics.js +153 -0
  726. package/dist/interface/admin-metrics.js.map +1 -0
  727. package/dist/interface/client-interface.d.ts +447 -0
  728. package/dist/interface/client-interface.d.ts.map +1 -0
  729. package/dist/interface/client-interface.js +1948 -0
  730. package/dist/interface/client-interface.js.map +1 -0
  731. package/dist/interface/client-interface.test.d.ts +1 -0
  732. package/dist/interface/client-interface.test.js +559 -0
  733. package/dist/interface/client-interface.test.js.map +1 -0
  734. package/dist/interface/conversations.d.ts +314 -0
  735. package/dist/interface/conversations.d.ts.map +1 -0
  736. package/dist/interface/conversations.js +121 -0
  737. package/dist/interface/conversations.js.map +1 -0
  738. package/dist/interface/crud/analytics.d.ts +14 -0
  739. package/dist/interface/crud/analytics.d.ts.map +1 -0
  740. package/dist/interface/crud/analytics.js +0 -0
  741. package/dist/interface/crud/connected-accounts.d.ts +68 -0
  742. package/dist/interface/crud/connected-accounts.d.ts.map +1 -0
  743. package/dist/interface/crud/connected-accounts.js +41 -0
  744. package/dist/interface/crud/connected-accounts.js.map +1 -0
  745. package/dist/interface/crud/contact-channels.d.ts +181 -0
  746. package/dist/interface/crud/contact-channels.d.ts.map +1 -0
  747. package/dist/interface/crud/contact-channels.js +76 -0
  748. package/dist/interface/crud/contact-channels.js.map +1 -0
  749. package/dist/interface/crud/current-user.d.ts +285 -0
  750. package/dist/interface/crud/current-user.d.ts.map +1 -0
  751. package/dist/interface/crud/current-user.js +71 -0
  752. package/dist/interface/crud/current-user.js.map +1 -0
  753. package/dist/interface/crud/email-outbox.d.ts +1465 -0
  754. package/dist/interface/crud/email-outbox.d.ts.map +1 -0
  755. package/dist/interface/crud/email-outbox.js +195 -0
  756. package/dist/interface/crud/email-outbox.js.map +1 -0
  757. package/dist/interface/crud/email-templates.d.ts +85 -0
  758. package/dist/interface/crud/email-templates.d.ts.map +1 -0
  759. package/dist/interface/crud/email-templates.js +53 -0
  760. package/dist/interface/crud/email-templates.js.map +1 -0
  761. package/dist/interface/crud/emails.d.ts +41 -0
  762. package/dist/interface/crud/emails.d.ts.map +1 -0
  763. package/dist/interface/crud/emails.js +23 -0
  764. package/dist/interface/crud/emails.js.map +1 -0
  765. package/dist/interface/crud/internal-api-keys.d.ts +140 -0
  766. package/dist/interface/crud/internal-api-keys.d.ts.map +1 -0
  767. package/dist/interface/crud/internal-api-keys.js +56 -0
  768. package/dist/interface/crud/internal-api-keys.js.map +1 -0
  769. package/dist/interface/crud/invoices.d.ts +43 -0
  770. package/dist/interface/crud/invoices.d.ts.map +1 -0
  771. package/dist/interface/crud/invoices.js +28 -0
  772. package/dist/interface/crud/invoices.js.map +1 -0
  773. package/dist/interface/crud/items.d.ts +30 -0
  774. package/dist/interface/crud/items.d.ts.map +1 -0
  775. package/dist/interface/crud/items.js +25 -0
  776. package/dist/interface/crud/items.js.map +1 -0
  777. package/dist/interface/crud/notification-preferences.d.ts +38 -0
  778. package/dist/interface/crud/notification-preferences.d.ts.map +1 -0
  779. package/dist/interface/crud/notification-preferences.js +33 -0
  780. package/dist/interface/crud/notification-preferences.js.map +1 -0
  781. package/dist/interface/crud/oauth-providers.d.ts +186 -0
  782. package/dist/interface/crud/oauth-providers.d.ts.map +1 -0
  783. package/dist/interface/crud/oauth-providers.js +83 -0
  784. package/dist/interface/crud/oauth-providers.js.map +1 -0
  785. package/dist/interface/crud/products.d.ts +182 -0
  786. package/dist/interface/crud/products.d.ts.map +1 -0
  787. package/dist/interface/crud/products.js +32 -0
  788. package/dist/interface/crud/products.js.map +1 -0
  789. package/dist/interface/crud/project-api-keys.d.ts +203 -0
  790. package/dist/interface/crud/project-api-keys.d.ts.map +1 -0
  791. package/dist/interface/crud/project-api-keys.js +79 -0
  792. package/dist/interface/crud/project-api-keys.js.map +1 -0
  793. package/dist/interface/crud/project-permissions.d.ts +161 -0
  794. package/dist/interface/crud/project-permissions.d.ts.map +1 -0
  795. package/dist/interface/crud/project-permissions.js +116 -0
  796. package/dist/interface/crud/project-permissions.js.map +1 -0
  797. package/dist/interface/crud/projects.d.ts +851 -0
  798. package/dist/interface/crud/projects.d.ts.map +1 -0
  799. package/dist/interface/crud/projects.js +204 -0
  800. package/dist/interface/crud/projects.js.map +1 -0
  801. package/dist/interface/crud/session-replays.d.ts +83 -0
  802. package/dist/interface/crud/session-replays.d.ts.map +1 -0
  803. package/dist/interface/crud/session-replays.js +0 -0
  804. package/dist/interface/crud/sessions.d.ts +150 -0
  805. package/dist/interface/crud/sessions.d.ts.map +1 -0
  806. package/dist/interface/crud/sessions.js +62 -0
  807. package/dist/interface/crud/sessions.js.map +1 -0
  808. package/dist/interface/crud/sign-up-rules.d.ts +15 -0
  809. package/dist/interface/crud/sign-up-rules.d.ts.map +1 -0
  810. package/dist/interface/crud/sign-up-rules.js +0 -0
  811. package/dist/interface/crud/svix-token.d.ts +31 -0
  812. package/dist/interface/crud/svix-token.d.ts.map +1 -0
  813. package/dist/interface/crud/svix-token.js +22 -0
  814. package/dist/interface/crud/svix-token.js.map +1 -0
  815. package/dist/interface/crud/team-invitation-details.d.ts +31 -0
  816. package/dist/interface/crud/team-invitation-details.d.ts.map +1 -0
  817. package/dist/interface/crud/team-invitation-details.js +24 -0
  818. package/dist/interface/crud/team-invitation-details.js.map +1 -0
  819. package/dist/interface/crud/team-invitation.d.ts +54 -0
  820. package/dist/interface/crud/team-invitation.d.ts.map +1 -0
  821. package/dist/interface/crud/team-invitation.js +40 -0
  822. package/dist/interface/crud/team-invitation.js.map +1 -0
  823. package/dist/interface/crud/team-member-profiles.d.ts +286 -0
  824. package/dist/interface/crud/team-member-profiles.d.ts.map +1 -0
  825. package/dist/interface/crud/team-member-profiles.js +63 -0
  826. package/dist/interface/crud/team-member-profiles.js.map +1 -0
  827. package/dist/interface/crud/team-memberships.d.ts +75 -0
  828. package/dist/interface/crud/team-memberships.d.ts.map +1 -0
  829. package/dist/interface/crud/team-memberships.js +61 -0
  830. package/dist/interface/crud/team-memberships.js.map +1 -0
  831. package/dist/interface/crud/team-permissions.d.ts +169 -0
  832. package/dist/interface/crud/team-permissions.d.ts.map +1 -0
  833. package/dist/interface/crud/team-permissions.js +117 -0
  834. package/dist/interface/crud/team-permissions.js.map +1 -0
  835. package/dist/interface/crud/teams.d.ts +299 -0
  836. package/dist/interface/crud/teams.d.ts.map +1 -0
  837. package/dist/interface/crud/teams.js +142 -0
  838. package/dist/interface/crud/teams.js.map +1 -0
  839. package/dist/interface/crud/transactions.d.ts +183 -0
  840. package/dist/interface/crud/transactions.d.ts.map +1 -0
  841. package/dist/interface/crud/transactions.js +89 -0
  842. package/dist/interface/crud/transactions.js.map +1 -0
  843. package/dist/interface/crud/users.d.ts +653 -0
  844. package/dist/interface/crud/users.d.ts.map +1 -0
  845. package/dist/interface/crud/users.js +193 -0
  846. package/dist/interface/crud/users.js.map +1 -0
  847. package/dist/interface/handler-urls.d.ts +51 -0
  848. package/dist/interface/handler-urls.d.ts.map +1 -0
  849. package/dist/interface/handler-urls.js +16 -0
  850. package/dist/interface/page-component-versions.d.ts +25 -0
  851. package/dist/interface/page-component-versions.d.ts.map +1 -0
  852. package/dist/interface/page-component-versions.js +1664 -0
  853. package/dist/interface/page-component-versions.js.map +1 -0
  854. package/dist/interface/server-interface.d.ts +255 -0
  855. package/dist/interface/server-interface.d.ts.map +1 -0
  856. package/dist/interface/server-interface.js +461 -0
  857. package/dist/interface/server-interface.js.map +1 -0
  858. package/dist/interface/webhooks.d.ts +326 -0
  859. package/dist/interface/webhooks.d.ts.map +1 -0
  860. package/dist/interface/webhooks.js +24 -0
  861. package/dist/interface/webhooks.js.map +1 -0
  862. package/dist/known-errors.d.ts +575 -0
  863. package/dist/known-errors.d.ts.map +1 -0
  864. package/dist/known-errors.js +794 -0
  865. package/dist/known-errors.js.map +1 -0
  866. package/dist/local-emulator.d.ts +6 -0
  867. package/dist/local-emulator.d.ts.map +1 -0
  868. package/dist/local-emulator.js +10 -0
  869. package/dist/local-emulator.js.map +1 -0
  870. package/dist/payments/payment-methods.d.ts +64 -0
  871. package/dist/payments/payment-methods.d.ts.map +1 -0
  872. package/dist/payments/payment-methods.js +216 -0
  873. package/dist/payments/payment-methods.js.map +1 -0
  874. package/dist/payments/stripe-limits.d.ts +17 -0
  875. package/dist/payments/stripe-limits.d.ts.map +1 -0
  876. package/dist/payments/stripe-limits.js +20 -0
  877. package/dist/payments/stripe-limits.js.map +1 -0
  878. package/dist/plans.d.ts +72 -0
  879. package/dist/plans.d.ts.map +1 -0
  880. package/dist/plans.js +88 -0
  881. package/dist/plans.js.map +1 -0
  882. package/dist/schema-fields.d.ts +472 -0
  883. package/dist/schema-fields.d.ts.map +1 -0
  884. package/dist/schema-fields.js +1188 -0
  885. package/dist/schema-fields.js.map +1 -0
  886. package/dist/sessions.d.ts +165 -0
  887. package/dist/sessions.d.ts.map +1 -0
  888. package/dist/sessions.js +231 -0
  889. package/dist/sessions.js.map +1 -0
  890. package/dist/stack-config-file.d.ts +15 -0
  891. package/dist/stack-config-file.d.ts.map +1 -0
  892. package/dist/stack-config-file.js +82 -0
  893. package/dist/stack-config-file.js.map +1 -0
  894. package/dist/utils/api-keys.d.ts +26 -0
  895. package/dist/utils/api-keys.d.ts.map +1 -0
  896. package/dist/utils/api-keys.js +82 -0
  897. package/dist/utils/api-keys.js.map +1 -0
  898. package/dist/utils/arrays.d.ts +25 -0
  899. package/dist/utils/arrays.d.ts.map +1 -0
  900. package/dist/utils/arrays.js +569 -0
  901. package/dist/utils/arrays.js.map +1 -0
  902. package/dist/utils/auth-methods.d.ts +6 -0
  903. package/dist/utils/auth-methods.d.ts.map +1 -0
  904. package/dist/utils/auth-methods.js +13 -0
  905. package/dist/utils/auth-methods.js.map +1 -0
  906. package/dist/utils/base64.d.ts +6 -0
  907. package/dist/utils/base64.d.ts.map +1 -0
  908. package/dist/utils/base64.js +28 -0
  909. package/dist/utils/base64.js.map +1 -0
  910. package/dist/utils/booleans.d.ts +8 -0
  911. package/dist/utils/booleans.d.ts.map +1 -0
  912. package/dist/utils/booleans.js +38 -0
  913. package/dist/utils/booleans.js.map +1 -0
  914. package/dist/utils/browser-compat.d.ts +10 -0
  915. package/dist/utils/browser-compat.d.ts.map +1 -0
  916. package/dist/utils/browser-compat.js +23 -0
  917. package/dist/utils/browser-compat.js.map +1 -0
  918. package/dist/utils/bytes.d.ts +17 -0
  919. package/dist/utils/bytes.d.ts.map +1 -0
  920. package/dist/utils/bytes.js +304 -0
  921. package/dist/utils/bytes.js.map +1 -0
  922. package/dist/utils/caches.d.ts +102 -0
  923. package/dist/utils/caches.d.ts.map +1 -0
  924. package/dist/utils/caches.js +188 -0
  925. package/dist/utils/caches.js.map +1 -0
  926. package/dist/utils/cel-fields.d.ts +23 -0
  927. package/dist/utils/cel-fields.d.ts.map +1 -0
  928. package/dist/utils/cel-fields.js +108 -0
  929. package/dist/utils/cel-fields.js.map +1 -0
  930. package/dist/utils/compile-time.d.ts +10 -0
  931. package/dist/utils/compile-time.d.ts.map +1 -0
  932. package/dist/utils/compile-time.js +16 -0
  933. package/dist/utils/compile-time.js.map +1 -0
  934. package/dist/utils/country-codes.d.ts +11 -0
  935. package/dist/utils/country-codes.d.ts.map +1 -0
  936. package/dist/utils/country-codes.js +40 -0
  937. package/dist/utils/country-codes.js.map +1 -0
  938. package/dist/utils/crypto.d.ts +48 -0
  939. package/dist/utils/crypto.d.ts.map +1 -0
  940. package/dist/utils/crypto.js +215 -0
  941. package/dist/utils/crypto.js.map +1 -0
  942. package/dist/utils/currencies.d.ts +8 -0
  943. package/dist/utils/currencies.d.ts.map +1 -0
  944. package/dist/utils/currencies.js +52 -0
  945. package/dist/utils/currencies.js.map +1 -0
  946. package/dist/utils/currency-constants.d.ts +39 -0
  947. package/dist/utils/currency-constants.d.ts.map +1 -0
  948. package/dist/utils/currency-constants.js +44 -0
  949. package/dist/utils/currency-constants.js.map +1 -0
  950. package/dist/utils/dates.d.ts +23 -0
  951. package/dist/utils/dates.d.ts.map +1 -0
  952. package/dist/utils/dates.js +176 -0
  953. package/dist/utils/dates.js.map +1 -0
  954. package/dist/utils/dev-env-state-path.d.ts +6 -0
  955. package/dist/utils/dev-env-state-path.d.ts.map +1 -0
  956. package/dist/utils/dev-env-state-path.js +18 -0
  957. package/dist/utils/dev-env-state-path.js.map +1 -0
  958. package/dist/utils/dom.d.ts +5 -0
  959. package/dist/utils/dom.d.ts.map +1 -0
  960. package/dist/utils/dom.js +13 -0
  961. package/dist/utils/dom.js.map +1 -0
  962. package/dist/utils/env.d.ts +25 -0
  963. package/dist/utils/env.d.ts.map +1 -0
  964. package/dist/utils/env.js +85 -0
  965. package/dist/utils/env.js.map +1 -0
  966. package/dist/utils/errors.d.ts +231 -0
  967. package/dist/utils/errors.d.ts.map +1 -0
  968. package/dist/utils/errors.js +393 -0
  969. package/dist/utils/errors.js.map +1 -0
  970. package/dist/utils/esbuild.d.ts +16 -0
  971. package/dist/utils/esbuild.d.ts.map +1 -0
  972. package/dist/utils/esbuild.js +186 -0
  973. package/dist/utils/esbuild.js.map +1 -0
  974. package/dist/utils/featurebase.d.ts +30 -0
  975. package/dist/utils/featurebase.d.ts.map +1 -0
  976. package/dist/utils/featurebase.js +168 -0
  977. package/dist/utils/featurebase.js.map +1 -0
  978. package/dist/utils/fs.d.ts +9 -0
  979. package/dist/utils/fs.d.ts.map +1 -0
  980. package/dist/utils/fs.js +31 -0
  981. package/dist/utils/fs.js.map +1 -0
  982. package/dist/utils/functions.d.ts +6 -0
  983. package/dist/utils/functions.d.ts.map +1 -0
  984. package/dist/utils/functions.js +37 -0
  985. package/dist/utils/functions.js.map +1 -0
  986. package/dist/utils/geo.d.ts +24 -0
  987. package/dist/utils/geo.d.ts.map +1 -0
  988. package/dist/utils/geo.js +18 -0
  989. package/dist/utils/geo.js.map +1 -0
  990. package/dist/utils/globals.d.ts +13 -0
  991. package/dist/utils/globals.d.ts.map +1 -0
  992. package/dist/utils/globals.js +40 -0
  993. package/dist/utils/globals.js.map +1 -0
  994. package/dist/utils/hashes.d.ts +9 -0
  995. package/dist/utils/hashes.d.ts.map +1 -0
  996. package/dist/utils/hashes.js +47 -0
  997. package/dist/utils/hashes.js.map +1 -0
  998. package/dist/utils/html.d.ts +7 -0
  999. package/dist/utils/html.d.ts.map +1 -0
  1000. package/dist/utils/html.js +37 -0
  1001. package/dist/utils/html.js.map +1 -0
  1002. package/dist/utils/http.d.ts +45 -0
  1003. package/dist/utils/http.d.ts.map +1 -0
  1004. package/dist/utils/http.js +79 -0
  1005. package/dist/utils/http.js.map +1 -0
  1006. package/dist/utils/ips.d.ts +8 -0
  1007. package/dist/utils/ips.d.ts.map +1 -0
  1008. package/dist/utils/ips.js +40 -0
  1009. package/dist/utils/ips.js.map +1 -0
  1010. package/dist/utils/json.d.ts +15 -0
  1011. package/dist/utils/json.d.ts.map +1 -0
  1012. package/dist/utils/json.js +182 -0
  1013. package/dist/utils/json.js.map +1 -0
  1014. package/dist/utils/jsx-editable-transpiler.d.ts +68 -0
  1015. package/dist/utils/jsx-editable-transpiler.d.ts.map +1 -0
  1016. package/dist/utils/jsx-editable-transpiler.js +223 -0
  1017. package/dist/utils/jsx-editable-transpiler.js.map +1 -0
  1018. package/dist/utils/jsx-editable-transpiler.test.d.ts +1 -0
  1019. package/dist/utils/jsx-editable-transpiler.test.js +122 -0
  1020. package/dist/utils/jsx-editable-transpiler.test.js.map +1 -0
  1021. package/dist/utils/jwt.d.ts +79 -0
  1022. package/dist/utils/jwt.d.ts.map +1 -0
  1023. package/dist/utils/jwt.js +112 -0
  1024. package/dist/utils/jwt.js.map +1 -0
  1025. package/dist/utils/locks.d.ts +17 -0
  1026. package/dist/utils/locks.d.ts.map +1 -0
  1027. package/dist/utils/locks.js +56 -0
  1028. package/dist/utils/locks.js.map +1 -0
  1029. package/dist/utils/maps.d.ts +61 -0
  1030. package/dist/utils/maps.d.ts.map +1 -0
  1031. package/dist/utils/maps.js +302 -0
  1032. package/dist/utils/maps.js.map +1 -0
  1033. package/dist/utils/math.d.ts +8 -0
  1034. package/dist/utils/math.d.ts.map +1 -0
  1035. package/dist/utils/math.js +23 -0
  1036. package/dist/utils/math.js.map +1 -0
  1037. package/dist/utils/monkey-patch.d.ts +7 -0
  1038. package/dist/utils/monkey-patch.d.ts.map +1 -0
  1039. package/dist/utils/monkey-patch.js +25 -0
  1040. package/dist/utils/monkey-patch.js.map +1 -0
  1041. package/dist/utils/node-http.d.ts +17 -0
  1042. package/dist/utils/node-http.d.ts.map +1 -0
  1043. package/dist/utils/node-http.js +40 -0
  1044. package/dist/utils/node-http.js.map +1 -0
  1045. package/dist/utils/numbers.d.ts +7 -0
  1046. package/dist/utils/numbers.d.ts.map +1 -0
  1047. package/dist/utils/numbers.js +79 -0
  1048. package/dist/utils/numbers.js.map +1 -0
  1049. package/dist/utils/oauth.d.ts +11 -0
  1050. package/dist/utils/oauth.d.ts.map +1 -0
  1051. package/dist/utils/oauth.js +32 -0
  1052. package/dist/utils/oauth.js.map +1 -0
  1053. package/dist/utils/objects.d.ts +59 -0
  1054. package/dist/utils/objects.d.ts.map +1 -0
  1055. package/dist/utils/objects.js +846 -0
  1056. package/dist/utils/objects.js.map +1 -0
  1057. package/dist/utils/paginated-lists.d.ts +442 -0
  1058. package/dist/utils/paginated-lists.d.ts.map +1 -0
  1059. package/dist/utils/paginated-lists.js +414 -0
  1060. package/dist/utils/paginated-lists.js.map +1 -0
  1061. package/dist/utils/paginated-lists.test.d.ts +1 -0
  1062. package/dist/utils/paginated-lists.test.js +1304 -0
  1063. package/dist/utils/paginated-lists.test.js.map +1 -0
  1064. package/dist/utils/passkey.d.ts +2 -0
  1065. package/dist/utils/passkey.js +0 -0
  1066. package/dist/utils/promises.d.ts +80 -0
  1067. package/dist/utils/promises.d.ts.map +1 -0
  1068. package/dist/utils/promises.js +349 -0
  1069. package/dist/utils/promises.js.map +1 -0
  1070. package/dist/utils/proxies.d.ts +13 -0
  1071. package/dist/utils/proxies.d.ts.map +1 -0
  1072. package/dist/utils/proxies.js +201 -0
  1073. package/dist/utils/proxies.js.map +1 -0
  1074. package/dist/utils/react.d.ts +61 -0
  1075. package/dist/utils/react.d.ts.map +1 -0
  1076. package/dist/utils/react.js +243 -0
  1077. package/dist/utils/react.js.map +1 -0
  1078. package/dist/utils/redirect-urls.d.ts +30 -0
  1079. package/dist/utils/redirect-urls.d.ts.map +1 -0
  1080. package/dist/utils/redirect-urls.js +222 -0
  1081. package/dist/utils/redirect-urls.js.map +1 -0
  1082. package/dist/utils/regex.d.ts +5 -0
  1083. package/dist/utils/regex.d.ts.map +1 -0
  1084. package/dist/utils/regex.js +15 -0
  1085. package/dist/utils/regex.js.map +1 -0
  1086. package/dist/utils/results.d.ts +70 -0
  1087. package/dist/utils/results.d.ts.map +1 -0
  1088. package/dist/utils/results.js +342 -0
  1089. package/dist/utils/results.js.map +1 -0
  1090. package/dist/utils/sentry.d.ts +13 -0
  1091. package/dist/utils/sentry.d.ts.map +1 -0
  1092. package/dist/utils/sentry.js +16 -0
  1093. package/dist/utils/sentry.js.map +1 -0
  1094. package/dist/utils/stores.d.ts +104 -0
  1095. package/dist/utils/stores.d.ts.map +1 -0
  1096. package/dist/utils/stores.js +179 -0
  1097. package/dist/utils/stores.js.map +1 -0
  1098. package/dist/utils/strings.d.ts +76 -0
  1099. package/dist/utils/strings.d.ts.map +1 -0
  1100. package/dist/utils/strings.js +549 -0
  1101. package/dist/utils/strings.js.map +1 -0
  1102. package/dist/utils/strings.nicify.test.d.ts +1 -0
  1103. package/dist/utils/strings.nicify.test.js +243 -0
  1104. package/dist/utils/strings.nicify.test.js.map +1 -0
  1105. package/dist/utils/telemetry.d.ts +15 -0
  1106. package/dist/utils/telemetry.d.ts.map +1 -0
  1107. package/dist/utils/telemetry.js +35 -0
  1108. package/dist/utils/telemetry.js.map +1 -0
  1109. package/dist/utils/turnstile-browser.d.ts +32 -0
  1110. package/dist/utils/turnstile-browser.d.ts.map +1 -0
  1111. package/dist/utils/turnstile-browser.js +65 -0
  1112. package/dist/utils/turnstile-browser.js.map +1 -0
  1113. package/dist/utils/turnstile-flow.d.ts +29 -0
  1114. package/dist/utils/turnstile-flow.d.ts.map +1 -0
  1115. package/dist/utils/turnstile-flow.js +225 -0
  1116. package/dist/utils/turnstile-flow.js.map +1 -0
  1117. package/dist/utils/turnstile-flow.test.d.ts +1 -0
  1118. package/dist/utils/turnstile-flow.test.js +75 -0
  1119. package/dist/utils/turnstile-flow.test.js.map +1 -0
  1120. package/dist/utils/turnstile.d.ts +17 -0
  1121. package/dist/utils/turnstile.d.ts.map +1 -0
  1122. package/dist/utils/turnstile.js +31 -0
  1123. package/dist/utils/turnstile.js.map +1 -0
  1124. package/dist/utils/typed-arrays.d.ts +14 -0
  1125. package/dist/utils/typed-arrays.d.ts.map +1 -0
  1126. package/dist/utils/typed-arrays.js +22 -0
  1127. package/dist/utils/typed-arrays.js.map +1 -0
  1128. package/dist/utils/types.d.ts +77 -0
  1129. package/dist/utils/types.d.ts.map +1 -0
  1130. package/dist/utils/types.js +59 -0
  1131. package/dist/utils/types.js.map +1 -0
  1132. package/dist/utils/unicode.d.ts +5 -0
  1133. package/dist/utils/unicode.d.ts.map +1 -0
  1134. package/dist/utils/unicode.js +26 -0
  1135. package/dist/utils/unicode.js.map +1 -0
  1136. package/dist/utils/urls.d.ts +28 -0
  1137. package/dist/utils/urls.d.ts.map +1 -0
  1138. package/dist/utils/urls.js +274 -0
  1139. package/dist/utils/urls.js.map +1 -0
  1140. package/dist/utils/uuids.d.ts +6 -0
  1141. package/dist/utils/uuids.d.ts.map +1 -0
  1142. package/dist/utils/uuids.js +39 -0
  1143. package/dist/utils/uuids.js.map +1 -0
  1144. package/package.json +99 -0
@@ -0,0 +1,459 @@
1
+ import { HexclaveAssertionError } from "../utils/errors.js";
2
+ import { filterUndefined } from "../utils/objects.js";
3
+ import { Result } from "../utils/results.js";
4
+ import { KnownErrors } from "../known-errors.js";
5
+ import { urlString } from "../utils/urls.js";
6
+ import { InternalSession } from "../sessions.js";
7
+ import { HexclaveClientInterface } from "./client-interface.js";
8
+ import { decryptValue, encryptValue, hashKey } from "../helpers/vault/client-side.js";
9
+
10
+ //#region src/interface/server-interface.ts
11
+ var HexclaveServerInterface = class extends HexclaveClientInterface {
12
+ constructor(options) {
13
+ super(options);
14
+ this.options = options;
15
+ }
16
+ async sendServerRequest(path, options, session, requestType = "server") {
17
+ return await this.sendClientRequest(path, {
18
+ ...options,
19
+ headers: {
20
+ "x-hexclave-secret-server-key": "secretServerKey" in this.options ? this.options.secretServerKey : "",
21
+ ...options.headers
22
+ }
23
+ }, session, requestType);
24
+ }
25
+ async getCustomerBilling(customerType, customerId, session) {
26
+ return await (await this.sendServerRequest(urlString`/payments/billing/${customerType}/${customerId}`, {}, session)).json();
27
+ }
28
+ async createCustomerPaymentMethodSetupIntent(customerType, customerId, session) {
29
+ return await (await this.sendServerRequest(urlString`/payments/payment-method/${customerType}/${customerId}/setup-intent`, {
30
+ method: "POST",
31
+ headers: { "content-type": "application/json" },
32
+ body: JSON.stringify({})
33
+ }, session)).json();
34
+ }
35
+ async setDefaultCustomerPaymentMethodFromSetupIntent(customerType, customerId, setupIntentId, session) {
36
+ return await (await this.sendServerRequest(urlString`/payments/payment-method/${customerType}/${customerId}/set-default`, {
37
+ method: "POST",
38
+ headers: { "content-type": "application/json" },
39
+ body: JSON.stringify({ setup_intent_id: setupIntentId })
40
+ }, session)).json();
41
+ }
42
+ async sendServerRequestAndCatchKnownError(path, requestOptions, tokenStoreOrNull, errorsToCatch) {
43
+ try {
44
+ return Result.ok(await this.sendServerRequest(path, requestOptions, tokenStoreOrNull));
45
+ } catch (e) {
46
+ for (const errorType of errorsToCatch) if (errorType.isInstance(e)) return Result.error(e);
47
+ throw e;
48
+ }
49
+ }
50
+ async createServerUser(data) {
51
+ return await (await this.sendServerRequest("/users", {
52
+ method: "POST",
53
+ headers: { "content-type": "application/json" },
54
+ body: JSON.stringify(data)
55
+ }, null)).json();
56
+ }
57
+ async getServerUserByToken(session) {
58
+ const responseOrError = await this.sendServerRequestAndCatchKnownError("/users/me", {}, session, [KnownErrors.CannotGetOwnUserWithoutUser]);
59
+ if (responseOrError.status === "error") if (KnownErrors.CannotGetOwnUserWithoutUser.isInstance(responseOrError.error)) return null;
60
+ else throw new HexclaveAssertionError("Unexpected uncaught error", { cause: responseOrError.error });
61
+ const user = await responseOrError.data.json();
62
+ if (!user) throw new HexclaveAssertionError("User endpoint returned null; this should never happen");
63
+ return user;
64
+ }
65
+ async getServerUserById(userId) {
66
+ const responseOrError = await this.sendServerRequestAndCatchKnownError(urlString`/users/${userId}`, {}, null, [KnownErrors.UserNotFound]);
67
+ if (responseOrError.status === "error") return Result.error(responseOrError.error);
68
+ const user = await responseOrError.data.json();
69
+ return Result.ok(user);
70
+ }
71
+ async listServerTeamInvitations(options) {
72
+ return (await (await this.sendServerRequest(urlString`/team-invitations?team_id=${options.teamId}`, {}, null)).json()).items;
73
+ }
74
+ async revokeServerTeamInvitation(invitationId, teamId) {
75
+ await this.sendServerRequest(urlString`/team-invitations/${invitationId}?team_id=${teamId}`, { method: "DELETE" }, null);
76
+ }
77
+ async listServerTeamMemberProfiles(options) {
78
+ return (await (await this.sendServerRequest(urlString`/team-member-profiles?team_id=${options.teamId}`, {}, null)).json()).items;
79
+ }
80
+ async getServerTeamMemberProfile(options) {
81
+ return await (await this.sendServerRequest(urlString`/team-member-profiles/${options.teamId}/${options.userId}`, {}, null)).json();
82
+ }
83
+ async listServerTeamPermissions(options, session) {
84
+ return (await (await this.sendServerRequest(`/team-permissions?${new URLSearchParams(filterUndefined({
85
+ user_id: options.userId,
86
+ team_id: options.teamId,
87
+ recursive: options.recursive.toString()
88
+ }))}`, {}, session)).json()).items;
89
+ }
90
+ async listServerProjectPermissions(options, session) {
91
+ return (await (await this.sendServerRequest(`/project-permissions?${new URLSearchParams(filterUndefined({
92
+ user_id: options.userId,
93
+ recursive: options.recursive.toString()
94
+ }))}`, {}, session)).json()).items;
95
+ }
96
+ async listServerUsers(options) {
97
+ const searchParams = new URLSearchParams(filterUndefined({
98
+ cursor: options.cursor,
99
+ limit: options.limit?.toString(),
100
+ desc: options.desc?.toString(),
101
+ team_id: options.teamId,
102
+ ...options.orderBy ? { order_by: {
103
+ signedUpAt: "signed_up_at",
104
+ lastActiveAt: "last_active_at"
105
+ }[options.orderBy] } : {},
106
+ ...options.query ? { query: options.query } : {},
107
+ ...options.includeRestricted ? { include_restricted: "true" } : {},
108
+ ...options.includeAnonymous ? { include_anonymous: "true" } : {},
109
+ ...options.onlyAnonymous ? { only_anonymous: "true" } : {}
110
+ }));
111
+ return await (await this.sendServerRequest("/users?" + searchParams.toString(), {}, null)).json();
112
+ }
113
+ async listServerTeams(options) {
114
+ return (await this.listServerTeamsPaginated(options)).items;
115
+ }
116
+ async listServerTeamsPaginated(options) {
117
+ return await (await this.sendServerRequest(`/teams?${new URLSearchParams(filterUndefined({
118
+ user_id: options?.userId,
119
+ order_by: options?.orderBy === "createdAt" ? "created_at" : options?.orderBy,
120
+ desc: options?.desc !== void 0 ? String(options.desc) : void 0,
121
+ cursor: options?.cursor,
122
+ limit: options?.limit?.toString(),
123
+ query: options?.query
124
+ }))}`, {}, null)).json();
125
+ }
126
+ async getServerTeam(teamId) {
127
+ return await (await this.sendServerRequest(`/teams/${teamId}`, {}, null)).json();
128
+ }
129
+ async listServerTeamUsers(teamId) {
130
+ return (await (await this.sendServerRequest(`/users?team_id=${teamId}`, {}, null)).json()).items;
131
+ }
132
+ async createServerTeam(data) {
133
+ return await (await this.sendServerRequest("/teams", {
134
+ method: "POST",
135
+ headers: { "content-type": "application/json" },
136
+ body: JSON.stringify(data)
137
+ }, null)).json();
138
+ }
139
+ async updateServerTeam(teamId, data) {
140
+ return await (await this.sendServerRequest(urlString`/teams/${teamId}`, {
141
+ method: "PATCH",
142
+ headers: { "content-type": "application/json" },
143
+ body: JSON.stringify(data)
144
+ }, null)).json();
145
+ }
146
+ async deleteServerTeam(teamId) {
147
+ await this.sendServerRequest(urlString`/teams/${teamId}`, { method: "DELETE" }, null);
148
+ }
149
+ async addServerUserToTeam(options) {
150
+ return await (await this.sendServerRequest(urlString`/team-memberships/${options.teamId}/${options.userId}`, {
151
+ method: "POST",
152
+ headers: { "content-type": "application/json" },
153
+ body: JSON.stringify({})
154
+ }, null)).json();
155
+ }
156
+ async removeServerUserFromTeam(options) {
157
+ await this.sendServerRequest(urlString`/team-memberships/${options.teamId}/${options.userId}`, {
158
+ method: "DELETE",
159
+ headers: { "content-type": "application/json" },
160
+ body: JSON.stringify({})
161
+ }, null);
162
+ }
163
+ async listServerUserTeamInvitations(userId) {
164
+ return (await (await this.sendServerRequest("/team-invitations?" + new URLSearchParams({ user_id: userId }), {}, null)).json()).items;
165
+ }
166
+ async acceptServerTeamInvitationById(invitationId, userId) {
167
+ await this.sendServerRequest(urlString`/team-invitations/${invitationId}/accept` + "?" + new URLSearchParams({ user_id: userId }), { method: "POST" }, null);
168
+ }
169
+ async updateServerUser(userId, update) {
170
+ return await (await this.sendServerRequest(urlString`/users/${userId}`, {
171
+ method: "PATCH",
172
+ headers: { "content-type": "application/json" },
173
+ body: JSON.stringify(update)
174
+ }, null)).json();
175
+ }
176
+ async createServerProviderAccessToken(userId, provider, scope) {
177
+ return await (await this.sendServerRequest(urlString`/connected-accounts/${userId}/${provider}/access-token`, {
178
+ method: "POST",
179
+ headers: { "content-type": "application/json" },
180
+ body: JSON.stringify({ scope })
181
+ }, null)).json();
182
+ }
183
+ /**
184
+ * Get access token for a specific connected account by provider ID and provider account ID.
185
+ * This is the preferred method when dealing with multiple accounts of the same provider.
186
+ */
187
+ async createServerProviderAccessTokenByAccount(userId, providerId, providerAccountId, scope) {
188
+ return await (await this.sendServerRequest(urlString`/connected-accounts/${userId}/${providerId}/${providerAccountId}/access-token`, {
189
+ method: "POST",
190
+ headers: { "content-type": "application/json" },
191
+ body: JSON.stringify({ scope })
192
+ }, null)).json();
193
+ }
194
+ /**
195
+ * List all connected accounts for a user.
196
+ */
197
+ async listServerConnectedAccounts(userId) {
198
+ return await (await this.sendServerRequest(urlString`/connected-accounts/${userId}`, { method: "GET" }, null)).json();
199
+ }
200
+ async createServerUserSession(userId, expiresInMillis, isImpersonation) {
201
+ const result = await (await this.sendServerRequest("/auth/sessions", {
202
+ method: "POST",
203
+ headers: { "content-type": "application/json" },
204
+ body: JSON.stringify({
205
+ user_id: userId,
206
+ expires_in_millis: expiresInMillis,
207
+ is_impersonation: isImpersonation
208
+ })
209
+ }, null)).json();
210
+ return {
211
+ accessToken: result.access_token,
212
+ refreshToken: result.refresh_token
213
+ };
214
+ }
215
+ async leaveServerTeam(options) {
216
+ await this.sendClientRequest(urlString`/team-memberships/${options.teamId}/${options.userId}`, {
217
+ method: "DELETE",
218
+ headers: { "content-type": "application/json" },
219
+ body: JSON.stringify({})
220
+ }, null);
221
+ }
222
+ async updateServerTeamMemberProfile(options) {
223
+ await this.sendServerRequest(urlString`/team-member-profiles/${options.teamId}/${options.userId}`, {
224
+ method: "PATCH",
225
+ headers: { "content-type": "application/json" },
226
+ body: JSON.stringify(options.profile)
227
+ }, null);
228
+ }
229
+ async grantServerTeamUserPermission(teamId, userId, permissionId) {
230
+ await this.sendServerRequest(urlString`/team-permissions/${teamId}/${userId}/${permissionId}`, {
231
+ method: "POST",
232
+ headers: { "content-type": "application/json" },
233
+ body: JSON.stringify({})
234
+ }, null);
235
+ }
236
+ async grantServerProjectPermission(userId, permissionId) {
237
+ await this.sendServerRequest(urlString`/project-permissions/${userId}/${permissionId}`, {
238
+ method: "POST",
239
+ headers: { "content-type": "application/json" },
240
+ body: JSON.stringify({})
241
+ }, null);
242
+ }
243
+ async revokeServerTeamUserPermission(teamId, userId, permissionId) {
244
+ await this.sendServerRequest(urlString`/team-permissions/${teamId}/${userId}/${permissionId}`, {
245
+ method: "DELETE",
246
+ headers: { "content-type": "application/json" },
247
+ body: JSON.stringify({})
248
+ }, null);
249
+ }
250
+ async revokeServerProjectPermission(userId, permissionId) {
251
+ await this.sendServerRequest(urlString`/project-permissions/${userId}/${permissionId}`, {
252
+ method: "DELETE",
253
+ headers: { "content-type": "application/json" },
254
+ body: JSON.stringify({})
255
+ }, null);
256
+ }
257
+ async deleteServerUser(userId) {
258
+ await this.sendServerRequest(urlString`/users/${userId}`, {
259
+ method: "DELETE",
260
+ headers: { "content-type": "application/json" },
261
+ body: JSON.stringify({})
262
+ }, null);
263
+ }
264
+ async createServerContactChannel(data) {
265
+ return await (await this.sendServerRequest("/contact-channels", {
266
+ method: "POST",
267
+ headers: { "content-type": "application/json" },
268
+ body: JSON.stringify(data)
269
+ }, null)).json();
270
+ }
271
+ async updateServerContactChannel(userId, contactChannelId, data) {
272
+ return await (await this.sendServerRequest(urlString`/contact-channels/${userId}/${contactChannelId}`, {
273
+ method: "PATCH",
274
+ headers: { "content-type": "application/json" },
275
+ body: JSON.stringify(data)
276
+ }, null)).json();
277
+ }
278
+ async deleteServerContactChannel(userId, contactChannelId) {
279
+ await this.sendServerRequest(urlString`/contact-channels/${userId}/${contactChannelId}`, { method: "DELETE" }, null);
280
+ }
281
+ async listServerContactChannels(userId) {
282
+ return (await (await this.sendServerRequest(urlString`/contact-channels?user_id=${userId}`, { method: "GET" }, null)).json()).items;
283
+ }
284
+ async listServerNotificationCategories(userId) {
285
+ return (await (await this.sendServerRequest(urlString`/emails/notification-preference/${userId}`, { method: "GET" }, null)).json()).items;
286
+ }
287
+ async setServerNotificationsEnabled(userId, notificationCategoryId, enabled) {
288
+ await this.sendServerRequest(urlString`/emails/notification-preference/${userId}/${notificationCategoryId}`, {
289
+ method: "PATCH",
290
+ headers: { "content-type": "application/json" },
291
+ body: JSON.stringify({ enabled })
292
+ }, null);
293
+ }
294
+ async sendServerContactChannelVerificationEmail(userId, contactChannelId, callbackUrl) {
295
+ await this.sendServerRequest(urlString`/contact-channels/${userId}/${contactChannelId}/send-verification-code`, {
296
+ method: "POST",
297
+ headers: { "content-type": "application/json" },
298
+ body: JSON.stringify({ callback_url: callbackUrl })
299
+ }, null);
300
+ }
301
+ async listServerSessions(userId) {
302
+ return await (await this.sendServerRequest(urlString`/auth/sessions?user_id=${userId}`, { method: "GET" }, null)).json();
303
+ }
304
+ async deleteServerSession(sessionId) {
305
+ await this.sendServerRequest(urlString`/auth/sessions/${sessionId}`, { method: "DELETE" }, null);
306
+ }
307
+ async sendServerTeamInvitation(options) {
308
+ await this.sendServerRequest("/team-invitations/send-code", {
309
+ method: "POST",
310
+ headers: { "Content-Type": "application/json" },
311
+ body: JSON.stringify({
312
+ email: options.email,
313
+ team_id: options.teamId,
314
+ callback_url: options.callbackUrl
315
+ })
316
+ }, null);
317
+ }
318
+ async updatePassword(options) {
319
+ const res = await this.sendServerRequestAndCatchKnownError("/auth/password/update", {
320
+ method: "POST",
321
+ headers: { "Content-Type": "application/json" },
322
+ body: JSON.stringify({
323
+ old_password: options.oldPassword,
324
+ new_password: options.newPassword
325
+ })
326
+ }, null, [KnownErrors.PasswordConfirmationMismatch, KnownErrors.PasswordRequirementsNotMet]);
327
+ if (res.status === "error") return res.error;
328
+ }
329
+ async createServerOAuthProvider(data) {
330
+ return await (await this.sendServerRequest("/oauth-providers", {
331
+ method: "POST",
332
+ headers: { "content-type": "application/json" },
333
+ body: JSON.stringify(data)
334
+ }, null)).json();
335
+ }
336
+ async listServerOAuthProviders(options = {}) {
337
+ const queryParams = new URLSearchParams(filterUndefined(options));
338
+ return (await (await this.sendServerRequest(`/oauth-providers${queryParams.toString() ? `?${queryParams.toString()}` : ""}`, { method: "GET" }, null)).json()).items;
339
+ }
340
+ async updateServerOAuthProvider(userId, providerId, data) {
341
+ return await (await this.sendServerRequest(urlString`/oauth-providers/${userId}/${providerId}`, {
342
+ method: "PATCH",
343
+ headers: { "content-type": "application/json" },
344
+ body: JSON.stringify(data)
345
+ }, null)).json();
346
+ }
347
+ async deleteServerOAuthProvider(userId, providerId) {
348
+ return await (await this.sendServerRequest(urlString`/oauth-providers/${userId}/${providerId}`, { method: "DELETE" }, null)).json();
349
+ }
350
+ async sendEmail(options) {
351
+ await this.sendServerRequest("/emails/send-email", {
352
+ method: "POST",
353
+ headers: { "Content-Type": "application/json" },
354
+ body: JSON.stringify({
355
+ user_ids: options.userIds,
356
+ all_users: options.allUsers,
357
+ theme_id: options.themeId,
358
+ html: options.html,
359
+ subject: options.subject,
360
+ notification_category_name: options.notificationCategoryName,
361
+ template_id: options.templateId,
362
+ variables: options.variables,
363
+ draft_id: options.draftId,
364
+ scheduled_at_millis: options.scheduledAt?.getTime()
365
+ })
366
+ }, null);
367
+ return Result.ok(void 0);
368
+ }
369
+ async getEmailDeliveryInfo() {
370
+ return await (await this.sendServerRequest("/emails/delivery-info", {
371
+ method: "GET",
372
+ headers: { "Content-Type": "application/json" }
373
+ }, null)).json();
374
+ }
375
+ async activateEmailCapacityBoost() {
376
+ return await (await this.sendServerRequest("/emails/capacity-boost", {
377
+ method: "POST",
378
+ headers: { "Content-Type": "application/json" },
379
+ body: JSON.stringify({})
380
+ }, null)).json();
381
+ }
382
+ async updateItemQuantity(options, data) {
383
+ let customerType;
384
+ let customerId;
385
+ const itemId = options.itemId;
386
+ if ("userId" in options) {
387
+ customerType = "user";
388
+ customerId = options.userId;
389
+ } else if ("teamId" in options) {
390
+ customerType = "team";
391
+ customerId = options.teamId;
392
+ } else if ("customCustomerId" in options) {
393
+ customerType = "custom";
394
+ customerId = options.customCustomerId;
395
+ } else throw new HexclaveAssertionError("updateItemQuantity requires one of userId, teamId, or customCustomerId");
396
+ const queryParams = new URLSearchParams({ allow_negative: (data.allow_negative ?? false).toString() });
397
+ await this.sendServerRequest(`/payments/items/${customerType}/${customerId}/${itemId}/update-quantity?${queryParams.toString()}`, {
398
+ method: "POST",
399
+ headers: { "content-type": "application/json" },
400
+ body: JSON.stringify({
401
+ delta: data.delta,
402
+ expires_at: data.expires_at,
403
+ description: data.description
404
+ })
405
+ }, null);
406
+ }
407
+ async grantProduct(options) {
408
+ if (!options.productId && !options.product) throw new HexclaveAssertionError("grantProduct requires either productId or product");
409
+ if (options.productId && options.product) throw new HexclaveAssertionError("grantProduct should not receive both productId and product");
410
+ const body = filterUndefined({
411
+ product_id: options.productId,
412
+ product_inline: options.product,
413
+ quantity: options.quantity
414
+ });
415
+ await this.sendServerRequest(urlString`/payments/products/${options.customerType}/${options.customerId}`, {
416
+ method: "POST",
417
+ headers: { "content-type": "application/json" },
418
+ body: JSON.stringify(body)
419
+ }, null);
420
+ }
421
+ async getDataVaultStoreValue(secret, storeId, key) {
422
+ const hashedKey = await hashKey(secret, key);
423
+ const response = await this.sendServerRequestAndCatchKnownError(`/data-vault/stores/${storeId}/get`, {
424
+ method: "POST",
425
+ headers: { "content-type": "application/json" },
426
+ body: JSON.stringify({ hashed_key: hashedKey })
427
+ }, null, [KnownErrors.DataVaultStoreHashedKeyDoesNotExist]);
428
+ if (response.status === "error") if (KnownErrors.DataVaultStoreHashedKeyDoesNotExist.isInstance(response.error)) return null;
429
+ else throw new HexclaveAssertionError("Unexpected uncaught error", { cause: response.error });
430
+ const encryptedValue = (await response.data.json()).encrypted_value;
431
+ if (typeof encryptedValue !== "string") throw new HexclaveAssertionError("encrypted_value is not a string", { type: typeof encryptedValue });
432
+ return await decryptValue(secret, key, encryptedValue);
433
+ }
434
+ async setDataVaultStoreValue(secret, storeId, key, value) {
435
+ const hashedKey = await hashKey(secret, key);
436
+ const encryptedValue = await encryptValue(secret, key, value);
437
+ await this.sendServerRequest(`/data-vault/stores/${storeId}/set`, {
438
+ method: "POST",
439
+ headers: { "content-type": "application/json" },
440
+ body: JSON.stringify({
441
+ hashed_key: hashedKey,
442
+ encrypted_value: encryptedValue
443
+ })
444
+ }, null);
445
+ }
446
+ async initiateServerPasskeyRegistration(userId) {
447
+ const { accessToken, refreshToken } = await this.createServerUserSession(userId, 6e4 * 2, false);
448
+ const tempSession = new InternalSession({
449
+ accessToken,
450
+ refreshToken,
451
+ refreshAccessTokenCallback: async () => null
452
+ });
453
+ return await this.initiatePasskeyRegistration({}, tempSession);
454
+ }
455
+ };
456
+
457
+ //#endregion
458
+ export { HexclaveServerInterface };
459
+ //# sourceMappingURL=server-interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-interface.js","names":[],"sources":["../../../src/interface/server-interface.ts"],"sourcesContent":["import * as yup from \"yup\";\nimport { decryptValue, encryptValue, hashKey } from \"../helpers/vault/client-side\";\nimport { KnownErrors } from \"../known-errors\";\nimport { inlineProductSchema } from \"../schema-fields\";\nimport { AccessToken, InternalSession, RefreshToken } from \"../sessions\";\nimport { HexclaveAssertionError } from \"../utils/errors\";\nimport { filterUndefined } from \"../utils/objects\";\nimport { Result } from \"../utils/results\";\nimport { urlString } from \"../utils/urls\";\nimport {\n ClientInterfaceOptions,\n HexclaveClientInterface\n} from \"./client-interface\";\nimport { ConnectedAccountAccessTokenCrud, ConnectedAccountCrud } from \"./crud/connected-accounts\";\nimport { ContactChannelsCrud } from \"./crud/contact-channels\";\nimport { CurrentUserCrud } from \"./crud/current-user\";\nimport { ItemCrud } from \"./crud/items\";\nimport { NotificationPreferenceCrud } from \"./crud/notification-preferences\";\nimport { OAuthProviderCrud } from \"./crud/oauth-providers\";\nimport { ProjectPermissionsCrud } from \"./crud/project-permissions\";\nimport { SessionsCrud } from \"./crud/sessions\";\nimport { TeamInvitationCrud } from \"./crud/team-invitation\";\nimport { TeamMemberProfilesCrud } from \"./crud/team-member-profiles\";\nimport { TeamMembershipsCrud } from \"./crud/team-memberships\";\nimport { TeamPermissionsCrud } from \"./crud/team-permissions\";\nimport { TeamsCrud } from \"./crud/teams\";\nimport { UsersCrud } from \"./crud/users\";\n\nexport type ServerAuthApplicationOptions = (\n & ClientInterfaceOptions\n & (\n | {\n readonly secretServerKey: string,\n }\n | {\n readonly projectOwnerSession: InternalSession | (() => Promise<string | null>),\n }\n )\n);\n\nexport class HexclaveServerInterface extends HexclaveClientInterface {\n constructor(public override options: ServerAuthApplicationOptions) {\n super(options);\n }\n\n protected async sendServerRequest(path: string, options: RequestInit, session: InternalSession | null, requestType: \"server\" | \"admin\" = \"server\") {\n return await this.sendClientRequest(\n path,\n {\n ...options,\n headers: {\n // Hexclave rebrand: emit x-hexclave-* request header; the backend proxy dual-accepts both names.\n \"x-hexclave-secret-server-key\": \"secretServerKey\" in this.options ? this.options.secretServerKey : \"\",\n ...options.headers,\n },\n },\n session,\n requestType,\n );\n }\n\n override async getCustomerBilling(\n customerType: \"user\" | \"team\",\n customerId: string,\n session: InternalSession | null,\n ): Promise<{\n has_customer: boolean,\n default_payment_method: {\n id: string,\n brand: string | null,\n last4: string | null,\n exp_month: number | null,\n exp_year: number | null,\n } | null,\n }> {\n const response = await this.sendServerRequest(\n urlString`/payments/billing/${customerType}/${customerId}`,\n {},\n session,\n );\n return await response.json();\n }\n\n override async createCustomerPaymentMethodSetupIntent(\n customerType: \"user\" | \"team\",\n customerId: string,\n session: InternalSession | null,\n ): Promise<{\n client_secret: string,\n stripe_account_id: string,\n }> {\n const response = await this.sendServerRequest(\n urlString`/payments/payment-method/${customerType}/${customerId}/setup-intent`,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({}),\n },\n session,\n );\n return await response.json();\n }\n\n override async setDefaultCustomerPaymentMethodFromSetupIntent(\n customerType: \"user\" | \"team\",\n customerId: string,\n setupIntentId: string,\n session: InternalSession | null,\n ): Promise<{\n default_payment_method: {\n id: string,\n brand: string | null,\n last4: string | null,\n exp_month: number | null,\n exp_year: number | null,\n },\n }> {\n const response = await this.sendServerRequest(\n urlString`/payments/payment-method/${customerType}/${customerId}/set-default`,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({\n setup_intent_id: setupIntentId,\n }),\n },\n session,\n );\n return await response.json();\n }\n\n\n protected async sendServerRequestAndCatchKnownError<E extends typeof KnownErrors[keyof KnownErrors]>(\n path: string,\n requestOptions: RequestInit,\n tokenStoreOrNull: InternalSession | null,\n errorsToCatch: readonly E[],\n ): Promise<Result<\n Response & {\n usedTokens: {\n accessToken: AccessToken,\n refreshToken: RefreshToken | null,\n } | null,\n },\n InstanceType<E>\n >> {\n try {\n return Result.ok(await this.sendServerRequest(path, requestOptions, tokenStoreOrNull));\n } catch (e) {\n for (const errorType of errorsToCatch) {\n if (errorType.isInstance(e)) {\n return Result.error(e as InstanceType<E>);\n }\n }\n throw e;\n }\n }\n\n async createServerUser(data: UsersCrud['Server']['Create']): Promise<UsersCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n \"/users\",\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(data),\n },\n null,\n );\n return await response.json();\n }\n\n async getServerUserByToken(session: InternalSession): Promise<CurrentUserCrud['Server']['Read'] | null> {\n const responseOrError = await this.sendServerRequestAndCatchKnownError(\n \"/users/me\",\n {},\n session,\n [KnownErrors.CannotGetOwnUserWithoutUser],\n );\n if (responseOrError.status === \"error\") {\n if (KnownErrors.CannotGetOwnUserWithoutUser.isInstance(responseOrError.error)) {\n return null;\n } else {\n throw new HexclaveAssertionError(\"Unexpected uncaught error\", { cause: responseOrError.error });\n }\n }\n const response = responseOrError.data;\n const user: CurrentUserCrud['Server']['Read'] = await response.json();\n if (!(user as any)) throw new HexclaveAssertionError(\"User endpoint returned null; this should never happen\");\n return user;\n }\n\n async getServerUserById(userId: string): Promise<Result<UsersCrud['Server']['Read']>> {\n const responseOrError = await this.sendServerRequestAndCatchKnownError(\n urlString`/users/${userId}`,\n {},\n null,\n [KnownErrors.UserNotFound],\n );\n if (responseOrError.status === \"error\") {\n return Result.error(responseOrError.error);\n }\n const user: UsersCrud['Server']['Read'] = await responseOrError.data.json();\n return Result.ok(user);\n }\n\n async listServerTeamInvitations(options: {\n teamId: string,\n }): Promise<TeamInvitationCrud['Server']['Read'][]> {\n const response = await this.sendServerRequest(\n urlString`/team-invitations?team_id=${options.teamId}`,\n {},\n null,\n );\n const result = await response.json() as TeamInvitationCrud['Server']['List'];\n return result.items;\n }\n\n async revokeServerTeamInvitation(invitationId: string, teamId: string) {\n await this.sendServerRequest(\n urlString`/team-invitations/${invitationId}?team_id=${teamId}`,\n { method: \"DELETE\" },\n null,\n );\n }\n\n async listServerTeamMemberProfiles(\n options: {\n teamId: string,\n },\n ): Promise<TeamMemberProfilesCrud['Server']['Read'][]> {\n const response = await this.sendServerRequest(\n urlString`/team-member-profiles?team_id=${options.teamId}`,\n {},\n null,\n );\n const result = await response.json() as TeamMemberProfilesCrud['Server']['List'];\n return result.items;\n }\n\n async getServerTeamMemberProfile(\n options: {\n teamId: string,\n userId: string,\n },\n ): Promise<TeamMemberProfilesCrud['Client']['Read']> {\n const response = await this.sendServerRequest(\n urlString`/team-member-profiles/${options.teamId}/${options.userId}`,\n {},\n null,\n );\n return await response.json();\n }\n\n async listServerTeamPermissions(\n options: {\n userId?: string,\n teamId?: string,\n recursive: boolean,\n },\n session: InternalSession | null,\n ): Promise<TeamPermissionsCrud['Server']['Read'][]> {\n const response = await this.sendServerRequest(\n `/team-permissions?${new URLSearchParams(filterUndefined({\n user_id: options.userId,\n team_id: options.teamId,\n recursive: options.recursive.toString(),\n }))}`,\n {},\n session,\n );\n const result = await response.json() as TeamPermissionsCrud['Server']['List'];\n return result.items;\n }\n\n async listServerProjectPermissions(\n options: {\n userId?: string,\n recursive: boolean,\n },\n session: InternalSession | null,\n ): Promise<ProjectPermissionsCrud['Server']['Read'][]> {\n const response = await this.sendServerRequest(\n `/project-permissions?${new URLSearchParams(filterUndefined({\n user_id: options.userId,\n recursive: options.recursive.toString(),\n }))}`,\n {},\n session,\n );\n const result = await response.json() as ProjectPermissionsCrud['Server']['List'];\n return result.items;\n }\n\n async listServerUsers(options: (\n & {\n cursor?: string,\n limit?: number,\n orderBy?: 'signedUpAt' | 'lastActiveAt',\n desc?: boolean,\n query?: string,\n includeRestricted?: boolean,\n teamId?: string,\n }\n & (\n {\n includeAnonymous?: boolean,\n onlyAnonymous?: false,\n }\n | {\n includeAnonymous: true,\n onlyAnonymous: true,\n }\n )\n )): Promise<UsersCrud['Server']['List']> {\n const searchParams = new URLSearchParams(filterUndefined({\n cursor: options.cursor,\n limit: options.limit?.toString(),\n desc: options.desc?.toString(),\n team_id: options.teamId,\n ...options.orderBy ? {\n order_by: {\n signedUpAt: \"signed_up_at\",\n lastActiveAt: \"last_active_at\",\n }[options.orderBy],\n } : {},\n ...options.query ? {\n query: options.query,\n } : {},\n ...options.includeRestricted ? {\n include_restricted: 'true',\n } : {},\n ...options.includeAnonymous ? {\n include_anonymous: 'true',\n } : {},\n ...options.onlyAnonymous ? {\n only_anonymous: 'true',\n } : {},\n }));\n const response = await this.sendServerRequest(\"/users?\" + searchParams.toString(), {}, null);\n return await response.json();\n }\n\n async listServerTeams(options?: {\n userId?: string,\n }): Promise<TeamsCrud['Server']['Read'][]> {\n const result = await this.listServerTeamsPaginated(options);\n return result.items;\n }\n\n async listServerTeamsPaginated(options?: {\n userId?: string,\n orderBy?: 'createdAt',\n desc?: boolean,\n cursor?: string,\n limit?: number,\n query?: string,\n }): Promise<TeamsCrud['Server']['List']> {\n const response = await this.sendServerRequest(\n `/teams?${new URLSearchParams(filterUndefined({\n user_id: options?.userId,\n // SDK option uses camelCase `createdAt`; backend uses snake_case.\n order_by: options?.orderBy === 'createdAt' ? 'created_at' : options?.orderBy,\n desc: options?.desc !== undefined ? String(options.desc) : undefined,\n cursor: options?.cursor,\n limit: options?.limit?.toString(),\n query: options?.query,\n }))}`,\n {},\n null\n );\n return await response.json() as TeamsCrud['Server']['List'];\n }\n\n async getServerTeam(teamId: string): Promise<TeamsCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n `/teams/${teamId}`,\n {},\n null\n );\n return await response.json();\n }\n\n async listServerTeamUsers(teamId: string): Promise<UsersCrud['Server']['Read'][]> {\n const response = await this.sendServerRequest(`/users?team_id=${teamId}`, {}, null);\n const result = await response.json() as UsersCrud['Server']['List'];\n return result.items;\n }\n\n /* when passing a session, the user will be added to the team */\n async createServerTeam(data: TeamsCrud['Server']['Create']): Promise<TeamsCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n \"/teams\",\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(data),\n },\n null\n );\n return await response.json();\n }\n\n async updateServerTeam(teamId: string, data: TeamsCrud['Server']['Update']): Promise<TeamsCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n urlString`/teams/${teamId}`,\n {\n method: \"PATCH\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(data),\n },\n null,\n );\n return await response.json();\n }\n\n async deleteServerTeam(teamId: string): Promise<void> {\n await this.sendServerRequest(\n urlString`/teams/${teamId}`,\n { method: \"DELETE\" },\n null,\n );\n }\n\n async addServerUserToTeam(options: {\n userId: string,\n teamId: string,\n }): Promise<TeamMembershipsCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n urlString`/team-memberships/${options.teamId}/${options.userId}`,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({}),\n },\n null,\n );\n return await response.json();\n }\n\n async removeServerUserFromTeam(options: {\n userId: string,\n teamId: string,\n }) {\n await this.sendServerRequest(\n urlString`/team-memberships/${options.teamId}/${options.userId}`,\n {\n method: \"DELETE\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({}),\n },\n null,\n );\n }\n\n async listServerUserTeamInvitations(userId: string): Promise<TeamInvitationCrud['Server']['Read'][]> {\n const response = await this.sendServerRequest(\n \"/team-invitations?\" + new URLSearchParams({ user_id: userId }),\n {},\n null,\n );\n const result = await response.json() as TeamInvitationCrud['Server']['List'];\n return result.items;\n }\n\n async acceptServerTeamInvitationById(\n invitationId: string,\n userId: string,\n ) {\n await this.sendServerRequest(\n urlString`/team-invitations/${invitationId}/accept` + \"?\" + new URLSearchParams({ user_id: userId }),\n { method: \"POST\" },\n null,\n );\n }\n\n async updateServerUser(userId: string, update: UsersCrud['Server']['Update']): Promise<UsersCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n urlString`/users/${userId}`,\n {\n method: \"PATCH\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(update),\n },\n null,\n );\n return await response.json();\n }\n\n async createServerProviderAccessToken(\n userId: string,\n provider: string,\n scope: string,\n ): Promise<ConnectedAccountAccessTokenCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n urlString`/connected-accounts/${userId}/${provider}/access-token`,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({ scope }),\n },\n null,\n );\n return await response.json();\n }\n\n /**\n * Get access token for a specific connected account by provider ID and provider account ID.\n * This is the preferred method when dealing with multiple accounts of the same provider.\n */\n async createServerProviderAccessTokenByAccount(\n userId: string,\n providerId: string,\n providerAccountId: string,\n scope: string,\n ): Promise<ConnectedAccountAccessTokenCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n urlString`/connected-accounts/${userId}/${providerId}/${providerAccountId}/access-token`,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({ scope }),\n },\n null,\n );\n return await response.json();\n }\n\n /**\n * List all connected accounts for a user.\n */\n async listServerConnectedAccounts(\n userId: string,\n ): Promise<ConnectedAccountCrud['Server']['List']> {\n const response = await this.sendServerRequest(\n urlString`/connected-accounts/${userId}`,\n { method: \"GET\" },\n null,\n );\n return await response.json();\n }\n\n async createServerUserSession(userId: string, expiresInMillis: number, isImpersonation: boolean): Promise<{ accessToken: string, refreshToken: string }> {\n const response = await this.sendServerRequest(\n \"/auth/sessions\",\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({\n user_id: userId,\n expires_in_millis: expiresInMillis,\n is_impersonation: isImpersonation,\n }),\n },\n null,\n );\n const result = await response.json();\n return {\n accessToken: result.access_token,\n refreshToken: result.refresh_token,\n };\n }\n\n async leaveServerTeam(\n options: {\n teamId: string,\n userId: string,\n },\n ) {\n await this.sendClientRequest(\n urlString`/team-memberships/${options.teamId}/${options.userId}`,\n {\n method: \"DELETE\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({}),\n },\n null,\n );\n }\n\n async updateServerTeamMemberProfile(options: {\n teamId: string,\n userId: string,\n profile: TeamMemberProfilesCrud['Server']['Update'],\n }) {\n await this.sendServerRequest(\n urlString`/team-member-profiles/${options.teamId}/${options.userId}`,\n {\n method: \"PATCH\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(options.profile),\n },\n null,\n );\n }\n\n async grantServerTeamUserPermission(teamId: string, userId: string, permissionId: string) {\n await this.sendServerRequest(\n urlString`/team-permissions/${teamId}/${userId}/${permissionId}`,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({}),\n },\n null,\n );\n }\n\n async grantServerProjectPermission(userId: string, permissionId: string) {\n await this.sendServerRequest(\n urlString`/project-permissions/${userId}/${permissionId}`,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({}),\n },\n null,\n );\n }\n\n async revokeServerTeamUserPermission(teamId: string, userId: string, permissionId: string) {\n await this.sendServerRequest(\n urlString`/team-permissions/${teamId}/${userId}/${permissionId}`,\n {\n method: \"DELETE\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({}),\n },\n null,\n );\n }\n\n async revokeServerProjectPermission(userId: string, permissionId: string) {\n await this.sendServerRequest(\n urlString`/project-permissions/${userId}/${permissionId}`,\n {\n method: \"DELETE\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({}),\n },\n null,\n );\n }\n\n async deleteServerUser(userId: string) {\n await this.sendServerRequest(\n urlString`/users/${userId}`,\n {\n method: \"DELETE\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({}),\n },\n null,\n );\n }\n\n async createServerContactChannel(\n data: ContactChannelsCrud['Server']['Create'],\n ): Promise<ContactChannelsCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n \"/contact-channels\",\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(data),\n },\n null,\n );\n return await response.json();\n }\n\n async updateServerContactChannel(\n userId: string,\n contactChannelId: string,\n data: ContactChannelsCrud['Server']['Update'],\n ): Promise<ContactChannelsCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n urlString`/contact-channels/${userId}/${contactChannelId}`,\n {\n method: \"PATCH\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(data),\n },\n null,\n );\n return await response.json();\n }\n\n async deleteServerContactChannel(\n userId: string,\n contactChannelId: string,\n ): Promise<void> {\n await this.sendServerRequest(\n urlString`/contact-channels/${userId}/${contactChannelId}`,\n {\n method: \"DELETE\",\n },\n null,\n );\n }\n\n async listServerContactChannels(\n userId: string,\n ): Promise<ContactChannelsCrud['Server']['Read'][]> {\n const response = await this.sendServerRequest(\n urlString`/contact-channels?user_id=${userId}`,\n {\n method: \"GET\",\n },\n null,\n );\n const json = await response.json() as ContactChannelsCrud['Server']['List'];\n return json.items;\n }\n\n async listServerNotificationCategories(\n userId: string,\n ): Promise<NotificationPreferenceCrud['Server']['Read'][]> {\n const response = await this.sendServerRequest(\n urlString`/emails/notification-preference/${userId}`,\n {\n method: \"GET\",\n },\n null,\n );\n const json = await response.json() as NotificationPreferenceCrud['Server']['List'];\n return json.items;\n }\n\n async setServerNotificationsEnabled(\n userId: string,\n notificationCategoryId: string,\n enabled: boolean,\n ): Promise<void> {\n await this.sendServerRequest(\n urlString`/emails/notification-preference/${userId}/${notificationCategoryId}`,\n {\n method: \"PATCH\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({\n enabled,\n }),\n },\n null,\n );\n }\n\n async sendServerContactChannelVerificationEmail(\n userId: string,\n contactChannelId: string,\n callbackUrl: string,\n ): Promise<void> {\n await this.sendServerRequest(\n urlString`/contact-channels/${userId}/${contactChannelId}/send-verification-code`,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({ callback_url: callbackUrl }),\n },\n null,\n );\n }\n\n\n async listServerSessions(userId: string): Promise<SessionsCrud['Server']['List']> {\n const response = await this.sendServerRequest(\n urlString`/auth/sessions?user_id=${userId}`,\n {\n method: \"GET\",\n },\n null,\n );\n return await response.json();\n }\n\n async deleteServerSession(sessionId: string) {\n await this.sendServerRequest(\n urlString`/auth/sessions/${sessionId}`,\n {\n method: \"DELETE\",\n },\n null,\n );\n }\n\n\n async sendServerTeamInvitation(options: {\n email: string,\n teamId: string,\n callbackUrl: string,\n }): Promise<void> {\n await this.sendServerRequest(\n \"/team-invitations/send-code\",\n {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n email: options.email,\n team_id: options.teamId,\n callback_url: options.callbackUrl,\n }),\n },\n null,\n );\n }\n\n async updatePassword(\n options: { oldPassword: string, newPassword: string },\n ): Promise<KnownErrors[\"PasswordConfirmationMismatch\"] | KnownErrors[\"PasswordRequirementsNotMet\"] | undefined> {\n const res = await this.sendServerRequestAndCatchKnownError(\n \"/auth/password/update\",\n {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n old_password: options.oldPassword,\n new_password: options.newPassword,\n }),\n },\n null,\n [KnownErrors.PasswordConfirmationMismatch, KnownErrors.PasswordRequirementsNotMet]\n );\n\n if (res.status === \"error\") {\n return res.error;\n }\n }\n\n // OAuth Providers CRUD operations\n async createServerOAuthProvider(\n data: OAuthProviderCrud['Server']['Create'],\n ): Promise<OAuthProviderCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n \"/oauth-providers\",\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(data),\n },\n null,\n );\n return await response.json();\n }\n\n\n async listServerOAuthProviders(\n options: {\n user_id?: string,\n } = {},\n ): Promise<OAuthProviderCrud['Server']['Read'][]> {\n const queryParams = new URLSearchParams(filterUndefined(options));\n const response = await this.sendServerRequest(\n `/oauth-providers${queryParams.toString() ? `?${queryParams.toString()}` : ''}`,\n {\n method: \"GET\",\n },\n null,\n );\n const result = await response.json();\n return result.items;\n }\n\n async updateServerOAuthProvider(\n userId: string,\n providerId: string,\n data: OAuthProviderCrud['Server']['Update'],\n ): Promise<OAuthProviderCrud['Server']['Read']> {\n const response = await this.sendServerRequest(\n urlString`/oauth-providers/${userId}/${providerId}`,\n {\n method: \"PATCH\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(data),\n },\n null,\n );\n return await response.json();\n }\n\n async deleteServerOAuthProvider(\n userId: string,\n providerId: string,\n ): Promise<void> {\n const response = await this.sendServerRequest(\n urlString`/oauth-providers/${userId}/${providerId}`,\n {\n method: \"DELETE\",\n },\n null,\n );\n return await response.json();\n }\n\n async sendEmail(options: {\n userIds?: string[],\n allUsers?: true,\n themeId?: string | null | false,\n html?: string,\n subject?: string,\n notificationCategoryName?: string,\n templateId?: string,\n variables?: Record<string, any>,\n draftId?: string,\n scheduledAt?: Date,\n }): Promise<Result<void, KnownErrors[\"RequiresCustomEmailServer\"] | KnownErrors[\"SchemaError\"] | KnownErrors[\"UserIdDoesNotExist\"]>> {\n const res = await this.sendServerRequest(\n \"/emails/send-email\",\n {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n user_ids: options.userIds,\n all_users: options.allUsers,\n theme_id: options.themeId,\n html: options.html,\n subject: options.subject,\n notification_category_name: options.notificationCategoryName,\n template_id: options.templateId,\n variables: options.variables,\n draft_id: options.draftId,\n scheduled_at_millis: options.scheduledAt?.getTime(),\n }),\n },\n null,\n );\n return Result.ok(undefined);\n }\n\n async getEmailDeliveryInfo(): Promise<{\n stats: {\n hour: { sent: number, bounced: number, marked_as_spam: number },\n day: { sent: number, bounced: number, marked_as_spam: number },\n week: { sent: number, bounced: number, marked_as_spam: number },\n month: { sent: number, bounced: number, marked_as_spam: number },\n },\n capacity: {\n rate_per_second: number,\n boost_multiplier: number,\n penalty_factor: number,\n is_boost_active: boolean,\n boost_expires_at: string | null,\n },\n }> {\n const res = await this.sendServerRequest(\n \"/emails/delivery-info\",\n {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n },\n null,\n );\n return await res.json();\n }\n\n async activateEmailCapacityBoost(): Promise<{ expires_at: string }> {\n const res = await this.sendServerRequest(\n \"/emails/capacity-boost\",\n {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({}),\n },\n null,\n );\n return await res.json();\n }\n\n async updateItemQuantity(\n options: (\n { itemId: string, userId: string } |\n { itemId: string, teamId: string } |\n { itemId: string, customCustomerId: string }\n ),\n data: ItemCrud['Server']['Update'],\n ): Promise<void> {\n let customerType: \"user\" | \"team\" | \"custom\";\n let customerId: string;\n const itemId: string = options.itemId;\n\n if (\"userId\" in options) {\n customerType = \"user\";\n customerId = options.userId;\n } else if (\"teamId\" in options) {\n customerType = \"team\";\n customerId = options.teamId;\n } else if (\"customCustomerId\" in options) {\n customerType = \"custom\";\n customerId = options.customCustomerId;\n } else {\n throw new HexclaveAssertionError(\"updateItemQuantity requires one of userId, teamId, or customCustomerId\");\n }\n\n const queryParams = new URLSearchParams({ allow_negative: (data.allow_negative ?? false).toString() });\n await this.sendServerRequest(\n `/payments/items/${customerType}/${customerId}/${itemId}/update-quantity?${queryParams.toString()}`,\n {\n method: \"POST\",\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify({ delta: data.delta, expires_at: data.expires_at, description: data.description }),\n },\n null\n );\n }\n\n async grantProduct(\n options: {\n customerType: \"user\" | \"team\" | \"custom\",\n customerId: string,\n productId?: string,\n product?: yup.InferType<typeof inlineProductSchema>,\n quantity?: number,\n },\n ): Promise<void> {\n if (!options.productId && !options.product) {\n throw new HexclaveAssertionError(\"grantProduct requires either productId or product\");\n }\n if (options.productId && options.product) {\n throw new HexclaveAssertionError(\"grantProduct should not receive both productId and product\");\n }\n const body = filterUndefined({\n product_id: options.productId,\n product_inline: options.product,\n quantity: options.quantity,\n });\n await this.sendServerRequest(\n urlString`/payments/products/${options.customerType}/${options.customerId}`,\n {\n method: \"POST\",\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify(body),\n },\n null,\n );\n }\n\n async getDataVaultStoreValue(secret: string, storeId: string, key: string) {\n const hashedKey = await hashKey(secret, key);\n const response = await this.sendServerRequestAndCatchKnownError(\n `/data-vault/stores/${storeId}/get`,\n {\n method: \"POST\",\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify({ hashed_key: hashedKey }),\n },\n null,\n [KnownErrors.DataVaultStoreHashedKeyDoesNotExist] as const,\n );\n if (response.status === \"error\") {\n if (KnownErrors.DataVaultStoreHashedKeyDoesNotExist.isInstance(response.error)) {\n return null;\n } else {\n throw new HexclaveAssertionError(\"Unexpected uncaught error\", { cause: response.error });\n }\n }\n const json = await response.data.json();\n const encryptedValue = json.encrypted_value;\n if (typeof encryptedValue !== \"string\") throw new HexclaveAssertionError(\"encrypted_value is not a string\", { type: typeof encryptedValue });\n return await decryptValue(secret, key, encryptedValue);\n }\n\n async setDataVaultStoreValue(secret: string, storeId: string, key: string, value: string) {\n const hashedKey = await hashKey(secret, key);\n const encryptedValue = await encryptValue(secret, key, value);\n await this.sendServerRequest(\n `/data-vault/stores/${storeId}/set`,\n {\n method: \"POST\",\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify({ hashed_key: hashedKey, encrypted_value: encryptedValue }),\n },\n null,\n );\n }\n\n async initiateServerPasskeyRegistration(userId: string): Promise<Result<{ options_json: any, code: string }, KnownErrors[]>> {\n // Create a temporary session for this user to use for passkey registration\n // TODO instead of creating a new session, this should just call the endpoint in a way in which it doesn't require a session\n // (currently this shows up on session history etc... not ideal)\n const { accessToken, refreshToken } = await this.createServerUserSession(userId, 60000 * 2, false); // 2 minute session\n const tempSession = new InternalSession({\n accessToken,\n refreshToken,\n refreshAccessTokenCallback: async () => null, // No refresh for temporary sessions\n });\n\n // Use the existing initiatePasskeyRegistration method with the temporary session\n return await this.initiatePasskeyRegistration({}, tempSession);\n }\n}\n"],"mappings":";;;;;;;;;;AAwCA,IAAa,0BAAb,cAA6C,wBAAwB;CACnE,YAAY,AAAgB,SAAuC;AACjE,QAAM,QAAQ;EADY;;CAI5B,MAAgB,kBAAkB,MAAc,SAAsB,SAAiC,cAAkC,UAAU;AACjJ,SAAO,MAAM,KAAK,kBAChB,MACA;GACE,GAAG;GACH,SAAS;IAEP,gCAAgC,qBAAqB,KAAK,UAAU,KAAK,QAAQ,kBAAkB;IACnG,GAAG,QAAQ;IACZ;GACF,EACD,SACA,YACD;;CAGH,MAAe,mBACb,cACA,YACA,SAUC;AAMD,SAAO,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