@hexclave/shared 1.0.40 → 1.0.42

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 (1066) hide show
  1. package/dist/admin-interface-Y9EZqwD6.d.ts +379 -0
  2. package/dist/admin-interface-Y9EZqwD6.d.ts.map +1 -0
  3. package/dist/admin-metrics-bsOkw4YQ.d.ts +807 -0
  4. package/dist/admin-metrics-bsOkw4YQ.d.ts.map +1 -0
  5. package/dist/ai/image-limits.d.ts.map +1 -1
  6. package/dist/ai/image-limits.js +6 -7
  7. package/dist/ai/image-limits.js.map +1 -1
  8. package/dist/ai/llms/llms.d.ts.map +1 -1
  9. package/dist/ai/llms/llms.js +2 -4
  10. package/dist/ai/llms/llms.js.map +1 -1
  11. package/dist/ai/unified-prompts/reminders.js +3 -6
  12. package/dist/ai/unified-prompts/reminders.js.map +1 -1
  13. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
  14. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +3 -5
  15. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
  16. package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.js +3 -6
  17. package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.js.map +1 -1
  18. package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.js +3 -6
  19. package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.js.map +1 -1
  20. package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.js +3 -6
  21. package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.js.map +1 -1
  22. package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js +3 -6
  23. package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js.map +1 -1
  24. package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js +3 -6
  25. package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js.map +1 -1
  26. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
  27. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +5 -6
  28. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
  29. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +1 -2
  30. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
  31. package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +3 -6
  32. package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -1
  33. package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js +3 -6
  34. package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js.map +1 -1
  35. package/dist/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
  36. package/dist/ai/unified-prompts/skill-site-prompt.js +2 -4
  37. package/dist/ai/unified-prompts/skill-site-prompt.js.map +1 -1
  38. package/dist/analytics-IjkAsefy.d.ts +14 -0
  39. package/dist/analytics-IjkAsefy.d.ts.map +1 -0
  40. package/dist/apps/apps-config.d.ts.map +1 -1
  41. package/dist/apps/apps-config.js +2 -3
  42. package/dist/apps/apps-config.js.map +1 -1
  43. package/dist/apps/apps-ui.d.ts +1 -2
  44. package/dist/apps/apps-ui.d.ts.map +1 -1
  45. package/dist/apps/apps-ui.js +4 -5
  46. package/dist/apps/apps-ui.js.map +1 -1
  47. package/dist/client-interface-iIw4nU5k.d.ts +447 -0
  48. package/dist/client-interface-iIw4nU5k.d.ts.map +1 -0
  49. package/dist/config/db-sync-mappings.js +2 -3
  50. package/dist/config/db-sync-mappings.js.map +1 -1
  51. package/dist/config/format.d.ts +2 -61
  52. package/dist/config/format.js +2 -192
  53. package/dist/config/format.js.map +1 -1
  54. package/dist/config/migrate-catalogs-to-product-lines.d.ts.map +1 -1
  55. package/dist/config/migrate-catalogs-to-product-lines.js +2 -196
  56. package/dist/config/migrate-catalogs-to-product-lines.js.map +1 -1
  57. package/dist/config/schema-fuzzer.test.js +18 -172
  58. package/dist/config/schema-fuzzer.test.js.map +1 -1
  59. package/dist/config/schema.d.ts +2 -2328
  60. package/dist/config/schema.js +6 -351
  61. package/dist/config/schema.js.map +1 -1
  62. package/dist/config-authoring.d.ts +1 -1
  63. package/dist/config-authoring.d.ts.map +1 -1
  64. package/dist/config-authoring.js +2 -3
  65. package/dist/config-authoring.js.map +1 -1
  66. package/dist/config-authoring.test.js +1 -3
  67. package/dist/config-authoring.test.js.map +1 -1
  68. package/dist/config-eval.d.ts.map +1 -1
  69. package/dist/config-eval.js +4 -46
  70. package/dist/config-eval.js.map +1 -1
  71. package/dist/config-rendering.d.ts.map +1 -1
  72. package/dist/config-rendering.js +2 -48
  73. package/dist/config-rendering.js.map +1 -1
  74. package/dist/connected-accounts-D5CKe50A.d.ts +67 -0
  75. package/dist/connected-accounts-D5CKe50A.d.ts.map +1 -0
  76. package/dist/contact-channels-DW8yQxlc.d.ts +180 -0
  77. package/dist/contact-channels-DW8yQxlc.d.ts.map +1 -0
  78. package/dist/country-codes-CRWDroBE.d.ts +11 -0
  79. package/dist/country-codes-CRWDroBE.d.ts.map +1 -0
  80. package/dist/crud-CqmEW9s6.d.ts +98 -0
  81. package/dist/crud-CqmEW9s6.d.ts.map +1 -0
  82. package/dist/crud.d.ts +2 -98
  83. package/dist/crud.js +3 -71
  84. package/dist/crud.js.map +1 -1
  85. package/dist/currency-constants-Cq_q8twn.d.ts +45 -0
  86. package/dist/currency-constants-Cq_q8twn.d.ts.map +1 -0
  87. package/dist/current-user-BBoN3hsn.d.ts +284 -0
  88. package/dist/current-user-BBoN3hsn.d.ts.map +1 -0
  89. package/dist/dates-B6ne9iOR.d.ts +23 -0
  90. package/dist/dates-B6ne9iOR.d.ts.map +1 -0
  91. package/dist/email-outbox-B1wmVPRG.d.ts +1464 -0
  92. package/dist/{interface/crud/email-outbox.d.ts.map → email-outbox-B1wmVPRG.d.ts.map} +1 -1
  93. package/dist/emails-Ba4yEaCS.d.ts +40 -0
  94. package/dist/emails-Ba4yEaCS.d.ts.map +1 -0
  95. package/dist/errors-Cl-RUyed.d.ts +238 -0
  96. package/dist/errors-Cl-RUyed.d.ts.map +1 -0
  97. package/dist/esm/ai/image-limits.d.ts.map +1 -1
  98. package/dist/esm/ai/image-limits.js +5 -5
  99. package/dist/esm/ai/image-limits.js.map +1 -1
  100. package/dist/esm/ai/llms/llms.d.ts +1 -1
  101. package/dist/esm/ai/llms/llms.d.ts.map +1 -1
  102. package/dist/esm/ai/llms/llms.js +1 -2
  103. package/dist/esm/ai/llms/llms.js.map +1 -1
  104. package/dist/esm/ai/unified-prompts/reminders.js +1 -2
  105. package/dist/esm/ai/unified-prompts/reminders.js.map +1 -1
  106. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
  107. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +26 -28
  108. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
  109. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.js +1 -2
  110. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.js.map +1 -1
  111. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.js +1 -2
  112. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.js.map +1 -1
  113. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.js +1 -2
  114. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.js.map +1 -1
  115. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js +1 -2
  116. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js.map +1 -1
  117. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js +1 -2
  118. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js.map +1 -1
  119. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
  120. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +2 -3
  121. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
  122. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +1 -1
  123. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
  124. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +1 -2
  125. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -1
  126. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js +1 -2
  127. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js.map +1 -1
  128. package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
  129. package/dist/esm/ai/unified-prompts/skill-site-prompt.js +1 -2
  130. package/dist/esm/ai/unified-prompts/skill-site-prompt.js.map +1 -1
  131. package/dist/esm/apps/apps-config.d.ts.map +1 -1
  132. package/dist/esm/apps/apps-config.js +1 -1
  133. package/dist/esm/apps/apps-config.js.map +1 -1
  134. package/dist/esm/apps/apps-ui.d.ts +2 -3
  135. package/dist/esm/apps/apps-ui.d.ts.map +1 -1
  136. package/dist/esm/apps/apps-ui.js +2 -3
  137. package/dist/esm/apps/apps-ui.js.map +1 -1
  138. package/dist/esm/config/db-sync-mappings.js +1 -1
  139. package/dist/esm/config/db-sync-mappings.js.map +1 -1
  140. package/dist/esm/config/format.d.ts +1 -1
  141. package/dist/esm/config/format.d.ts.map +1 -1
  142. package/dist/esm/config/format.js +1 -190
  143. package/dist/esm/config/format.js.map +1 -1
  144. package/dist/esm/config/migrate-catalogs-to-product-lines.d.ts.map +1 -1
  145. package/dist/esm/config/migrate-catalogs-to-product-lines.js +1 -194
  146. package/dist/esm/config/migrate-catalogs-to-product-lines.js.map +1 -1
  147. package/dist/esm/config/schema-fuzzer.test.js +20 -173
  148. package/dist/esm/config/schema-fuzzer.test.js.map +1 -1
  149. package/dist/esm/config/schema.d.ts +81 -82
  150. package/dist/esm/config/schema.d.ts.map +1 -1
  151. package/dist/esm/config/schema.js +2 -347
  152. package/dist/esm/config/schema.js.map +1 -1
  153. package/dist/esm/config-authoring.d.ts +1 -1
  154. package/dist/esm/config-authoring.d.ts.map +1 -1
  155. package/dist/esm/config-authoring.js +1 -1
  156. package/dist/esm/config-authoring.js.map +1 -1
  157. package/dist/esm/config-authoring.test.js +2 -3
  158. package/dist/esm/config-authoring.test.js.map +1 -1
  159. package/dist/esm/config-eval.d.ts +1 -1
  160. package/dist/esm/config-eval.d.ts.map +1 -1
  161. package/dist/esm/config-eval.js +1 -43
  162. package/dist/esm/config-eval.js.map +1 -1
  163. package/dist/esm/config-rendering.d.ts.map +1 -1
  164. package/dist/esm/config-rendering.js +1 -46
  165. package/dist/esm/config-rendering.js.map +1 -1
  166. package/dist/esm/crud.d.ts +1 -1
  167. package/dist/esm/crud.d.ts.map +1 -1
  168. package/dist/esm/crud.js +2 -69
  169. package/dist/esm/crud.js.map +1 -1
  170. package/dist/esm/helpers/emails.js +1 -2
  171. package/dist/esm/helpers/emails.js.map +1 -1
  172. package/dist/esm/helpers/init-prompt.d.ts.map +1 -1
  173. package/dist/esm/helpers/init-prompt.js +1 -2
  174. package/dist/esm/helpers/init-prompt.js.map +1 -1
  175. package/dist/esm/helpers/password.d.ts +1 -1
  176. package/dist/esm/helpers/password.d.ts.map +1 -1
  177. package/dist/esm/helpers/password.js +1 -2
  178. package/dist/esm/helpers/password.js.map +1 -1
  179. package/dist/esm/helpers/production-mode.d.ts +1 -1
  180. package/dist/esm/helpers/production-mode.d.ts.map +1 -1
  181. package/dist/esm/helpers/production-mode.js +1 -2
  182. package/dist/esm/helpers/production-mode.js.map +1 -1
  183. package/dist/esm/helpers/support-sla.d.ts.map +1 -1
  184. package/dist/esm/helpers/support-sla.js +1 -1
  185. package/dist/esm/helpers/support-sla.js.map +1 -1
  186. package/dist/esm/helpers/support-sla.test.js +2 -3
  187. package/dist/esm/helpers/support-sla.test.js.map +1 -1
  188. package/dist/esm/helpers/vault/client-side.d.ts.map +1 -1
  189. package/dist/esm/helpers/vault/client-side.js +1 -20
  190. package/dist/esm/helpers/vault/client-side.js.map +1 -1
  191. package/dist/esm/helpers/vault/server-side.js +1 -2
  192. package/dist/esm/helpers/vault/server-side.js.map +1 -1
  193. package/dist/esm/hooks/use-async-callback.d.ts.map +1 -1
  194. package/dist/esm/hooks/use-async-callback.js +1 -2
  195. package/dist/esm/hooks/use-async-callback.js.map +1 -1
  196. package/dist/esm/hooks/use-async-external-store.d.ts +1 -1
  197. package/dist/esm/hooks/use-async-external-store.d.ts.map +1 -1
  198. package/dist/esm/hooks/use-async-external-store.js +1 -2
  199. package/dist/esm/hooks/use-async-external-store.js.map +1 -1
  200. package/dist/esm/hooks/use-hash.js +1 -2
  201. package/dist/esm/hooks/use-hash.js.map +1 -1
  202. package/dist/esm/hooks/use-hover.d.ts.map +1 -1
  203. package/dist/esm/hooks/use-hover.js +1 -2
  204. package/dist/esm/hooks/use-hover.js.map +1 -1
  205. package/dist/esm/hooks/use-strict-memo.d.ts.map +1 -1
  206. package/dist/esm/hooks/use-strict-memo.js +1 -70
  207. package/dist/esm/hooks/use-strict-memo.js.map +1 -1
  208. package/dist/esm/index.d.ts +4 -4
  209. package/dist/esm/index.js +1 -2
  210. package/dist/esm/interface/admin-interface.d.ts +19 -19
  211. package/dist/esm/interface/admin-interface.d.ts.map +1 -1
  212. package/dist/esm/interface/admin-interface.js +2 -3
  213. package/dist/esm/interface/admin-interface.js.map +1 -1
  214. package/dist/esm/interface/admin-metrics.d.ts +2 -2
  215. package/dist/esm/interface/admin-metrics.d.ts.map +1 -1
  216. package/dist/esm/interface/admin-metrics.js +1 -2
  217. package/dist/esm/interface/admin-metrics.js.map +1 -1
  218. package/dist/esm/interface/client-interface.d.ts +22 -22
  219. package/dist/esm/interface/client-interface.d.ts.map +1 -1
  220. package/dist/esm/interface/client-interface.js +32 -16
  221. package/dist/esm/interface/client-interface.js.map +1 -1
  222. package/dist/esm/interface/client-interface.test.js +84 -13
  223. package/dist/esm/interface/client-interface.test.js.map +1 -1
  224. package/dist/esm/interface/conversations.d.ts +11 -11
  225. package/dist/esm/interface/conversations.d.ts.map +1 -1
  226. package/dist/esm/interface/conversations.js +1 -2
  227. package/dist/esm/interface/conversations.js.map +1 -1
  228. package/dist/esm/interface/crud/analytics.d.ts.map +1 -1
  229. package/dist/esm/interface/crud/analytics.js +1 -1
  230. package/dist/esm/interface/crud/connected-accounts.d.ts +15 -17
  231. package/dist/esm/interface/crud/connected-accounts.d.ts.map +1 -1
  232. package/dist/esm/interface/crud/connected-accounts.js +1 -2
  233. package/dist/esm/interface/crud/connected-accounts.js.map +1 -1
  234. package/dist/esm/interface/crud/contact-channels.d.ts +24 -26
  235. package/dist/esm/interface/crud/contact-channels.d.ts.map +1 -1
  236. package/dist/esm/interface/crud/contact-channels.js +1 -2
  237. package/dist/esm/interface/crud/contact-channels.js.map +1 -1
  238. package/dist/esm/interface/crud/current-user.d.ts +11 -13
  239. package/dist/esm/interface/crud/current-user.d.ts.map +1 -1
  240. package/dist/esm/interface/crud/current-user.js +25 -29
  241. package/dist/esm/interface/crud/current-user.js.map +1 -1
  242. package/dist/esm/interface/crud/email-outbox.d.ts +10 -12
  243. package/dist/esm/interface/crud/email-outbox.d.ts.map +1 -1
  244. package/dist/esm/interface/crud/email-outbox.js +1 -2
  245. package/dist/esm/interface/crud/email-outbox.js.map +1 -1
  246. package/dist/esm/interface/crud/email-templates.d.ts +16 -18
  247. package/dist/esm/interface/crud/email-templates.d.ts.map +1 -1
  248. package/dist/esm/interface/crud/email-templates.js +1 -2
  249. package/dist/esm/interface/crud/email-templates.js.map +1 -1
  250. package/dist/esm/interface/crud/emails.d.ts +6 -8
  251. package/dist/esm/interface/crud/emails.d.ts.map +1 -1
  252. package/dist/esm/interface/crud/emails.js +1 -2
  253. package/dist/esm/interface/crud/emails.js.map +1 -1
  254. package/dist/esm/interface/crud/internal-api-keys.d.ts +16 -18
  255. package/dist/esm/interface/crud/internal-api-keys.d.ts.map +1 -1
  256. package/dist/esm/interface/crud/internal-api-keys.js +1 -2
  257. package/dist/esm/interface/crud/internal-api-keys.js.map +1 -1
  258. package/dist/esm/interface/crud/invoices.d.ts.map +1 -1
  259. package/dist/esm/interface/crud/invoices.js +1 -2
  260. package/dist/esm/interface/crud/invoices.js.map +1 -1
  261. package/dist/esm/interface/crud/items.d.ts +6 -8
  262. package/dist/esm/interface/crud/items.d.ts.map +1 -1
  263. package/dist/esm/interface/crud/items.js +12 -16
  264. package/dist/esm/interface/crud/items.js.map +1 -1
  265. package/dist/esm/interface/crud/notification-preferences.d.ts +6 -8
  266. package/dist/esm/interface/crud/notification-preferences.d.ts.map +1 -1
  267. package/dist/esm/interface/crud/notification-preferences.js +8 -12
  268. package/dist/esm/interface/crud/notification-preferences.js.map +1 -1
  269. package/dist/esm/interface/crud/oauth-providers.d.ts +24 -26
  270. package/dist/esm/interface/crud/oauth-providers.d.ts.map +1 -1
  271. package/dist/esm/interface/crud/oauth-providers.js +1 -2
  272. package/dist/esm/interface/crud/oauth-providers.js.map +1 -1
  273. package/dist/esm/interface/crud/products.d.ts +16 -17
  274. package/dist/esm/interface/crud/products.d.ts.map +1 -1
  275. package/dist/esm/interface/crud/products.js +3 -2
  276. package/dist/esm/interface/crud/products.js.map +1 -1
  277. package/dist/esm/interface/crud/project-api-keys.d.ts +3 -4
  278. package/dist/esm/interface/crud/project-api-keys.d.ts.map +1 -1
  279. package/dist/esm/interface/crud/project-api-keys.js +1 -2
  280. package/dist/esm/interface/crud/project-api-keys.js.map +1 -1
  281. package/dist/esm/interface/crud/project-permissions.d.ts +29 -31
  282. package/dist/esm/interface/crud/project-permissions.d.ts.map +1 -1
  283. package/dist/esm/interface/crud/project-permissions.js +1 -2
  284. package/dist/esm/interface/crud/project-permissions.js.map +1 -1
  285. package/dist/esm/interface/crud/projects.d.ts +28 -30
  286. package/dist/esm/interface/crud/projects.d.ts.map +1 -1
  287. package/dist/esm/interface/crud/projects.js +3 -2
  288. package/dist/esm/interface/crud/projects.js.map +1 -1
  289. package/dist/esm/interface/crud/session-replays.d.ts.map +1 -1
  290. package/dist/esm/interface/crud/session-replays.js +1 -1
  291. package/dist/esm/interface/crud/sessions.d.ts +15 -17
  292. package/dist/esm/interface/crud/sessions.d.ts.map +1 -1
  293. package/dist/esm/interface/crud/sessions.js +1 -2
  294. package/dist/esm/interface/crud/sessions.js.map +1 -1
  295. package/dist/esm/interface/crud/sign-up-rules.d.ts.map +1 -1
  296. package/dist/esm/interface/crud/sign-up-rules.js +1 -1
  297. package/dist/esm/interface/crud/svix-token.d.ts +8 -10
  298. package/dist/esm/interface/crud/svix-token.d.ts.map +1 -1
  299. package/dist/esm/interface/crud/svix-token.js +1 -2
  300. package/dist/esm/interface/crud/svix-token.js.map +1 -1
  301. package/dist/esm/interface/crud/team-invitation-details.d.ts +6 -8
  302. package/dist/esm/interface/crud/team-invitation-details.d.ts.map +1 -1
  303. package/dist/esm/interface/crud/team-invitation-details.js +1 -2
  304. package/dist/esm/interface/crud/team-invitation-details.js.map +1 -1
  305. package/dist/esm/interface/crud/team-invitation.d.ts +7 -9
  306. package/dist/esm/interface/crud/team-invitation.d.ts.map +1 -1
  307. package/dist/esm/interface/crud/team-invitation.js +1 -2
  308. package/dist/esm/interface/crud/team-invitation.js.map +1 -1
  309. package/dist/esm/interface/crud/team-member-profiles.d.ts +14 -16
  310. package/dist/esm/interface/crud/team-member-profiles.d.ts.map +1 -1
  311. package/dist/esm/interface/crud/team-member-profiles.js +1 -2
  312. package/dist/esm/interface/crud/team-member-profiles.js.map +1 -1
  313. package/dist/esm/interface/crud/team-memberships.d.ts +14 -16
  314. package/dist/esm/interface/crud/team-memberships.d.ts.map +1 -1
  315. package/dist/esm/interface/crud/team-memberships.js +1 -2
  316. package/dist/esm/interface/crud/team-memberships.js.map +1 -1
  317. package/dist/esm/interface/crud/team-permissions.d.ts +29 -31
  318. package/dist/esm/interface/crud/team-permissions.d.ts.map +1 -1
  319. package/dist/esm/interface/crud/team-permissions.js +1 -2
  320. package/dist/esm/interface/crud/team-permissions.js.map +1 -1
  321. package/dist/esm/interface/crud/teams.d.ts +36 -38
  322. package/dist/esm/interface/crud/teams.d.ts.map +1 -1
  323. package/dist/esm/interface/crud/teams.js +2 -4
  324. package/dist/esm/interface/crud/teams.js.map +1 -1
  325. package/dist/esm/interface/crud/transactions.d.ts +12 -14
  326. package/dist/esm/interface/crud/transactions.d.ts.map +1 -1
  327. package/dist/esm/interface/crud/transactions.js +7 -13
  328. package/dist/esm/interface/crud/transactions.js.map +1 -1
  329. package/dist/esm/interface/crud/users.d.ts +5 -6
  330. package/dist/esm/interface/crud/users.d.ts.map +1 -1
  331. package/dist/esm/interface/crud/users.js +9 -5
  332. package/dist/esm/interface/crud/users.js.map +1 -1
  333. package/dist/esm/interface/handler-urls.d.ts +1 -1
  334. package/dist/esm/interface/handler-urls.d.ts.map +1 -1
  335. package/dist/esm/interface/handler-urls.js +1 -2
  336. package/dist/esm/interface/page-component-versions.d.ts +1 -1
  337. package/dist/esm/interface/page-component-versions.d.ts.map +1 -1
  338. package/dist/esm/interface/page-component-versions.js +1 -2
  339. package/dist/esm/interface/page-component-versions.js.map +1 -1
  340. package/dist/esm/interface/plan-usage.d.ts +1 -1
  341. package/dist/esm/interface/plan-usage.d.ts.map +1 -1
  342. package/dist/esm/interface/plan-usage.js +1 -2
  343. package/dist/esm/interface/plan-usage.js.map +1 -1
  344. package/dist/esm/interface/server-interface.d.ts +19 -19
  345. package/dist/esm/interface/server-interface.d.ts.map +1 -1
  346. package/dist/esm/interface/server-interface.js +2 -3
  347. package/dist/esm/interface/server-interface.js.map +1 -1
  348. package/dist/esm/interface/webhooks.d.ts.map +1 -1
  349. package/dist/esm/interface/webhooks.js +1 -2
  350. package/dist/esm/interface/webhooks.js.map +1 -1
  351. package/dist/esm/known-errors.d.ts +2 -2
  352. package/dist/esm/known-errors.d.ts.map +1 -1
  353. package/dist/esm/known-errors.js +10 -21
  354. package/dist/esm/known-errors.js.map +1 -1
  355. package/dist/esm/payments/payment-methods.d.ts.map +1 -1
  356. package/dist/esm/payments/payment-methods.js +1 -1
  357. package/dist/esm/payments/payment-methods.js.map +1 -1
  358. package/dist/esm/payments/stripe-limits.d.ts.map +1 -1
  359. package/dist/esm/payments/stripe-limits.js +1 -1
  360. package/dist/esm/payments/stripe-limits.js.map +1 -1
  361. package/dist/esm/plans.d.ts.map +1 -1
  362. package/dist/esm/plans.js +1 -1
  363. package/dist/esm/plans.js.map +1 -1
  364. package/dist/esm/schema-fields.d.ts +3 -3
  365. package/dist/esm/schema-fields.d.ts.map +1 -1
  366. package/dist/esm/schema-fields.js +3 -64
  367. package/dist/esm/schema-fields.js.map +1 -1
  368. package/dist/esm/sessions.d.ts +1 -1
  369. package/dist/esm/sessions.d.ts.map +1 -1
  370. package/dist/esm/sessions.js +1 -2
  371. package/dist/esm/sessions.js.map +1 -1
  372. package/dist/esm/sessions.test.js +2 -3
  373. package/dist/esm/sessions.test.js.map +1 -1
  374. package/dist/esm/utils/analytics-clickmap-overlay.d.ts.map +1 -1
  375. package/dist/esm/utils/analytics-clickmap-overlay.js +1 -1
  376. package/dist/esm/utils/api-keys.d.ts.map +1 -1
  377. package/dist/esm/utils/api-keys.js +1 -2
  378. package/dist/esm/utils/api-keys.js.map +1 -1
  379. package/dist/esm/utils/arrays.d.ts.map +1 -1
  380. package/dist/esm/utils/arrays.js +1 -470
  381. package/dist/esm/utils/arrays.js.map +1 -1
  382. package/dist/esm/utils/auth-methods.d.ts.map +1 -1
  383. package/dist/esm/utils/auth-methods.js +1 -1
  384. package/dist/esm/utils/auth-methods.js.map +1 -1
  385. package/dist/esm/utils/base64.d.ts.map +1 -1
  386. package/dist/esm/utils/base64.js +1 -10
  387. package/dist/esm/utils/base64.js.map +1 -1
  388. package/dist/esm/utils/booleans.d.ts.map +1 -1
  389. package/dist/esm/utils/booleans.js +1 -25
  390. package/dist/esm/utils/booleans.js.map +1 -1
  391. package/dist/esm/utils/browser-compat.d.ts.map +1 -1
  392. package/dist/esm/utils/browser-compat.js +1 -1
  393. package/dist/esm/utils/browser-compat.js.map +1 -1
  394. package/dist/esm/utils/bytes.d.ts.map +1 -1
  395. package/dist/esm/utils/bytes.js +3 -198
  396. package/dist/esm/utils/bytes.js.map +1 -1
  397. package/dist/esm/utils/caches.d.ts +1 -1
  398. package/dist/esm/utils/caches.d.ts.map +1 -1
  399. package/dist/esm/utils/caches.js +1 -27
  400. package/dist/esm/utils/caches.js.map +1 -1
  401. package/dist/esm/utils/cel-fields.d.ts.map +1 -1
  402. package/dist/esm/utils/cel-fields.js +1 -2
  403. package/dist/esm/utils/cel-fields.js.map +1 -1
  404. package/dist/esm/utils/cloud-hosts.d.ts.map +1 -1
  405. package/dist/esm/utils/cloud-hosts.js +1 -27
  406. package/dist/esm/utils/cloud-hosts.js.map +1 -1
  407. package/dist/esm/utils/compile-time.d.ts.map +1 -1
  408. package/dist/esm/utils/compile-time.js +1 -1
  409. package/dist/esm/utils/compile-time.js.map +1 -1
  410. package/dist/esm/utils/country-codes.d.ts.map +1 -1
  411. package/dist/esm/utils/country-codes.js +1 -16
  412. package/dist/esm/utils/country-codes.js.map +1 -1
  413. package/dist/esm/utils/crypto.d.ts.map +1 -1
  414. package/dist/esm/utils/crypto.js +3 -113
  415. package/dist/esm/utils/crypto.js.map +1 -1
  416. package/dist/esm/utils/currencies.d.ts +1 -1
  417. package/dist/esm/utils/currencies.d.ts.map +1 -1
  418. package/dist/esm/utils/currencies.js +2 -37
  419. package/dist/esm/utils/currencies.js.map +1 -1
  420. package/dist/esm/utils/currency-constants.d.ts.map +1 -1
  421. package/dist/esm/utils/currency-constants.js +1 -1
  422. package/dist/esm/utils/currency-constants.js.map +1 -1
  423. package/dist/esm/utils/dates.d.ts.map +1 -1
  424. package/dist/esm/utils/dates.js +1 -44
  425. package/dist/esm/utils/dates.js.map +1 -1
  426. package/dist/esm/utils/dev-env-state-path.d.ts.map +1 -1
  427. package/dist/esm/utils/dev-env-state-path.js +1 -2
  428. package/dist/esm/utils/dev-env-state-path.js.map +1 -1
  429. package/dist/esm/utils/dev-tool.d.ts.map +1 -1
  430. package/dist/esm/utils/dev-tool.js +1 -1
  431. package/dist/esm/utils/dom.d.ts.map +1 -1
  432. package/dist/esm/utils/dom.js +1 -1
  433. package/dist/esm/utils/dom.js.map +1 -1
  434. package/dist/esm/utils/elements-chain.d.ts.map +1 -1
  435. package/dist/esm/utils/elements-chain.js +5 -50
  436. package/dist/esm/utils/elements-chain.js.map +1 -1
  437. package/dist/esm/utils/env.d.ts.map +1 -1
  438. package/dist/esm/utils/env.js +1 -2
  439. package/dist/esm/utils/env.js.map +1 -1
  440. package/dist/esm/utils/env.test.js +2 -3
  441. package/dist/esm/utils/env.test.js.map +1 -1
  442. package/dist/esm/utils/errors.d.ts +1 -1
  443. package/dist/esm/utils/errors.d.ts.map +1 -1
  444. package/dist/esm/utils/errors.js +1 -2
  445. package/dist/esm/utils/errors.js.map +1 -1
  446. package/dist/esm/utils/esbuild.d.ts +1 -1
  447. package/dist/esm/utils/esbuild.d.ts.map +1 -1
  448. package/dist/esm/utils/esbuild.js +2 -3
  449. package/dist/esm/utils/esbuild.js.map +1 -1
  450. package/dist/esm/utils/featurebase.d.ts.map +1 -1
  451. package/dist/esm/utils/featurebase.js +1 -2
  452. package/dist/esm/utils/featurebase.js.map +1 -1
  453. package/dist/esm/utils/fs.d.ts.map +1 -1
  454. package/dist/esm/utils/fs.js +1 -2
  455. package/dist/esm/utils/fs.js.map +1 -1
  456. package/dist/esm/utils/functions.d.ts.map +1 -1
  457. package/dist/esm/utils/functions.js +1 -24
  458. package/dist/esm/utils/functions.js.map +1 -1
  459. package/dist/esm/utils/geo.d.ts.map +1 -1
  460. package/dist/esm/utils/geo.js +1 -2
  461. package/dist/esm/utils/geo.js.map +1 -1
  462. package/dist/esm/utils/globals.d.ts.map +1 -1
  463. package/dist/esm/utils/globals.js +1 -1
  464. package/dist/esm/utils/globals.js.map +1 -1
  465. package/dist/esm/utils/hashes.d.ts.map +1 -1
  466. package/dist/esm/utils/hashes.js +1 -2
  467. package/dist/esm/utils/hashes.js.map +1 -1
  468. package/dist/esm/utils/html.d.ts.map +1 -1
  469. package/dist/esm/utils/html.js +1 -19
  470. package/dist/esm/utils/html.js.map +1 -1
  471. package/dist/esm/utils/http.d.ts.map +1 -1
  472. package/dist/esm/utils/http.js +1 -19
  473. package/dist/esm/utils/http.js.map +1 -1
  474. package/dist/esm/utils/ips.d.ts.map +1 -1
  475. package/dist/esm/utils/ips.js +1 -25
  476. package/dist/esm/utils/ips.js.map +1 -1
  477. package/dist/esm/utils/json.d.ts +1 -1
  478. package/dist/esm/utils/json.d.ts.map +1 -1
  479. package/dist/esm/utils/json.js +1 -155
  480. package/dist/esm/utils/json.js.map +1 -1
  481. package/dist/esm/utils/jsx-editable-transpiler.d.ts.map +1 -1
  482. package/dist/esm/utils/jsx-editable-transpiler.js +1 -2
  483. package/dist/esm/utils/jsx-editable-transpiler.js.map +1 -1
  484. package/dist/esm/utils/jsx-editable-transpiler.test.js +2 -3
  485. package/dist/esm/utils/jsx-editable-transpiler.test.js.map +1 -1
  486. package/dist/esm/utils/jwt.d.ts.map +1 -1
  487. package/dist/esm/utils/jwt.js +1 -2
  488. package/dist/esm/utils/jwt.js.map +1 -1
  489. package/dist/esm/utils/locks.d.ts.map +1 -1
  490. package/dist/esm/utils/locks.js +1 -2
  491. package/dist/esm/utils/locks.js.map +1 -1
  492. package/dist/esm/utils/maps.d.ts.map +1 -1
  493. package/dist/esm/utils/maps.js +1 -111
  494. package/dist/esm/utils/maps.js.map +1 -1
  495. package/dist/esm/utils/math.d.ts.map +1 -1
  496. package/dist/esm/utils/math.js +1 -11
  497. package/dist/esm/utils/math.js.map +1 -1
  498. package/dist/esm/utils/monkey-patch.d.ts.map +1 -1
  499. package/dist/esm/utils/monkey-patch.js +2 -3
  500. package/dist/esm/utils/monkey-patch.js.map +1 -1
  501. package/dist/esm/utils/node-http.js +1 -2
  502. package/dist/esm/utils/node-http.js.map +1 -1
  503. package/dist/esm/utils/numbers.d.ts.map +1 -1
  504. package/dist/esm/utils/numbers.js +1 -45
  505. package/dist/esm/utils/numbers.js.map +1 -1
  506. package/dist/esm/utils/oauth.d.ts.map +1 -1
  507. package/dist/esm/utils/oauth.js +1 -1
  508. package/dist/esm/utils/oauth.js.map +1 -1
  509. package/dist/esm/utils/objects.d.ts.map +1 -1
  510. package/dist/esm/utils/objects.js +1 -622
  511. package/dist/esm/utils/objects.js.map +1 -1
  512. package/dist/esm/utils/paginated-lists.d.ts.map +1 -1
  513. package/dist/esm/utils/paginated-lists.js +1 -2
  514. package/dist/esm/utils/paginated-lists.js.map +1 -1
  515. package/dist/esm/utils/paginated-lists.test.js +2 -3
  516. package/dist/esm/utils/paginated-lists.test.js.map +1 -1
  517. package/dist/esm/utils/passkey.d.ts +1 -1
  518. package/dist/esm/utils/passkey.js +1 -1
  519. package/dist/esm/utils/promises.d.ts +1 -1
  520. package/dist/esm/utils/promises.d.ts.map +1 -1
  521. package/dist/esm/utils/promises.js +2 -161
  522. package/dist/esm/utils/promises.js.map +1 -1
  523. package/dist/esm/utils/proxies.d.ts.map +1 -1
  524. package/dist/esm/utils/proxies.js +1 -37
  525. package/dist/esm/utils/proxies.js.map +1 -1
  526. package/dist/esm/utils/react.d.ts.map +1 -1
  527. package/dist/esm/utils/react.js +1 -41
  528. package/dist/esm/utils/react.js.map +1 -1
  529. package/dist/esm/utils/redirect-urls.d.ts.map +1 -1
  530. package/dist/esm/utils/redirect-urls.js +2 -92
  531. package/dist/esm/utils/redirect-urls.js.map +1 -1
  532. package/dist/esm/utils/regex.js +1 -1
  533. package/dist/esm/utils/regex.js.map +1 -1
  534. package/dist/esm/utils/results.d.ts.map +1 -1
  535. package/dist/esm/utils/results.js +1 -213
  536. package/dist/esm/utils/results.js.map +1 -1
  537. package/dist/esm/utils/sentry.js +1 -1
  538. package/dist/esm/utils/sentry.js.map +1 -1
  539. package/dist/esm/utils/stores.d.ts +3 -3
  540. package/dist/esm/utils/stores.d.ts.map +1 -1
  541. package/dist/esm/utils/stores.js +1 -2
  542. package/dist/esm/utils/stores.js.map +1 -1
  543. package/dist/esm/utils/strings.d.ts.map +1 -1
  544. package/dist/esm/utils/strings.js +1 -251
  545. package/dist/esm/utils/strings.js.map +1 -1
  546. package/dist/esm/utils/strings.nicify.test.js +2 -3
  547. package/dist/esm/utils/strings.nicify.test.js.map +1 -1
  548. package/dist/esm/utils/telemetry.d.ts.map +1 -1
  549. package/dist/esm/utils/telemetry.js +1 -2
  550. package/dist/esm/utils/telemetry.js.map +1 -1
  551. package/dist/esm/utils/turnstile-browser.d.ts +1 -1
  552. package/dist/esm/utils/turnstile-browser.d.ts.map +1 -1
  553. package/dist/esm/utils/turnstile-browser.js +1 -2
  554. package/dist/esm/utils/turnstile-browser.js.map +1 -1
  555. package/dist/esm/utils/turnstile-flow.d.ts +1 -1
  556. package/dist/esm/utils/turnstile-flow.d.ts.map +1 -1
  557. package/dist/esm/utils/turnstile-flow.js +1 -2
  558. package/dist/esm/utils/turnstile-flow.js.map +1 -1
  559. package/dist/esm/utils/turnstile-flow.test.js +2 -3
  560. package/dist/esm/utils/turnstile-flow.test.js.map +1 -1
  561. package/dist/esm/utils/turnstile.d.ts.map +1 -1
  562. package/dist/esm/utils/turnstile.js +1 -1
  563. package/dist/esm/utils/turnstile.js.map +1 -1
  564. package/dist/esm/utils/typed-arrays.js +1 -2
  565. package/dist/esm/utils/typed-arrays.js.map +1 -1
  566. package/dist/esm/utils/types.d.ts +1 -1
  567. package/dist/esm/utils/types.d.ts.map +1 -1
  568. package/dist/esm/utils/types.js +1 -1
  569. package/dist/esm/utils/types.js.map +1 -1
  570. package/dist/esm/utils/unicode.d.ts.map +1 -1
  571. package/dist/esm/utils/unicode.js +1 -13
  572. package/dist/esm/utils/unicode.js.map +1 -1
  573. package/dist/esm/utils/urls.d.ts.map +1 -1
  574. package/dist/esm/utils/urls.js +1 -151
  575. package/dist/esm/utils/urls.js.map +1 -1
  576. package/dist/esm/utils/uuids.d.ts.map +1 -1
  577. package/dist/esm/utils/uuids.js +2 -26
  578. package/dist/esm/utils/uuids.js.map +1 -1
  579. package/dist/format-4JG1MGv5.d.ts +61 -0
  580. package/dist/format-4JG1MGv5.d.ts.map +1 -0
  581. package/dist/handler-urls-BHt3v8Ai.d.ts +70 -0
  582. package/dist/handler-urls-BHt3v8Ai.d.ts.map +1 -0
  583. package/dist/helpers/emails.js +2 -4
  584. package/dist/helpers/emails.js.map +1 -1
  585. package/dist/helpers/init-prompt.d.ts.map +1 -1
  586. package/dist/helpers/init-prompt.js +2 -4
  587. package/dist/helpers/init-prompt.js.map +1 -1
  588. package/dist/helpers/password.d.ts +1 -1
  589. package/dist/helpers/password.d.ts.map +1 -1
  590. package/dist/helpers/password.js +2 -4
  591. package/dist/helpers/password.js.map +1 -1
  592. package/dist/helpers/production-mode.d.ts +1 -1
  593. package/dist/helpers/production-mode.d.ts.map +1 -1
  594. package/dist/helpers/production-mode.js +2 -4
  595. package/dist/helpers/production-mode.js.map +1 -1
  596. package/dist/helpers/support-sla.d.ts.map +1 -1
  597. package/dist/helpers/support-sla.js +2 -3
  598. package/dist/helpers/support-sla.js.map +1 -1
  599. package/dist/helpers/support-sla.test.js +1 -3
  600. package/dist/helpers/support-sla.test.js.map +1 -1
  601. package/dist/helpers/vault/client-side.d.ts.map +1 -1
  602. package/dist/helpers/vault/client-side.js +2 -22
  603. package/dist/helpers/vault/client-side.js.map +1 -1
  604. package/dist/helpers/vault/server-side.js +2 -4
  605. package/dist/helpers/vault/server-side.js.map +1 -1
  606. package/dist/hooks/use-async-callback.d.ts.map +1 -1
  607. package/dist/hooks/use-async-callback.js +4 -5
  608. package/dist/hooks/use-async-callback.js.map +1 -1
  609. package/dist/hooks/use-async-external-store.d.ts +1 -1
  610. package/dist/hooks/use-async-external-store.d.ts.map +1 -1
  611. package/dist/hooks/use-async-external-store.js +2 -4
  612. package/dist/hooks/use-async-external-store.js.map +1 -1
  613. package/dist/hooks/use-hash.js +2 -4
  614. package/dist/hooks/use-hash.js.map +1 -1
  615. package/dist/hooks/use-hover.d.ts.map +1 -1
  616. package/dist/hooks/use-hover.js +2 -4
  617. package/dist/hooks/use-hover.js.map +1 -1
  618. package/dist/hooks/use-strict-memo.d.ts.map +1 -1
  619. package/dist/hooks/use-strict-memo.js +2 -72
  620. package/dist/hooks/use-strict-memo.js.map +1 -1
  621. package/dist/index.d.ts +4 -4
  622. package/dist/index.js +27 -29
  623. package/dist/interface/admin-interface.d.ts +3 -379
  624. package/dist/interface/admin-interface.js +3 -5
  625. package/dist/interface/admin-interface.js.map +1 -1
  626. package/dist/interface/admin-metrics.d.ts +2 -807
  627. package/dist/interface/admin-metrics.js +2 -4
  628. package/dist/interface/admin-metrics.js.map +1 -1
  629. package/dist/interface/client-interface.d.ts +2 -447
  630. package/dist/interface/client-interface.js +33 -18
  631. package/dist/interface/client-interface.js.map +1 -1
  632. package/dist/interface/client-interface.test.js +83 -13
  633. package/dist/interface/client-interface.test.js.map +1 -1
  634. package/dist/interface/conversations.d.ts +11 -11
  635. package/dist/interface/conversations.d.ts.map +1 -1
  636. package/dist/interface/conversations.js +2 -4
  637. package/dist/interface/conversations.js.map +1 -1
  638. package/dist/interface/crud/analytics.d.ts +2 -14
  639. package/dist/interface/crud/connected-accounts.d.ts +2 -68
  640. package/dist/interface/crud/connected-accounts.js +2 -4
  641. package/dist/interface/crud/connected-accounts.js.map +1 -1
  642. package/dist/interface/crud/contact-channels.d.ts +2 -181
  643. package/dist/interface/crud/contact-channels.js +2 -4
  644. package/dist/interface/crud/contact-channels.js.map +1 -1
  645. package/dist/interface/crud/current-user.d.ts +2 -285
  646. package/dist/interface/crud/current-user.js +2 -4
  647. package/dist/interface/crud/current-user.js.map +1 -1
  648. package/dist/interface/crud/email-outbox.d.ts +2 -1465
  649. package/dist/interface/crud/email-outbox.js +4 -5
  650. package/dist/interface/crud/email-outbox.js.map +1 -1
  651. package/dist/interface/crud/email-templates.d.ts +15 -16
  652. package/dist/interface/crud/email-templates.d.ts.map +1 -1
  653. package/dist/interface/crud/email-templates.js +2 -4
  654. package/dist/interface/crud/email-templates.js.map +1 -1
  655. package/dist/interface/crud/emails.d.ts +2 -41
  656. package/dist/interface/crud/emails.js +4 -5
  657. package/dist/interface/crud/emails.js.map +1 -1
  658. package/dist/interface/crud/internal-api-keys.d.ts +2 -140
  659. package/dist/interface/crud/internal-api-keys.js +2 -4
  660. package/dist/interface/crud/internal-api-keys.js.map +1 -1
  661. package/dist/interface/crud/invoices.d.ts +2 -43
  662. package/dist/interface/crud/invoices.js +2 -4
  663. package/dist/interface/crud/invoices.js.map +1 -1
  664. package/dist/interface/crud/items.d.ts +2 -30
  665. package/dist/interface/crud/items.js +2 -4
  666. package/dist/interface/crud/items.js.map +1 -1
  667. package/dist/interface/crud/notification-preferences.d.ts +2 -38
  668. package/dist/interface/crud/notification-preferences.js +2 -4
  669. package/dist/interface/crud/notification-preferences.js.map +1 -1
  670. package/dist/interface/crud/oauth-providers.d.ts +2 -186
  671. package/dist/interface/crud/oauth-providers.js +2 -4
  672. package/dist/interface/crud/oauth-providers.js.map +1 -1
  673. package/dist/interface/crud/products.d.ts +2 -182
  674. package/dist/interface/crud/products.js +4 -4
  675. package/dist/interface/crud/products.js.map +1 -1
  676. package/dist/interface/crud/project-api-keys.d.ts +2 -203
  677. package/dist/interface/crud/project-api-keys.js +2 -4
  678. package/dist/interface/crud/project-api-keys.js.map +1 -1
  679. package/dist/interface/crud/project-permissions.d.ts +2 -161
  680. package/dist/interface/crud/project-permissions.js +4 -5
  681. package/dist/interface/crud/project-permissions.js.map +1 -1
  682. package/dist/interface/crud/projects.d.ts +2 -901
  683. package/dist/interface/crud/projects.js +6 -5
  684. package/dist/interface/crud/projects.js.map +1 -1
  685. package/dist/interface/crud/session-replays.d.ts +2 -83
  686. package/dist/interface/crud/sessions.d.ts +2 -150
  687. package/dist/interface/crud/sessions.js +2 -4
  688. package/dist/interface/crud/sessions.js.map +1 -1
  689. package/dist/interface/crud/sign-up-rules.d.ts.map +1 -1
  690. package/dist/interface/crud/svix-token.d.ts +2 -31
  691. package/dist/interface/crud/svix-token.js +2 -4
  692. package/dist/interface/crud/svix-token.js.map +1 -1
  693. package/dist/interface/crud/team-invitation-details.d.ts +5 -6
  694. package/dist/interface/crud/team-invitation-details.d.ts.map +1 -1
  695. package/dist/interface/crud/team-invitation-details.js +4 -5
  696. package/dist/interface/crud/team-invitation-details.js.map +1 -1
  697. package/dist/interface/crud/team-invitation.d.ts +2 -54
  698. package/dist/interface/crud/team-invitation.js +4 -5
  699. package/dist/interface/crud/team-invitation.js.map +1 -1
  700. package/dist/interface/crud/team-member-profiles.d.ts +2 -286
  701. package/dist/interface/crud/team-member-profiles.js +4 -5
  702. package/dist/interface/crud/team-member-profiles.js.map +1 -1
  703. package/dist/interface/crud/team-memberships.d.ts +2 -75
  704. package/dist/interface/crud/team-memberships.js +2 -4
  705. package/dist/interface/crud/team-memberships.js.map +1 -1
  706. package/dist/interface/crud/team-permissions.d.ts +2 -169
  707. package/dist/interface/crud/team-permissions.js +4 -5
  708. package/dist/interface/crud/team-permissions.js.map +1 -1
  709. package/dist/interface/crud/teams.d.ts +2 -299
  710. package/dist/interface/crud/teams.js +5 -7
  711. package/dist/interface/crud/teams.js.map +1 -1
  712. package/dist/interface/crud/transactions.d.ts +2 -183
  713. package/dist/interface/crud/transactions.js +2 -4
  714. package/dist/interface/crud/transactions.js.map +1 -1
  715. package/dist/interface/crud/users.d.ts +2 -653
  716. package/dist/interface/crud/users.js +12 -8
  717. package/dist/interface/crud/users.js.map +1 -1
  718. package/dist/interface/handler-urls.d.ts +2 -51
  719. package/dist/interface/handler-urls.js +12 -14
  720. package/dist/interface/page-component-versions.d.ts +2 -25
  721. package/dist/interface/page-component-versions.js +2 -4
  722. package/dist/interface/page-component-versions.js.map +1 -1
  723. package/dist/interface/plan-usage.d.ts +2 -57
  724. package/dist/interface/plan-usage.js +2 -4
  725. package/dist/interface/plan-usage.js.map +1 -1
  726. package/dist/interface/server-interface.d.ts +2 -257
  727. package/dist/interface/server-interface.js +3 -5
  728. package/dist/interface/server-interface.js.map +1 -1
  729. package/dist/interface/webhooks.d.ts +2 -326
  730. package/dist/interface/webhooks.js +2 -4
  731. package/dist/interface/webhooks.js.map +1 -1
  732. package/dist/internal-api-keys-D8IYDodH.d.ts +139 -0
  733. package/dist/internal-api-keys-D8IYDodH.d.ts.map +1 -0
  734. package/dist/invoices-CHo9YKbI.d.ts +43 -0
  735. package/dist/invoices-CHo9YKbI.d.ts.map +1 -0
  736. package/dist/items-DlLSlVUD.d.ts +29 -0
  737. package/dist/items-DlLSlVUD.d.ts.map +1 -0
  738. package/dist/json-a1QIXu5z.d.ts +15 -0
  739. package/dist/json-a1QIXu5z.d.ts.map +1 -0
  740. package/dist/known-errors-Bm4a61wL.d.ts +575 -0
  741. package/dist/known-errors-Bm4a61wL.d.ts.map +1 -0
  742. package/dist/known-errors.d.ts +2 -575
  743. package/dist/known-errors.js +11 -23
  744. package/dist/known-errors.js.map +1 -1
  745. package/dist/notification-preferences-Bmzr_EOY.d.ts +37 -0
  746. package/dist/notification-preferences-Bmzr_EOY.d.ts.map +1 -0
  747. package/dist/oauth-providers-BMkKSSlA.d.ts +185 -0
  748. package/dist/oauth-providers-BMkKSSlA.d.ts.map +1 -0
  749. package/dist/objects-DkCkeBWE.d.ts +59 -0
  750. package/dist/objects-DkCkeBWE.d.ts.map +1 -0
  751. package/dist/passkey-CKg87UH-.d.ts +2 -0
  752. package/dist/payments/payment-methods.d.ts.map +1 -1
  753. package/dist/payments/payment-methods.js +2 -3
  754. package/dist/payments/payment-methods.js.map +1 -1
  755. package/dist/payments/stripe-limits.d.ts.map +1 -1
  756. package/dist/payments/stripe-limits.js +2 -3
  757. package/dist/payments/stripe-limits.js.map +1 -1
  758. package/dist/plan-usage-DfDoj5K4.d.ts +57 -0
  759. package/dist/plan-usage-DfDoj5K4.d.ts.map +1 -0
  760. package/dist/plans.d.ts.map +1 -1
  761. package/dist/plans.js +2 -3
  762. package/dist/plans.js.map +1 -1
  763. package/dist/products-Bs74ld-v.d.ts +182 -0
  764. package/dist/products-Bs74ld-v.d.ts.map +1 -0
  765. package/dist/project-api-keys--7V5X_UW.d.ts +203 -0
  766. package/dist/project-api-keys--7V5X_UW.d.ts.map +1 -0
  767. package/dist/project-permissions-kdi675F-.d.ts +160 -0
  768. package/dist/project-permissions-kdi675F-.d.ts.map +1 -0
  769. package/dist/projects-CFTNXRfG.d.ts +900 -0
  770. package/dist/projects-CFTNXRfG.d.ts.map +1 -0
  771. package/dist/results-DP3BzoL6.d.ts +70 -0
  772. package/dist/results-DP3BzoL6.d.ts.map +1 -0
  773. package/dist/{chunk-BE-pF4vm.js → rolldown-runtime-D6vf50IK.js} +12 -18
  774. package/dist/schema-CJwkGkdf.d.ts +2328 -0
  775. package/dist/schema-CJwkGkdf.d.ts.map +1 -0
  776. package/dist/schema-fields-DqGQ4kF7.d.ts +517 -0
  777. package/dist/schema-fields-DqGQ4kF7.d.ts.map +1 -0
  778. package/dist/schema-fields.d.ts +3 -518
  779. package/dist/schema-fields.js +21 -82
  780. package/dist/schema-fields.js.map +1 -1
  781. package/dist/server-interface-CgpxsLT_.d.ts +257 -0
  782. package/dist/server-interface-CgpxsLT_.d.ts.map +1 -0
  783. package/dist/session-replays-CXqhDpZq.d.ts +83 -0
  784. package/dist/session-replays-CXqhDpZq.d.ts.map +1 -0
  785. package/dist/sessions-B7Ko2Ldr.d.ts +149 -0
  786. package/dist/sessions-B7Ko2Ldr.d.ts.map +1 -0
  787. package/dist/sessions-d8qtvBUB.d.ts +175 -0
  788. package/dist/sessions-d8qtvBUB.d.ts.map +1 -0
  789. package/dist/sessions.d.ts +2 -175
  790. package/dist/sessions.js +4 -5
  791. package/dist/sessions.js.map +1 -1
  792. package/dist/sessions.test.js +1 -3
  793. package/dist/sessions.test.js.map +1 -1
  794. package/dist/strings-DWgkUybS.d.ts +76 -0
  795. package/dist/strings-DWgkUybS.d.ts.map +1 -0
  796. package/dist/svix-token-BsMrLGvy.d.ts +30 -0
  797. package/dist/svix-token-BsMrLGvy.d.ts.map +1 -0
  798. package/dist/team-invitation-Cyqt9oWw.d.ts +53 -0
  799. package/dist/team-invitation-Cyqt9oWw.d.ts.map +1 -0
  800. package/dist/team-member-profiles-BoDEqx-0.d.ts +285 -0
  801. package/dist/team-member-profiles-BoDEqx-0.d.ts.map +1 -0
  802. package/dist/team-memberships-DZHk2A5b.d.ts +74 -0
  803. package/dist/team-memberships-DZHk2A5b.d.ts.map +1 -0
  804. package/dist/team-permissions-DqOpaOWh.d.ts +168 -0
  805. package/dist/team-permissions-DqOpaOWh.d.ts.map +1 -0
  806. package/dist/teams-CQMcBnjM.d.ts +298 -0
  807. package/dist/teams-CQMcBnjM.d.ts.map +1 -0
  808. package/dist/transactions-DhnbvGH5.d.ts +182 -0
  809. package/dist/transactions-DhnbvGH5.d.ts.map +1 -0
  810. package/dist/types-DfTcxNtM.d.ts +77 -0
  811. package/dist/types-DfTcxNtM.d.ts.map +1 -0
  812. package/dist/users-DHNRwoSz.d.ts +653 -0
  813. package/dist/users-DHNRwoSz.d.ts.map +1 -0
  814. package/dist/utils/analytics-clickmap-overlay.d.ts.map +1 -1
  815. package/dist/utils/analytics-clickmap-overlay.js +2 -3
  816. package/dist/utils/analytics-clickmap-overlay.js.map +1 -1
  817. package/dist/utils/api-keys.d.ts.map +1 -1
  818. package/dist/utils/api-keys.js +4 -5
  819. package/dist/utils/api-keys.js.map +1 -1
  820. package/dist/utils/arrays.d.ts.map +1 -1
  821. package/dist/utils/arrays.js +2 -472
  822. package/dist/utils/arrays.js.map +1 -1
  823. package/dist/utils/auth-methods.d.ts.map +1 -1
  824. package/dist/utils/auth-methods.js +2 -3
  825. package/dist/utils/auth-methods.js.map +1 -1
  826. package/dist/utils/base64.d.ts.map +1 -1
  827. package/dist/utils/base64.js +2 -12
  828. package/dist/utils/base64.js.map +1 -1
  829. package/dist/utils/booleans.d.ts.map +1 -1
  830. package/dist/utils/booleans.js +2 -27
  831. package/dist/utils/booleans.js.map +1 -1
  832. package/dist/utils/browser-compat.d.ts.map +1 -1
  833. package/dist/utils/browser-compat.js +2 -3
  834. package/dist/utils/browser-compat.js.map +1 -1
  835. package/dist/utils/bytes.d.ts.map +1 -1
  836. package/dist/utils/bytes.js +4 -200
  837. package/dist/utils/bytes.js.map +1 -1
  838. package/dist/utils/caches.d.ts.map +1 -1
  839. package/dist/utils/caches.js +2 -29
  840. package/dist/utils/caches.js.map +1 -1
  841. package/dist/utils/cel-fields.d.ts.map +1 -1
  842. package/dist/utils/cel-fields.js +2 -4
  843. package/dist/utils/cel-fields.js.map +1 -1
  844. package/dist/utils/cloud-hosts.d.ts.map +1 -1
  845. package/dist/utils/cloud-hosts.js +2 -29
  846. package/dist/utils/cloud-hosts.js.map +1 -1
  847. package/dist/utils/compile-time.d.ts.map +1 -1
  848. package/dist/utils/compile-time.js +2 -3
  849. package/dist/utils/compile-time.js.map +1 -1
  850. package/dist/utils/country-codes.d.ts +2 -11
  851. package/dist/utils/country-codes.js +2 -18
  852. package/dist/utils/country-codes.js.map +1 -1
  853. package/dist/utils/crypto.d.ts.map +1 -1
  854. package/dist/utils/crypto.js +4 -115
  855. package/dist/utils/crypto.js.map +1 -1
  856. package/dist/utils/currencies.d.ts +1 -1
  857. package/dist/utils/currencies.d.ts.map +1 -1
  858. package/dist/utils/currencies.js +3 -39
  859. package/dist/utils/currencies.js.map +1 -1
  860. package/dist/utils/currency-constants.d.ts +2 -45
  861. package/dist/utils/currency-constants.js +2 -3
  862. package/dist/utils/currency-constants.js.map +1 -1
  863. package/dist/utils/dates.d.ts +2 -23
  864. package/dist/utils/dates.js +2 -46
  865. package/dist/utils/dates.js.map +1 -1
  866. package/dist/utils/dev-env-state-path.d.ts.map +1 -1
  867. package/dist/utils/dev-env-state-path.js +2 -4
  868. package/dist/utils/dev-env-state-path.js.map +1 -1
  869. package/dist/utils/dev-tool.d.ts.map +1 -1
  870. package/dist/utils/dev-tool.js +2 -3
  871. package/dist/utils/dev-tool.js.map +1 -1
  872. package/dist/utils/dom.d.ts.map +1 -1
  873. package/dist/utils/dom.js +2 -3
  874. package/dist/utils/dom.js.map +1 -1
  875. package/dist/utils/elements-chain.d.ts.map +1 -1
  876. package/dist/utils/elements-chain.js +6 -52
  877. package/dist/utils/elements-chain.js.map +1 -1
  878. package/dist/utils/env.d.ts.map +1 -1
  879. package/dist/utils/env.js +2 -4
  880. package/dist/utils/env.js.map +1 -1
  881. package/dist/utils/env.test.js +1 -3
  882. package/dist/utils/env.test.js.map +1 -1
  883. package/dist/utils/errors.d.ts +2 -238
  884. package/dist/utils/errors.js +2 -4
  885. package/dist/utils/errors.js.map +1 -1
  886. package/dist/utils/esbuild.d.ts +1 -1
  887. package/dist/utils/esbuild.d.ts.map +1 -1
  888. package/dist/utils/esbuild.js +5 -6
  889. package/dist/utils/esbuild.js.map +1 -1
  890. package/dist/utils/featurebase.d.ts.map +1 -1
  891. package/dist/utils/featurebase.js +2 -4
  892. package/dist/utils/featurebase.js.map +1 -1
  893. package/dist/utils/fs.d.ts.map +1 -1
  894. package/dist/utils/fs.js +5 -6
  895. package/dist/utils/fs.js.map +1 -1
  896. package/dist/utils/functions.d.ts.map +1 -1
  897. package/dist/utils/functions.js +2 -26
  898. package/dist/utils/functions.js.map +1 -1
  899. package/dist/utils/geo.d.ts.map +1 -1
  900. package/dist/utils/geo.js +2 -4
  901. package/dist/utils/geo.js.map +1 -1
  902. package/dist/utils/globals.d.ts.map +1 -1
  903. package/dist/utils/globals.js +2 -3
  904. package/dist/utils/globals.js.map +1 -1
  905. package/dist/utils/hashes.d.ts.map +1 -1
  906. package/dist/utils/hashes.js +4 -5
  907. package/dist/utils/hashes.js.map +1 -1
  908. package/dist/utils/html.d.ts.map +1 -1
  909. package/dist/utils/html.js +2 -21
  910. package/dist/utils/html.js.map +1 -1
  911. package/dist/utils/http.d.ts.map +1 -1
  912. package/dist/utils/http.js +2 -21
  913. package/dist/utils/http.js.map +1 -1
  914. package/dist/utils/ips.d.ts.map +1 -1
  915. package/dist/utils/ips.js +4 -28
  916. package/dist/utils/ips.js.map +1 -1
  917. package/dist/utils/json.d.ts +2 -15
  918. package/dist/utils/json.js +2 -157
  919. package/dist/utils/json.js.map +1 -1
  920. package/dist/utils/jsx-editable-transpiler.d.ts.map +1 -1
  921. package/dist/utils/jsx-editable-transpiler.js +7 -8
  922. package/dist/utils/jsx-editable-transpiler.js.map +1 -1
  923. package/dist/utils/jsx-editable-transpiler.test.js +1 -3
  924. package/dist/utils/jsx-editable-transpiler.test.js.map +1 -1
  925. package/dist/utils/jwt.d.ts.map +1 -1
  926. package/dist/utils/jwt.js +6 -7
  927. package/dist/utils/jwt.js.map +1 -1
  928. package/dist/utils/locks.d.ts.map +1 -1
  929. package/dist/utils/locks.js +2 -4
  930. package/dist/utils/locks.js.map +1 -1
  931. package/dist/utils/maps.d.ts.map +1 -1
  932. package/dist/utils/maps.js +2 -113
  933. package/dist/utils/maps.js.map +1 -1
  934. package/dist/utils/math.d.ts.map +1 -1
  935. package/dist/utils/math.js +2 -13
  936. package/dist/utils/math.js.map +1 -1
  937. package/dist/utils/monkey-patch.d.ts.map +1 -1
  938. package/dist/utils/monkey-patch.js +3 -5
  939. package/dist/utils/monkey-patch.js.map +1 -1
  940. package/dist/utils/node-http.js +2 -4
  941. package/dist/utils/node-http.js.map +1 -1
  942. package/dist/utils/numbers.d.ts.map +1 -1
  943. package/dist/utils/numbers.js +2 -47
  944. package/dist/utils/numbers.js.map +1 -1
  945. package/dist/utils/oauth.d.ts.map +1 -1
  946. package/dist/utils/oauth.js +2 -3
  947. package/dist/utils/oauth.js.map +1 -1
  948. package/dist/utils/objects.d.ts +2 -59
  949. package/dist/utils/objects.js +2 -624
  950. package/dist/utils/objects.js.map +1 -1
  951. package/dist/utils/paginated-lists.d.ts.map +1 -1
  952. package/dist/utils/paginated-lists.js +2 -4
  953. package/dist/utils/paginated-lists.js.map +1 -1
  954. package/dist/utils/paginated-lists.test.js +1 -3
  955. package/dist/utils/paginated-lists.test.js.map +1 -1
  956. package/dist/utils/passkey.d.ts +2 -2
  957. package/dist/utils/promises.d.ts +1 -1
  958. package/dist/utils/promises.d.ts.map +1 -1
  959. package/dist/utils/promises.js +3 -163
  960. package/dist/utils/promises.js.map +1 -1
  961. package/dist/utils/proxies.d.ts.map +1 -1
  962. package/dist/utils/proxies.js +2 -39
  963. package/dist/utils/proxies.js.map +1 -1
  964. package/dist/utils/react.d.ts.map +1 -1
  965. package/dist/utils/react.js +4 -44
  966. package/dist/utils/react.js.map +1 -1
  967. package/dist/utils/redirect-urls.d.ts.map +1 -1
  968. package/dist/utils/redirect-urls.js +3 -94
  969. package/dist/utils/redirect-urls.js.map +1 -1
  970. package/dist/utils/regex.js +2 -3
  971. package/dist/utils/regex.js.map +1 -1
  972. package/dist/utils/results.d.ts +2 -70
  973. package/dist/utils/results.js +2 -215
  974. package/dist/utils/results.js.map +1 -1
  975. package/dist/utils/sentry.js +2 -3
  976. package/dist/utils/sentry.js.map +1 -1
  977. package/dist/utils/stores.d.ts +1 -1
  978. package/dist/utils/stores.d.ts.map +1 -1
  979. package/dist/utils/stores.js +2 -4
  980. package/dist/utils/stores.js.map +1 -1
  981. package/dist/utils/strings.d.ts +2 -76
  982. package/dist/utils/strings.js +2 -253
  983. package/dist/utils/strings.js.map +1 -1
  984. package/dist/utils/strings.nicify.test.js +1 -3
  985. package/dist/utils/strings.nicify.test.js.map +1 -1
  986. package/dist/utils/telemetry.d.ts.map +1 -1
  987. package/dist/utils/telemetry.js +2 -4
  988. package/dist/utils/telemetry.js.map +1 -1
  989. package/dist/utils/turnstile-browser.d.ts.map +1 -1
  990. package/dist/utils/turnstile-browser.js +2 -4
  991. package/dist/utils/turnstile-browser.js.map +1 -1
  992. package/dist/utils/turnstile-flow.d.ts.map +1 -1
  993. package/dist/utils/turnstile-flow.js +2 -4
  994. package/dist/utils/turnstile-flow.js.map +1 -1
  995. package/dist/utils/turnstile-flow.test.js +1 -3
  996. package/dist/utils/turnstile-flow.test.js.map +1 -1
  997. package/dist/utils/turnstile.d.ts.map +1 -1
  998. package/dist/utils/turnstile.js +2 -3
  999. package/dist/utils/turnstile.js.map +1 -1
  1000. package/dist/utils/typed-arrays.js +2 -4
  1001. package/dist/utils/typed-arrays.js.map +1 -1
  1002. package/dist/utils/types.d.ts +2 -77
  1003. package/dist/utils/types.js +2 -3
  1004. package/dist/utils/types.js.map +1 -1
  1005. package/dist/utils/unicode.d.ts.map +1 -1
  1006. package/dist/utils/unicode.js +2 -15
  1007. package/dist/utils/unicode.js.map +1 -1
  1008. package/dist/utils/urls.d.ts.map +1 -1
  1009. package/dist/utils/urls.js +2 -153
  1010. package/dist/utils/urls.js.map +1 -1
  1011. package/dist/utils/uuids.d.ts.map +1 -1
  1012. package/dist/utils/uuids.js +3 -28
  1013. package/dist/utils/uuids.js.map +1 -1
  1014. package/dist/webhooks-8Ts1Clcb.d.ts +326 -0
  1015. package/dist/webhooks-8Ts1Clcb.d.ts.map +1 -0
  1016. package/package.json +2 -8
  1017. package/src/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.ts +1 -0
  1018. package/src/interface/client-interface.test.ts +77 -12
  1019. package/src/interface/client-interface.ts +9 -9
  1020. package/dist/config/format.d.ts.map +0 -1
  1021. package/dist/config/schema.d.ts.map +0 -1
  1022. package/dist/crud.d.ts.map +0 -1
  1023. package/dist/interface/admin-interface.d.ts.map +0 -1
  1024. package/dist/interface/admin-metrics.d.ts.map +0 -1
  1025. package/dist/interface/client-interface.d.ts.map +0 -1
  1026. package/dist/interface/crud/analytics.d.ts.map +0 -1
  1027. package/dist/interface/crud/connected-accounts.d.ts.map +0 -1
  1028. package/dist/interface/crud/contact-channels.d.ts.map +0 -1
  1029. package/dist/interface/crud/current-user.d.ts.map +0 -1
  1030. package/dist/interface/crud/emails.d.ts.map +0 -1
  1031. package/dist/interface/crud/internal-api-keys.d.ts.map +0 -1
  1032. package/dist/interface/crud/invoices.d.ts.map +0 -1
  1033. package/dist/interface/crud/items.d.ts.map +0 -1
  1034. package/dist/interface/crud/notification-preferences.d.ts.map +0 -1
  1035. package/dist/interface/crud/oauth-providers.d.ts.map +0 -1
  1036. package/dist/interface/crud/products.d.ts.map +0 -1
  1037. package/dist/interface/crud/project-api-keys.d.ts.map +0 -1
  1038. package/dist/interface/crud/project-permissions.d.ts.map +0 -1
  1039. package/dist/interface/crud/projects.d.ts.map +0 -1
  1040. package/dist/interface/crud/session-replays.d.ts.map +0 -1
  1041. package/dist/interface/crud/sessions.d.ts.map +0 -1
  1042. package/dist/interface/crud/svix-token.d.ts.map +0 -1
  1043. package/dist/interface/crud/team-invitation.d.ts.map +0 -1
  1044. package/dist/interface/crud/team-member-profiles.d.ts.map +0 -1
  1045. package/dist/interface/crud/team-memberships.d.ts.map +0 -1
  1046. package/dist/interface/crud/team-permissions.d.ts.map +0 -1
  1047. package/dist/interface/crud/teams.d.ts.map +0 -1
  1048. package/dist/interface/crud/transactions.d.ts.map +0 -1
  1049. package/dist/interface/crud/users.d.ts.map +0 -1
  1050. package/dist/interface/handler-urls.d.ts.map +0 -1
  1051. package/dist/interface/page-component-versions.d.ts.map +0 -1
  1052. package/dist/interface/plan-usage.d.ts.map +0 -1
  1053. package/dist/interface/server-interface.d.ts.map +0 -1
  1054. package/dist/interface/webhooks.d.ts.map +0 -1
  1055. package/dist/known-errors.d.ts.map +0 -1
  1056. package/dist/schema-fields.d.ts.map +0 -1
  1057. package/dist/sessions.d.ts.map +0 -1
  1058. package/dist/utils/country-codes.d.ts.map +0 -1
  1059. package/dist/utils/currency-constants.d.ts.map +0 -1
  1060. package/dist/utils/dates.d.ts.map +0 -1
  1061. package/dist/utils/errors.d.ts.map +0 -1
  1062. package/dist/utils/json.d.ts.map +0 -1
  1063. package/dist/utils/objects.d.ts.map +0 -1
  1064. package/dist/utils/results.d.ts.map +0 -1
  1065. package/dist/utils/strings.d.ts.map +0 -1
  1066. package/dist/utils/types.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"urls.js","names":[],"sources":["../../src/utils/urls.tsx"],"sourcesContent":["import { generateSecureRandomString } from \"./crypto\";\nimport { templateIdentity } from \"./strings\";\n\nexport function createUrlIfValid(...args: ConstructorParameters<typeof URL>) {\n try {\n return new URL(...args);\n } catch (e) {\n return null;\n }\n}\nimport.meta.vitest?.test(\"createUrlIfValid\", ({ expect }) => {\n // Test with valid URLs\n expect(createUrlIfValid(\"https://example.com\")).toBeInstanceOf(URL);\n expect(createUrlIfValid(\"https://example.com/path?query=value#hash\")).toBeInstanceOf(URL);\n expect(createUrlIfValid(\"/path\", \"https://example.com\")).toBeInstanceOf(URL);\n\n // Test with invalid URLs\n expect(createUrlIfValid(\"\")).toBeNull();\n expect(createUrlIfValid(\"not a url\")).toBeNull();\n expect(createUrlIfValid(\"http://\")).toBeNull();\n});\n\nexport function isValidUrl(url: string) {\n return !!createUrlIfValid(url);\n}\nimport.meta.vitest?.test(\"isValidUrl\", ({ expect }) => {\n // Test with valid URLs\n expect(isValidUrl(\"https://example.com\")).toBe(true);\n expect(isValidUrl(\"http://localhost:3000\")).toBe(true);\n expect(isValidUrl(\"ftp://example.com\")).toBe(true);\n\n // Test with invalid URLs\n expect(isValidUrl(\"\")).toBe(false);\n expect(isValidUrl(\"not a url\")).toBe(false);\n expect(isValidUrl(\"http://\")).toBe(false);\n});\n\nexport function isValidHostname(hostname: string) {\n // Basic validation\n if (!hostname || hostname.startsWith('.') || hostname.endsWith('.') || hostname.includes('..')) {\n return false;\n }\n\n const url = createUrlIfValid(`https://${hostname}`);\n if (!url) return false;\n return url.hostname === hostname;\n}\nimport.meta.vitest?.test(\"isValidHostname\", ({ expect }) => {\n // Test with valid hostnames\n expect(isValidHostname(\"example.com\")).toBe(true);\n expect(isValidHostname(\"localhost\")).toBe(true);\n expect(isValidHostname(\"sub.domain.example.com\")).toBe(true);\n expect(isValidHostname(\"127.0.0.1\")).toBe(true);\n\n // Test with invalid hostnames\n expect(isValidHostname(\"\")).toBe(false);\n expect(isValidHostname(\"example.com/path\")).toBe(false);\n expect(isValidHostname(\"https://example.com\")).toBe(false);\n expect(isValidHostname(\"example com\")).toBe(false);\n});\n\nexport function isValidHostnameWithWildcards(hostname: string) {\n // Empty hostnames are invalid\n if (!hostname) return false;\n\n // Check if it contains wildcards\n const hasWildcard = hostname.includes('*');\n\n if (!hasWildcard) {\n // If no wildcards, validate as a normal hostname\n return isValidHostname(hostname);\n }\n\n // Basic validation checks that apply even with wildcards\n // - Hostname cannot start or end with a dot\n if (hostname.startsWith('.') || hostname.endsWith('.')) {\n return false;\n }\n\n // - No consecutive dots\n if (hostname.includes('..')) {\n return false;\n }\n\n // For wildcard validation, check that non-wildcard parts contain valid characters\n // Replace wildcards with a valid placeholder to check the rest\n const testHostname = hostname.replace(/\\*+/g, 'wildcard');\n\n // Check if the resulting string would be a valid hostname\n if (!/^[a-zA-Z0-9.-]+$/.test(testHostname)) {\n return false;\n }\n\n // Additional check: ensure the pattern makes sense\n // Check each segment between wildcards\n const segments = hostname.split(/\\*+/);\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n if (segment === '') continue; // Empty segments are OK (consecutive wildcards)\n\n // First segment can't start with dot\n if (i === 0 && segment.startsWith('.')) {\n return false;\n }\n\n // Last segment can't end with dot\n if (i === segments.length - 1 && segment.endsWith('.')) {\n return false;\n }\n\n // No segment should have consecutive dots\n if (segment.includes('..')) {\n return false;\n }\n }\n\n return true;\n}\nimport.meta.vitest?.test(\"isValidHostnameWithWildcards\", ({ expect }) => {\n // Test with valid regular hostnames\n expect(isValidHostnameWithWildcards(\"example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"localhost\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"sub.domain.example.com\")).toBe(true);\n\n // Test with valid wildcard hostnames\n expect(isValidHostnameWithWildcards(\"*.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"a-*.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"*.*.org\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"**.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"sub.**.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"*-api.*.com\")).toBe(true);\n\n // Test with invalid hostnames\n expect(isValidHostnameWithWildcards(\"\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example.com/path\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"https://example.com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\".example.com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example.com.\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example..com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"*.example..com\")).toBe(false);\n});\n\nexport function matchHostnamePattern(pattern: string, hostname: string): boolean {\n // If no wildcards, it's an exact match\n if (!pattern.includes('*')) {\n return pattern === hostname;\n }\n\n // Convert the pattern to a regex\n // First, escape all regex special characters except *\n let regexPattern = pattern.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n // Use a placeholder for ** to handle it separately from single *\n const doubleWildcardPlaceholder = '\\x00DOUBLE_WILDCARD\\x00';\n regexPattern = regexPattern.replace(/\\*\\*/g, doubleWildcardPlaceholder);\n\n // Replace single * with a pattern that matches anything except dots\n regexPattern = regexPattern.replace(/\\*/g, '[^.]*');\n\n // Replace the double wildcard placeholder with a pattern that matches anything including dots\n regexPattern = regexPattern.replace(new RegExp(doubleWildcardPlaceholder, 'g'), '.*');\n\n // Anchor the pattern to match the entire hostname\n regexPattern = '^' + regexPattern + '$';\n\n try {\n const regex = new RegExp(regexPattern);\n return regex.test(hostname);\n } catch {\n return false;\n }\n}\nimport.meta.vitest?.test(\"matchHostnamePattern\", ({ expect }) => {\n // Test exact matches\n expect(matchHostnamePattern(\"example.com\", \"example.com\")).toBe(true);\n expect(matchHostnamePattern(\"example.com\", \"other.com\")).toBe(false);\n\n // Test single wildcard matches\n expect(matchHostnamePattern(\"*.example.com\", \"api.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"*.example.com\", \"www.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"*.example.com\", \"example.com\")).toBe(false);\n expect(matchHostnamePattern(\"*.example.com\", \"api.v2.example.com\")).toBe(false);\n\n // Test double wildcard matches\n expect(matchHostnamePattern(\"**.example.com\", \"api.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"api.v2.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"a.b.c.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"example.com\")).toBe(false);\n\n // Test complex patterns\n expect(matchHostnamePattern(\"api-*.example.com\", \"api-v1.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"api-*.example.com\", \"api-v2.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"api-*.example.com\", \"api.example.com\")).toBe(false);\n expect(matchHostnamePattern(\"*.*.org\", \"mail.example.org\")).toBe(true);\n expect(matchHostnamePattern(\"*.*.org\", \"example.org\")).toBe(false);\n});\n\nexport function getHardcodedFallbackUrls(primaryBaseUrl: string): string[] {\n // `defaultBaseUrl` in `@stackframe/*` SDK builds is `https://api.stack-auth.com`\n // (see `packages/template/src/lib/hexclave-app/apps/implementations/common.ts`).\n // The `@hexclave/*` mirror packages will get this rewritten to the hexclave\n // hostname by `scripts/rewrite-packages-to-hexclave.ts` in a follow-up PR; both\n // branches below stay listed so either build resolves its own fallback set.\n if (primaryBaseUrl === \"https://api.stack-auth.com\") {\n return [\"https://api1.stack-auth.com\", \"https://api2.stack-auth.com\"];\n }\n if (primaryBaseUrl === \"https://api.dev.stack-auth.com\") {\n return [\"https://api1.dev.stack-auth.com\", \"https://api2.dev.stack-auth.com\"];\n }\n if (primaryBaseUrl === \"https://api.hexclave.com\") {\n return [\"https://api1.hexclave.com\", \"https://api2.hexclave.com\"];\n }\n if (primaryBaseUrl === \"https://api.dev.hexclave.com\") {\n return [\"https://api1.dev.hexclave.com\", \"https://api2.dev.hexclave.com\"];\n }\n const localhostMatch = primaryBaseUrl.match(/^http:\\/\\/localhost:(\\d+)02$/);\n if (localhostMatch) {\n return [`http://localhost:${localhostMatch[1]}10`];\n }\n return [];\n}\n\nexport function getDefaultApiUrls(primaryBaseUrl: string): string[] {\n return [primaryBaseUrl, ...getHardcodedFallbackUrls(primaryBaseUrl)];\n}\n\nexport function isLocalhost(urlOrString: string | URL) {\n const url = createUrlIfValid(urlOrString);\n if (!url) return false;\n if (url.hostname === \"localhost\" || url.hostname.endsWith(\".localhost\")) return true;\n if (url.hostname.match(/^127\\.\\d+\\.\\d+\\.\\d+$/)) return true;\n if (url.hostname === \"[::1]\" || url.hostname === \"::1\") return true;\n return false;\n}\nimport.meta.vitest?.test(\"isLocalhost\", ({ expect }) => {\n // Test with localhost URLs\n expect(isLocalhost(\"http://localhost\")).toBe(true);\n expect(isLocalhost(\"https://localhost:8080\")).toBe(true);\n expect(isLocalhost(\"http://sub.localhost\")).toBe(true);\n expect(isLocalhost(\"http://127.0.0.1\")).toBe(true);\n expect(isLocalhost(\"http://127.1.2.3\")).toBe(true);\n expect(isLocalhost(\"http://[::1]\")).toBe(true);\n\n // Test with non-localhost URLs\n expect(isLocalhost(\"https://example.com\")).toBe(false);\n expect(isLocalhost(\"http://192.168.1.1\")).toBe(false);\n expect(isLocalhost(\"http://10.0.0.1\")).toBe(false);\n\n // Test with URL objects\n expect(isLocalhost(new URL(\"http://localhost\"))).toBe(true);\n expect(isLocalhost(new URL(\"https://example.com\"))).toBe(false);\n\n // Test with invalid URLs\n expect(isLocalhost(\"not a url\")).toBe(false);\n expect(isLocalhost(\"\")).toBe(false);\n});\n\nexport function isRelative(url: string) {\n const randomDomain = `${generateSecureRandomString()}.stack-auth.example.com`;\n const u = createUrlIfValid(url, `https://${randomDomain}`);\n if (!u) return false;\n if (u.host !== randomDomain) return false;\n if (u.protocol !== \"https:\") return false;\n return true;\n}\nimport.meta.vitest?.test(\"isRelative\", ({ expect }) => {\n // We can't easily mock generateSecureRandomString in this context\n // but we can still test the function's behavior\n\n // Test with relative URLs\n expect(isRelative(\"/\")).toBe(true);\n expect(isRelative(\"/path\")).toBe(true);\n expect(isRelative(\"/path?query=value#hash\")).toBe(true);\n\n // Test with absolute URLs\n expect(isRelative(\"https://example.com\")).toBe(false);\n expect(isRelative(\"http://example.com\")).toBe(false);\n expect(isRelative(\"//example.com\")).toBe(false);\n\n // Note: The implementation treats empty strings and invalid URLs as relative\n // This is because they can be resolved against a base URL\n expect(isRelative(\"\")).toBe(true);\n expect(isRelative(\"not a url\")).toBe(true);\n});\n\nexport function getRelativePart(url: URL) {\n return url.pathname + url.search + url.hash;\n}\nimport.meta.vitest?.test(\"getRelativePart\", ({ expect }) => {\n // Test with various URLs\n expect(getRelativePart(new URL(\"https://example.com\"))).toBe(\"/\");\n expect(getRelativePart(new URL(\"https://example.com/path\"))).toBe(\"/path\");\n expect(getRelativePart(new URL(\"https://example.com/path?query=value\"))).toBe(\"/path?query=value\");\n expect(getRelativePart(new URL(\"https://example.com/path#hash\"))).toBe(\"/path#hash\");\n expect(getRelativePart(new URL(\"https://example.com/path?query=value#hash\"))).toBe(\"/path?query=value#hash\");\n\n // Test with different domains but same paths\n const url1 = new URL(\"https://example.com/path?query=value#hash\");\n const url2 = new URL(\"https://different.com/path?query=value#hash\");\n expect(getRelativePart(url1)).toBe(getRelativePart(url2));\n});\n\n/**\n * A template literal tag that returns a URL.\n *\n * Any values passed are encoded.\n */\nexport function url(strings: TemplateStringsArray | readonly string[], ...values: (string | number | boolean)[]): URL {\n return new URL(urlString(strings, ...values));\n}\nimport.meta.vitest?.test(\"url\", ({ expect }) => {\n // Test with no interpolation\n expect(url`https://example.com`).toBeInstanceOf(URL);\n expect(url`https://example.com`.href).toBe(\"https://example.com/\");\n\n // Test with string interpolation\n expect(url`https://example.com/${\"path\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path\"}`.pathname).toBe(\"/path\");\n\n // Test with number interpolation\n expect(url`https://example.com/${42}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${42}`.pathname).toBe(\"/42\");\n\n // Test with boolean interpolation\n expect(url`https://example.com/${true}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${true}`.pathname).toBe(\"/true\");\n\n // Test with special characters in interpolation\n expect(url`https://example.com/${\"path with spaces\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path with spaces\"}`.pathname).toBe(\"/path%20with%20spaces\");\n\n // Test with multiple interpolations\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`.pathname).toBe(\"/path\");\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`.search).toBe(\"?query=value\");\n});\n\n\n/**\n * A template literal tag that returns a URL string.\n *\n * Any values passed are encoded.\n */\nexport function urlString(strings: TemplateStringsArray | readonly string[], ...values: (string | number | boolean)[]): string {\n return templateIdentity(strings, ...values.map(encodeURIComponent));\n}\nimport.meta.vitest?.test(\"urlString\", ({ expect }) => {\n // Test with no interpolation\n expect(urlString`https://example.com`).toBe(\"https://example.com\");\n\n // Test with string interpolation\n expect(urlString`https://example.com/${\"path\"}`).toBe(\"https://example.com/path\");\n\n // Test with number interpolation\n expect(urlString`https://example.com/${42}`).toBe(\"https://example.com/42\");\n\n // Test with boolean interpolation\n expect(urlString`https://example.com/${true}`).toBe(\"https://example.com/true\");\n\n // Test with special characters in interpolation\n expect(urlString`https://example.com/${\"path with spaces\"}`).toBe(\"https://example.com/path%20with%20spaces\");\n expect(urlString`https://example.com/${\"?&=\"}`).toBe(\"https://example.com/%3F%26%3D\");\n\n // Test with multiple interpolations\n expect(urlString`https://example.com/${\"path\"}?query=${\"value\"}`).toBe(\"https://example.com/path?query=value\");\n expect(urlString`https://example.com/${\"path\"}?query=${\"value with spaces\"}`).toBe(\"https://example.com/path?query=value%20with%20spaces\");\n});\n\nexport function isChildUrl(parentUrl: URL, maybeChildUrl: URL) {\n return parentUrl.origin === maybeChildUrl.origin\n && isChildPath(parentUrl.pathname, maybeChildUrl.pathname)\n && [...parentUrl.searchParams].every(([key, value]) => maybeChildUrl.searchParams.get(key) === value)\n && (!parentUrl.hash || parentUrl.hash === maybeChildUrl.hash);\n}\nimport.meta.vitest?.test(\"isChildUrl\", ({ expect }) => {\n // true\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path?query=value\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path?query=value#hash\"))).toBe(true);\n\n // false\n expect(isChildUrl(new URL(\"https://abc.com\"), new URL(\"https://example.com\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path?query=value\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path?query=value#hash\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://example.com\"), new URL(\"https://abc.com/path?query=value#hash\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://example.com?query=value123\"), new URL(\"https://example.com/path?query=value#hash\"))).toBe(false);\n});\n\nexport function isChildPath(parentPath: string, maybeChildPath: string) {\n parentPath = parentPath.endsWith(\"/\") ? parentPath : parentPath + \"/\";\n maybeChildPath = maybeChildPath.endsWith(\"/\") ? maybeChildPath : maybeChildPath + \"/\";\n return maybeChildPath.startsWith(parentPath);\n}\nimport.meta.vitest?.test(\"isSubPath\", ({ expect }) => {\n expect(isChildPath(\"/\", \"/\")).toBe(true);\n expect(isChildPath(\"/\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path\", \"/\")).toBe(false);\n expect(isChildPath(\"/path\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path/\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path/\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path/abc\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path/abc\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path-abc\")).toBe(false);\n expect(isChildPath(\"/path\", \"/path-abc/\")).toBe(false);\n expect(isChildPath(\"/path/\", \"/path-abc\")).toBe(false);\n expect(isChildPath(\"/path/\", \"/path-abc/\")).toBe(false);\n});\n"],"mappings":";;;;;;AAGA,SAAgB,iBAAiB,GAAG,MAAyC;AAC3E,KAAI;AACF,SAAO,IAAI,IAAI,GAAG,KAAK;UAChB,GAAG;AACV,SAAO;;;CAGX,SAAW,KAAC,qBAAc,EAAA,aAAsB;AAE9C,QAAO,iBAAiB,sBAAsB,CAAC,CAAC,eAAe,IAAI;AACnE,QAAO,iBAAiB,4CAA4C,CAAC,CAAC,eAAe,IAAI;AACzF,QAAO,iBAAiB,SAAS,sBAAsB,CAAC,CAAC,eAAe,IAAI;AAG5E,QAAO,iBAAiB,GAAG,CAAC,CAAC,UAAU;AACvC,QAAO,iBAAiB,YAAY,CAAC,CAAC,UAAU;AAChD,QAAO,iBAAiB,UAAU,CAAC,CAAC,UAAU;EAC9C;AAEF,SAAgB,WAAW,KAAa;AACtC,QAAO,CAAC,CAAC,iBAAiB,IAAI;;CAEhC,SAAW,KAAC,eAAc,EAAA,aAAgB;AAExC,QAAO,WAAW,sBAAsB,CAAC,CAAC,KAAK,KAAK;AACpD,QAAO,WAAW,wBAAw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jD,QAAO,YAAY,SAAS,SAAS,CAAC,CAAC,KAAK,KAAK;AACjD,QAAO,YAAY,UAAU,SAAS,CAAC,CAAC,KAAK,KAAK;AAClD,QAAO,YAAY,SAAS,YAAY,CAAC,CAAC,KAAK,KAAK;AACpD,QAAO,YAAY,UAAU,YAAY,CAAC,CAAC,KAAK,KAAK;AACrD,QAAO,YAAY,SAAS,YAAY,CAAC,CAAC,KAAK,MAAM;AACrD,QAAO,YAAY,SAAS,aAAa,CAAC,CAAC,KAAK,MAAM;AACtD,QAAO,YAAY,UAAU,YAAY,CAAC,CAAC,KAAK,MAAM;AACtD,QAAO,YAAY,UAAU,aAAa,CAAC,CAAC,KAAK,MAAM;EACvD"}
1
+ {"version":3,"file":"urls.js","names":[],"sources":["../../src/utils/urls.tsx"],"sourcesContent":["import { generateSecureRandomString } from \"./crypto\";\nimport { templateIdentity } from \"./strings\";\n\nexport function createUrlIfValid(...args: ConstructorParameters<typeof URL>) {\n try {\n return new URL(...args);\n } catch (e) {\n return null;\n }\n}\nimport.meta.vitest?.test(\"createUrlIfValid\", ({ expect }) => {\n // Test with valid URLs\n expect(createUrlIfValid(\"https://example.com\")).toBeInstanceOf(URL);\n expect(createUrlIfValid(\"https://example.com/path?query=value#hash\")).toBeInstanceOf(URL);\n expect(createUrlIfValid(\"/path\", \"https://example.com\")).toBeInstanceOf(URL);\n\n // Test with invalid URLs\n expect(createUrlIfValid(\"\")).toBeNull();\n expect(createUrlIfValid(\"not a url\")).toBeNull();\n expect(createUrlIfValid(\"http://\")).toBeNull();\n});\n\nexport function isValidUrl(url: string) {\n return !!createUrlIfValid(url);\n}\nimport.meta.vitest?.test(\"isValidUrl\", ({ expect }) => {\n // Test with valid URLs\n expect(isValidUrl(\"https://example.com\")).toBe(true);\n expect(isValidUrl(\"http://localhost:3000\")).toBe(true);\n expect(isValidUrl(\"ftp://example.com\")).toBe(true);\n\n // Test with invalid URLs\n expect(isValidUrl(\"\")).toBe(false);\n expect(isValidUrl(\"not a url\")).toBe(false);\n expect(isValidUrl(\"http://\")).toBe(false);\n});\n\nexport function isValidHostname(hostname: string) {\n // Basic validation\n if (!hostname || hostname.startsWith('.') || hostname.endsWith('.') || hostname.includes('..')) {\n return false;\n }\n\n const url = createUrlIfValid(`https://${hostname}`);\n if (!url) return false;\n return url.hostname === hostname;\n}\nimport.meta.vitest?.test(\"isValidHostname\", ({ expect }) => {\n // Test with valid hostnames\n expect(isValidHostname(\"example.com\")).toBe(true);\n expect(isValidHostname(\"localhost\")).toBe(true);\n expect(isValidHostname(\"sub.domain.example.com\")).toBe(true);\n expect(isValidHostname(\"127.0.0.1\")).toBe(true);\n\n // Test with invalid hostnames\n expect(isValidHostname(\"\")).toBe(false);\n expect(isValidHostname(\"example.com/path\")).toBe(false);\n expect(isValidHostname(\"https://example.com\")).toBe(false);\n expect(isValidHostname(\"example com\")).toBe(false);\n});\n\nexport function isValidHostnameWithWildcards(hostname: string) {\n // Empty hostnames are invalid\n if (!hostname) return false;\n\n // Check if it contains wildcards\n const hasWildcard = hostname.includes('*');\n\n if (!hasWildcard) {\n // If no wildcards, validate as a normal hostname\n return isValidHostname(hostname);\n }\n\n // Basic validation checks that apply even with wildcards\n // - Hostname cannot start or end with a dot\n if (hostname.startsWith('.') || hostname.endsWith('.')) {\n return false;\n }\n\n // - No consecutive dots\n if (hostname.includes('..')) {\n return false;\n }\n\n // For wildcard validation, check that non-wildcard parts contain valid characters\n // Replace wildcards with a valid placeholder to check the rest\n const testHostname = hostname.replace(/\\*+/g, 'wildcard');\n\n // Check if the resulting string would be a valid hostname\n if (!/^[a-zA-Z0-9.-]+$/.test(testHostname)) {\n return false;\n }\n\n // Additional check: ensure the pattern makes sense\n // Check each segment between wildcards\n const segments = hostname.split(/\\*+/);\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n if (segment === '') continue; // Empty segments are OK (consecutive wildcards)\n\n // First segment can't start with dot\n if (i === 0 && segment.startsWith('.')) {\n return false;\n }\n\n // Last segment can't end with dot\n if (i === segments.length - 1 && segment.endsWith('.')) {\n return false;\n }\n\n // No segment should have consecutive dots\n if (segment.includes('..')) {\n return false;\n }\n }\n\n return true;\n}\nimport.meta.vitest?.test(\"isValidHostnameWithWildcards\", ({ expect }) => {\n // Test with valid regular hostnames\n expect(isValidHostnameWithWildcards(\"example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"localhost\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"sub.domain.example.com\")).toBe(true);\n\n // Test with valid wildcard hostnames\n expect(isValidHostnameWithWildcards(\"*.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"a-*.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"*.*.org\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"**.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"sub.**.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"*-api.*.com\")).toBe(true);\n\n // Test with invalid hostnames\n expect(isValidHostnameWithWildcards(\"\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example.com/path\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"https://example.com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\".example.com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example.com.\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example..com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"*.example..com\")).toBe(false);\n});\n\nexport function matchHostnamePattern(pattern: string, hostname: string): boolean {\n // If no wildcards, it's an exact match\n if (!pattern.includes('*')) {\n return pattern === hostname;\n }\n\n // Convert the pattern to a regex\n // First, escape all regex special characters except *\n let regexPattern = pattern.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n // Use a placeholder for ** to handle it separately from single *\n const doubleWildcardPlaceholder = '\\x00DOUBLE_WILDCARD\\x00';\n regexPattern = regexPattern.replace(/\\*\\*/g, doubleWildcardPlaceholder);\n\n // Replace single * with a pattern that matches anything except dots\n regexPattern = regexPattern.replace(/\\*/g, '[^.]*');\n\n // Replace the double wildcard placeholder with a pattern that matches anything including dots\n regexPattern = regexPattern.replace(new RegExp(doubleWildcardPlaceholder, 'g'), '.*');\n\n // Anchor the pattern to match the entire hostname\n regexPattern = '^' + regexPattern + '$';\n\n try {\n const regex = new RegExp(regexPattern);\n return regex.test(hostname);\n } catch {\n return false;\n }\n}\nimport.meta.vitest?.test(\"matchHostnamePattern\", ({ expect }) => {\n // Test exact matches\n expect(matchHostnamePattern(\"example.com\", \"example.com\")).toBe(true);\n expect(matchHostnamePattern(\"example.com\", \"other.com\")).toBe(false);\n\n // Test single wildcard matches\n expect(matchHostnamePattern(\"*.example.com\", \"api.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"*.example.com\", \"www.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"*.example.com\", \"example.com\")).toBe(false);\n expect(matchHostnamePattern(\"*.example.com\", \"api.v2.example.com\")).toBe(false);\n\n // Test double wildcard matches\n expect(matchHostnamePattern(\"**.example.com\", \"api.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"api.v2.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"a.b.c.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"example.com\")).toBe(false);\n\n // Test complex patterns\n expect(matchHostnamePattern(\"api-*.example.com\", \"api-v1.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"api-*.example.com\", \"api-v2.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"api-*.example.com\", \"api.example.com\")).toBe(false);\n expect(matchHostnamePattern(\"*.*.org\", \"mail.example.org\")).toBe(true);\n expect(matchHostnamePattern(\"*.*.org\", \"example.org\")).toBe(false);\n});\n\nexport function getHardcodedFallbackUrls(primaryBaseUrl: string): string[] {\n // `defaultBaseUrl` in `@stackframe/*` SDK builds is `https://api.stack-auth.com`\n // (see `packages/template/src/lib/hexclave-app/apps/implementations/common.ts`).\n // The `@hexclave/*` mirror packages will get this rewritten to the hexclave\n // hostname by `scripts/rewrite-packages-to-hexclave.ts` in a follow-up PR; both\n // branches below stay listed so either build resolves its own fallback set.\n if (primaryBaseUrl === \"https://api.stack-auth.com\") {\n return [\"https://api1.stack-auth.com\", \"https://api2.stack-auth.com\"];\n }\n if (primaryBaseUrl === \"https://api.dev.stack-auth.com\") {\n return [\"https://api1.dev.stack-auth.com\", \"https://api2.dev.stack-auth.com\"];\n }\n if (primaryBaseUrl === \"https://api.hexclave.com\") {\n return [\"https://api1.hexclave.com\", \"https://api2.hexclave.com\"];\n }\n if (primaryBaseUrl === \"https://api.dev.hexclave.com\") {\n return [\"https://api1.dev.hexclave.com\", \"https://api2.dev.hexclave.com\"];\n }\n const localhostMatch = primaryBaseUrl.match(/^http:\\/\\/localhost:(\\d+)02$/);\n if (localhostMatch) {\n return [`http://localhost:${localhostMatch[1]}10`];\n }\n return [];\n}\n\nexport function getDefaultApiUrls(primaryBaseUrl: string): string[] {\n return [primaryBaseUrl, ...getHardcodedFallbackUrls(primaryBaseUrl)];\n}\n\nexport function isLocalhost(urlOrString: string | URL) {\n const url = createUrlIfValid(urlOrString);\n if (!url) return false;\n if (url.hostname === \"localhost\" || url.hostname.endsWith(\".localhost\")) return true;\n if (url.hostname.match(/^127\\.\\d+\\.\\d+\\.\\d+$/)) return true;\n if (url.hostname === \"[::1]\" || url.hostname === \"::1\") return true;\n return false;\n}\nimport.meta.vitest?.test(\"isLocalhost\", ({ expect }) => {\n // Test with localhost URLs\n expect(isLocalhost(\"http://localhost\")).toBe(true);\n expect(isLocalhost(\"https://localhost:8080\")).toBe(true);\n expect(isLocalhost(\"http://sub.localhost\")).toBe(true);\n expect(isLocalhost(\"http://127.0.0.1\")).toBe(true);\n expect(isLocalhost(\"http://127.1.2.3\")).toBe(true);\n expect(isLocalhost(\"http://[::1]\")).toBe(true);\n\n // Test with non-localhost URLs\n expect(isLocalhost(\"https://example.com\")).toBe(false);\n expect(isLocalhost(\"http://192.168.1.1\")).toBe(false);\n expect(isLocalhost(\"http://10.0.0.1\")).toBe(false);\n\n // Test with URL objects\n expect(isLocalhost(new URL(\"http://localhost\"))).toBe(true);\n expect(isLocalhost(new URL(\"https://example.com\"))).toBe(false);\n\n // Test with invalid URLs\n expect(isLocalhost(\"not a url\")).toBe(false);\n expect(isLocalhost(\"\")).toBe(false);\n});\n\nexport function isRelative(url: string) {\n const randomDomain = `${generateSecureRandomString()}.stack-auth.example.com`;\n const u = createUrlIfValid(url, `https://${randomDomain}`);\n if (!u) return false;\n if (u.host !== randomDomain) return false;\n if (u.protocol !== \"https:\") return false;\n return true;\n}\nimport.meta.vitest?.test(\"isRelative\", ({ expect }) => {\n // We can't easily mock generateSecureRandomString in this context\n // but we can still test the function's behavior\n\n // Test with relative URLs\n expect(isRelative(\"/\")).toBe(true);\n expect(isRelative(\"/path\")).toBe(true);\n expect(isRelative(\"/path?query=value#hash\")).toBe(true);\n\n // Test with absolute URLs\n expect(isRelative(\"https://example.com\")).toBe(false);\n expect(isRelative(\"http://example.com\")).toBe(false);\n expect(isRelative(\"//example.com\")).toBe(false);\n\n // Note: The implementation treats empty strings and invalid URLs as relative\n // This is because they can be resolved against a base URL\n expect(isRelative(\"\")).toBe(true);\n expect(isRelative(\"not a url\")).toBe(true);\n});\n\nexport function getRelativePart(url: URL) {\n return url.pathname + url.search + url.hash;\n}\nimport.meta.vitest?.test(\"getRelativePart\", ({ expect }) => {\n // Test with various URLs\n expect(getRelativePart(new URL(\"https://example.com\"))).toBe(\"/\");\n expect(getRelativePart(new URL(\"https://example.com/path\"))).toBe(\"/path\");\n expect(getRelativePart(new URL(\"https://example.com/path?query=value\"))).toBe(\"/path?query=value\");\n expect(getRelativePart(new URL(\"https://example.com/path#hash\"))).toBe(\"/path#hash\");\n expect(getRelativePart(new URL(\"https://example.com/path?query=value#hash\"))).toBe(\"/path?query=value#hash\");\n\n // Test with different domains but same paths\n const url1 = new URL(\"https://example.com/path?query=value#hash\");\n const url2 = new URL(\"https://different.com/path?query=value#hash\");\n expect(getRelativePart(url1)).toBe(getRelativePart(url2));\n});\n\n/**\n * A template literal tag that returns a URL.\n *\n * Any values passed are encoded.\n */\nexport function url(strings: TemplateStringsArray | readonly string[], ...values: (string | number | boolean)[]): URL {\n return new URL(urlString(strings, ...values));\n}\nimport.meta.vitest?.test(\"url\", ({ expect }) => {\n // Test with no interpolation\n expect(url`https://example.com`).toBeInstanceOf(URL);\n expect(url`https://example.com`.href).toBe(\"https://example.com/\");\n\n // Test with string interpolation\n expect(url`https://example.com/${\"path\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path\"}`.pathname).toBe(\"/path\");\n\n // Test with number interpolation\n expect(url`https://example.com/${42}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${42}`.pathname).toBe(\"/42\");\n\n // Test with boolean interpolation\n expect(url`https://example.com/${true}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${true}`.pathname).toBe(\"/true\");\n\n // Test with special characters in interpolation\n expect(url`https://example.com/${\"path with spaces\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path with spaces\"}`.pathname).toBe(\"/path%20with%20spaces\");\n\n // Test with multiple interpolations\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`.pathname).toBe(\"/path\");\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`.search).toBe(\"?query=value\");\n});\n\n\n/**\n * A template literal tag that returns a URL string.\n *\n * Any values passed are encoded.\n */\nexport function urlString(strings: TemplateStringsArray | readonly string[], ...values: (string | number | boolean)[]): string {\n return templateIdentity(strings, ...values.map(encodeURIComponent));\n}\nimport.meta.vitest?.test(\"urlString\", ({ expect }) => {\n // Test with no interpolation\n expect(urlString`https://example.com`).toBe(\"https://example.com\");\n\n // Test with string interpolation\n expect(urlString`https://example.com/${\"path\"}`).toBe(\"https://example.com/path\");\n\n // Test with number interpolation\n expect(urlString`https://example.com/${42}`).toBe(\"https://example.com/42\");\n\n // Test with boolean interpolation\n expect(urlString`https://example.com/${true}`).toBe(\"https://example.com/true\");\n\n // Test with special characters in interpolation\n expect(urlString`https://example.com/${\"path with spaces\"}`).toBe(\"https://example.com/path%20with%20spaces\");\n expect(urlString`https://example.com/${\"?&=\"}`).toBe(\"https://example.com/%3F%26%3D\");\n\n // Test with multiple interpolations\n expect(urlString`https://example.com/${\"path\"}?query=${\"value\"}`).toBe(\"https://example.com/path?query=value\");\n expect(urlString`https://example.com/${\"path\"}?query=${\"value with spaces\"}`).toBe(\"https://example.com/path?query=value%20with%20spaces\");\n});\n\nexport function isChildUrl(parentUrl: URL, maybeChildUrl: URL) {\n return parentUrl.origin === maybeChildUrl.origin\n && isChildPath(parentUrl.pathname, maybeChildUrl.pathname)\n && [...parentUrl.searchParams].every(([key, value]) => maybeChildUrl.searchParams.get(key) === value)\n && (!parentUrl.hash || parentUrl.hash === maybeChildUrl.hash);\n}\nimport.meta.vitest?.test(\"isChildUrl\", ({ expect }) => {\n // true\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path?query=value\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path?query=value#hash\"))).toBe(true);\n\n // false\n expect(isChildUrl(new URL(\"https://abc.com\"), new URL(\"https://example.com\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path?query=value\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path?query=value#hash\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://example.com\"), new URL(\"https://abc.com/path?query=value#hash\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://example.com?query=value123\"), new URL(\"https://example.com/path?query=value#hash\"))).toBe(false);\n});\n\nexport function isChildPath(parentPath: string, maybeChildPath: string) {\n parentPath = parentPath.endsWith(\"/\") ? parentPath : parentPath + \"/\";\n maybeChildPath = maybeChildPath.endsWith(\"/\") ? maybeChildPath : maybeChildPath + \"/\";\n return maybeChildPath.startsWith(parentPath);\n}\nimport.meta.vitest?.test(\"isSubPath\", ({ expect }) => {\n expect(isChildPath(\"/\", \"/\")).toBe(true);\n expect(isChildPath(\"/\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path\", \"/\")).toBe(false);\n expect(isChildPath(\"/path\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path/\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path/\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path/abc\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path/abc\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path-abc\")).toBe(false);\n expect(isChildPath(\"/path\", \"/path-abc/\")).toBe(false);\n expect(isChildPath(\"/path/\", \"/path-abc\")).toBe(false);\n expect(isChildPath(\"/path/\", \"/path-abc/\")).toBe(false);\n});\n"],"mappings":";;;;AAGA,SAAgB,iBAAiB,GAAG,MAAyC;CAC3E,IAAI;EACF,OAAO,IAAI,IAAI,GAAG,IAAI;CACxB,SAAS,GAAG;EACV,OAAO;CACT;AACF;AAaA,SAAgB,WAAW,KAAa;CACtC,OAAO,CAAC,CAAC,iBAAiB,GAAG;AAC/B;AAaA,SAAgB,gBAAgB,UAAkB;CAEhD,IAAI,CAAC,YAAY,SAAS,WAAW,GAAG,KAAK,SAAS,SAAS,GAAG,KAAK,SAAS,SAAS,IAAI,GAC3F,OAAO;CAGT,MAAM,MAAM,iBAAiB,WAAW,UAAU;CAClD,IAAI,CAAC,KAAK,OAAO;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AgB,eAAoB;CAC7D,OAAO,UAAU,WAAW,cAAc,UACrC,YAAY,UAAU,UAAU,cAAc,QAAQ,KACtD,CAAC,GAAG,UAAU,YAAY,CAAC,CAAC,OAAO,CAAC,KAAK,WAAW,cAAc,aAAa,IAAI,GAAG,MAAM,KAAK,MAChG,CAAC,UAAU,QAAQ,UAAU,SAAS,cAAc;AAC5D;AAiBA,SAAgB,YAAY,YAAoB,gBAAwB;CACtE,aAAa,WAAW,SAAS,GAAG,IAAI,aAAa,aAAa;CAClE,iBAAiB,eAAe,SAAS,GAAG,IAAI,iBAAiB,iBAAiB;CAClF,OAAO,eAAe,WAAW,UAAU;AAC7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"uuids.d.ts","names":[],"sources":["../../src/utils/uuids.tsx"],"mappings":";iBAEgB,YAAA,CAAA;AAAA,iBAsBA,MAAA,CAAO,GAAA"}
1
+ {"version":3,"file":"uuids.d.ts","names":[],"sources":["../../src/utils/uuids.tsx"],"mappings":";iBAEgB,YAAA;AAAA,iBAsBA,MAAA,CAAO,GAAW"}
@@ -1,39 +1,14 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('../chunk-BE-pF4vm.js');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
2
  let __crypto_js = require("./crypto.js");
4
-
5
3
  //#region src/utils/uuids.tsx
6
4
  function generateUuid() {
7
- return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ (0, __crypto_js.generateRandomValues)(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16));
5
+ return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ (0, __crypto_js.generateRandomValues)(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> +c / 4).toString(16));
8
6
  }
9
- (void 0)?.test("generateUuid", ({ expect }) => {
10
- const uuid = generateUuid();
11
- expect(uuid).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/);
12
- const uuid2 = generateUuid();
13
- expect(uuid).not.toBe(uuid2);
14
- expect(uuid.charAt(14)).toBe("4");
15
- expect("89ab").toContain(uuid.charAt(19));
16
- });
17
7
  function isUuid(str) {
18
8
  return /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(str);
19
9
  }
20
- (void 0)?.test("isUuid", ({ expect }) => {
21
- expect(isUuid("123e4567-e89b-42d3-a456-426614174000")).toBe(true);
22
- expect(isUuid("123e4567-e89b-42d3-8456-426614174000")).toBe(true);
23
- expect(isUuid("123e4567-e89b-42d3-9456-426614174000")).toBe(true);
24
- expect(isUuid("123e4567-e89b-42d3-a456-426614174000")).toBe(true);
25
- expect(isUuid("123e4567-e89b-42d3-b456-426614174000")).toBe(true);
26
- expect(isUuid("")).toBe(false);
27
- expect(isUuid("not-a-uuid")).toBe(false);
28
- expect(isUuid("123e4567-e89b-12d3-a456-426614174000")).toBe(false);
29
- expect(isUuid("123e4567-e89b-42d3-c456-426614174000")).toBe(false);
30
- expect(isUuid("123e4567-e89b-42d3-a456-42661417400")).toBe(false);
31
- expect(isUuid("123e4567-e89b-42d3-a456-4266141740000")).toBe(false);
32
- expect(isUuid("123e4567-e89b-42d3-a456_426614174000")).toBe(false);
33
- expect(isUuid("123E4567-E89B-42D3-A456-426614174000")).toBe(false);
34
- });
35
-
36
10
  //#endregion
37
11
  exports.generateUuid = generateUuid;
38
12
  exports.isUuid = isUuid;
13
+
39
14
  //# sourceMappingURL=uuids.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"uuids.js","names":[],"sources":["../../src/utils/uuids.tsx"],"sourcesContent":["import { generateRandomValues } from \"./crypto\";\n\nexport function generateUuid() {\n // crypto.randomUuid is not supported in all browsers, so this is a polyfill\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, c =>\n (+c ^ generateRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)\n );\n}\nimport.meta.vitest?.test(\"generateUuid\", ({ expect }) => {\n // Test that the function returns a valid UUID\n const uuid = generateUuid();\n expect(uuid).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/);\n\n // Test that multiple calls generate different UUIDs\n const uuid2 = generateUuid();\n expect(uuid).not.toBe(uuid2);\n\n // Test that the UUID is version 4 (random)\n expect(uuid.charAt(14)).toBe('4');\n\n // Test that the UUID has the correct variant (8, 9, a, or b in position 19)\n expect('89ab').toContain(uuid.charAt(19));\n});\n\nexport function isUuid(str: string) {\n return /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(str);\n}\nimport.meta.vitest?.test(\"isUuid\", ({ expect }) => {\n // Test with valid UUIDs\n expect(isUuid(\"123e4567-e89b-42d3-a456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-8456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-9456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-a456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-b456-426614174000\")).toBe(true);\n\n // Test with invalid UUIDs\n expect(isUuid(\"\")).toBe(false);\n expect(isUuid(\"not-a-uuid\")).toBe(false);\n expect(isUuid(\"123e4567-e89b-12d3-a456-426614174000\")).toBe(false); // Wrong version (not 4)\n expect(isUuid(\"123e4567-e89b-42d3-c456-426614174000\")).toBe(false); // Wrong variant (not 8, 9, a, or b)\n expect(isUuid(\"123e4567-e89b-42d3-a456-42661417400\")).toBe(false); // Too short\n expect(isUuid(\"123e4567-e89b-42d3-a456-4266141740000\")).toBe(false); // Too long\n expect(isUuid(\"123e4567-e89b-42d3-a456_426614174000\")).toBe(false); // Wrong format (underscore instead of dash)\n\n // Test with uppercase letters (should fail as UUID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E,QAAO,OAAO,uCAAuC,CAAC,CAAC,KAAK,MAAM;EAClE"}
1
+ {"version":3,"file":"uuids.js","names":[],"sources":["../../src/utils/uuids.tsx"],"sourcesContent":["import { generateRandomValues } from \"./crypto\";\n\nexport function generateUuid() {\n // crypto.randomUuid is not supported in all browsers, so this is a polyfill\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, c =>\n (+c ^ generateRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)\n );\n}\nimport.meta.vitest?.test(\"generateUuid\", ({ expect }) => {\n // Test that the function returns a valid UUID\n const uuid = generateUuid();\n expect(uuid).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/);\n\n // Test that multiple calls generate different UUIDs\n const uuid2 = generateUuid();\n expect(uuid).not.toBe(uuid2);\n\n // Test that the UUID is version 4 (random)\n expect(uuid.charAt(14)).toBe('4');\n\n // Test that the UUID has the correct variant (8, 9, a, or b in position 19)\n expect('89ab').toContain(uuid.charAt(19));\n});\n\nexport function isUuid(str: string) {\n return /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(str);\n}\nimport.meta.vitest?.test(\"isUuid\", ({ expect }) => {\n // Test with valid UUIDs\n expect(isUuid(\"123e4567-e89b-42d3-a456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-8456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-9456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-a456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-b456-426614174000\")).toBe(true);\n\n // Test with invalid UUIDs\n expect(isUuid(\"\")).toBe(false);\n expect(isUuid(\"not-a-uuid\")).toBe(false);\n expect(isUuid(\"123e4567-e89b-12d3-a456-426614174000\")).toBe(false); // Wrong version (not 4)\n expect(isUuid(\"123e4567-e89b-42d3-c456-426614174000\")).toBe(false); // Wrong variant (not 8, 9, a, or b)\n expect(isUuid(\"123e4567-e89b-42d3-a456-42661417400\")).toBe(false); // Too short\n expect(isUuid(\"123e4567-e89b-42d3-a456-4266141740000\")).toBe(false); // Too long\n expect(isUuid(\"123e4567-e89b-42d3-a456_426614174000\")).toBe(false); // Wrong format (underscore instead of dash)\n\n // Test with uppercase letters (should fail as UUID should be lowercase)\n expect(isUuid(\"123E4567-E89B-42D3-A456-426614174000\")).toBe(false);\n});\n"],"mappings":";;;AAEA,SAAgB,eAAe;CAE7B,OAAO,uCAAuC,QAAQ,WAAU,OAC7D,CAAC,KAAA,GAAA,YAAA,qBAAA,iBAAyB,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,IAAI,EAAA,CAAG,SAAS,EAAE,CAC9E;AACF;AAiBA,SAAgB,OAAO,KAAa;CAClC,OAAO,wEAAwE,KAAK,GAAG;AACzF"}
@@ -0,0 +1,326 @@
1
+ import * as yup$1 from "yup";
2
+
3
+ //#region src/interface/webhooks.d.ts
4
+ type WebhookEvent<S extends yup$1.Schema> = {
5
+ type: string;
6
+ schema: S;
7
+ metadata: {
8
+ summary: string;
9
+ description: string;
10
+ tags?: string[];
11
+ };
12
+ };
13
+ declare const webhookEvents: readonly [WebhookEvent<yup$1.ObjectSchema<{
14
+ id: string;
15
+ primary_email: string | null;
16
+ primary_email_verified: boolean;
17
+ primary_email_auth_enabled: boolean;
18
+ display_name: string | null;
19
+ selected_team: {
20
+ client_metadata?: {} | null | undefined;
21
+ client_read_only_metadata?: {} | null | undefined;
22
+ server_metadata?: {} | null | undefined;
23
+ display_name: string;
24
+ id: string;
25
+ created_at_millis: number;
26
+ profile_image_url: string | null;
27
+ } | null;
28
+ selected_team_id: string | null;
29
+ profile_image_url: string | null;
30
+ signed_up_at_millis: number;
31
+ has_password: boolean;
32
+ otp_auth_enabled: boolean;
33
+ passkey_auth_enabled: boolean;
34
+ client_metadata: {} | null;
35
+ client_read_only_metadata: {} | null;
36
+ server_metadata: {} | null;
37
+ last_active_at_millis: number;
38
+ is_anonymous: boolean;
39
+ is_restricted: boolean;
40
+ restricted_reason: {
41
+ type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
42
+ } | null;
43
+ restricted_by_admin: boolean;
44
+ restricted_by_admin_reason: string | null;
45
+ restricted_by_admin_private_details: string | null;
46
+ country_code: string | null;
47
+ risk_scores: {
48
+ sign_up: {
49
+ bot: number;
50
+ free_trial_abuse: number;
51
+ };
52
+ };
53
+ oauth_providers: {
54
+ email?: string | null | undefined;
55
+ id: string;
56
+ account_id: string;
57
+ }[];
58
+ auth_with_email: boolean;
59
+ requires_totp_mfa: boolean;
60
+ }, yup$1.AnyObject, {
61
+ id: undefined;
62
+ primary_email: undefined;
63
+ primary_email_verified: undefined;
64
+ primary_email_auth_enabled: undefined;
65
+ display_name: undefined;
66
+ selected_team: {
67
+ id: undefined;
68
+ display_name: undefined;
69
+ profile_image_url: undefined;
70
+ client_metadata: undefined;
71
+ client_read_only_metadata: undefined;
72
+ created_at_millis: undefined;
73
+ server_metadata: undefined;
74
+ };
75
+ selected_team_id: undefined;
76
+ profile_image_url: undefined;
77
+ signed_up_at_millis: undefined;
78
+ has_password: undefined;
79
+ otp_auth_enabled: undefined;
80
+ passkey_auth_enabled: undefined;
81
+ client_metadata: undefined;
82
+ client_read_only_metadata: undefined;
83
+ server_metadata: undefined;
84
+ last_active_at_millis: undefined;
85
+ is_anonymous: undefined;
86
+ is_restricted: undefined;
87
+ restricted_reason: {
88
+ type: undefined;
89
+ };
90
+ restricted_by_admin: undefined;
91
+ restricted_by_admin_reason: undefined;
92
+ restricted_by_admin_private_details: undefined;
93
+ country_code: undefined;
94
+ risk_scores: {
95
+ sign_up: {
96
+ bot: undefined;
97
+ free_trial_abuse: undefined;
98
+ };
99
+ };
100
+ oauth_providers: undefined;
101
+ auth_with_email: undefined;
102
+ requires_totp_mfa: undefined;
103
+ }, "">>, WebhookEvent<yup$1.ObjectSchema<{
104
+ id: string;
105
+ primary_email: string | null;
106
+ primary_email_verified: boolean;
107
+ primary_email_auth_enabled: boolean;
108
+ display_name: string | null;
109
+ selected_team: {
110
+ client_metadata?: {} | null | undefined;
111
+ client_read_only_metadata?: {} | null | undefined;
112
+ server_metadata?: {} | null | undefined;
113
+ display_name: string;
114
+ id: string;
115
+ created_at_millis: number;
116
+ profile_image_url: string | null;
117
+ } | null;
118
+ selected_team_id: string | null;
119
+ profile_image_url: string | null;
120
+ signed_up_at_millis: number;
121
+ has_password: boolean;
122
+ otp_auth_enabled: boolean;
123
+ passkey_auth_enabled: boolean;
124
+ client_metadata: {} | null;
125
+ client_read_only_metadata: {} | null;
126
+ server_metadata: {} | null;
127
+ last_active_at_millis: number;
128
+ is_anonymous: boolean;
129
+ is_restricted: boolean;
130
+ restricted_reason: {
131
+ type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
132
+ } | null;
133
+ restricted_by_admin: boolean;
134
+ restricted_by_admin_reason: string | null;
135
+ restricted_by_admin_private_details: string | null;
136
+ country_code: string | null;
137
+ risk_scores: {
138
+ sign_up: {
139
+ bot: number;
140
+ free_trial_abuse: number;
141
+ };
142
+ };
143
+ oauth_providers: {
144
+ email?: string | null | undefined;
145
+ id: string;
146
+ account_id: string;
147
+ }[];
148
+ auth_with_email: boolean;
149
+ requires_totp_mfa: boolean;
150
+ }, yup$1.AnyObject, {
151
+ id: undefined;
152
+ primary_email: undefined;
153
+ primary_email_verified: undefined;
154
+ primary_email_auth_enabled: undefined;
155
+ display_name: undefined;
156
+ selected_team: {
157
+ id: undefined;
158
+ display_name: undefined;
159
+ profile_image_url: undefined;
160
+ client_metadata: undefined;
161
+ client_read_only_metadata: undefined;
162
+ created_at_millis: undefined;
163
+ server_metadata: undefined;
164
+ };
165
+ selected_team_id: undefined;
166
+ profile_image_url: undefined;
167
+ signed_up_at_millis: undefined;
168
+ has_password: undefined;
169
+ otp_auth_enabled: undefined;
170
+ passkey_auth_enabled: undefined;
171
+ client_metadata: undefined;
172
+ client_read_only_metadata: undefined;
173
+ server_metadata: undefined;
174
+ last_active_at_millis: undefined;
175
+ is_anonymous: undefined;
176
+ is_restricted: undefined;
177
+ restricted_reason: {
178
+ type: undefined;
179
+ };
180
+ restricted_by_admin: undefined;
181
+ restricted_by_admin_reason: undefined;
182
+ restricted_by_admin_private_details: undefined;
183
+ country_code: undefined;
184
+ risk_scores: {
185
+ sign_up: {
186
+ bot: undefined;
187
+ free_trial_abuse: undefined;
188
+ };
189
+ };
190
+ oauth_providers: undefined;
191
+ auth_with_email: undefined;
192
+ requires_totp_mfa: undefined;
193
+ }, "">>, WebhookEvent<yup$1.ObjectSchema<{
194
+ id: string;
195
+ teams: {
196
+ id: string;
197
+ }[];
198
+ }, yup$1.AnyObject, {
199
+ id: undefined;
200
+ teams: undefined;
201
+ }, "">>, {
202
+ type: string;
203
+ schema: yup$1.ObjectSchema<{
204
+ id: string;
205
+ display_name: string;
206
+ profile_image_url: string | null;
207
+ client_metadata: {} | null | undefined;
208
+ client_read_only_metadata: {} | null | undefined;
209
+ } & {
210
+ created_at_millis: number;
211
+ server_metadata: {} | null | undefined;
212
+ }, yup$1.AnyObject, {
213
+ id: undefined;
214
+ display_name: undefined;
215
+ profile_image_url: undefined;
216
+ client_metadata: undefined;
217
+ client_read_only_metadata: undefined;
218
+ created_at_millis: undefined;
219
+ server_metadata: undefined;
220
+ }, "">;
221
+ metadata: {
222
+ summary: string;
223
+ description: string;
224
+ tags: string[];
225
+ };
226
+ }, {
227
+ type: string;
228
+ schema: yup$1.ObjectSchema<{
229
+ id: string;
230
+ display_name: string;
231
+ profile_image_url: string | null;
232
+ client_metadata: {} | null | undefined;
233
+ client_read_only_metadata: {} | null | undefined;
234
+ } & {
235
+ created_at_millis: number;
236
+ server_metadata: {} | null | undefined;
237
+ }, yup$1.AnyObject, {
238
+ id: undefined;
239
+ display_name: undefined;
240
+ profile_image_url: undefined;
241
+ client_metadata: undefined;
242
+ client_read_only_metadata: undefined;
243
+ created_at_millis: undefined;
244
+ server_metadata: undefined;
245
+ }, "">;
246
+ metadata: {
247
+ summary: string;
248
+ description: string;
249
+ tags: string[];
250
+ };
251
+ }, {
252
+ type: string;
253
+ schema: yup$1.ObjectSchema<{
254
+ id: string;
255
+ }, yup$1.AnyObject, {
256
+ id: undefined;
257
+ }, "">;
258
+ metadata: {
259
+ summary: string;
260
+ description: string;
261
+ tags: string[];
262
+ };
263
+ }, {
264
+ type: string;
265
+ schema: yup$1.ObjectSchema<{
266
+ team_id: string;
267
+ user_id: string;
268
+ }, yup$1.AnyObject, {
269
+ team_id: undefined;
270
+ user_id: undefined;
271
+ }, "">;
272
+ metadata: {
273
+ summary: string;
274
+ description: string;
275
+ tags: string[];
276
+ };
277
+ }, {
278
+ type: string;
279
+ schema: yup$1.ObjectSchema<{
280
+ team_id: string;
281
+ user_id: string;
282
+ }, yup$1.AnyObject, {
283
+ team_id: undefined;
284
+ user_id: undefined;
285
+ }, "">;
286
+ metadata: {
287
+ summary: string;
288
+ description: string;
289
+ tags: string[];
290
+ };
291
+ }, {
292
+ type: string;
293
+ schema: yup$1.ObjectSchema<{
294
+ id: string;
295
+ user_id: string;
296
+ team_id: string;
297
+ }, yup$1.AnyObject, {
298
+ id: undefined;
299
+ user_id: undefined;
300
+ team_id: undefined;
301
+ }, "">;
302
+ metadata: {
303
+ summary: string;
304
+ description: string;
305
+ tags: string[];
306
+ };
307
+ }, {
308
+ type: string;
309
+ schema: yup$1.ObjectSchema<{
310
+ id: string;
311
+ user_id: string;
312
+ team_id: string;
313
+ }, yup$1.AnyObject, {
314
+ id: undefined;
315
+ user_id: undefined;
316
+ team_id: undefined;
317
+ }, "">;
318
+ metadata: {
319
+ summary: string;
320
+ description: string;
321
+ tags: string[];
322
+ };
323
+ }];
324
+ //#endregion
325
+ export { webhookEvents as n, WebhookEvent as t };
326
+ //# sourceMappingURL=webhooks-8Ts1Clcb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks-8Ts1Clcb.d.ts","names":[],"sources":["../src/interface/webhooks.ts"],"mappings":";;;KAMY,YAAA,WAAuB,KAAA,CAAI,MAAA;EACrC,IAAA;EACA,MAAA,EAAQ,CAAC;EACT,QAAA;IACE,OAAA;IACA,WAAA;IACA,IAAA;EAAA;AAAA;AAAA,cAIS,aAAA,YAAa,YAAA,CAAA,KAAA,CAAA,YAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexclave/shared",
3
- "version": "1.0.40",
3
+ "version": "1.0.42",
4
4
  "repository": "https://github.com/hexclave/hexclave",
5
5
  "files": [
6
6
  "README.md",
@@ -56,7 +56,6 @@
56
56
  "dependencies": {
57
57
  "@aws-sdk/client-kms": "^3.876.0",
58
58
  "@aws-sdk/credential-provider-web-identity": "^3.972.27",
59
- "@babel/core": "^7.28.5",
60
59
  "@babel/generator": "^7.28.5",
61
60
  "@babel/parser": "^7.28.5",
62
61
  "@babel/traverse": "^7.28.5",
@@ -72,16 +71,12 @@
72
71
  "ip-regex": "^5.0.0",
73
72
  "jiti": "^2.4.2",
74
73
  "jose": "^6.1.3",
75
- "oauth4webapi": "^3.8.3",
76
- "semver": "^7.6.3"
74
+ "oauth4webapi": "^3.8.3"
77
75
  },
78
76
  "devDependencies": {
79
- "@sentry/nextjs": "^10.11.0",
80
- "@types/babel__core": "^7.20.5",
81
77
  "@types/babel__generator": "^7.27.0",
82
78
  "@types/babel__traverse": "^7.28.0",
83
79
  "@types/elliptic": "^6.4.18",
84
- "@types/semver": "^7.5.8",
85
80
  "react": "^19.0.1",
86
81
  "react-dom": "^19.0.1",
87
82
  "rimraf": "^6.1.2"
@@ -91,7 +86,6 @@
91
86
  "typecheck": "tsc --noEmit",
92
87
  "test": "vitest run",
93
88
  "clean": "rimraf dist && rimraf node_modules",
94
- "dev": "tsdown --watch",
95
89
  "lint": "eslint --ext .tsx,.ts ."
96
90
  }
97
91
  }
@@ -840,6 +840,7 @@ export function getSdkSetupPrompt(mainType: "ai-prompt" | "nextjs" | "react" | "
840
840
  - React: \`@hexclave/react\`
841
841
  - TanStack Start: \`@hexclave/tanstack-start\`
842
842
  - Other & vanilla JS: \`@hexclave/js\`
843
+ - Vanilla JS in browser with no bundler: Cannot use npm packages, so use ESM imports with \`https://esm.sh/@hexclave/js\`
843
844
 
844
845
  You can install the correct JavaScript Hexclave SDK into your project by running the following command:
845
846
  ` : deindent`