@hexclave/shared 1.0.41 → 1.0.43

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 (1067) hide show
  1. package/dist/admin-interface-Bv8rBJo-.d.ts +379 -0
  2. package/dist/admin-interface-Bv8rBJo-.d.ts.map +1 -0
  3. package/dist/admin-metrics-DyW8_G82.d.ts +807 -0
  4. package/dist/admin-metrics-DyW8_G82.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 +2 -4
  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 +2 -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-CGrvUtX0.d.ts +447 -0
  48. package/dist/client-interface-CGrvUtX0.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-Dvf8Ttjo.d.ts +284 -0
  88. package/dist/current-user-Dvf8Ttjo.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-BVqBaXpn.d.ts +1464 -0
  92. package/dist/{interface/crud/email-outbox.d.ts.map → email-outbox-BVqBaXpn.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 +25 -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 +249 -250
  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 +1 -2
  213. package/dist/esm/interface/admin-interface.js.map +1 -1
  214. package/dist/esm/interface/admin-metrics.d.ts +11 -11
  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 +31 -15
  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 +33 -33
  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 +20 -22
  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 +32 -34
  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 +2 -2
  259. package/dist/esm/interface/crud/invoices.d.ts.map +1 -1
  260. package/dist/esm/interface/crud/invoices.js +1 -2
  261. package/dist/esm/interface/crud/invoices.js.map +1 -1
  262. package/dist/esm/interface/crud/items.d.ts +6 -8
  263. package/dist/esm/interface/crud/items.d.ts.map +1 -1
  264. package/dist/esm/interface/crud/items.js +12 -16
  265. package/dist/esm/interface/crud/items.js.map +1 -1
  266. package/dist/esm/interface/crud/notification-preferences.d.ts +6 -8
  267. package/dist/esm/interface/crud/notification-preferences.d.ts.map +1 -1
  268. package/dist/esm/interface/crud/notification-preferences.js +8 -12
  269. package/dist/esm/interface/crud/notification-preferences.js.map +1 -1
  270. package/dist/esm/interface/crud/oauth-providers.d.ts +24 -26
  271. package/dist/esm/interface/crud/oauth-providers.d.ts.map +1 -1
  272. package/dist/esm/interface/crud/oauth-providers.js +1 -2
  273. package/dist/esm/interface/crud/oauth-providers.js.map +1 -1
  274. package/dist/esm/interface/crud/products.d.ts +21 -22
  275. package/dist/esm/interface/crud/products.d.ts.map +1 -1
  276. package/dist/esm/interface/crud/products.js +3 -2
  277. package/dist/esm/interface/crud/products.js.map +1 -1
  278. package/dist/esm/interface/crud/project-api-keys.d.ts +5 -6
  279. package/dist/esm/interface/crud/project-api-keys.d.ts.map +1 -1
  280. package/dist/esm/interface/crud/project-api-keys.js +1 -2
  281. package/dist/esm/interface/crud/project-api-keys.js.map +1 -1
  282. package/dist/esm/interface/crud/project-permissions.d.ts +29 -31
  283. package/dist/esm/interface/crud/project-permissions.d.ts.map +1 -1
  284. package/dist/esm/interface/crud/project-permissions.js +1 -2
  285. package/dist/esm/interface/crud/project-permissions.js.map +1 -1
  286. package/dist/esm/interface/crud/projects.d.ts +71 -73
  287. package/dist/esm/interface/crud/projects.d.ts.map +1 -1
  288. package/dist/esm/interface/crud/projects.js +3 -2
  289. package/dist/esm/interface/crud/projects.js.map +1 -1
  290. package/dist/esm/interface/crud/session-replays.d.ts.map +1 -1
  291. package/dist/esm/interface/crud/session-replays.js +1 -1
  292. package/dist/esm/interface/crud/sessions.d.ts +15 -17
  293. package/dist/esm/interface/crud/sessions.d.ts.map +1 -1
  294. package/dist/esm/interface/crud/sessions.js +1 -2
  295. package/dist/esm/interface/crud/sessions.js.map +1 -1
  296. package/dist/esm/interface/crud/sign-up-rules.d.ts.map +1 -1
  297. package/dist/esm/interface/crud/sign-up-rules.js +1 -1
  298. package/dist/esm/interface/crud/svix-token.d.ts +8 -10
  299. package/dist/esm/interface/crud/svix-token.d.ts.map +1 -1
  300. package/dist/esm/interface/crud/svix-token.js +1 -2
  301. package/dist/esm/interface/crud/svix-token.js.map +1 -1
  302. package/dist/esm/interface/crud/team-invitation-details.d.ts +6 -8
  303. package/dist/esm/interface/crud/team-invitation-details.d.ts.map +1 -1
  304. package/dist/esm/interface/crud/team-invitation-details.js +1 -2
  305. package/dist/esm/interface/crud/team-invitation-details.js.map +1 -1
  306. package/dist/esm/interface/crud/team-invitation.d.ts +7 -9
  307. package/dist/esm/interface/crud/team-invitation.d.ts.map +1 -1
  308. package/dist/esm/interface/crud/team-invitation.js +1 -2
  309. package/dist/esm/interface/crud/team-invitation.js.map +1 -1
  310. package/dist/esm/interface/crud/team-member-profiles.d.ts +26 -28
  311. package/dist/esm/interface/crud/team-member-profiles.d.ts.map +1 -1
  312. package/dist/esm/interface/crud/team-member-profiles.js +1 -2
  313. package/dist/esm/interface/crud/team-member-profiles.js.map +1 -1
  314. package/dist/esm/interface/crud/team-memberships.d.ts +14 -16
  315. package/dist/esm/interface/crud/team-memberships.d.ts.map +1 -1
  316. package/dist/esm/interface/crud/team-memberships.js +1 -2
  317. package/dist/esm/interface/crud/team-memberships.js.map +1 -1
  318. package/dist/esm/interface/crud/team-permissions.d.ts +29 -31
  319. package/dist/esm/interface/crud/team-permissions.d.ts.map +1 -1
  320. package/dist/esm/interface/crud/team-permissions.js +1 -2
  321. package/dist/esm/interface/crud/team-permissions.js.map +1 -1
  322. package/dist/esm/interface/crud/teams.d.ts +36 -38
  323. package/dist/esm/interface/crud/teams.d.ts.map +1 -1
  324. package/dist/esm/interface/crud/teams.js +2 -4
  325. package/dist/esm/interface/crud/teams.js.map +1 -1
  326. package/dist/esm/interface/crud/transactions.d.ts +14 -16
  327. package/dist/esm/interface/crud/transactions.d.ts.map +1 -1
  328. package/dist/esm/interface/crud/transactions.js +7 -13
  329. package/dist/esm/interface/crud/transactions.js.map +1 -1
  330. package/dist/esm/interface/crud/users.d.ts +11 -12
  331. package/dist/esm/interface/crud/users.d.ts.map +1 -1
  332. package/dist/esm/interface/crud/users.js +9 -5
  333. package/dist/esm/interface/crud/users.js.map +1 -1
  334. package/dist/esm/interface/handler-urls.d.ts +1 -1
  335. package/dist/esm/interface/handler-urls.d.ts.map +1 -1
  336. package/dist/esm/interface/handler-urls.js +1 -2
  337. package/dist/esm/interface/page-component-versions.d.ts +1 -1
  338. package/dist/esm/interface/page-component-versions.d.ts.map +1 -1
  339. package/dist/esm/interface/page-component-versions.js +1 -2
  340. package/dist/esm/interface/page-component-versions.js.map +1 -1
  341. package/dist/esm/interface/plan-usage.d.ts +1 -1
  342. package/dist/esm/interface/plan-usage.d.ts.map +1 -1
  343. package/dist/esm/interface/plan-usage.js +1 -2
  344. package/dist/esm/interface/plan-usage.js.map +1 -1
  345. package/dist/esm/interface/server-interface.d.ts +19 -19
  346. package/dist/esm/interface/server-interface.d.ts.map +1 -1
  347. package/dist/esm/interface/server-interface.js +1 -2
  348. package/dist/esm/interface/server-interface.js.map +1 -1
  349. package/dist/esm/interface/webhooks.d.ts +2 -2
  350. package/dist/esm/interface/webhooks.d.ts.map +1 -1
  351. package/dist/esm/interface/webhooks.js +1 -2
  352. package/dist/esm/interface/webhooks.js.map +1 -1
  353. package/dist/esm/known-errors.d.ts +2 -2
  354. package/dist/esm/known-errors.d.ts.map +1 -1
  355. package/dist/esm/known-errors.js +10 -21
  356. package/dist/esm/known-errors.js.map +1 -1
  357. package/dist/esm/payments/payment-methods.d.ts.map +1 -1
  358. package/dist/esm/payments/payment-methods.js +1 -1
  359. package/dist/esm/payments/payment-methods.js.map +1 -1
  360. package/dist/esm/payments/stripe-limits.d.ts.map +1 -1
  361. package/dist/esm/payments/stripe-limits.js +1 -1
  362. package/dist/esm/payments/stripe-limits.js.map +1 -1
  363. package/dist/esm/plans.d.ts.map +1 -1
  364. package/dist/esm/plans.js +1 -1
  365. package/dist/esm/plans.js.map +1 -1
  366. package/dist/esm/schema-fields.d.ts +14 -14
  367. package/dist/esm/schema-fields.d.ts.map +1 -1
  368. package/dist/esm/schema-fields.js +3 -64
  369. package/dist/esm/schema-fields.js.map +1 -1
  370. package/dist/esm/sessions.d.ts +6 -6
  371. package/dist/esm/sessions.d.ts.map +1 -1
  372. package/dist/esm/sessions.js +1 -2
  373. package/dist/esm/sessions.js.map +1 -1
  374. package/dist/esm/sessions.test.js +2 -3
  375. package/dist/esm/sessions.test.js.map +1 -1
  376. package/dist/esm/utils/analytics-clickmap-overlay.d.ts.map +1 -1
  377. package/dist/esm/utils/analytics-clickmap-overlay.js +1 -1
  378. package/dist/esm/utils/api-keys.d.ts.map +1 -1
  379. package/dist/esm/utils/api-keys.js +1 -2
  380. package/dist/esm/utils/api-keys.js.map +1 -1
  381. package/dist/esm/utils/arrays.d.ts.map +1 -1
  382. package/dist/esm/utils/arrays.js +1 -470
  383. package/dist/esm/utils/arrays.js.map +1 -1
  384. package/dist/esm/utils/auth-methods.d.ts.map +1 -1
  385. package/dist/esm/utils/auth-methods.js +1 -1
  386. package/dist/esm/utils/auth-methods.js.map +1 -1
  387. package/dist/esm/utils/base64.d.ts.map +1 -1
  388. package/dist/esm/utils/base64.js +1 -10
  389. package/dist/esm/utils/base64.js.map +1 -1
  390. package/dist/esm/utils/booleans.d.ts.map +1 -1
  391. package/dist/esm/utils/booleans.js +1 -25
  392. package/dist/esm/utils/booleans.js.map +1 -1
  393. package/dist/esm/utils/browser-compat.d.ts.map +1 -1
  394. package/dist/esm/utils/browser-compat.js +1 -1
  395. package/dist/esm/utils/browser-compat.js.map +1 -1
  396. package/dist/esm/utils/bytes.d.ts.map +1 -1
  397. package/dist/esm/utils/bytes.js +3 -198
  398. package/dist/esm/utils/bytes.js.map +1 -1
  399. package/dist/esm/utils/caches.d.ts +1 -1
  400. package/dist/esm/utils/caches.d.ts.map +1 -1
  401. package/dist/esm/utils/caches.js +1 -27
  402. package/dist/esm/utils/caches.js.map +1 -1
  403. package/dist/esm/utils/cel-fields.d.ts.map +1 -1
  404. package/dist/esm/utils/cel-fields.js +1 -2
  405. package/dist/esm/utils/cel-fields.js.map +1 -1
  406. package/dist/esm/utils/cloud-hosts.d.ts.map +1 -1
  407. package/dist/esm/utils/cloud-hosts.js +1 -27
  408. package/dist/esm/utils/cloud-hosts.js.map +1 -1
  409. package/dist/esm/utils/compile-time.d.ts.map +1 -1
  410. package/dist/esm/utils/compile-time.js +1 -1
  411. package/dist/esm/utils/compile-time.js.map +1 -1
  412. package/dist/esm/utils/country-codes.d.ts.map +1 -1
  413. package/dist/esm/utils/country-codes.js +1 -16
  414. package/dist/esm/utils/country-codes.js.map +1 -1
  415. package/dist/esm/utils/crypto.d.ts.map +1 -1
  416. package/dist/esm/utils/crypto.js +3 -113
  417. package/dist/esm/utils/crypto.js.map +1 -1
  418. package/dist/esm/utils/currencies.d.ts +1 -1
  419. package/dist/esm/utils/currencies.d.ts.map +1 -1
  420. package/dist/esm/utils/currencies.js +2 -37
  421. package/dist/esm/utils/currencies.js.map +1 -1
  422. package/dist/esm/utils/currency-constants.d.ts.map +1 -1
  423. package/dist/esm/utils/currency-constants.js +1 -1
  424. package/dist/esm/utils/currency-constants.js.map +1 -1
  425. package/dist/esm/utils/dates.d.ts.map +1 -1
  426. package/dist/esm/utils/dates.js +1 -44
  427. package/dist/esm/utils/dates.js.map +1 -1
  428. package/dist/esm/utils/dev-env-state-path.d.ts.map +1 -1
  429. package/dist/esm/utils/dev-env-state-path.js +1 -2
  430. package/dist/esm/utils/dev-env-state-path.js.map +1 -1
  431. package/dist/esm/utils/dev-tool.d.ts.map +1 -1
  432. package/dist/esm/utils/dev-tool.js +1 -1
  433. package/dist/esm/utils/dom.d.ts.map +1 -1
  434. package/dist/esm/utils/dom.js +1 -1
  435. package/dist/esm/utils/dom.js.map +1 -1
  436. package/dist/esm/utils/elements-chain.d.ts.map +1 -1
  437. package/dist/esm/utils/elements-chain.js +5 -50
  438. package/dist/esm/utils/elements-chain.js.map +1 -1
  439. package/dist/esm/utils/env.d.ts.map +1 -1
  440. package/dist/esm/utils/env.js +1 -2
  441. package/dist/esm/utils/env.js.map +1 -1
  442. package/dist/esm/utils/env.test.js +2 -3
  443. package/dist/esm/utils/env.test.js.map +1 -1
  444. package/dist/esm/utils/errors.d.ts +1 -1
  445. package/dist/esm/utils/errors.d.ts.map +1 -1
  446. package/dist/esm/utils/errors.js +1 -2
  447. package/dist/esm/utils/errors.js.map +1 -1
  448. package/dist/esm/utils/esbuild.d.ts +1 -1
  449. package/dist/esm/utils/esbuild.d.ts.map +1 -1
  450. package/dist/esm/utils/esbuild.js +2 -3
  451. package/dist/esm/utils/esbuild.js.map +1 -1
  452. package/dist/esm/utils/featurebase.d.ts.map +1 -1
  453. package/dist/esm/utils/featurebase.js +1 -2
  454. package/dist/esm/utils/featurebase.js.map +1 -1
  455. package/dist/esm/utils/fs.d.ts.map +1 -1
  456. package/dist/esm/utils/fs.js +1 -2
  457. package/dist/esm/utils/fs.js.map +1 -1
  458. package/dist/esm/utils/functions.d.ts.map +1 -1
  459. package/dist/esm/utils/functions.js +1 -24
  460. package/dist/esm/utils/functions.js.map +1 -1
  461. package/dist/esm/utils/geo.d.ts.map +1 -1
  462. package/dist/esm/utils/geo.js +1 -2
  463. package/dist/esm/utils/geo.js.map +1 -1
  464. package/dist/esm/utils/globals.d.ts.map +1 -1
  465. package/dist/esm/utils/globals.js +1 -1
  466. package/dist/esm/utils/globals.js.map +1 -1
  467. package/dist/esm/utils/hashes.d.ts.map +1 -1
  468. package/dist/esm/utils/hashes.js +1 -2
  469. package/dist/esm/utils/hashes.js.map +1 -1
  470. package/dist/esm/utils/html.d.ts.map +1 -1
  471. package/dist/esm/utils/html.js +1 -19
  472. package/dist/esm/utils/html.js.map +1 -1
  473. package/dist/esm/utils/http.d.ts.map +1 -1
  474. package/dist/esm/utils/http.js +1 -19
  475. package/dist/esm/utils/http.js.map +1 -1
  476. package/dist/esm/utils/ips.d.ts.map +1 -1
  477. package/dist/esm/utils/ips.js +1 -25
  478. package/dist/esm/utils/ips.js.map +1 -1
  479. package/dist/esm/utils/json.d.ts +1 -1
  480. package/dist/esm/utils/json.d.ts.map +1 -1
  481. package/dist/esm/utils/json.js +1 -155
  482. package/dist/esm/utils/json.js.map +1 -1
  483. package/dist/esm/utils/jsx-editable-transpiler.d.ts.map +1 -1
  484. package/dist/esm/utils/jsx-editable-transpiler.js +1 -2
  485. package/dist/esm/utils/jsx-editable-transpiler.js.map +1 -1
  486. package/dist/esm/utils/jsx-editable-transpiler.test.js +2 -3
  487. package/dist/esm/utils/jsx-editable-transpiler.test.js.map +1 -1
  488. package/dist/esm/utils/jwt.d.ts.map +1 -1
  489. package/dist/esm/utils/jwt.js +1 -2
  490. package/dist/esm/utils/jwt.js.map +1 -1
  491. package/dist/esm/utils/locks.d.ts.map +1 -1
  492. package/dist/esm/utils/locks.js +1 -2
  493. package/dist/esm/utils/locks.js.map +1 -1
  494. package/dist/esm/utils/maps.d.ts.map +1 -1
  495. package/dist/esm/utils/maps.js +1 -111
  496. package/dist/esm/utils/maps.js.map +1 -1
  497. package/dist/esm/utils/math.d.ts.map +1 -1
  498. package/dist/esm/utils/math.js +1 -11
  499. package/dist/esm/utils/math.js.map +1 -1
  500. package/dist/esm/utils/monkey-patch.d.ts.map +1 -1
  501. package/dist/esm/utils/monkey-patch.js +2 -3
  502. package/dist/esm/utils/monkey-patch.js.map +1 -1
  503. package/dist/esm/utils/node-http.js +1 -2
  504. package/dist/esm/utils/node-http.js.map +1 -1
  505. package/dist/esm/utils/numbers.d.ts.map +1 -1
  506. package/dist/esm/utils/numbers.js +1 -45
  507. package/dist/esm/utils/numbers.js.map +1 -1
  508. package/dist/esm/utils/oauth.d.ts.map +1 -1
  509. package/dist/esm/utils/oauth.js +1 -1
  510. package/dist/esm/utils/oauth.js.map +1 -1
  511. package/dist/esm/utils/objects.d.ts.map +1 -1
  512. package/dist/esm/utils/objects.js +1 -622
  513. package/dist/esm/utils/objects.js.map +1 -1
  514. package/dist/esm/utils/paginated-lists.d.ts.map +1 -1
  515. package/dist/esm/utils/paginated-lists.js +1 -2
  516. package/dist/esm/utils/paginated-lists.js.map +1 -1
  517. package/dist/esm/utils/paginated-lists.test.js +2 -3
  518. package/dist/esm/utils/paginated-lists.test.js.map +1 -1
  519. package/dist/esm/utils/passkey.d.ts +1 -1
  520. package/dist/esm/utils/passkey.js +1 -1
  521. package/dist/esm/utils/promises.d.ts +1 -1
  522. package/dist/esm/utils/promises.d.ts.map +1 -1
  523. package/dist/esm/utils/promises.js +1 -160
  524. package/dist/esm/utils/promises.js.map +1 -1
  525. package/dist/esm/utils/proxies.d.ts.map +1 -1
  526. package/dist/esm/utils/proxies.js +1 -37
  527. package/dist/esm/utils/proxies.js.map +1 -1
  528. package/dist/esm/utils/react.d.ts.map +1 -1
  529. package/dist/esm/utils/react.js +1 -41
  530. package/dist/esm/utils/react.js.map +1 -1
  531. package/dist/esm/utils/redirect-urls.d.ts.map +1 -1
  532. package/dist/esm/utils/redirect-urls.js +2 -92
  533. package/dist/esm/utils/redirect-urls.js.map +1 -1
  534. package/dist/esm/utils/regex.js +1 -1
  535. package/dist/esm/utils/regex.js.map +1 -1
  536. package/dist/esm/utils/results.d.ts.map +1 -1
  537. package/dist/esm/utils/results.js +1 -213
  538. package/dist/esm/utils/results.js.map +1 -1
  539. package/dist/esm/utils/sentry.js +1 -1
  540. package/dist/esm/utils/sentry.js.map +1 -1
  541. package/dist/esm/utils/stores.d.ts +3 -3
  542. package/dist/esm/utils/stores.d.ts.map +1 -1
  543. package/dist/esm/utils/stores.js +1 -2
  544. package/dist/esm/utils/stores.js.map +1 -1
  545. package/dist/esm/utils/strings.d.ts.map +1 -1
  546. package/dist/esm/utils/strings.js +1 -251
  547. package/dist/esm/utils/strings.js.map +1 -1
  548. package/dist/esm/utils/strings.nicify.test.js +2 -3
  549. package/dist/esm/utils/strings.nicify.test.js.map +1 -1
  550. package/dist/esm/utils/telemetry.d.ts.map +1 -1
  551. package/dist/esm/utils/telemetry.js +1 -2
  552. package/dist/esm/utils/telemetry.js.map +1 -1
  553. package/dist/esm/utils/turnstile-browser.d.ts +1 -1
  554. package/dist/esm/utils/turnstile-browser.d.ts.map +1 -1
  555. package/dist/esm/utils/turnstile-browser.js +1 -2
  556. package/dist/esm/utils/turnstile-browser.js.map +1 -1
  557. package/dist/esm/utils/turnstile-flow.d.ts +1 -1
  558. package/dist/esm/utils/turnstile-flow.d.ts.map +1 -1
  559. package/dist/esm/utils/turnstile-flow.js +1 -2
  560. package/dist/esm/utils/turnstile-flow.js.map +1 -1
  561. package/dist/esm/utils/turnstile-flow.test.js +2 -3
  562. package/dist/esm/utils/turnstile-flow.test.js.map +1 -1
  563. package/dist/esm/utils/turnstile.d.ts.map +1 -1
  564. package/dist/esm/utils/turnstile.js +1 -1
  565. package/dist/esm/utils/turnstile.js.map +1 -1
  566. package/dist/esm/utils/typed-arrays.js +1 -2
  567. package/dist/esm/utils/typed-arrays.js.map +1 -1
  568. package/dist/esm/utils/types.d.ts +1 -1
  569. package/dist/esm/utils/types.d.ts.map +1 -1
  570. package/dist/esm/utils/types.js +1 -1
  571. package/dist/esm/utils/types.js.map +1 -1
  572. package/dist/esm/utils/unicode.d.ts.map +1 -1
  573. package/dist/esm/utils/unicode.js +1 -13
  574. package/dist/esm/utils/unicode.js.map +1 -1
  575. package/dist/esm/utils/urls.d.ts.map +1 -1
  576. package/dist/esm/utils/urls.js +1 -151
  577. package/dist/esm/utils/urls.js.map +1 -1
  578. package/dist/esm/utils/uuids.d.ts.map +1 -1
  579. package/dist/esm/utils/uuids.js +2 -26
  580. package/dist/esm/utils/uuids.js.map +1 -1
  581. package/dist/format-4JG1MGv5.d.ts +61 -0
  582. package/dist/format-4JG1MGv5.d.ts.map +1 -0
  583. package/dist/handler-urls-BHt3v8Ai.d.ts +70 -0
  584. package/dist/handler-urls-BHt3v8Ai.d.ts.map +1 -0
  585. package/dist/helpers/emails.js +2 -4
  586. package/dist/helpers/emails.js.map +1 -1
  587. package/dist/helpers/init-prompt.d.ts.map +1 -1
  588. package/dist/helpers/init-prompt.js +2 -4
  589. package/dist/helpers/init-prompt.js.map +1 -1
  590. package/dist/helpers/password.d.ts +1 -1
  591. package/dist/helpers/password.d.ts.map +1 -1
  592. package/dist/helpers/password.js +2 -4
  593. package/dist/helpers/password.js.map +1 -1
  594. package/dist/helpers/production-mode.d.ts +1 -1
  595. package/dist/helpers/production-mode.d.ts.map +1 -1
  596. package/dist/helpers/production-mode.js +2 -4
  597. package/dist/helpers/production-mode.js.map +1 -1
  598. package/dist/helpers/support-sla.d.ts.map +1 -1
  599. package/dist/helpers/support-sla.js +2 -3
  600. package/dist/helpers/support-sla.js.map +1 -1
  601. package/dist/helpers/support-sla.test.js +1 -3
  602. package/dist/helpers/support-sla.test.js.map +1 -1
  603. package/dist/helpers/vault/client-side.d.ts.map +1 -1
  604. package/dist/helpers/vault/client-side.js +2 -22
  605. package/dist/helpers/vault/client-side.js.map +1 -1
  606. package/dist/helpers/vault/server-side.js +2 -4
  607. package/dist/helpers/vault/server-side.js.map +1 -1
  608. package/dist/hooks/use-async-callback.d.ts.map +1 -1
  609. package/dist/hooks/use-async-callback.js +4 -5
  610. package/dist/hooks/use-async-callback.js.map +1 -1
  611. package/dist/hooks/use-async-external-store.d.ts +1 -1
  612. package/dist/hooks/use-async-external-store.d.ts.map +1 -1
  613. package/dist/hooks/use-async-external-store.js +2 -4
  614. package/dist/hooks/use-async-external-store.js.map +1 -1
  615. package/dist/hooks/use-hash.js +2 -4
  616. package/dist/hooks/use-hash.js.map +1 -1
  617. package/dist/hooks/use-hover.d.ts.map +1 -1
  618. package/dist/hooks/use-hover.js +2 -4
  619. package/dist/hooks/use-hover.js.map +1 -1
  620. package/dist/hooks/use-strict-memo.d.ts.map +1 -1
  621. package/dist/hooks/use-strict-memo.js +2 -72
  622. package/dist/hooks/use-strict-memo.js.map +1 -1
  623. package/dist/index.d.ts +4 -4
  624. package/dist/index.js +27 -29
  625. package/dist/interface/admin-interface.d.ts +3 -379
  626. package/dist/interface/admin-interface.js +2 -4
  627. package/dist/interface/admin-interface.js.map +1 -1
  628. package/dist/interface/admin-metrics.d.ts +2 -807
  629. package/dist/interface/admin-metrics.js +2 -4
  630. package/dist/interface/admin-metrics.js.map +1 -1
  631. package/dist/interface/client-interface.d.ts +2 -447
  632. package/dist/interface/client-interface.js +32 -17
  633. package/dist/interface/client-interface.js.map +1 -1
  634. package/dist/interface/client-interface.test.js +83 -13
  635. package/dist/interface/client-interface.test.js.map +1 -1
  636. package/dist/interface/conversations.d.ts +33 -33
  637. package/dist/interface/conversations.d.ts.map +1 -1
  638. package/dist/interface/conversations.js +2 -4
  639. package/dist/interface/conversations.js.map +1 -1
  640. package/dist/interface/crud/analytics.d.ts +2 -14
  641. package/dist/interface/crud/connected-accounts.d.ts +2 -68
  642. package/dist/interface/crud/connected-accounts.js +2 -4
  643. package/dist/interface/crud/connected-accounts.js.map +1 -1
  644. package/dist/interface/crud/contact-channels.d.ts +2 -181
  645. package/dist/interface/crud/contact-channels.js +2 -4
  646. package/dist/interface/crud/contact-channels.js.map +1 -1
  647. package/dist/interface/crud/current-user.d.ts +2 -285
  648. package/dist/interface/crud/current-user.js +2 -4
  649. package/dist/interface/crud/current-user.js.map +1 -1
  650. package/dist/interface/crud/email-outbox.d.ts +2 -1465
  651. package/dist/interface/crud/email-outbox.js +4 -5
  652. package/dist/interface/crud/email-outbox.js.map +1 -1
  653. package/dist/interface/crud/email-templates.d.ts +15 -16
  654. package/dist/interface/crud/email-templates.d.ts.map +1 -1
  655. package/dist/interface/crud/email-templates.js +2 -4
  656. package/dist/interface/crud/email-templates.js.map +1 -1
  657. package/dist/interface/crud/emails.d.ts +2 -41
  658. package/dist/interface/crud/emails.js +4 -5
  659. package/dist/interface/crud/emails.js.map +1 -1
  660. package/dist/interface/crud/internal-api-keys.d.ts +2 -140
  661. package/dist/interface/crud/internal-api-keys.js +2 -4
  662. package/dist/interface/crud/internal-api-keys.js.map +1 -1
  663. package/dist/interface/crud/invoices.d.ts +2 -43
  664. package/dist/interface/crud/invoices.js +2 -4
  665. package/dist/interface/crud/invoices.js.map +1 -1
  666. package/dist/interface/crud/items.d.ts +2 -30
  667. package/dist/interface/crud/items.js +2 -4
  668. package/dist/interface/crud/items.js.map +1 -1
  669. package/dist/interface/crud/notification-preferences.d.ts +2 -38
  670. package/dist/interface/crud/notification-preferences.js +2 -4
  671. package/dist/interface/crud/notification-preferences.js.map +1 -1
  672. package/dist/interface/crud/oauth-providers.d.ts +2 -186
  673. package/dist/interface/crud/oauth-providers.js +2 -4
  674. package/dist/interface/crud/oauth-providers.js.map +1 -1
  675. package/dist/interface/crud/products.d.ts +2 -182
  676. package/dist/interface/crud/products.js +4 -4
  677. package/dist/interface/crud/products.js.map +1 -1
  678. package/dist/interface/crud/project-api-keys.d.ts +2 -203
  679. package/dist/interface/crud/project-api-keys.js +2 -4
  680. package/dist/interface/crud/project-api-keys.js.map +1 -1
  681. package/dist/interface/crud/project-permissions.d.ts +2 -161
  682. package/dist/interface/crud/project-permissions.js +4 -5
  683. package/dist/interface/crud/project-permissions.js.map +1 -1
  684. package/dist/interface/crud/projects.d.ts +2 -901
  685. package/dist/interface/crud/projects.js +6 -5
  686. package/dist/interface/crud/projects.js.map +1 -1
  687. package/dist/interface/crud/session-replays.d.ts +2 -83
  688. package/dist/interface/crud/sessions.d.ts +2 -150
  689. package/dist/interface/crud/sessions.js +2 -4
  690. package/dist/interface/crud/sessions.js.map +1 -1
  691. package/dist/interface/crud/sign-up-rules.d.ts.map +1 -1
  692. package/dist/interface/crud/svix-token.d.ts +2 -31
  693. package/dist/interface/crud/svix-token.js +2 -4
  694. package/dist/interface/crud/svix-token.js.map +1 -1
  695. package/dist/interface/crud/team-invitation-details.d.ts +5 -6
  696. package/dist/interface/crud/team-invitation-details.d.ts.map +1 -1
  697. package/dist/interface/crud/team-invitation-details.js +4 -5
  698. package/dist/interface/crud/team-invitation-details.js.map +1 -1
  699. package/dist/interface/crud/team-invitation.d.ts +2 -54
  700. package/dist/interface/crud/team-invitation.js +4 -5
  701. package/dist/interface/crud/team-invitation.js.map +1 -1
  702. package/dist/interface/crud/team-member-profiles.d.ts +2 -286
  703. package/dist/interface/crud/team-member-profiles.js +4 -5
  704. package/dist/interface/crud/team-member-profiles.js.map +1 -1
  705. package/dist/interface/crud/team-memberships.d.ts +2 -75
  706. package/dist/interface/crud/team-memberships.js +2 -4
  707. package/dist/interface/crud/team-memberships.js.map +1 -1
  708. package/dist/interface/crud/team-permissions.d.ts +2 -169
  709. package/dist/interface/crud/team-permissions.js +4 -5
  710. package/dist/interface/crud/team-permissions.js.map +1 -1
  711. package/dist/interface/crud/teams.d.ts +2 -299
  712. package/dist/interface/crud/teams.js +5 -7
  713. package/dist/interface/crud/teams.js.map +1 -1
  714. package/dist/interface/crud/transactions.d.ts +2 -183
  715. package/dist/interface/crud/transactions.js +2 -4
  716. package/dist/interface/crud/transactions.js.map +1 -1
  717. package/dist/interface/crud/users.d.ts +2 -653
  718. package/dist/interface/crud/users.js +12 -8
  719. package/dist/interface/crud/users.js.map +1 -1
  720. package/dist/interface/handler-urls.d.ts +2 -51
  721. package/dist/interface/handler-urls.js +12 -14
  722. package/dist/interface/page-component-versions.d.ts +2 -25
  723. package/dist/interface/page-component-versions.js +2 -4
  724. package/dist/interface/page-component-versions.js.map +1 -1
  725. package/dist/interface/plan-usage.d.ts +2 -57
  726. package/dist/interface/plan-usage.js +2 -4
  727. package/dist/interface/plan-usage.js.map +1 -1
  728. package/dist/interface/server-interface.d.ts +2 -257
  729. package/dist/interface/server-interface.js +2 -4
  730. package/dist/interface/server-interface.js.map +1 -1
  731. package/dist/interface/webhooks.d.ts +2 -326
  732. package/dist/interface/webhooks.js +2 -4
  733. package/dist/interface/webhooks.js.map +1 -1
  734. package/dist/internal-api-keys-D8IYDodH.d.ts +139 -0
  735. package/dist/internal-api-keys-D8IYDodH.d.ts.map +1 -0
  736. package/dist/invoices-U65KzAZX.d.ts +43 -0
  737. package/dist/invoices-U65KzAZX.d.ts.map +1 -0
  738. package/dist/items-DlLSlVUD.d.ts +29 -0
  739. package/dist/items-DlLSlVUD.d.ts.map +1 -0
  740. package/dist/json-a1QIXu5z.d.ts +15 -0
  741. package/dist/json-a1QIXu5z.d.ts.map +1 -0
  742. package/dist/known-errors-Bm4a61wL.d.ts +575 -0
  743. package/dist/known-errors-Bm4a61wL.d.ts.map +1 -0
  744. package/dist/known-errors.d.ts +2 -575
  745. package/dist/known-errors.js +11 -23
  746. package/dist/known-errors.js.map +1 -1
  747. package/dist/notification-preferences-Bmzr_EOY.d.ts +37 -0
  748. package/dist/notification-preferences-Bmzr_EOY.d.ts.map +1 -0
  749. package/dist/oauth-providers-BMkKSSlA.d.ts +185 -0
  750. package/dist/oauth-providers-BMkKSSlA.d.ts.map +1 -0
  751. package/dist/objects-DkCkeBWE.d.ts +59 -0
  752. package/dist/objects-DkCkeBWE.d.ts.map +1 -0
  753. package/dist/passkey-CKg87UH-.d.ts +2 -0
  754. package/dist/payments/payment-methods.d.ts.map +1 -1
  755. package/dist/payments/payment-methods.js +2 -3
  756. package/dist/payments/payment-methods.js.map +1 -1
  757. package/dist/payments/stripe-limits.d.ts.map +1 -1
  758. package/dist/payments/stripe-limits.js +2 -3
  759. package/dist/payments/stripe-limits.js.map +1 -1
  760. package/dist/plan-usage-DfDoj5K4.d.ts +57 -0
  761. package/dist/plan-usage-DfDoj5K4.d.ts.map +1 -0
  762. package/dist/plans.d.ts.map +1 -1
  763. package/dist/plans.js +2 -3
  764. package/dist/plans.js.map +1 -1
  765. package/dist/products-Bs74ld-v.d.ts +182 -0
  766. package/dist/products-Bs74ld-v.d.ts.map +1 -0
  767. package/dist/project-api-keys--7V5X_UW.d.ts +203 -0
  768. package/dist/project-api-keys--7V5X_UW.d.ts.map +1 -0
  769. package/dist/project-permissions-kdi675F-.d.ts +160 -0
  770. package/dist/project-permissions-kdi675F-.d.ts.map +1 -0
  771. package/dist/projects-CgFGB3nO.d.ts +900 -0
  772. package/dist/projects-CgFGB3nO.d.ts.map +1 -0
  773. package/dist/results-DP3BzoL6.d.ts +70 -0
  774. package/dist/results-DP3BzoL6.d.ts.map +1 -0
  775. package/dist/{chunk-BE-pF4vm.js → rolldown-runtime-D6vf50IK.js} +12 -18
  776. package/dist/schema-01nWxmb4.d.ts +2328 -0
  777. package/dist/schema-01nWxmb4.d.ts.map +1 -0
  778. package/dist/schema-fields-DqGQ4kF7.d.ts +517 -0
  779. package/dist/schema-fields-DqGQ4kF7.d.ts.map +1 -0
  780. package/dist/schema-fields.d.ts +3 -518
  781. package/dist/schema-fields.js +21 -82
  782. package/dist/schema-fields.js.map +1 -1
  783. package/dist/server-interface-BUPG1kor.d.ts +257 -0
  784. package/dist/server-interface-BUPG1kor.d.ts.map +1 -0
  785. package/dist/session-replays-CXqhDpZq.d.ts +83 -0
  786. package/dist/session-replays-CXqhDpZq.d.ts.map +1 -0
  787. package/dist/sessions-B7Ko2Ldr.d.ts +149 -0
  788. package/dist/sessions-B7Ko2Ldr.d.ts.map +1 -0
  789. package/dist/sessions-d8qtvBUB.d.ts +175 -0
  790. package/dist/sessions-d8qtvBUB.d.ts.map +1 -0
  791. package/dist/sessions.d.ts +2 -175
  792. package/dist/sessions.js +4 -5
  793. package/dist/sessions.js.map +1 -1
  794. package/dist/sessions.test.js +1 -3
  795. package/dist/sessions.test.js.map +1 -1
  796. package/dist/strings-DWgkUybS.d.ts +76 -0
  797. package/dist/strings-DWgkUybS.d.ts.map +1 -0
  798. package/dist/svix-token-BsMrLGvy.d.ts +30 -0
  799. package/dist/svix-token-BsMrLGvy.d.ts.map +1 -0
  800. package/dist/team-invitation-Cyqt9oWw.d.ts +53 -0
  801. package/dist/team-invitation-Cyqt9oWw.d.ts.map +1 -0
  802. package/dist/team-member-profiles-uTluO8XI.d.ts +285 -0
  803. package/dist/team-member-profiles-uTluO8XI.d.ts.map +1 -0
  804. package/dist/team-memberships-DZHk2A5b.d.ts +74 -0
  805. package/dist/team-memberships-DZHk2A5b.d.ts.map +1 -0
  806. package/dist/team-permissions-DqOpaOWh.d.ts +168 -0
  807. package/dist/team-permissions-DqOpaOWh.d.ts.map +1 -0
  808. package/dist/teams-CQMcBnjM.d.ts +298 -0
  809. package/dist/teams-CQMcBnjM.d.ts.map +1 -0
  810. package/dist/transactions-DhnbvGH5.d.ts +182 -0
  811. package/dist/transactions-DhnbvGH5.d.ts.map +1 -0
  812. package/dist/types-DfTcxNtM.d.ts +77 -0
  813. package/dist/types-DfTcxNtM.d.ts.map +1 -0
  814. package/dist/users-CmBBuF00.d.ts +653 -0
  815. package/dist/users-CmBBuF00.d.ts.map +1 -0
  816. package/dist/utils/analytics-clickmap-overlay.d.ts.map +1 -1
  817. package/dist/utils/analytics-clickmap-overlay.js +2 -3
  818. package/dist/utils/analytics-clickmap-overlay.js.map +1 -1
  819. package/dist/utils/api-keys.d.ts.map +1 -1
  820. package/dist/utils/api-keys.js +4 -5
  821. package/dist/utils/api-keys.js.map +1 -1
  822. package/dist/utils/arrays.d.ts.map +1 -1
  823. package/dist/utils/arrays.js +2 -472
  824. package/dist/utils/arrays.js.map +1 -1
  825. package/dist/utils/auth-methods.d.ts.map +1 -1
  826. package/dist/utils/auth-methods.js +2 -3
  827. package/dist/utils/auth-methods.js.map +1 -1
  828. package/dist/utils/base64.d.ts.map +1 -1
  829. package/dist/utils/base64.js +2 -12
  830. package/dist/utils/base64.js.map +1 -1
  831. package/dist/utils/booleans.d.ts.map +1 -1
  832. package/dist/utils/booleans.js +2 -27
  833. package/dist/utils/booleans.js.map +1 -1
  834. package/dist/utils/browser-compat.d.ts.map +1 -1
  835. package/dist/utils/browser-compat.js +2 -3
  836. package/dist/utils/browser-compat.js.map +1 -1
  837. package/dist/utils/bytes.d.ts.map +1 -1
  838. package/dist/utils/bytes.js +4 -200
  839. package/dist/utils/bytes.js.map +1 -1
  840. package/dist/utils/caches.d.ts.map +1 -1
  841. package/dist/utils/caches.js +2 -29
  842. package/dist/utils/caches.js.map +1 -1
  843. package/dist/utils/cel-fields.d.ts.map +1 -1
  844. package/dist/utils/cel-fields.js +2 -4
  845. package/dist/utils/cel-fields.js.map +1 -1
  846. package/dist/utils/cloud-hosts.d.ts.map +1 -1
  847. package/dist/utils/cloud-hosts.js +2 -29
  848. package/dist/utils/cloud-hosts.js.map +1 -1
  849. package/dist/utils/compile-time.d.ts.map +1 -1
  850. package/dist/utils/compile-time.js +2 -3
  851. package/dist/utils/compile-time.js.map +1 -1
  852. package/dist/utils/country-codes.d.ts +2 -11
  853. package/dist/utils/country-codes.js +2 -18
  854. package/dist/utils/country-codes.js.map +1 -1
  855. package/dist/utils/crypto.d.ts.map +1 -1
  856. package/dist/utils/crypto.js +4 -115
  857. package/dist/utils/crypto.js.map +1 -1
  858. package/dist/utils/currencies.d.ts +1 -1
  859. package/dist/utils/currencies.d.ts.map +1 -1
  860. package/dist/utils/currencies.js +3 -39
  861. package/dist/utils/currencies.js.map +1 -1
  862. package/dist/utils/currency-constants.d.ts +2 -45
  863. package/dist/utils/currency-constants.js +2 -3
  864. package/dist/utils/currency-constants.js.map +1 -1
  865. package/dist/utils/dates.d.ts +2 -23
  866. package/dist/utils/dates.js +2 -46
  867. package/dist/utils/dates.js.map +1 -1
  868. package/dist/utils/dev-env-state-path.d.ts.map +1 -1
  869. package/dist/utils/dev-env-state-path.js +2 -4
  870. package/dist/utils/dev-env-state-path.js.map +1 -1
  871. package/dist/utils/dev-tool.d.ts.map +1 -1
  872. package/dist/utils/dev-tool.js +2 -3
  873. package/dist/utils/dev-tool.js.map +1 -1
  874. package/dist/utils/dom.d.ts.map +1 -1
  875. package/dist/utils/dom.js +2 -3
  876. package/dist/utils/dom.js.map +1 -1
  877. package/dist/utils/elements-chain.d.ts.map +1 -1
  878. package/dist/utils/elements-chain.js +6 -52
  879. package/dist/utils/elements-chain.js.map +1 -1
  880. package/dist/utils/env.d.ts.map +1 -1
  881. package/dist/utils/env.js +2 -4
  882. package/dist/utils/env.js.map +1 -1
  883. package/dist/utils/env.test.js +1 -3
  884. package/dist/utils/env.test.js.map +1 -1
  885. package/dist/utils/errors.d.ts +2 -238
  886. package/dist/utils/errors.js +2 -4
  887. package/dist/utils/errors.js.map +1 -1
  888. package/dist/utils/esbuild.d.ts +1 -1
  889. package/dist/utils/esbuild.d.ts.map +1 -1
  890. package/dist/utils/esbuild.js +5 -6
  891. package/dist/utils/esbuild.js.map +1 -1
  892. package/dist/utils/featurebase.d.ts.map +1 -1
  893. package/dist/utils/featurebase.js +2 -4
  894. package/dist/utils/featurebase.js.map +1 -1
  895. package/dist/utils/fs.d.ts.map +1 -1
  896. package/dist/utils/fs.js +5 -6
  897. package/dist/utils/fs.js.map +1 -1
  898. package/dist/utils/functions.d.ts.map +1 -1
  899. package/dist/utils/functions.js +2 -26
  900. package/dist/utils/functions.js.map +1 -1
  901. package/dist/utils/geo.d.ts.map +1 -1
  902. package/dist/utils/geo.js +2 -4
  903. package/dist/utils/geo.js.map +1 -1
  904. package/dist/utils/globals.d.ts.map +1 -1
  905. package/dist/utils/globals.js +2 -3
  906. package/dist/utils/globals.js.map +1 -1
  907. package/dist/utils/hashes.d.ts.map +1 -1
  908. package/dist/utils/hashes.js +4 -5
  909. package/dist/utils/hashes.js.map +1 -1
  910. package/dist/utils/html.d.ts.map +1 -1
  911. package/dist/utils/html.js +2 -21
  912. package/dist/utils/html.js.map +1 -1
  913. package/dist/utils/http.d.ts.map +1 -1
  914. package/dist/utils/http.js +2 -21
  915. package/dist/utils/http.js.map +1 -1
  916. package/dist/utils/ips.d.ts.map +1 -1
  917. package/dist/utils/ips.js +4 -28
  918. package/dist/utils/ips.js.map +1 -1
  919. package/dist/utils/json.d.ts +2 -15
  920. package/dist/utils/json.js +2 -157
  921. package/dist/utils/json.js.map +1 -1
  922. package/dist/utils/jsx-editable-transpiler.d.ts.map +1 -1
  923. package/dist/utils/jsx-editable-transpiler.js +7 -8
  924. package/dist/utils/jsx-editable-transpiler.js.map +1 -1
  925. package/dist/utils/jsx-editable-transpiler.test.js +1 -3
  926. package/dist/utils/jsx-editable-transpiler.test.js.map +1 -1
  927. package/dist/utils/jwt.d.ts.map +1 -1
  928. package/dist/utils/jwt.js +6 -7
  929. package/dist/utils/jwt.js.map +1 -1
  930. package/dist/utils/locks.d.ts.map +1 -1
  931. package/dist/utils/locks.js +2 -4
  932. package/dist/utils/locks.js.map +1 -1
  933. package/dist/utils/maps.d.ts.map +1 -1
  934. package/dist/utils/maps.js +2 -113
  935. package/dist/utils/maps.js.map +1 -1
  936. package/dist/utils/math.d.ts.map +1 -1
  937. package/dist/utils/math.js +2 -13
  938. package/dist/utils/math.js.map +1 -1
  939. package/dist/utils/monkey-patch.d.ts.map +1 -1
  940. package/dist/utils/monkey-patch.js +3 -5
  941. package/dist/utils/monkey-patch.js.map +1 -1
  942. package/dist/utils/node-http.js +2 -4
  943. package/dist/utils/node-http.js.map +1 -1
  944. package/dist/utils/numbers.d.ts.map +1 -1
  945. package/dist/utils/numbers.js +2 -47
  946. package/dist/utils/numbers.js.map +1 -1
  947. package/dist/utils/oauth.d.ts.map +1 -1
  948. package/dist/utils/oauth.js +2 -3
  949. package/dist/utils/oauth.js.map +1 -1
  950. package/dist/utils/objects.d.ts +2 -59
  951. package/dist/utils/objects.js +2 -624
  952. package/dist/utils/objects.js.map +1 -1
  953. package/dist/utils/paginated-lists.d.ts.map +1 -1
  954. package/dist/utils/paginated-lists.js +2 -4
  955. package/dist/utils/paginated-lists.js.map +1 -1
  956. package/dist/utils/paginated-lists.test.js +1 -3
  957. package/dist/utils/paginated-lists.test.js.map +1 -1
  958. package/dist/utils/passkey.d.ts +2 -2
  959. package/dist/utils/promises.d.ts +1 -1
  960. package/dist/utils/promises.d.ts.map +1 -1
  961. package/dist/utils/promises.js +2 -162
  962. package/dist/utils/promises.js.map +1 -1
  963. package/dist/utils/proxies.d.ts.map +1 -1
  964. package/dist/utils/proxies.js +2 -39
  965. package/dist/utils/proxies.js.map +1 -1
  966. package/dist/utils/react.d.ts.map +1 -1
  967. package/dist/utils/react.js +4 -44
  968. package/dist/utils/react.js.map +1 -1
  969. package/dist/utils/redirect-urls.d.ts.map +1 -1
  970. package/dist/utils/redirect-urls.js +3 -94
  971. package/dist/utils/redirect-urls.js.map +1 -1
  972. package/dist/utils/regex.js +2 -3
  973. package/dist/utils/regex.js.map +1 -1
  974. package/dist/utils/results.d.ts +2 -70
  975. package/dist/utils/results.js +2 -215
  976. package/dist/utils/results.js.map +1 -1
  977. package/dist/utils/sentry.js +2 -3
  978. package/dist/utils/sentry.js.map +1 -1
  979. package/dist/utils/stores.d.ts +1 -1
  980. package/dist/utils/stores.d.ts.map +1 -1
  981. package/dist/utils/stores.js +2 -4
  982. package/dist/utils/stores.js.map +1 -1
  983. package/dist/utils/strings.d.ts +2 -76
  984. package/dist/utils/strings.js +2 -253
  985. package/dist/utils/strings.js.map +1 -1
  986. package/dist/utils/strings.nicify.test.js +1 -3
  987. package/dist/utils/strings.nicify.test.js.map +1 -1
  988. package/dist/utils/telemetry.d.ts.map +1 -1
  989. package/dist/utils/telemetry.js +2 -4
  990. package/dist/utils/telemetry.js.map +1 -1
  991. package/dist/utils/turnstile-browser.d.ts.map +1 -1
  992. package/dist/utils/turnstile-browser.js +2 -4
  993. package/dist/utils/turnstile-browser.js.map +1 -1
  994. package/dist/utils/turnstile-flow.d.ts.map +1 -1
  995. package/dist/utils/turnstile-flow.js +2 -4
  996. package/dist/utils/turnstile-flow.js.map +1 -1
  997. package/dist/utils/turnstile-flow.test.js +1 -3
  998. package/dist/utils/turnstile-flow.test.js.map +1 -1
  999. package/dist/utils/turnstile.d.ts.map +1 -1
  1000. package/dist/utils/turnstile.js +2 -3
  1001. package/dist/utils/turnstile.js.map +1 -1
  1002. package/dist/utils/typed-arrays.js +2 -4
  1003. package/dist/utils/typed-arrays.js.map +1 -1
  1004. package/dist/utils/types.d.ts +2 -77
  1005. package/dist/utils/types.js +2 -3
  1006. package/dist/utils/types.js.map +1 -1
  1007. package/dist/utils/unicode.d.ts.map +1 -1
  1008. package/dist/utils/unicode.js +2 -15
  1009. package/dist/utils/unicode.js.map +1 -1
  1010. package/dist/utils/urls.d.ts.map +1 -1
  1011. package/dist/utils/urls.js +2 -153
  1012. package/dist/utils/urls.js.map +1 -1
  1013. package/dist/utils/uuids.d.ts.map +1 -1
  1014. package/dist/utils/uuids.js +3 -28
  1015. package/dist/utils/uuids.js.map +1 -1
  1016. package/dist/webhooks-ByXrdSOx.d.ts +326 -0
  1017. package/dist/webhooks-ByXrdSOx.d.ts.map +1 -0
  1018. package/package.json +2 -8
  1019. package/src/interface/client-interface.test.ts +77 -12
  1020. package/src/interface/client-interface.ts +9 -9
  1021. package/dist/config/format.d.ts.map +0 -1
  1022. package/dist/config/schema.d.ts.map +0 -1
  1023. package/dist/crud.d.ts.map +0 -1
  1024. package/dist/interface/admin-interface.d.ts.map +0 -1
  1025. package/dist/interface/admin-metrics.d.ts.map +0 -1
  1026. package/dist/interface/client-interface.d.ts.map +0 -1
  1027. package/dist/interface/crud/analytics.d.ts.map +0 -1
  1028. package/dist/interface/crud/connected-accounts.d.ts.map +0 -1
  1029. package/dist/interface/crud/contact-channels.d.ts.map +0 -1
  1030. package/dist/interface/crud/current-user.d.ts.map +0 -1
  1031. package/dist/interface/crud/emails.d.ts.map +0 -1
  1032. package/dist/interface/crud/internal-api-keys.d.ts.map +0 -1
  1033. package/dist/interface/crud/invoices.d.ts.map +0 -1
  1034. package/dist/interface/crud/items.d.ts.map +0 -1
  1035. package/dist/interface/crud/notification-preferences.d.ts.map +0 -1
  1036. package/dist/interface/crud/oauth-providers.d.ts.map +0 -1
  1037. package/dist/interface/crud/products.d.ts.map +0 -1
  1038. package/dist/interface/crud/project-api-keys.d.ts.map +0 -1
  1039. package/dist/interface/crud/project-permissions.d.ts.map +0 -1
  1040. package/dist/interface/crud/projects.d.ts.map +0 -1
  1041. package/dist/interface/crud/session-replays.d.ts.map +0 -1
  1042. package/dist/interface/crud/sessions.d.ts.map +0 -1
  1043. package/dist/interface/crud/svix-token.d.ts.map +0 -1
  1044. package/dist/interface/crud/team-invitation.d.ts.map +0 -1
  1045. package/dist/interface/crud/team-member-profiles.d.ts.map +0 -1
  1046. package/dist/interface/crud/team-memberships.d.ts.map +0 -1
  1047. package/dist/interface/crud/team-permissions.d.ts.map +0 -1
  1048. package/dist/interface/crud/teams.d.ts.map +0 -1
  1049. package/dist/interface/crud/transactions.d.ts.map +0 -1
  1050. package/dist/interface/crud/users.d.ts.map +0 -1
  1051. package/dist/interface/handler-urls.d.ts.map +0 -1
  1052. package/dist/interface/page-component-versions.d.ts.map +0 -1
  1053. package/dist/interface/plan-usage.d.ts.map +0 -1
  1054. package/dist/interface/server-interface.d.ts.map +0 -1
  1055. package/dist/interface/webhooks.d.ts.map +0 -1
  1056. package/dist/known-errors.d.ts.map +0 -1
  1057. package/dist/schema-fields.d.ts.map +0 -1
  1058. package/dist/sessions.d.ts.map +0 -1
  1059. package/dist/utils/country-codes.d.ts.map +0 -1
  1060. package/dist/utils/currency-constants.d.ts.map +0 -1
  1061. package/dist/utils/dates.d.ts.map +0 -1
  1062. package/dist/utils/errors.d.ts.map +0 -1
  1063. package/dist/utils/json.d.ts.map +0 -1
  1064. package/dist/utils/objects.d.ts.map +0 -1
  1065. package/dist/utils/results.d.ts.map +0 -1
  1066. package/dist/utils/strings.d.ts.map +0 -1
  1067. package/dist/utils/types.d.ts.map +0 -1
@@ -1,6 +1,5 @@
1
1
  import { generateSecureRandomString } from "./crypto.js";
2
2
  import { templateIdentity } from "./strings.js";
3
-
4
3
  //#region src/utils/urls.tsx
5
4
  function createUrlIfValid(...args) {
6
5
  try {
@@ -9,41 +8,15 @@ function createUrlIfValid(...args) {
9
8
  return null;
10
9
  }
11
10
  }
12
- (void 0)?.test("createUrlIfValid", ({ expect }) => {
13
- expect(createUrlIfValid("https://example.com")).toBeInstanceOf(URL);
14
- expect(createUrlIfValid("https://example.com/path?query=value#hash")).toBeInstanceOf(URL);
15
- expect(createUrlIfValid("/path", "https://example.com")).toBeInstanceOf(URL);
16
- expect(createUrlIfValid("")).toBeNull();
17
- expect(createUrlIfValid("not a url")).toBeNull();
18
- expect(createUrlIfValid("http://")).toBeNull();
19
- });
20
11
  function isValidUrl(url) {
21
12
  return !!createUrlIfValid(url);
22
13
  }
23
- (void 0)?.test("isValidUrl", ({ expect }) => {
24
- expect(isValidUrl("https://example.com")).toBe(true);
25
- expect(isValidUrl("http://localhost:3000")).toBe(true);
26
- expect(isValidUrl("ftp://example.com")).toBe(true);
27
- expect(isValidUrl("")).toBe(false);
28
- expect(isValidUrl("not a url")).toBe(false);
29
- expect(isValidUrl("http://")).toBe(false);
30
- });
31
14
  function isValidHostname(hostname) {
32
15
  if (!hostname || hostname.startsWith(".") || hostname.endsWith(".") || hostname.includes("..")) return false;
33
16
  const url = createUrlIfValid(`https://${hostname}`);
34
17
  if (!url) return false;
35
18
  return url.hostname === hostname;
36
19
  }
37
- (void 0)?.test("isValidHostname", ({ expect }) => {
38
- expect(isValidHostname("example.com")).toBe(true);
39
- expect(isValidHostname("localhost")).toBe(true);
40
- expect(isValidHostname("sub.domain.example.com")).toBe(true);
41
- expect(isValidHostname("127.0.0.1")).toBe(true);
42
- expect(isValidHostname("")).toBe(false);
43
- expect(isValidHostname("example.com/path")).toBe(false);
44
- expect(isValidHostname("https://example.com")).toBe(false);
45
- expect(isValidHostname("example com")).toBe(false);
46
- });
47
20
  function isValidHostnameWithWildcards(hostname) {
48
21
  if (!hostname) return false;
49
22
  if (!hostname.includes("*")) return isValidHostname(hostname);
@@ -61,25 +34,6 @@ function isValidHostnameWithWildcards(hostname) {
61
34
  }
62
35
  return true;
63
36
  }
64
- (void 0)?.test("isValidHostnameWithWildcards", ({ expect }) => {
65
- expect(isValidHostnameWithWildcards("example.com")).toBe(true);
66
- expect(isValidHostnameWithWildcards("localhost")).toBe(true);
67
- expect(isValidHostnameWithWildcards("sub.domain.example.com")).toBe(true);
68
- expect(isValidHostnameWithWildcards("*.example.com")).toBe(true);
69
- expect(isValidHostnameWithWildcards("a-*.example.com")).toBe(true);
70
- expect(isValidHostnameWithWildcards("*.*.org")).toBe(true);
71
- expect(isValidHostnameWithWildcards("**.example.com")).toBe(true);
72
- expect(isValidHostnameWithWildcards("sub.**.com")).toBe(true);
73
- expect(isValidHostnameWithWildcards("*-api.*.com")).toBe(true);
74
- expect(isValidHostnameWithWildcards("")).toBe(false);
75
- expect(isValidHostnameWithWildcards("example.com/path")).toBe(false);
76
- expect(isValidHostnameWithWildcards("https://example.com")).toBe(false);
77
- expect(isValidHostnameWithWildcards("example com")).toBe(false);
78
- expect(isValidHostnameWithWildcards(".example.com")).toBe(false);
79
- expect(isValidHostnameWithWildcards("example.com.")).toBe(false);
80
- expect(isValidHostnameWithWildcards("example..com")).toBe(false);
81
- expect(isValidHostnameWithWildcards("*.example..com")).toBe(false);
82
- });
83
37
  function matchHostnamePattern(pattern, hostname) {
84
38
  if (!pattern.includes("*")) return pattern === hostname;
85
39
  let regexPattern = pattern.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
@@ -94,23 +48,6 @@ function matchHostnamePattern(pattern, hostname) {
94
48
  return false;
95
49
  }
96
50
  }
97
- (void 0)?.test("matchHostnamePattern", ({ expect }) => {
98
- expect(matchHostnamePattern("example.com", "example.com")).toBe(true);
99
- expect(matchHostnamePattern("example.com", "other.com")).toBe(false);
100
- expect(matchHostnamePattern("*.example.com", "api.example.com")).toBe(true);
101
- expect(matchHostnamePattern("*.example.com", "www.example.com")).toBe(true);
102
- expect(matchHostnamePattern("*.example.com", "example.com")).toBe(false);
103
- expect(matchHostnamePattern("*.example.com", "api.v2.example.com")).toBe(false);
104
- expect(matchHostnamePattern("**.example.com", "api.example.com")).toBe(true);
105
- expect(matchHostnamePattern("**.example.com", "api.v2.example.com")).toBe(true);
106
- expect(matchHostnamePattern("**.example.com", "a.b.c.example.com")).toBe(true);
107
- expect(matchHostnamePattern("**.example.com", "example.com")).toBe(false);
108
- expect(matchHostnamePattern("api-*.example.com", "api-v1.example.com")).toBe(true);
109
- expect(matchHostnamePattern("api-*.example.com", "api-v2.example.com")).toBe(true);
110
- expect(matchHostnamePattern("api-*.example.com", "api.example.com")).toBe(false);
111
- expect(matchHostnamePattern("*.*.org", "mail.example.org")).toBe(true);
112
- expect(matchHostnamePattern("*.*.org", "example.org")).toBe(false);
113
- });
114
51
  function getHardcodedFallbackUrls(primaryBaseUrl) {
115
52
  if (primaryBaseUrl === "https://api.stack-auth.com") return ["https://api1.stack-auth.com", "https://api2.stack-auth.com"];
116
53
  if (primaryBaseUrl === "https://api.dev.stack-auth.com") return ["https://api1.dev.stack-auth.com", "https://api2.dev.stack-auth.com"];
@@ -131,21 +68,6 @@ function isLocalhost(urlOrString) {
131
68
  if (url.hostname === "[::1]" || url.hostname === "::1") return true;
132
69
  return false;
133
70
  }
134
- (void 0)?.test("isLocalhost", ({ expect }) => {
135
- expect(isLocalhost("http://localhost")).toBe(true);
136
- expect(isLocalhost("https://localhost:8080")).toBe(true);
137
- expect(isLocalhost("http://sub.localhost")).toBe(true);
138
- expect(isLocalhost("http://127.0.0.1")).toBe(true);
139
- expect(isLocalhost("http://127.1.2.3")).toBe(true);
140
- expect(isLocalhost("http://[::1]")).toBe(true);
141
- expect(isLocalhost("https://example.com")).toBe(false);
142
- expect(isLocalhost("http://192.168.1.1")).toBe(false);
143
- expect(isLocalhost("http://10.0.0.1")).toBe(false);
144
- expect(isLocalhost(new URL("http://localhost"))).toBe(true);
145
- expect(isLocalhost(new URL("https://example.com"))).toBe(false);
146
- expect(isLocalhost("not a url")).toBe(false);
147
- expect(isLocalhost("")).toBe(false);
148
- });
149
71
  function isRelative(url) {
150
72
  const randomDomain = `${generateSecureRandomString()}.stack-auth.example.com`;
151
73
  const u = createUrlIfValid(url, `https://${randomDomain}`);
@@ -154,29 +76,9 @@ function isRelative(url) {
154
76
  if (u.protocol !== "https:") return false;
155
77
  return true;
156
78
  }
157
- (void 0)?.test("isRelative", ({ expect }) => {
158
- expect(isRelative("/")).toBe(true);
159
- expect(isRelative("/path")).toBe(true);
160
- expect(isRelative("/path?query=value#hash")).toBe(true);
161
- expect(isRelative("https://example.com")).toBe(false);
162
- expect(isRelative("http://example.com")).toBe(false);
163
- expect(isRelative("//example.com")).toBe(false);
164
- expect(isRelative("")).toBe(true);
165
- expect(isRelative("not a url")).toBe(true);
166
- });
167
79
  function getRelativePart(url) {
168
80
  return url.pathname + url.search + url.hash;
169
81
  }
170
- (void 0)?.test("getRelativePart", ({ expect }) => {
171
- expect(getRelativePart(new URL("https://example.com"))).toBe("/");
172
- expect(getRelativePart(new URL("https://example.com/path"))).toBe("/path");
173
- expect(getRelativePart(new URL("https://example.com/path?query=value"))).toBe("/path?query=value");
174
- expect(getRelativePart(new URL("https://example.com/path#hash"))).toBe("/path#hash");
175
- expect(getRelativePart(new URL("https://example.com/path?query=value#hash"))).toBe("/path?query=value#hash");
176
- const url1 = new URL("https://example.com/path?query=value#hash");
177
- const url2 = new URL("https://different.com/path?query=value#hash");
178
- expect(getRelativePart(url1)).toBe(getRelativePart(url2));
179
- });
180
82
  /**
181
83
  * A template literal tag that returns a URL.
182
84
  *
@@ -185,21 +87,6 @@ function getRelativePart(url) {
185
87
  function url(strings, ...values) {
186
88
  return new URL(urlString(strings, ...values));
187
89
  }
188
- (void 0)?.test("url", ({ expect }) => {
189
- expect(url`https://example.com`).toBeInstanceOf(URL);
190
- expect(url`https://example.com`.href).toBe("https://example.com/");
191
- expect(url`https://example.com/${"path"}`).toBeInstanceOf(URL);
192
- expect(url`https://example.com/${"path"}`.pathname).toBe("/path");
193
- expect(url`https://example.com/${42}`).toBeInstanceOf(URL);
194
- expect(url`https://example.com/${42}`.pathname).toBe("/42");
195
- expect(url`https://example.com/${true}`).toBeInstanceOf(URL);
196
- expect(url`https://example.com/${true}`.pathname).toBe("/true");
197
- expect(url`https://example.com/${"path with spaces"}`).toBeInstanceOf(URL);
198
- expect(url`https://example.com/${"path with spaces"}`.pathname).toBe("/path%20with%20spaces");
199
- expect(url`https://example.com/${"path"}?query=${"value"}`).toBeInstanceOf(URL);
200
- expect(url`https://example.com/${"path"}?query=${"value"}`.pathname).toBe("/path");
201
- expect(url`https://example.com/${"path"}?query=${"value"}`.search).toBe("?query=value");
202
- });
203
90
  /**
204
91
  * A template literal tag that returns a URL string.
205
92
  *
@@ -208,52 +95,15 @@ function url(strings, ...values) {
208
95
  function urlString(strings, ...values) {
209
96
  return templateIdentity(strings, ...values.map(encodeURIComponent));
210
97
  }
211
- (void 0)?.test("urlString", ({ expect }) => {
212
- expect(urlString`https://example.com`).toBe("https://example.com");
213
- expect(urlString`https://example.com/${"path"}`).toBe("https://example.com/path");
214
- expect(urlString`https://example.com/${42}`).toBe("https://example.com/42");
215
- expect(urlString`https://example.com/${true}`).toBe("https://example.com/true");
216
- expect(urlString`https://example.com/${"path with spaces"}`).toBe("https://example.com/path%20with%20spaces");
217
- expect(urlString`https://example.com/${"?&="}`).toBe("https://example.com/%3F%26%3D");
218
- expect(urlString`https://example.com/${"path"}?query=${"value"}`).toBe("https://example.com/path?query=value");
219
- expect(urlString`https://example.com/${"path"}?query=${"value with spaces"}`).toBe("https://example.com/path?query=value%20with%20spaces");
220
- });
221
98
  function isChildUrl(parentUrl, maybeChildUrl) {
222
99
  return parentUrl.origin === maybeChildUrl.origin && isChildPath(parentUrl.pathname, maybeChildUrl.pathname) && [...parentUrl.searchParams].every(([key, value]) => maybeChildUrl.searchParams.get(key) === value) && (!parentUrl.hash || parentUrl.hash === maybeChildUrl.hash);
223
100
  }
224
- (void 0)?.test("isChildUrl", ({ expect }) => {
225
- expect(isChildUrl(new URL("https://abc.com/"), new URL("https://abc.com/"))).toBe(true);
226
- expect(isChildUrl(new URL("https://abc.com/"), new URL("https://abc.com/path"))).toBe(true);
227
- expect(isChildUrl(new URL("https://abc.com/"), new URL("https://abc.com/path?query=value"))).toBe(true);
228
- expect(isChildUrl(new URL("https://abc.com/"), new URL("https://abc.com/path?query=value#hash"))).toBe(true);
229
- expect(isChildUrl(new URL("https://abc.com"), new URL("https://example.com"))).toBe(false);
230
- expect(isChildUrl(new URL("https://abc.com/"), new URL("https://example.com/path"))).toBe(false);
231
- expect(isChildUrl(new URL("https://abc.com/"), new URL("https://example.com/path?query=value"))).toBe(false);
232
- expect(isChildUrl(new URL("https://abc.com/"), new URL("https://example.com/path?query=value#hash"))).toBe(false);
233
- expect(isChildUrl(new URL("https://example.com"), new URL("https://abc.com/path?query=value#hash"))).toBe(false);
234
- expect(isChildUrl(new URL("https://example.com?query=value123"), new URL("https://example.com/path?query=value#hash"))).toBe(false);
235
- });
236
101
  function isChildPath(parentPath, maybeChildPath) {
237
102
  parentPath = parentPath.endsWith("/") ? parentPath : parentPath + "/";
238
103
  maybeChildPath = maybeChildPath.endsWith("/") ? maybeChildPath : maybeChildPath + "/";
239
104
  return maybeChildPath.startsWith(parentPath);
240
105
  }
241
- (void 0)?.test("isSubPath", ({ expect }) => {
242
- expect(isChildPath("/", "/")).toBe(true);
243
- expect(isChildPath("/", "/path")).toBe(true);
244
- expect(isChildPath("/path", "/")).toBe(false);
245
- expect(isChildPath("/path", "/path")).toBe(true);
246
- expect(isChildPath("/path/", "/path")).toBe(true);
247
- expect(isChildPath("/path", "/path/")).toBe(true);
248
- expect(isChildPath("/path/", "/path/")).toBe(true);
249
- expect(isChildPath("/path", "/path/abc")).toBe(true);
250
- expect(isChildPath("/path/", "/path/abc")).toBe(true);
251
- expect(isChildPath("/path", "/path-abc")).toBe(false);
252
- expect(isChildPath("/path", "/path-abc/")).toBe(false);
253
- expect(isChildPath("/path/", "/path-abc")).toBe(false);
254
- expect(isChildPath("/path/", "/path-abc/")).toBe(false);
255
- });
256
-
257
106
  //#endregion
258
107
  export { createUrlIfValid, getDefaultApiUrls, getHardcodedFallbackUrls, getRelativePart, isChildPath, isChildUrl, isLocalhost, isRelative, isValidHostname, isValidHostnameWithWildcards, isValidUrl, matchHostnamePattern, url, urlString };
108
+
259
109
  //# sourceMappingURL=urls.js.map
@@ -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,sB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AAiB,iBAAiB;AAClF,QAAO,eAAe,WAAW,WAAW;;CAE9C,SAAW,KAAC,cAAc,EAAA,aAAe;AACvC,QAAO,YAAY,KAAK,IAAI,CAAC,CAAC,KAAK,KAAK;AACxC,QAAO,YAAY,KAAK,QAAQ,CAAC,CAAC,KAAK,KAAK;AAC5C,QAAO,YAAY,SAAS,IAAI,CAAC,CAAC,KAAK,MAAM;AAC7C,QAAO,YAAY,SAAS,QAAQ,CAAC,CAAC,KAAK,KAAK;AAChD,QAAO,YAAY,UAAU,QAAQ,CAAC,CAAC,KAAK,KAAK;AACjD,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,MAAy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AACT;AAqBA,SAAgB,gBAAgB,KAAU;CACxC,OAAO,IAAI,WAAW,IAAI,SAAS,IAAI;AACzC;;;;;;AAoBA,SAAgB,IAAI,SAAmD,GAAG,QAA4C;CACpH,OAAO,IAAI,IAAI,UAAU,SAAS,GAAG,MAAM,CAAC;AAC9C;;;;;;AAkCA,SAAgB,UAAU,SAAmD,GAAG,QAA+C;CAC7H,OAAO,iBAAiB,SAAS,GAAG,OAAO,IAAI,kBAAkB,CAAC;AACpE;AAuBA,SAAgB,WAAW,WAAgB,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,36 +1,12 @@
1
1
  import { generateRandomValues } from "./crypto.js";
2
-
3
2
  //#region src/utils/uuids.tsx
4
3
  function generateUuid() {
5
- return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ generateRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16));
4
+ return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ generateRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> +c / 4).toString(16));
6
5
  }
7
- (void 0)?.test("generateUuid", ({ expect }) => {
8
- const uuid = generateUuid();
9
- 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}$/);
10
- const uuid2 = generateUuid();
11
- expect(uuid).not.toBe(uuid2);
12
- expect(uuid.charAt(14)).toBe("4");
13
- expect("89ab").toContain(uuid.charAt(19));
14
- });
15
6
  function isUuid(str) {
16
7
  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);
17
8
  }
18
- (void 0)?.test("isUuid", ({ expect }) => {
19
- expect(isUuid("123e4567-e89b-42d3-a456-426614174000")).toBe(true);
20
- expect(isUuid("123e4567-e89b-42d3-8456-426614174000")).toBe(true);
21
- expect(isUuid("123e4567-e89b-42d3-9456-426614174000")).toBe(true);
22
- expect(isUuid("123e4567-e89b-42d3-a456-426614174000")).toBe(true);
23
- expect(isUuid("123e4567-e89b-42d3-b456-426614174000")).toBe(true);
24
- expect(isUuid("")).toBe(false);
25
- expect(isUuid("not-a-uuid")).toBe(false);
26
- expect(isUuid("123e4567-e89b-12d3-a456-426614174000")).toBe(false);
27
- expect(isUuid("123e4567-e89b-42d3-c456-426614174000")).toBe(false);
28
- expect(isUuid("123e4567-e89b-42d3-a456-42661417400")).toBe(false);
29
- expect(isUuid("123e4567-e89b-42d3-a456-4266141740000")).toBe(false);
30
- expect(isUuid("123e4567-e89b-42d3-a456_426614174000")).toBe(false);
31
- expect(isUuid("123E4567-E89B-42D3-A456-426614174000")).toBe(false);
32
- });
33
-
34
9
  //#endregion
35
10
  export { generateUuid, isUuid };
11
+
36
12
  //# 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 should be lowercase)\n expect(isUuid(\"123E4567-E89B-42D3-A456-426614174000\")).toBe(false);\n});\n"],"mappings":";;;AAEA,SAAgB,eAAe;AAE7B,QAAO,uCAAuC,QAAQ,WAAU,OAC7D,CAAC,IAAI,qBAAqB,IAAI,WAAW,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,IAAI,GAAG,SAAS,GAAE,CAC7E;;CAEH,SAAW,KAAC,iBAAc,EAAA,aAAkB;CAE1C,MAAM,OAAO,cAAc;AAC3B,QAAO,KAAK,CAAC,QAAQ,wEAAwE;CAG7F,MAAM,QAAQ,cAAc;AAC5B,QAAO,KAAK,CAAC,IAAI,KAAK,MAAM;AAG5B,QAAO,KAAK,OAAO,GAAG,CAAC,CAAC,KAAK,IAAI;AAGjC,QAAO,OAAO,CAAC,UAAU,KAAK,OAAO,GAAG,CAAC;EACzC;AAEF,SAAgB,OAAO,KAAa;AAClC,QAAO,wEAAwE,KAAK,IAAI;;CAE1F,SAAW,KAAC,WAAc,EAAA,aAAY;AAEpC,QAAO,OAAO,uCAAuC,CAAC,CAAC,KAAK,KAAK;AACjE,QAAO,OAAO,uCAAuC,CAAC,CAAC,KAAK,KAAK;AACjE,QAAO,OAAO,uCAAuC,CAAC,CAAC,KAAK,KAAK;AACjE,QAAO,OAAO,uCAAuC,CAAC,CAAC,KAAK,KAAK;AACjE,QAAO,OAAO,uCAAuC,CAAC,CAAC,KAAK,KAAK;AAGjE,QAAO,OAAO,GAAG,CAAC,CAAC,KAAK,MAAM;AAC9B,QAAO,OAAO,aAAa,CAAC,CAAC,KAAK,MAAM;AACxC,QAAO,OAAO,uCAAuC,CAAC,CAAC,KAAK,MAAM;AAClE,QAAO,OAAO,uCAAuC,CAAC,CAAC,KAAK,MAAM;AAClE,QAAO,OAAO,sCAAsC,CAAC,CAAC,KAAK,MAAM;AACjE,QAAO,OAAO,wCAAwC,CAAC,CAAC,KAAK,MAAM;AACnE,QAAO,OAAO,uCAAuC,CAAC,CAAC,KAAK,MAAM;AAGlE,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,IAAI,qCAAqB,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,61 @@
1
+ import { h as OptionalKeys, v as RequiredKeys } from "./types-DfTcxNtM.js";
2
+
3
+ //#region src/config/format.d.ts
4
+ type ConfigValue = string | number | boolean | null | ConfigValue[] | Config;
5
+ type Config = {
6
+ [keyOrDotNotation: string]: ConfigValue | undefined;
7
+ };
8
+ type NormalizedConfigValue = string | number | boolean | NormalizedConfig | NormalizedConfigValue[];
9
+ type NormalizedConfig = {
10
+ [key: string]: NormalizedConfigValue | undefined;
11
+ };
12
+ type _NormalizesTo<N> = N extends readonly any[] ? { [K in keyof N]: _NormalizesTo<N[K]> } : N extends object ? (Config & { [K in OptionalKeys<N>]?: _NormalizesTo<N[K]> | null } & { [K in RequiredKeys<N>]: undefined extends N[K] ? _NormalizesTo<N[K]> | null : _NormalizesTo<N[K]> } & { [K in `${string}.${string}`]: ConfigValue }) : N;
13
+ type NormalizesTo<N extends NormalizedConfig> = _NormalizesTo<N>;
14
+ /**
15
+ * Note that a config can both be valid and not normalizable.
16
+ */
17
+ declare function isValidConfig(c: unknown): c is Config;
18
+ declare function getInvalidConfigReason(c: unknown, options?: {
19
+ configName?: string;
20
+ }): string | undefined;
21
+ declare function assertValidConfig(c: unknown): void;
22
+ declare function override(c1: Config, ...configs: Config[]): Config;
23
+ /**
24
+ * Removes keys from a config override, using the same nested key logic as the `override` function.
25
+ * Resetting key "a.b" also resets "a.b.c" (and any other descendants).
26
+ * Handles both flat dot-notation keys and nested object keys.
27
+ */
28
+ declare function removeKeysFromConfig(config: Config, keysToRemove: string[]): Config;
29
+ type NormalizeOptions = {
30
+ /**
31
+ * What to do if a dot notation is used on a value that is not an object.
32
+ *
33
+ * - "throw" (default): Throw an error.
34
+ * - "ignore": Ignore the dot notation field.
35
+ */
36
+ onDotIntoNonObject?: "throw" | "ignore";
37
+ /**
38
+ * What to do if a dot notation is used on a value that is null.
39
+ *
40
+ * - "like-non-object" (default): Treat it like a non-object. See `onDotIntoNonObject`.
41
+ * - "throw": Throw an error.
42
+ * - "ignore": Ignore the dot notation field.
43
+ * - "empty-object": Set the value to an empty object.
44
+ */
45
+ onDotIntoNull?: "like-non-object" | "throw" | "ignore" | "empty-object";
46
+ /**
47
+ * If provided, keys that are silently dropped during normalization (when a dot-notation key
48
+ * references a parent that doesn't exist or is not an object and the behavior is "ignore")
49
+ * will be pushed to this array.
50
+ */
51
+ droppedKeys?: string[];
52
+ };
53
+ declare class NormalizationError extends Error {
54
+ constructor(...args: ConstructorParameters<typeof Error>);
55
+ }
56
+ declare function isNormalized(c: Config): c is NormalizedConfig;
57
+ declare function assertNormalized(c: Config): asserts c is NormalizedConfig;
58
+ declare function normalize(c: Config, options?: NormalizeOptions): NormalizedConfig;
59
+ //#endregion
60
+ export { NormalizedConfigValue as a, assertNormalized as c, isNormalized as d, isValidConfig as f, removeKeysFromConfig as h, NormalizedConfig as i, assertValidConfig as l, override as m, ConfigValue as n, NormalizesTo as o, normalize as p, NormalizationError as r, _NormalizesTo as s, Config as t, getInvalidConfigReason as u };
61
+ //# sourceMappingURL=format-4JG1MGv5.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-4JG1MGv5.d.ts","names":[],"sources":["../src/config/format.ts"],"mappings":";;;KAQY,WAAA,sCAAiD,WAAA,KAAgB,MAAM;AAAA,KACvE,MAAA;EAAA,CACT,gBAAA,WAA2B,WAAW;AAAA;AAAA,KAG7B,qBAAA,+BAAoD,gBAAA,GAAmB,qBAAqB;AAAA,KAC5F,gBAAA;EAAA,CACT,GAAA,WAAc,qBAAqB;AAAA;AAAA,KAG1B,aAAA,MAAmB,CAAA,wCACb,CAAA,GAAI,aAAA,CAAc,CAAA,CAAE,CAAA,OAClC,CAAA,mBACE,MAAA,WACQ,YAAA,CAAa,CAAA,KAAM,aAAA,CAAc,CAAA,CAAE,CAAA,sBACnC,YAAA,CAAa,CAAA,sBAAuB,CAAA,CAAE,CAAA,IAAK,aAAA,CAAc,CAAA,CAAE,CAAA,YAAa,aAAA,CAAc,CAAA,CAAE,CAAA,uCAChE,WAAA,MAChC,CAAA;AAAA,KACM,YAAA,WAAuB,gBAAA,IAAoB,aAAA,CAAc,CAAA;;;;iBAKrD,aAAA,CAAc,CAAA,YAAa,CAAA,IAAK,MAAM;AAAA,iBAItC,sBAAA,CAAuB,CAAA,WAAY,OAAA;EAAW,UAAA;AAAA;AAAA,iBA8C9C,iBAAA,CAAkB,CAAU;AAAA,iBAK5B,QAAA,CAAS,EAAA,EAAI,MAAA,KAAW,OAAA,EAAS,MAAA,KAAQ,MAAA;;;;;;iBA0BzC,oBAAA,CAAqB,MAAA,EAAQ,MAAA,EAAQ,YAAA,aAAyB,MAAM;AAAA,KAgH/E,gBAAA;EA1M0C;;;;;;EAiN7C,kBAAA;EAhNqE;;;;;;;;EAyNrE,aAAA;EAvNK;;;;;EA6NL,WAAA;AAAA;AAAA,cAGW,kBAAA,SAA2B,KAAA;iBACvB,IAAA,EAAM,qBAAA,QAA6B,KAAA;AAAA;AAAA,iBAMpC,YAAA,CAAa,CAAA,EAAG,MAAA,GAAS,CAAA,IAAK,gBAAgB;AAAA,iBAU9C,gBAAA,CAAiB,CAAA,EAAG,MAAA,WAAiB,CAAA,IAAK,gBAAgB;AAAA,iBAK1D,SAAA,CAAU,CAAA,EAAG,MAAA,EAAQ,OAAA,GAAS,gBAAA,GAAwB,gBAAA"}
@@ -0,0 +1,70 @@
1
+ //#region src/interface/page-component-versions.d.ts
2
+ type PageVersionEntry = {
3
+ minSdkVersion: `${number}.${number}.${number}`;
4
+ upgradePrompt: string;
5
+ changelog: string;
6
+ };
7
+ type PageVersions = Record<number, PageVersionEntry> & {
8
+ 1: PageVersionEntry;
9
+ };
10
+ type PageComponentKey = Exclude<keyof HandlerPageUrls, "handler">;
11
+ type CustomPagePrompt = {
12
+ title: string;
13
+ fullPrompt: string;
14
+ versions: PageVersions;
15
+ };
16
+ declare function getCustomPagePrompts(): Record<PageComponentKey, CustomPagePrompt>;
17
+ declare function getLatestPageVersions(): Record<string, {
18
+ version: number;
19
+ changelogs: Record<number, string>;
20
+ }>;
21
+ //#endregion
22
+ //#region src/interface/handler-urls.d.ts
23
+ /**
24
+ * @deprecated Plain string URLs are deprecated. Use `{ type: "custom", url: "...", version: 0 }` instead.
25
+ */
26
+ type DeprecatedStringUrl = string;
27
+ type HandlerPageUrls = Record<"handler" | "signIn" | "signUp" | "signOut" | "emailVerification" | "passwordReset" | "forgotPassword" | "oauthCallback" | "magicLinkCallback" | "accountSettings" | "teamInvitation" | "cliAuthConfirm" | "mfa" | "error" | "onboarding", DeprecatedStringUrl | {
28
+ type: "custom";
29
+ url: string;
30
+ version: number;
31
+ } | {
32
+ type: "hosted" | "handler-component";
33
+ }>;
34
+ type HandlerRedirectUrls = Record<"afterSignIn" | "afterSignUp" | "afterSignOut" | "home", string>;
35
+ type HandlerUrls = HandlerPageUrls & HandlerRedirectUrls;
36
+ type HandlerUrlTarget = HandlerUrls[keyof HandlerUrls];
37
+ /**
38
+ * The default handler URL target, applied to any key not explicitly set.
39
+ *
40
+ * - `{ type: "handler-component" }` — render the page inside the local `StackHandler` component (current default, may change in the next breaking version).
41
+ * - `{ type: "hosted" }` — redirect to Stack's hosted auth pages.
42
+ */
43
+ type DefaultHandlerUrlTarget = {
44
+ type: "hosted" | "handler-component";
45
+ };
46
+ /**
47
+ * Configuration for where each auth page/redirect lives.
48
+ *
49
+ * **`default`** — fallback target for every key not set individually:
50
+ * - `{ type: "handler-component" }` — use the local `StackHandler` (current default, may change in the next breaking version).
51
+ * - `{ type: "hosted" }` — use Stack's hosted auth pages.
52
+ *
53
+ * **Page keys** (`signIn`, `signUp`, `signOut`, `emailVerification`, `passwordReset`,
54
+ * `forgotPassword`, `oauthCallback`, `magicLinkCallback`, `accountSettings`,
55
+ * `teamInvitation`, `cliAuthConfirm`, `mfa`, `error`, `onboarding`, `handler`):
56
+ * - A URL string (e.g. `"/my-sign-in"`) — custom path.
57
+ * - `{ type: "custom", url: "...", version: 0 }` — custom URL with version tracking.
58
+ * - `{ type: "hosted" }` — Stack's hosted page.
59
+ * - `{ type: "handler-component" }` — local `StackHandler`.
60
+ *
61
+ * **Redirect keys** (`afterSignIn`, `afterSignUp`, `afterSignOut`, `home`):
62
+ * - A URL string (e.g. `"/dashboard"`) — where to redirect after the action.
63
+ */
64
+ type HandlerUrlOptions = Partial<HandlerUrls> & {
65
+ default?: DefaultHandlerUrlTarget;
66
+ };
67
+ type ResolvedHandlerUrls = { [K in keyof HandlerUrls]: string };
68
+ //#endregion
69
+ export { HandlerUrlTarget as a, CustomPagePrompt as c, PageVersions as d, getCustomPagePrompts as f, HandlerUrlOptions as i, PageComponentKey as l, HandlerPageUrls as n, HandlerUrls as o, getLatestPageVersions as p, HandlerRedirectUrls as r, ResolvedHandlerUrls as s, DefaultHandlerUrlTarget as t, PageVersionEntry as u };
70
+ //# sourceMappingURL=handler-urls-BHt3v8Ai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler-urls-BHt3v8Ai.d.ts","names":[],"sources":["../src/interface/page-component-versions.ts","../src/interface/handler-urls.ts"],"mappings":";KAmBY,gBAAA;EACV,aAAA;EACA,aAAA;EACA,SAAA;AAAA;AAAA,KAGU,YAAA,GAAe,MAAA,SAAe,gBAAA;EAAsB,CAAA,EAAG,gBAAA;AAAA;AAAA,KAEvD,gBAAA,GAAmB,OAAO,OAAO,eAAA;AAAA,KAEjC,gBAAA;EACV,KAAA;EACA,UAAA;EACA,QAAA,EAAU,YAAY;AAAA;AAAA,iBAySR,oBAAA,IAAwB,MAAA,CAAO,gBAAA,EAAkB,gBAAA;AAAA,iBA81CjD,qBAAA,IAAyB,MAAM;EAAW,OAAA;EAAiB,UAAA,EAAY,MAAA;AAAA;;;;AAppDvF;;KChBK,mBAAA;AAAA,KAEO,eAAA,GAAkB,MAAM,4OAgBlC,mBAAA;EAAwB,IAAA;EAAgB,GAAA;EAAa,OAAA;AAAA;EAAsB,IAAA;AAAA;AAAA,KAGjE,mBAAA,GAAsB,MAAM;AAAA,KAQ5B,WAAA,GAAc,eAAA,GAAkB,mBAAmB;AAAA,KACnD,gBAAA,GAAmB,WAAA,OAAkB,WAAW;;;;;;;KAQhD,uBAAA;EAA4B,IAAI;AAAA;ADhBuC;AAEnF;;;;AAA4D;AAE5D;;;;;;;;;AAGwB;AAySxB;;AAhTmF,KCoCvE,iBAAA,GAAoB,OAAA,CAAQ,WAAA;EAAiB,OAAA,GAAU,uBAAA;AAAA;AAAA,KACvD,mBAAA,iBACE,WAAW"}
@@ -1,7 +1,5 @@
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 ___utils_strings_js = require("../utils/strings.js");
4
-
5
3
  //#region src/helpers/emails.ts
6
4
  const defaultNewTemplateSource = ___utils_strings_js.deindent`
7
5
  import { type } from "arktype"
@@ -239,7 +237,6 @@ const DEFAULT_TEMPLATE_IDS = {
239
237
  payment_receipt: EMAIL_TEMPLATE_PAYMENT_RECEIPT_ID,
240
238
  payment_failed: EMAIL_TEMPLATE_PAYMENT_FAILED_ID
241
239
  };
242
-
243
240
  //#endregion
244
241
  exports.DEFAULT_EMAIL_TEMPLATES = DEFAULT_EMAIL_TEMPLATES;
245
242
  exports.DEFAULT_EMAIL_THEMES = DEFAULT_EMAIL_THEMES;
@@ -249,4 +246,5 @@ exports.LightEmailTheme = LightEmailTheme;
249
246
  exports.defaultNewTemplateSource = defaultNewTemplateSource;
250
247
  exports.emptyEmailTheme = emptyEmailTheme;
251
248
  exports.previewTemplateSource = previewTemplateSource;
249
+
252
250
  //# sourceMappingURL=emails.js.map