@aglyn/tenant-data-admin 1.0.0-beta.143

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 (374) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +7 -0
  3. package/jest.integration.config.d.ts +39 -0
  4. package/jest.integration.setup.d.ts +17 -0
  5. package/package.json +51 -0
  6. package/src/index.d.ts +17 -0
  7. package/src/index.js +18 -0
  8. package/src/index.js.map +1 -0
  9. package/src/lib/render-cache.d.ts +184 -0
  10. package/src/lib/render-cache.js +198 -0
  11. package/src/lib/render-cache.js.map +1 -0
  12. package/src/lib/server/account-addresses.d.ts +160 -0
  13. package/src/lib/server/account-addresses.js +311 -0
  14. package/src/lib/server/account-addresses.js.map +1 -0
  15. package/src/lib/server/account-emails.d.ts +219 -0
  16. package/src/lib/server/account-emails.js +640 -0
  17. package/src/lib/server/account-emails.js.map +1 -0
  18. package/src/lib/server/admin-audit.d.ts +180 -0
  19. package/src/lib/server/admin-audit.js +233 -0
  20. package/src/lib/server/admin-audit.js.map +1 -0
  21. package/src/lib/server/analytics-retention.d.ts +63 -0
  22. package/src/lib/server/analytics-retention.js +66 -0
  23. package/src/lib/server/analytics-retention.js.map +1 -0
  24. package/src/lib/server/api-http.d.ts +159 -0
  25. package/src/lib/server/api-http.js +230 -0
  26. package/src/lib/server/api-http.js.map +1 -0
  27. package/src/lib/server/api-keys.d.ts +117 -0
  28. package/src/lib/server/api-keys.js +298 -0
  29. package/src/lib/server/api-keys.js.map +1 -0
  30. package/src/lib/server/auth-handoff.d.ts +165 -0
  31. package/src/lib/server/auth-handoff.js +482 -0
  32. package/src/lib/server/auth-handoff.js.map +1 -0
  33. package/src/lib/server/auth-pools.d.ts +246 -0
  34. package/src/lib/server/auth-pools.js +551 -0
  35. package/src/lib/server/auth-pools.js.map +1 -0
  36. package/src/lib/server/billing-addons.d.ts +171 -0
  37. package/src/lib/server/billing-addons.js +277 -0
  38. package/src/lib/server/billing-addons.js.map +1 -0
  39. package/src/lib/server/campaign-attribution-store.d.ts +55 -0
  40. package/src/lib/server/campaign-attribution-store.js +95 -0
  41. package/src/lib/server/campaign-attribution-store.js.map +1 -0
  42. package/src/lib/server/campaign-conversion-attribution.d.ts +205 -0
  43. package/src/lib/server/campaign-conversion-attribution.js +279 -0
  44. package/src/lib/server/campaign-conversion-attribution.js.map +1 -0
  45. package/src/lib/server/client-error-report.d.ts +301 -0
  46. package/src/lib/server/client-error-report.js +755 -0
  47. package/src/lib/server/client-error-report.js.map +1 -0
  48. package/src/lib/server/connect-account-status.d.ts +74 -0
  49. package/src/lib/server/connect-account-status.js +94 -0
  50. package/src/lib/server/connect-account-status.js.map +1 -0
  51. package/src/lib/server/connect-payout-failure.d.ts +103 -0
  52. package/src/lib/server/connect-payout-failure.js +127 -0
  53. package/src/lib/server/connect-payout-failure.js.map +1 -0
  54. package/src/lib/server/console-api-rate-limit.d.ts +81 -0
  55. package/src/lib/server/console-api-rate-limit.js +111 -0
  56. package/src/lib/server/console-api-rate-limit.js.map +1 -0
  57. package/src/lib/server/console-domains.d.ts +326 -0
  58. package/src/lib/server/console-domains.js +779 -0
  59. package/src/lib/server/console-domains.js.map +1 -0
  60. package/src/lib/server/consume-once.d.ts +91 -0
  61. package/src/lib/server/consume-once.js +96 -0
  62. package/src/lib/server/consume-once.js.map +1 -0
  63. package/src/lib/server/contact-company-link.d.ts +85 -0
  64. package/src/lib/server/contact-company-link.js +105 -0
  65. package/src/lib/server/contact-company-link.js.map +1 -0
  66. package/src/lib/server/contact-email-engagement.d.ts +32 -0
  67. package/src/lib/server/contact-email-engagement.js +145 -0
  68. package/src/lib/server/contact-email-engagement.js.map +1 -0
  69. package/src/lib/server/contact-email-index.d.ts +56 -0
  70. package/src/lib/server/contact-email-index.js +158 -0
  71. package/src/lib/server/contact-email-index.js.map +1 -0
  72. package/src/lib/server/contact-lifecycle-floor.d.ts +89 -0
  73. package/src/lib/server/contact-lifecycle-floor.js +88 -0
  74. package/src/lib/server/contact-lifecycle-floor.js.map +1 -0
  75. package/src/lib/server/contact-merge.d.ts +55 -0
  76. package/src/lib/server/contact-merge.js +279 -0
  77. package/src/lib/server/contact-merge.js.map +1 -0
  78. package/src/lib/server/contact-suppression.d.ts +153 -0
  79. package/src/lib/server/contact-suppression.js +259 -0
  80. package/src/lib/server/contact-suppression.js.map +1 -0
  81. package/src/lib/server/crm-booking-activity.d.ts +86 -0
  82. package/src/lib/server/crm-booking-activity.js +251 -0
  83. package/src/lib/server/crm-booking-activity.js.map +1 -0
  84. package/src/lib/server/crm-email-activity.d.ts +112 -0
  85. package/src/lib/server/crm-email-activity.js +143 -0
  86. package/src/lib/server/crm-email-activity.js.map +1 -0
  87. package/src/lib/server/crm-inbound-email.d.ts +145 -0
  88. package/src/lib/server/crm-inbound-email.js +287 -0
  89. package/src/lib/server/crm-inbound-email.js.map +1 -0
  90. package/src/lib/server/crm-next-activity.d.ts +74 -0
  91. package/src/lib/server/crm-next-activity.js +194 -0
  92. package/src/lib/server/crm-next-activity.js.map +1 -0
  93. package/src/lib/server/crm-records.d.ts +144 -0
  94. package/src/lib/server/crm-records.js +218 -0
  95. package/src/lib/server/crm-records.js.map +1 -0
  96. package/src/lib/server/csp-aggregate.d.ts +62 -0
  97. package/src/lib/server/csp-aggregate.js +276 -0
  98. package/src/lib/server/csp-aggregate.js.map +1 -0
  99. package/src/lib/server/data-storage-gate.d.ts +66 -0
  100. package/src/lib/server/data-storage-gate.js +48 -0
  101. package/src/lib/server/data-storage-gate.js.map +1 -0
  102. package/src/lib/server/dataset-live-pages.d.ts +179 -0
  103. package/src/lib/server/dataset-live-pages.js +421 -0
  104. package/src/lib/server/dataset-live-pages.js.map +1 -0
  105. package/src/lib/server/dns-probe.d.ts +53 -0
  106. package/src/lib/server/dns-probe.js +184 -0
  107. package/src/lib/server/dns-probe.js.map +1 -0
  108. package/src/lib/server/document-id.d.ts +29 -0
  109. package/src/lib/server/document-id.js +100 -0
  110. package/src/lib/server/document-id.js.map +1 -0
  111. package/src/lib/server/domain-provider-vercel.d.ts +33 -0
  112. package/src/lib/server/domain-provider-vercel.js +298 -0
  113. package/src/lib/server/domain-provider-vercel.js.map +1 -0
  114. package/src/lib/server/domain-provider-webhook.d.ts +73 -0
  115. package/src/lib/server/domain-provider-webhook.js +223 -0
  116. package/src/lib/server/domain-provider-webhook.js.map +1 -0
  117. package/src/lib/server/domain-provider-wildcard.d.ts +54 -0
  118. package/src/lib/server/domain-provider-wildcard.js +163 -0
  119. package/src/lib/server/domain-provider-wildcard.js.map +1 -0
  120. package/src/lib/server/domain-provider.d.ts +197 -0
  121. package/src/lib/server/domain-provider.js +221 -0
  122. package/src/lib/server/domain-provider.js.map +1 -0
  123. package/src/lib/server/duplicate-activity.d.ts +54 -0
  124. package/src/lib/server/duplicate-activity.js +67 -0
  125. package/src/lib/server/duplicate-activity.js.map +1 -0
  126. package/src/lib/server/duplicate-resource.d.ts +55 -0
  127. package/src/lib/server/duplicate-resource.js +474 -0
  128. package/src/lib/server/duplicate-resource.js.map +1 -0
  129. package/src/lib/server/dynamic-list-materialize.d.ts +153 -0
  130. package/src/lib/server/dynamic-list-materialize.js +581 -0
  131. package/src/lib/server/dynamic-list-materialize.js.map +1 -0
  132. package/src/lib/server/edit-access-authz.d.ts +56 -0
  133. package/src/lib/server/edit-access-authz.js +107 -0
  134. package/src/lib/server/edit-access-authz.js.map +1 -0
  135. package/src/lib/server/edit-access-token.d.ts +72 -0
  136. package/src/lib/server/edit-access-token.js +116 -0
  137. package/src/lib/server/edit-access-token.js.map +1 -0
  138. package/src/lib/server/edit-hint-token.d.ts +83 -0
  139. package/src/lib/server/edit-hint-token.js +119 -0
  140. package/src/lib/server/edit-hint-token.js.map +1 -0
  141. package/src/lib/server/email-delivery-log.d.ts +509 -0
  142. package/src/lib/server/email-delivery-log.js +1043 -0
  143. package/src/lib/server/email-delivery-log.js.map +1 -0
  144. package/src/lib/server/email-flow-gate.d.ts +80 -0
  145. package/src/lib/server/email-flow-gate.js +153 -0
  146. package/src/lib/server/email-flow-gate.js.map +1 -0
  147. package/src/lib/server/email-marketing-gate.d.ts +333 -0
  148. package/src/lib/server/email-marketing-gate.js +639 -0
  149. package/src/lib/server/email-marketing-gate.js.map +1 -0
  150. package/src/lib/server/email-metering.d.ts +293 -0
  151. package/src/lib/server/email-metering.js +359 -0
  152. package/src/lib/server/email-metering.js.map +1 -0
  153. package/src/lib/server/email-revenue-attribution.d.ts +185 -0
  154. package/src/lib/server/email-revenue-attribution.js +300 -0
  155. package/src/lib/server/email-revenue-attribution.js.map +1 -0
  156. package/src/lib/server/email-send-rate.d.ts +232 -0
  157. package/src/lib/server/email-send-rate.js +417 -0
  158. package/src/lib/server/email-send-rate.js.map +1 -0
  159. package/src/lib/server/email-sender-reputation.d.ts +317 -0
  160. package/src/lib/server/email-sender-reputation.js +464 -0
  161. package/src/lib/server/email-sender-reputation.js.map +1 -0
  162. package/src/lib/server/email-suppression.d.ts +490 -0
  163. package/src/lib/server/email-suppression.js +648 -0
  164. package/src/lib/server/email-suppression.js.map +1 -0
  165. package/src/lib/server/email-topic-confirmation.d.ts +150 -0
  166. package/src/lib/server/email-topic-confirmation.js +272 -0
  167. package/src/lib/server/email-topic-confirmation.js.map +1 -0
  168. package/src/lib/server/email-unsubscribe-link.d.ts +174 -0
  169. package/src/lib/server/email-unsubscribe-link.js +236 -0
  170. package/src/lib/server/email-unsubscribe-link.js.map +1 -0
  171. package/src/lib/server/erase-person.d.ts +116 -0
  172. package/src/lib/server/erase-person.js +272 -0
  173. package/src/lib/server/erase-person.js.map +1 -0
  174. package/src/lib/server/erase.d.ts +458 -0
  175. package/src/lib/server/erase.js +1506 -0
  176. package/src/lib/server/erase.js.map +1 -0
  177. package/src/lib/server/firebase-admin.d.ts +71 -0
  178. package/src/lib/server/firebase-admin.js +343 -0
  179. package/src/lib/server/firebase-admin.js.map +1 -0
  180. package/src/lib/server/form-dataset-binding-token.d.ts +35 -0
  181. package/src/lib/server/form-dataset-binding-token.js +107 -0
  182. package/src/lib/server/form-dataset-binding-token.js.map +1 -0
  183. package/src/lib/server/free-workspace-cap.d.ts +201 -0
  184. package/src/lib/server/free-workspace-cap.js +404 -0
  185. package/src/lib/server/free-workspace-cap.js.map +1 -0
  186. package/src/lib/server/ga4-measurement-protocol.d.ts +256 -0
  187. package/src/lib/server/ga4-measurement-protocol.js +558 -0
  188. package/src/lib/server/ga4-measurement-protocol.js.map +1 -0
  189. package/src/lib/server/host-email-tokens.d.ts +47 -0
  190. package/src/lib/server/host-email-tokens.js +72 -0
  191. package/src/lib/server/host-email-tokens.js.map +1 -0
  192. package/src/lib/server/host-memberships.d.ts +54 -0
  193. package/src/lib/server/host-memberships.js +194 -0
  194. package/src/lib/server/host-memberships.js.map +1 -0
  195. package/src/lib/server/host-sending-domain.d.ts +292 -0
  196. package/src/lib/server/host-sending-domain.js +451 -0
  197. package/src/lib/server/host-sending-domain.js.map +1 -0
  198. package/src/lib/server/host-visitor-records.d.ts +150 -0
  199. package/src/lib/server/host-visitor-records.js +262 -0
  200. package/src/lib/server/host-visitor-records.js.map +1 -0
  201. package/src/lib/server/id-token-refusal.d.ts +28 -0
  202. package/src/lib/server/id-token-refusal.js +111 -0
  203. package/src/lib/server/id-token-refusal.js.map +1 -0
  204. package/src/lib/server/legal-acceptance.d.ts +214 -0
  205. package/src/lib/server/legal-acceptance.js +305 -0
  206. package/src/lib/server/legal-acceptance.js.map +1 -0
  207. package/src/lib/server/list-members.d.ts +211 -0
  208. package/src/lib/server/list-members.js +176 -0
  209. package/src/lib/server/list-members.js.map +1 -0
  210. package/src/lib/server/live-page-usage.d.ts +202 -0
  211. package/src/lib/server/live-page-usage.js +300 -0
  212. package/src/lib/server/live-page-usage.js.map +1 -0
  213. package/src/lib/server/lockdown.d.ts +313 -0
  214. package/src/lib/server/lockdown.js +643 -0
  215. package/src/lib/server/lockdown.js.map +1 -0
  216. package/src/lib/server/media-cdn-rate-limit.d.ts +188 -0
  217. package/src/lib/server/media-cdn-rate-limit.js +204 -0
  218. package/src/lib/server/media-cdn-rate-limit.js.map +1 -0
  219. package/src/lib/server/media-delivery.d.ts +267 -0
  220. package/src/lib/server/media-delivery.js +485 -0
  221. package/src/lib/server/media-delivery.js.map +1 -0
  222. package/src/lib/server/media-download-tokens.d.ts +161 -0
  223. package/src/lib/server/media-download-tokens.js +386 -0
  224. package/src/lib/server/media-download-tokens.js.map +1 -0
  225. package/src/lib/server/media-quarantine.d.ts +127 -0
  226. package/src/lib/server/media-quarantine.js +170 -0
  227. package/src/lib/server/media-quarantine.js.map +1 -0
  228. package/src/lib/server/media-signing.d.ts +126 -0
  229. package/src/lib/server/media-signing.js +159 -0
  230. package/src/lib/server/media-signing.js.map +1 -0
  231. package/src/lib/server/media-storage-path.d.ts +96 -0
  232. package/src/lib/server/media-storage-path.js +111 -0
  233. package/src/lib/server/media-storage-path.js.map +1 -0
  234. package/src/lib/server/media-strong-digest.d.ts +85 -0
  235. package/src/lib/server/media-strong-digest.js +190 -0
  236. package/src/lib/server/media-strong-digest.js.map +1 -0
  237. package/src/lib/server/media-tombstone.d.ts +276 -0
  238. package/src/lib/server/media-tombstone.js +421 -0
  239. package/src/lib/server/media-tombstone.js.map +1 -0
  240. package/src/lib/server/media-variants.d.ts +309 -0
  241. package/src/lib/server/media-variants.js +428 -0
  242. package/src/lib/server/media-variants.js.map +1 -0
  243. package/src/lib/server/member-email-aliases.d.ts +180 -0
  244. package/src/lib/server/member-email-aliases.js +420 -0
  245. package/src/lib/server/member-email-aliases.js.map +1 -0
  246. package/src/lib/server/member-photo.d.ts +88 -0
  247. package/src/lib/server/member-photo.js +185 -0
  248. package/src/lib/server/member-photo.js.map +1 -0
  249. package/src/lib/server/membership-recover-throttle.d.ts +211 -0
  250. package/src/lib/server/membership-recover-throttle.js +231 -0
  251. package/src/lib/server/membership-recover-throttle.js.map +1 -0
  252. package/src/lib/server/notifications.d.ts +55 -0
  253. package/src/lib/server/notifications.js +134 -0
  254. package/src/lib/server/notifications.js.map +1 -0
  255. package/src/lib/server/org-billing.d.ts +97 -0
  256. package/src/lib/server/org-billing.js +236 -0
  257. package/src/lib/server/org-billing.js.map +1 -0
  258. package/src/lib/server/organizations.d.ts +837 -0
  259. package/src/lib/server/organizations.js +1814 -0
  260. package/src/lib/server/organizations.js.map +1 -0
  261. package/src/lib/server/password-reset-throttle.d.ts +84 -0
  262. package/src/lib/server/password-reset-throttle.js +102 -0
  263. package/src/lib/server/password-reset-throttle.js.map +1 -0
  264. package/src/lib/server/personal-data-export.d.ts +241 -0
  265. package/src/lib/server/personal-data-export.js +858 -0
  266. package/src/lib/server/personal-data-export.js.map +1 -0
  267. package/src/lib/server/platform-domain-names.d.ts +62 -0
  268. package/src/lib/server/platform-domain-names.js +197 -0
  269. package/src/lib/server/platform-domain-names.js.map +1 -0
  270. package/src/lib/server/platform-marketing-consent.d.ts +133 -0
  271. package/src/lib/server/platform-marketing-consent.js +209 -0
  272. package/src/lib/server/platform-marketing-consent.js.map +1 -0
  273. package/src/lib/server/rate-limit-store.d.ts +702 -0
  274. package/src/lib/server/rate-limit-store.js +1220 -0
  275. package/src/lib/server/rate-limit-store.js.map +1 -0
  276. package/src/lib/server/realm-plugins.d.ts +67 -0
  277. package/src/lib/server/realm-plugins.js +250 -0
  278. package/src/lib/server/realm-plugins.js.map +1 -0
  279. package/src/lib/server/recaptcha-allowlist.d.ts +90 -0
  280. package/src/lib/server/recaptcha-allowlist.js +409 -0
  281. package/src/lib/server/recaptcha-allowlist.js.map +1 -0
  282. package/src/lib/server/release-flags.d.ts +105 -0
  283. package/src/lib/server/release-flags.js +183 -0
  284. package/src/lib/server/release-flags.js.map +1 -0
  285. package/src/lib/server/replay-erasures.d.ts +126 -0
  286. package/src/lib/server/replay-erasures.js +217 -0
  287. package/src/lib/server/replay-erasures.js.map +1 -0
  288. package/src/lib/server/resolve-people.d.ts +66 -0
  289. package/src/lib/server/resolve-people.js +112 -0
  290. package/src/lib/server/resolve-people.js.map +1 -0
  291. package/src/lib/server/safe-equal.d.ts +45 -0
  292. package/src/lib/server/safe-equal.js +58 -0
  293. package/src/lib/server/safe-equal.js.map +1 -0
  294. package/src/lib/server/sending-domain-debt.d.ts +127 -0
  295. package/src/lib/server/sending-domain-debt.js +268 -0
  296. package/src/lib/server/sending-domain-debt.js.map +1 -0
  297. package/src/lib/server/sending-domain-recheck.d.ts +151 -0
  298. package/src/lib/server/sending-domain-recheck.js +253 -0
  299. package/src/lib/server/sending-domain-recheck.js.map +1 -0
  300. package/src/lib/server/sending-domains.d.ts +364 -0
  301. package/src/lib/server/sending-domains.js +683 -0
  302. package/src/lib/server/sending-domains.js.map +1 -0
  303. package/src/lib/server/serve-media-cdn.d.ts +433 -0
  304. package/src/lib/server/serve-media-cdn.js +1370 -0
  305. package/src/lib/server/serve-media-cdn.js.map +1 -0
  306. package/src/lib/server/serve-plugin-fetch.d.ts +61 -0
  307. package/src/lib/server/serve-plugin-fetch.js +294 -0
  308. package/src/lib/server/serve-plugin-fetch.js.map +1 -0
  309. package/src/lib/server/sms-keywords.d.ts +63 -0
  310. package/src/lib/server/sms-keywords.js +146 -0
  311. package/src/lib/server/sms-keywords.js.map +1 -0
  312. package/src/lib/server/sso-break-glass-owners.d.ts +91 -0
  313. package/src/lib/server/sso-break-glass-owners.js +227 -0
  314. package/src/lib/server/sso-break-glass-owners.js.map +1 -0
  315. package/src/lib/server/sso-domain-policy.d.ts +140 -0
  316. package/src/lib/server/sso-domain-policy.js +239 -0
  317. package/src/lib/server/sso-domain-policy.js.map +1 -0
  318. package/src/lib/server/sso-drift-logic.d.ts +106 -0
  319. package/src/lib/server/sso-drift-logic.js +95 -0
  320. package/src/lib/server/sso-drift-logic.js.map +1 -0
  321. package/src/lib/server/sso-enforcement.d.ts +204 -0
  322. package/src/lib/server/sso-enforcement.js +309 -0
  323. package/src/lib/server/sso-enforcement.js.map +1 -0
  324. package/src/lib/server/sso-provisioning.d.ts +320 -0
  325. package/src/lib/server/sso-provisioning.js +715 -0
  326. package/src/lib/server/sso-provisioning.js.map +1 -0
  327. package/src/lib/server/staff-alert-email.d.ts +41 -0
  328. package/src/lib/server/staff-alert-email.js +63 -0
  329. package/src/lib/server/staff-alert-email.js.map +1 -0
  330. package/src/lib/server/stripe-account-mode.d.ts +156 -0
  331. package/src/lib/server/stripe-account-mode.js +162 -0
  332. package/src/lib/server/stripe-account-mode.js.map +1 -0
  333. package/src/lib/server/tenant-write-lockdown.d.ts +131 -0
  334. package/src/lib/server/tenant-write-lockdown.js +176 -0
  335. package/src/lib/server/tenant-write-lockdown.js.map +1 -0
  336. package/src/lib/server/test-firestore.d.ts +45 -0
  337. package/src/lib/server/test-firestore.js +124 -0
  338. package/src/lib/server/test-firestore.js.map +1 -0
  339. package/src/lib/server/token-revocation.d.ts +140 -0
  340. package/src/lib/server/token-revocation.js +255 -0
  341. package/src/lib/server/token-revocation.js.map +1 -0
  342. package/src/lib/server/update-existing.d.ts +32 -0
  343. package/src/lib/server/update-existing.js +73 -0
  344. package/src/lib/server/update-existing.js.map +1 -0
  345. package/src/lib/server/upload-cors-reconcile.d.ts +118 -0
  346. package/src/lib/server/upload-cors-reconcile.js +234 -0
  347. package/src/lib/server/upload-cors-reconcile.js.map +1 -0
  348. package/src/lib/server/upsert-contact.d.ts +262 -0
  349. package/src/lib/server/upsert-contact.js +546 -0
  350. package/src/lib/server/upsert-contact.js.map +1 -0
  351. package/src/lib/server/usage-invoice.d.ts +203 -0
  352. package/src/lib/server/usage-invoice.js +397 -0
  353. package/src/lib/server/usage-invoice.js.map +1 -0
  354. package/src/lib/server/user-profiles.d.ts +151 -0
  355. package/src/lib/server/user-profiles.js +364 -0
  356. package/src/lib/server/user-profiles.js.map +1 -0
  357. package/src/lib/server/vercel-drain-signature.d.ts +30 -0
  358. package/src/lib/server/vercel-drain-signature.js +61 -0
  359. package/src/lib/server/vercel-drain-signature.js.map +1 -0
  360. package/src/lib/server/vercel-log-drain.d.ts +259 -0
  361. package/src/lib/server/vercel-log-drain.js +479 -0
  362. package/src/lib/server/vercel-log-drain.js.map +1 -0
  363. package/src/lib/server/verify-email-cooldown.d.ts +102 -0
  364. package/src/lib/server/verify-email-cooldown.js +114 -0
  365. package/src/lib/server/verify-email-cooldown.js.map +1 -0
  366. package/src/lib/server/visitor-write-rate-limit.d.ts +87 -0
  367. package/src/lib/server/visitor-write-rate-limit.js +117 -0
  368. package/src/lib/server/visitor-write-rate-limit.js.map +1 -0
  369. package/src/lib/server/workspace-domains.d.ts +156 -0
  370. package/src/lib/server/workspace-domains.js +271 -0
  371. package/src/lib/server/workspace-domains.js.map +1 -0
  372. package/src/tenancy.d.ts +115 -0
  373. package/src/tenancy.js +142 -0
  374. package/src/tenancy.js.map +1 -0
@@ -0,0 +1,271 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ var _process_env_NEXT_PUBLIC_WORKSPACE_DOMAIN;
3
+ /**
4
+ * @license
5
+ * Copyright 2026 Aglyn LLC
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */ /**
19
+ * Attach and detach names for the console (AGL-1136).
20
+ *
21
+ * Two layers. The bottom one — `attachProjectDomain` / `detachProjectDomain` —
22
+ * takes a fully-qualified name and is what a custom **console** domain uses
23
+ * (AGL-1373). The top one is the workspace-subdomain pair below, which is that
24
+ * primitive with `{slug}.aglyn.com` built for it.
25
+ *
26
+ * The hosting vendor is no longer either of them. Registering a name goes
27
+ * through `domain-provider.ts`, so the same workspace subdomain is created by
28
+ * Vercel's API on Aglyn's own hosting, by a wildcard record on a Docker
29
+ * install, or by whatever an operator put behind the webhook driver. What
30
+ * stays here is everything that is Aglyn's own policy rather than a vendor's:
31
+ * the slug arithmetic, the upload-CORS reconcile, and the three properties
32
+ * below.
33
+ *
34
+ * AGL-1135 removed the `*.aglyn.com` wildcard, because it meant every
35
+ * hostname under the domain served a real console sign-in page —
36
+ * `billing-security-update.aglyn.com` returned 200 with a valid certificate.
37
+ * Removing it made unregistered names 404, and made **registered** names
38
+ * something that has to be registered: a slug only resolves if that exact
39
+ * domain is attached.
40
+ *
41
+ * Nothing did that, so every workspace created after AGL-1135 had a subdomain
42
+ * that 404s. AGL-1115 then made signup provision an org, which turned a latent
43
+ * gap into one every new account hits.
44
+ *
45
+ * ## Three properties, in the order they matter
46
+ *
47
+ * 1. **It can never fail an org.** Every entry point swallows its errors and
48
+ * returns a verdict instead of throwing. The console is path-routed
49
+ * (`app.aglyn.com/{slug}`) and that is the canonical form, so a workspace
50
+ * with no subdomain is fully usable — while an org creation that rolled
51
+ * back because a DNS API was slow would not be.
52
+ * 2. **Unconfigured is a no-op, not an error.** With no provider this reports
53
+ * `skipped`. A deployment that registers names some other way must not log
54
+ * an error per signup forever.
55
+ * 3. **A rename ADDS without removing.** The old slug keeps a tombstone that
56
+ * 308s to the new one (AGL-585/236), and a redirect can only run on a
57
+ * hostname that still resolves. Detaching the old domain would break the
58
+ * very redirect the tombstone exists to serve.
59
+ */ import { domainProvider, redirectHostname } from "./domain-provider.js";
60
+ import { reconcileUploadCors, releaseUploadCors } from "./upload-cors-reconcile.js";
61
+ export { domainStateServes, redirectHostname } from "./domain-provider.js";
62
+ const WORKSPACE_DOMAIN = (_process_env_NEXT_PUBLIC_WORKSPACE_DOMAIN = process.env.NEXT_PUBLIC_WORKSPACE_DOMAIN) != null ? _process_env_NEXT_PUBLIC_WORKSPACE_DOMAIN : 'aglyn.com';
63
+ function domainFor(slug) {
64
+ return `${String(slug != null ? slug : '').trim().toLowerCase()}.${WORKSPACE_DOMAIN}`;
65
+ }
66
+ /**
67
+ * Attach one fully-qualified name to the console.
68
+ *
69
+ * Idempotent by contract: a name already registered comes back as
70
+ * `already-exists`, which is success — the reconcile script and the create
71
+ * path can both run without coordinating.
72
+ *
73
+ * ⚠️ Tolerating `already-exists` is only safe while **every** name this
74
+ * function is asked to attach is also claimed in Firestore. Without that, a
75
+ * second org attaches a name someone else already holds, reads it as success,
76
+ * and gets a console that looks healthy while its visitors are served — or
77
+ * redirected — somewhere else. That is the AGL-743 shape, and
78
+ * `console-domains.ts` is where the claim is kept in step.
79
+ */ export async function attachProjectDomain(name, options = {}, scope = 'console') {
80
+ const result = await domainProvider().attach(scope, name, options);
81
+ if (result.outcome !== 'attached' && result.outcome !== 'already-exists') {
82
+ return result;
83
+ }
84
+ const redirect = options.redirectTo ? redirectHostname(options.redirectTo) : null;
85
+ return _extends({}, result, await uploadCorsFor(result.domain, redirect, scope));
86
+ }
87
+ /**
88
+ * The upload-CORS verdict for a name this call just registered.
89
+ *
90
+ * Nothing for a REDIRECT: the browser is already at the redirect target before
91
+ * it uploads, so that name is never an origin, and an entry for it would be
92
+ * permission granted for nothing. Every unnecessary origin is one more site
93
+ * that could spend a leaked signed URL.
94
+ *
95
+ * Nothing for a TENANT name either, for the same reason one step further out:
96
+ * a published site is not a page that uploads. The signed direct-to-GCS path
97
+ * has exactly one client — the console's media library, which mints at
98
+ * `/api/media/upload-url` and `PUT`s the returned URL for files over 3 MB —
99
+ * and that component ships only in the console bundle. The besigner reaches
100
+ * media through a picker seam whose one implementation is also console-side,
101
+ * and no tenant surface carries a file input at all. So a customer's
102
+ * `shop.acme.com` issues no signed `PUT`, and an entry for it is permission
103
+ * that buys nothing on a bucket where the signed URL IS the authorization —
104
+ * held, for a white-label domain, by a host somebody else controls.
105
+ *
106
+ * The shape of the system says the same thing independently: a platform
107
+ * subdomain with no custom domain is never registered at all, because the
108
+ * wildcard already serves it. It has therefore never had a bucket entry. Were
109
+ * tenant pages really uploading, every such site would already be failing on
110
+ * large files, and none is.
111
+ *
112
+ * Console scope keeps the grant, and needs it: `app.<domain>` and every
113
+ * workspace subdomain (`acme.<domain>`) serve the console itself, media
114
+ * library included.
115
+ *
116
+ * ⚠️ The release side is deliberately NOT scoped to match — see
117
+ * {@link uploadCorsReleaseFor}.
118
+ *
119
+ * Swallows its own failures for the same reason everything else in this file
120
+ * does: a domain must not fail to attach because a storage API was slow.
121
+ */ async function uploadCorsFor(domain, redirect, scope) {
122
+ if (redirect || scope !== 'console') return {};
123
+ try {
124
+ const verdict = await reconcileUploadCors(domain);
125
+ // The key appears only when there is something to say. A deployment with
126
+ // no media bucket configured — a fresh self-host install — has nothing,
127
+ // and reporting `uploadCors: null` on every attach would be noise about a
128
+ // feature the operator is not using.
129
+ return verdict ? {
130
+ uploadCors: verdict
131
+ } : {};
132
+ } catch (error) {
133
+ console.error('[workspace-domains] upload CORS reconcile threw', domain, error);
134
+ return {};
135
+ }
136
+ }
137
+ /**
138
+ * Reclaim the origin a just-detached name leaves on the bucket.
139
+ *
140
+ * Called unconditionally on a successful detach rather than only for names we
141
+ * believe were serving: the redirect flag is the provider's state at ATTACH
142
+ * time and a name can have been changed since, and `releaseUploadCors` is a
143
+ * no-op for an origin that is not on the bucket anyway. Guessing wrong in the
144
+ * other direction leaves the permission standing.
145
+ *
146
+ * Unconditional across SCOPE too, and that asymmetry with
147
+ * {@link uploadCorsFor} is the point rather than an oversight. Attach stopped
148
+ * granting to tenant names, but bucket state outlives a release: every tenant
149
+ * origin an earlier build added is still on the allowlist, and this is the
150
+ * only path that takes one back off. Narrowing release to console scope to
151
+ * mirror the grant would strand exactly the entries the narrowing was meant to
152
+ * be rid of. A release for a name that never held an entry costs one read and
153
+ * reports `revoked` on an origin that was already absent.
154
+ *
155
+ * Swallows its own failures like everything else here — a domain must not fail
156
+ * to detach because a storage API was slow — but reports them, because an
157
+ * operator who has just removed a customer needs to see that their permission
158
+ * outlived them.
159
+ */ async function uploadCorsReleaseFor(domain) {
160
+ try {
161
+ const release = await releaseUploadCors(domain);
162
+ return release ? {
163
+ uploadCorsRelease: release
164
+ } : {};
165
+ } catch (error) {
166
+ console.error('[workspace-domains] upload CORS release threw', domain, error);
167
+ return {};
168
+ }
169
+ }
170
+ /**
171
+ * The command still owed after a set of attaches, or null when nothing is
172
+ * (AGL-1452).
173
+ *
174
+ * One remedy rather than a list: every verdict names the same bucket and the
175
+ * same command, and a caller that has to render five copies of it renders
176
+ * none.
177
+ */ export function pendingUploadCorsRemedy(results) {
178
+ var _ref;
179
+ var _results_find_uploadCors, _results_find;
180
+ return (_ref = (_results_find = results.find((result)=>result.uploadCors && !result.uploadCors.permitted)) == null ? void 0 : (_results_find_uploadCors = _results_find.uploadCors) == null ? void 0 : _results_find_uploadCors.remedy) != null ? _ref : null;
181
+ }
182
+ /** Detach one fully-qualified name from the console. */ export async function detachProjectDomain(name, scope = 'console') {
183
+ const result = await domainProvider().detach(scope, name);
184
+ // A name that was never registered has no origin of ours to reclaim.
185
+ if (result.outcome !== 'detached') return result;
186
+ return _extends({}, result, await uploadCorsReleaseFor(result.domain));
187
+ }
188
+ /**
189
+ * Attach `{slug}.<workspace domain>` so the workspace subdomain resolves.
190
+ *
191
+ * The `!slug` guard is not redundant with the one inside `attachProjectDomain`:
192
+ * an empty slug still produces the well-formed `.aglyn.com`, and on the detach
193
+ * side that is a request to delete the apex.
194
+ */ export async function attachWorkspaceDomain(slug) {
195
+ if (!slug) return {
196
+ outcome: 'skipped',
197
+ domain: domainFor(slug)
198
+ };
199
+ noteUnmanagedWorkspaceDomains();
200
+ return attachProjectDomain(domainFor(slug));
201
+ }
202
+ /**
203
+ * Has this instance already said that it does not manage workspace subdomains?
204
+ *
205
+ * Once per instance, not once per org: on a deployment that will never have
206
+ * this integration the condition is permanent, and a line per workspace
207
+ * creation is noise an operator learns to scroll past.
208
+ */ let loggedUnmanagedDomains = false;
209
+ /**
210
+ * Say ONCE that `{slug}.<workspace domain>` is nobody's job on this deployment.
211
+ *
212
+ * `createOrg` awaits the attach and discards the result, which is fine when
213
+ * the outcome is `attached` or `already-exists`. With no provider the outcome
214
+ * is `skipped` and the org is still created, with the console going on to
215
+ * advertise `{slug}.<workspace domain>` as the workspace URL. That address
216
+ * resolves only if the operator independently runs wildcard DNS and a proxy
217
+ * rule for it, and nothing in the product would otherwise tell them so: the
218
+ * workspace simply has a URL that does not load.
219
+ *
220
+ * A log line rather than a refusal, because the operator's proxy is a
221
+ * legitimate way to serve those names — `AGLYN_DOMAIN_PROVIDER=wildcard` is
222
+ * how they say so — and failing org creation over a missing credential would
223
+ * be far worse than the gap it closes.
224
+ */ function noteUnmanagedWorkspaceDomains() {
225
+ if (loggedUnmanagedDomains || workspaceDomainsConfigured()) return;
226
+ loggedUnmanagedDomains = true;
227
+ console.info('[workspace-domains] no domain provider — workspace subdomains are not ' + 'registered by this deployment. Point a wildcard DNS record for ' + `*.${WORKSPACE_DOMAIN} at your console, route it there, and set ` + 'AGLYN_DOMAIN_PROVIDER=wildcard — or the workspace URL the console ' + 'shows will not resolve.');
228
+ }
229
+ /**
230
+ * Detach the domain, for org erasure.
231
+ *
232
+ * NOT called on rename: the previous slug keeps serving a 308 to the new one,
233
+ * and a redirect needs a hostname that still resolves.
234
+ */ export async function detachWorkspaceDomain(slug) {
235
+ if (!slug) return {
236
+ outcome: 'skipped',
237
+ domain: domainFor(slug)
238
+ };
239
+ return detachProjectDomain(domainFor(slug));
240
+ }
241
+ /**
242
+ * Whether the workspace-domain integration is configured at all.
243
+ *
244
+ * Exposed so a reconcile script can say "not configured" once instead of
245
+ * reporting every workspace as skipped, which reads like a failure.
246
+ */ export function workspaceDomainsConfigured() {
247
+ return domainProvider().configured('console');
248
+ }
249
+ /**
250
+ * What a name is ACTUALLY doing, right now.
251
+ *
252
+ * `attachProjectDomain` answers "did the registration succeed", which is a
253
+ * different question and a much weaker one. A domain can be registered and
254
+ * still serve nothing — ownership unproven, DNS not yet pointed, certificate
255
+ * not yet issued — and all three return a perfectly successful attach.
256
+ *
257
+ * That is the gap this closes (AGL-1913): the site custom-domain wizard
258
+ * reported `attached: true` off the attach alone, so "certificate is still
259
+ * issuing" and "this will never work" rendered as the same green chip, and the
260
+ * only advice the docs could give was to press retry again.
261
+ *
262
+ * `scope` picks which app should be answering for the name — `tenant` for a
263
+ * published site's custom domain, `console` for a workspace subdomain or a
264
+ * white-label console domain. It was a raw project id before the provider
265
+ * seam, which only ever meant anything to one vendor.
266
+ */ export async function projectDomainStatus(name, options = {}) {
267
+ var _options_scope;
268
+ return domainProvider().status((_options_scope = options.scope) != null ? _options_scope : 'console', name);
269
+ }
270
+
271
+ //# sourceMappingURL=workspace-domains.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/tenant/data/admin/src/lib/server/workspace-domains.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Attach and detach names for the console (AGL-1136).\n *\n * Two layers. The bottom one — `attachProjectDomain` / `detachProjectDomain` —\n * takes a fully-qualified name and is what a custom **console** domain uses\n * (AGL-1373). The top one is the workspace-subdomain pair below, which is that\n * primitive with `{slug}.aglyn.com` built for it.\n *\n * The hosting vendor is no longer either of them. Registering a name goes\n * through `domain-provider.ts`, so the same workspace subdomain is created by\n * Vercel's API on Aglyn's own hosting, by a wildcard record on a Docker\n * install, or by whatever an operator put behind the webhook driver. What\n * stays here is everything that is Aglyn's own policy rather than a vendor's:\n * the slug arithmetic, the upload-CORS reconcile, and the three properties\n * below.\n *\n * AGL-1135 removed the `*.aglyn.com` wildcard, because it meant every\n * hostname under the domain served a real console sign-in page —\n * `billing-security-update.aglyn.com` returned 200 with a valid certificate.\n * Removing it made unregistered names 404, and made **registered** names\n * something that has to be registered: a slug only resolves if that exact\n * domain is attached.\n *\n * Nothing did that, so every workspace created after AGL-1135 had a subdomain\n * that 404s. AGL-1115 then made signup provision an org, which turned a latent\n * gap into one every new account hits.\n *\n * ## Three properties, in the order they matter\n *\n * 1. **It can never fail an org.** Every entry point swallows its errors and\n * returns a verdict instead of throwing. The console is path-routed\n * (`app.aglyn.com/{slug}`) and that is the canonical form, so a workspace\n * with no subdomain is fully usable — while an org creation that rolled\n * back because a DNS API was slow would not be.\n * 2. **Unconfigured is a no-op, not an error.** With no provider this reports\n * `skipped`. A deployment that registers names some other way must not log\n * an error per signup forever.\n * 3. **A rename ADDS without removing.** The old slug keeps a tombstone that\n * 308s to the new one (AGL-585/236), and a redirect can only run on a\n * hostname that still resolves. Detaching the old domain would break the\n * very redirect the tombstone exists to serve.\n */\n\nimport {\n domainProvider,\n redirectHostname,\n type DomainAttachOptions,\n type DomainOutcome,\n type DomainScope,\n type ProjectDomainStatus,\n} from './domain-provider'\nimport {\n reconcileUploadCors,\n releaseUploadCors,\n type UploadCorsRelease,\n type UploadCorsVerdict,\n} from './upload-cors-reconcile'\n\nexport {\n domainStateServes,\n redirectHostname,\n type ProjectDomainState,\n type ProjectDomainStatus,\n type ProjectDomainVerification,\n} from './domain-provider'\n\nexport type WorkspaceDomainOutcome = DomainOutcome\n\nexport interface WorkspaceDomainResult {\n outcome: WorkspaceDomainOutcome\n domain: string\n detail?: string\n /**\n * Whether a browser at this name can complete a signed direct-to-GCS upload\n * (AGL-1452).\n *\n * Present only when the attach made the name a SERVING origin — a redirect\n * never becomes one. `permitted: false` carries the exact command a human\n * must run, so the gap is legible here rather than days later as a large\n * upload that fails behind a generic snackbar.\n */\n uploadCors?: UploadCorsVerdict | null\n /**\n * What a DETACH did about the origin the name leaves behind (AGL-1452).\n *\n * The attach half without this one only ever grows the allowlist. A stale\n * origin is a standing permission to complete a signed upload, held by a host\n * we no longer serve — and for a white-label console domain, one the customer\n * still controls.\n */\n uploadCorsRelease?: UploadCorsRelease | null\n}\n\nconst WORKSPACE_DOMAIN =\n process.env.NEXT_PUBLIC_WORKSPACE_DOMAIN ?? 'aglyn.com'\n\nfunction domainFor(slug: string): string {\n return `${String(slug ?? '').trim().toLowerCase()}.${WORKSPACE_DOMAIN}`\n}\n\nexport type ProjectDomainOptions = DomainAttachOptions\n\n/**\n * Attach one fully-qualified name to the console.\n *\n * Idempotent by contract: a name already registered comes back as\n * `already-exists`, which is success — the reconcile script and the create\n * path can both run without coordinating.\n *\n * ⚠️ Tolerating `already-exists` is only safe while **every** name this\n * function is asked to attach is also claimed in Firestore. Without that, a\n * second org attaches a name someone else already holds, reads it as success,\n * and gets a console that looks healthy while its visitors are served — or\n * redirected — somewhere else. That is the AGL-743 shape, and\n * `console-domains.ts` is where the claim is kept in step.\n */\nexport async function attachProjectDomain(\n name: string,\n options: ProjectDomainOptions = {},\n scope: DomainScope = 'console',\n): Promise<WorkspaceDomainResult> {\n const result = await domainProvider().attach(scope, name, options)\n if (result.outcome !== 'attached' && result.outcome !== 'already-exists') {\n return result\n }\n const redirect = options.redirectTo ? redirectHostname(options.redirectTo) : null\n return { ...result, ...(await uploadCorsFor(result.domain, redirect, scope)) }\n}\n\n/**\n * The upload-CORS verdict for a name this call just registered.\n *\n * Nothing for a REDIRECT: the browser is already at the redirect target before\n * it uploads, so that name is never an origin, and an entry for it would be\n * permission granted for nothing. Every unnecessary origin is one more site\n * that could spend a leaked signed URL.\n *\n * Nothing for a TENANT name either, for the same reason one step further out:\n * a published site is not a page that uploads. The signed direct-to-GCS path\n * has exactly one client — the console's media library, which mints at\n * `/api/media/upload-url` and `PUT`s the returned URL for files over 3 MB —\n * and that component ships only in the console bundle. The besigner reaches\n * media through a picker seam whose one implementation is also console-side,\n * and no tenant surface carries a file input at all. So a customer's\n * `shop.acme.com` issues no signed `PUT`, and an entry for it is permission\n * that buys nothing on a bucket where the signed URL IS the authorization —\n * held, for a white-label domain, by a host somebody else controls.\n *\n * The shape of the system says the same thing independently: a platform\n * subdomain with no custom domain is never registered at all, because the\n * wildcard already serves it. It has therefore never had a bucket entry. Were\n * tenant pages really uploading, every such site would already be failing on\n * large files, and none is.\n *\n * Console scope keeps the grant, and needs it: `app.<domain>` and every\n * workspace subdomain (`acme.<domain>`) serve the console itself, media\n * library included.\n *\n * ⚠️ The release side is deliberately NOT scoped to match — see\n * {@link uploadCorsReleaseFor}.\n *\n * Swallows its own failures for the same reason everything else in this file\n * does: a domain must not fail to attach because a storage API was slow.\n */\nasync function uploadCorsFor(\n domain: string,\n redirect: string | null,\n scope: DomainScope,\n): Promise<{ uploadCors?: UploadCorsVerdict | null }> {\n if (redirect || scope !== 'console') return {}\n try {\n const verdict = await reconcileUploadCors(domain)\n // The key appears only when there is something to say. A deployment with\n // no media bucket configured — a fresh self-host install — has nothing,\n // and reporting `uploadCors: null` on every attach would be noise about a\n // feature the operator is not using.\n return verdict ? { uploadCors: verdict } : {}\n } catch (error) {\n console.error('[workspace-domains] upload CORS reconcile threw', domain, error)\n return {}\n }\n}\n\n/**\n * Reclaim the origin a just-detached name leaves on the bucket.\n *\n * Called unconditionally on a successful detach rather than only for names we\n * believe were serving: the redirect flag is the provider's state at ATTACH\n * time and a name can have been changed since, and `releaseUploadCors` is a\n * no-op for an origin that is not on the bucket anyway. Guessing wrong in the\n * other direction leaves the permission standing.\n *\n * Unconditional across SCOPE too, and that asymmetry with\n * {@link uploadCorsFor} is the point rather than an oversight. Attach stopped\n * granting to tenant names, but bucket state outlives a release: every tenant\n * origin an earlier build added is still on the allowlist, and this is the\n * only path that takes one back off. Narrowing release to console scope to\n * mirror the grant would strand exactly the entries the narrowing was meant to\n * be rid of. A release for a name that never held an entry costs one read and\n * reports `revoked` on an origin that was already absent.\n *\n * Swallows its own failures like everything else here — a domain must not fail\n * to detach because a storage API was slow — but reports them, because an\n * operator who has just removed a customer needs to see that their permission\n * outlived them.\n */\nasync function uploadCorsReleaseFor(\n domain: string,\n): Promise<{ uploadCorsRelease?: UploadCorsRelease | null }> {\n try {\n const release = await releaseUploadCors(domain)\n return release ? { uploadCorsRelease: release } : {}\n } catch (error) {\n console.error('[workspace-domains] upload CORS release threw', domain, error)\n return {}\n }\n}\n\n/**\n * The command still owed after a set of attaches, or null when nothing is\n * (AGL-1452).\n *\n * One remedy rather than a list: every verdict names the same bucket and the\n * same command, and a caller that has to render five copies of it renders\n * none.\n */\nexport function pendingUploadCorsRemedy(\n results: WorkspaceDomainResult[],\n): string | null {\n return (\n results.find((result) => result.uploadCors && !result.uploadCors.permitted)\n ?.uploadCors?.remedy ?? null\n )\n}\n\n/** Detach one fully-qualified name from the console. */\nexport async function detachProjectDomain(\n name: string,\n scope: DomainScope = 'console',\n): Promise<WorkspaceDomainResult> {\n const result = await domainProvider().detach(scope, name)\n // A name that was never registered has no origin of ours to reclaim.\n if (result.outcome !== 'detached') return result\n return { ...result, ...(await uploadCorsReleaseFor(result.domain)) }\n}\n\n/**\n * Attach `{slug}.<workspace domain>` so the workspace subdomain resolves.\n *\n * The `!slug` guard is not redundant with the one inside `attachProjectDomain`:\n * an empty slug still produces the well-formed `.aglyn.com`, and on the detach\n * side that is a request to delete the apex.\n */\nexport async function attachWorkspaceDomain(\n slug: string,\n): Promise<WorkspaceDomainResult> {\n if (!slug) return { outcome: 'skipped', domain: domainFor(slug) }\n noteUnmanagedWorkspaceDomains()\n return attachProjectDomain(domainFor(slug))\n}\n\n/**\n * Has this instance already said that it does not manage workspace subdomains?\n *\n * Once per instance, not once per org: on a deployment that will never have\n * this integration the condition is permanent, and a line per workspace\n * creation is noise an operator learns to scroll past.\n */\nlet loggedUnmanagedDomains = false\n\n/**\n * Say ONCE that `{slug}.<workspace domain>` is nobody's job on this deployment.\n *\n * `createOrg` awaits the attach and discards the result, which is fine when\n * the outcome is `attached` or `already-exists`. With no provider the outcome\n * is `skipped` and the org is still created, with the console going on to\n * advertise `{slug}.<workspace domain>` as the workspace URL. That address\n * resolves only if the operator independently runs wildcard DNS and a proxy\n * rule for it, and nothing in the product would otherwise tell them so: the\n * workspace simply has a URL that does not load.\n *\n * A log line rather than a refusal, because the operator's proxy is a\n * legitimate way to serve those names — `AGLYN_DOMAIN_PROVIDER=wildcard` is\n * how they say so — and failing org creation over a missing credential would\n * be far worse than the gap it closes.\n */\nfunction noteUnmanagedWorkspaceDomains(): void {\n if (loggedUnmanagedDomains || workspaceDomainsConfigured()) return\n loggedUnmanagedDomains = true\n console.info(\n '[workspace-domains] no domain provider — workspace subdomains are not ' +\n 'registered by this deployment. Point a wildcard DNS record for ' +\n `*.${WORKSPACE_DOMAIN} at your console, route it there, and set ` +\n 'AGLYN_DOMAIN_PROVIDER=wildcard — or the workspace URL the console ' +\n 'shows will not resolve.',\n )\n}\n\n/**\n * Detach the domain, for org erasure.\n *\n * NOT called on rename: the previous slug keeps serving a 308 to the new one,\n * and a redirect needs a hostname that still resolves.\n */\nexport async function detachWorkspaceDomain(\n slug: string,\n): Promise<WorkspaceDomainResult> {\n if (!slug) return { outcome: 'skipped', domain: domainFor(slug) }\n return detachProjectDomain(domainFor(slug))\n}\n\n/**\n * Whether the workspace-domain integration is configured at all.\n *\n * Exposed so a reconcile script can say \"not configured\" once instead of\n * reporting every workspace as skipped, which reads like a failure.\n */\nexport function workspaceDomainsConfigured(): boolean {\n return domainProvider().configured('console')\n}\n\n/**\n * What a name is ACTUALLY doing, right now.\n *\n * `attachProjectDomain` answers \"did the registration succeed\", which is a\n * different question and a much weaker one. A domain can be registered and\n * still serve nothing — ownership unproven, DNS not yet pointed, certificate\n * not yet issued — and all three return a perfectly successful attach.\n *\n * That is the gap this closes (AGL-1913): the site custom-domain wizard\n * reported `attached: true` off the attach alone, so \"certificate is still\n * issuing\" and \"this will never work\" rendered as the same green chip, and the\n * only advice the docs could give was to press retry again.\n *\n * `scope` picks which app should be answering for the name — `tenant` for a\n * published site's custom domain, `console` for a workspace subdomain or a\n * white-label console domain. It was a raw project id before the provider\n * seam, which only ever meant anything to one vendor.\n */\nexport async function projectDomainStatus(\n name: string,\n options: { scope?: DomainScope } = {},\n): Promise<ProjectDomainStatus> {\n return domainProvider().status(options.scope ?? 'console', name)\n}\n"],"names":["process","domainProvider","redirectHostname","reconcileUploadCors","releaseUploadCors","domainStateServes","WORKSPACE_DOMAIN","env","NEXT_PUBLIC_WORKSPACE_DOMAIN","domainFor","slug","String","trim","toLowerCase","attachProjectDomain","name","options","scope","result","attach","outcome","redirect","redirectTo","uploadCorsFor","domain","verdict","uploadCors","error","console","uploadCorsReleaseFor","release","uploadCorsRelease","pendingUploadCorsRemedy","results","find","permitted","remedy","detachProjectDomain","detach","attachWorkspaceDomain","noteUnmanagedWorkspaceDomains","loggedUnmanagedDomains","workspaceDomainsConfigured","info","detachWorkspaceDomain","configured","projectDomainStatus","status"],"mappings":"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"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export * from './lib/server/analytics-retention';
18
+ export * from './lib/server/api-http';
19
+ export * from './lib/server/api-keys';
20
+ export * from './lib/server/account-emails';
21
+ export * from './lib/server/auth-pools';
22
+ export * from './lib/server/client-error-report';
23
+ export * from './lib/server/connect-account-status';
24
+ export * from './lib/server/connect-payout-failure';
25
+ export * from './lib/server/stripe-account-mode';
26
+ export * from './lib/server/auth-handoff';
27
+ export * from './lib/server/console-domains';
28
+ export * from './lib/server/dns-probe';
29
+ export * from './lib/server/sending-domains';
30
+ export * from './lib/server/host-sending-domain';
31
+ export * from './lib/server/sending-domain-debt';
32
+ export * from './lib/server/sending-domain-recheck';
33
+ export { domainProvider } from './lib/server/domain-provider';
34
+ export type { DomainProvider, DomainProviderId, DomainScope, } from './lib/server/domain-provider';
35
+ export * from './lib/server/platform-domain-names';
36
+ export * from './lib/server/consume-once';
37
+ export * from './lib/server/csp-aggregate';
38
+ export * from './lib/server/data-storage-gate';
39
+ export * from './lib/server/contact-suppression';
40
+ export * from './lib/server/email-suppression';
41
+ export * from './lib/server/email-topic-confirmation';
42
+ export * from './lib/server/email-unsubscribe-link';
43
+ export * from './lib/server/email-flow-gate';
44
+ export * from './lib/server/email-marketing-gate';
45
+ export * from './lib/server/sms-keywords';
46
+ export * from './lib/server/document-id';
47
+ export * from './lib/server/edit-access-authz';
48
+ export * from './lib/server/edit-access-token';
49
+ export * from './lib/server/edit-hint-token';
50
+ export * from './lib/server/email-metering';
51
+ export * from './lib/server/campaign-conversion-attribution';
52
+ export * from './lib/server/email-send-rate';
53
+ export * from './lib/server/email-sender-reputation';
54
+ export * from './lib/server/erase';
55
+ export * from './lib/server/erase-person';
56
+ export * from './lib/server/dynamic-list-materialize';
57
+ export * from './lib/server/firebase-admin';
58
+ export * from './lib/server/free-workspace-cap';
59
+ export * from './lib/server/ga4-measurement-protocol';
60
+ export * from './lib/server/host-memberships';
61
+ export * from './lib/server/host-visitor-records';
62
+ export * from './lib/server/list-members';
63
+ export * from './lib/server/lockdown';
64
+ export * from './lib/server/token-revocation';
65
+ export * from './lib/server/tenant-write-lockdown';
66
+ export * from './lib/server/host-email-tokens';
67
+ export * from './lib/server/notifications';
68
+ export * from './lib/server/org-billing';
69
+ export * from './lib/server/organizations';
70
+ export * from './lib/server/duplicate-activity';
71
+ export * from './lib/server/duplicate-resource';
72
+ export * from './lib/server/workspace-domains';
73
+ export * from './lib/server/membership-recover-throttle';
74
+ export * from './lib/server/password-reset-throttle';
75
+ export * from './lib/server/rate-limit-store';
76
+ export * from './lib/server/verify-email-cooldown';
77
+ export * from './lib/server/vercel-drain-signature';
78
+ export * from './lib/server/vercel-log-drain';
79
+ export * from './lib/server/visitor-write-rate-limit';
80
+ export * from './lib/server/console-api-rate-limit';
81
+ export * from './lib/server/realm-plugins';
82
+ export * from './lib/server/release-flags';
83
+ export * from './lib/server/resolve-people';
84
+ export * from './lib/server/member-photo';
85
+ export * from './lib/server/personal-data-export';
86
+ export * from './lib/server/media-delivery';
87
+ export * from './lib/server/media-download-tokens';
88
+ export * from './lib/server/media-quarantine';
89
+ export * from './lib/server/media-signing';
90
+ export * from './lib/server/media-storage-path';
91
+ export * from './lib/server/safe-equal';
92
+ export * from './lib/server/media-strong-digest';
93
+ export * from './lib/server/media-tombstone';
94
+ export * from './lib/server/media-variants';
95
+ export * from './lib/server/serve-media-cdn';
96
+ export * from './lib/server/serve-plugin-fetch';
97
+ export * from './lib/server/sso-break-glass-owners';
98
+ export * from './lib/server/sso-domain-policy';
99
+ export * from './lib/server/sso-enforcement';
100
+ export * from './lib/server/sso-provisioning';
101
+ export * from './lib/server/update-existing';
102
+ export * from './lib/server/contact-company-link';
103
+ export * from './lib/server/contact-email-index';
104
+ export * from './lib/server/contact-merge';
105
+ export * from './lib/server/upsert-contact';
106
+ export * from './lib/server/contact-lifecycle-floor';
107
+ export * from './lib/server/crm-records';
108
+ export * from './lib/server/crm-next-activity';
109
+ export * from './lib/server/crm-email-activity';
110
+ export * from './lib/server/crm-booking-activity';
111
+ export * from './lib/server/crm-inbound-email';
112
+ export * from './lib/server/member-email-aliases';
113
+ export * from './lib/server/user-profiles';
114
+ export * from './lib/server/legal-acceptance';
115
+ export * from './lib/server/platform-marketing-consent';
package/src/tenancy.js ADDED
@@ -0,0 +1,142 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ export * from "./lib/server/analytics-retention.js";
17
+ export * from "./lib/server/api-http.js";
18
+ export * from "./lib/server/api-keys.js";
19
+ export * from "./lib/server/account-emails.js";
20
+ export * from "./lib/server/auth-pools.js";
21
+ export * from "./lib/server/client-error-report.js";
22
+ export * from "./lib/server/connect-account-status.js";
23
+ export * from "./lib/server/connect-payout-failure.js";
24
+ export * from "./lib/server/stripe-account-mode.js";
25
+ export * from "./lib/server/auth-handoff.js";
26
+ export * from "./lib/server/console-domains.js";
27
+ export * from "./lib/server/dns-probe.js";
28
+ export * from "./lib/server/sending-domains.js";
29
+ export * from "./lib/server/host-sending-domain.js";
30
+ export * from "./lib/server/sending-domain-debt.js";
31
+ export * from "./lib/server/sending-domain-recheck.js";
32
+ // The hosting seam itself, so a door can ask whether this deployment is able
33
+ // to register a name at all before it promises the caller one.
34
+ // `workspace-domains` re-exports the pieces its own callers share with it; the
35
+ // provider behind it is not among them.
36
+ export { domainProvider } from "./lib/server/domain-provider.js";
37
+ export * from "./lib/server/platform-domain-names.js";
38
+ export * from "./lib/server/consume-once.js";
39
+ export * from "./lib/server/csp-aggregate.js";
40
+ export * from "./lib/server/data-storage-gate.js";
41
+ export * from "./lib/server/contact-suppression.js";
42
+ export * from "./lib/server/email-suppression.js";
43
+ // The double opt-in quarantine, after the module whose keying it shares and
44
+ // whose `filterTopicSendable` is the reader that makes it a quarantine rather
45
+ // than a stored fact.
46
+ export * from "./lib/server/email-topic-confirmation.js";
47
+ export * from "./lib/server/email-unsubscribe-link.js";
48
+ export * from "./lib/server/email-flow-gate.js";
49
+ // Side-effecting on purpose, for the reason `email-send-rate` below is:
50
+ // evaluating this module INSTALLS the marketing gate on `sendEmail`, so the
51
+ // unsubscribe header, the suppression check and the frequency ceiling reach
52
+ // every bulk sender without a call at each server entrypoint.
53
+ export * from "./lib/server/email-marketing-gate.js";
54
+ export * from "./lib/server/sms-keywords.js";
55
+ export * from "./lib/server/document-id.js";
56
+ export * from "./lib/server/edit-access-authz.js";
57
+ export * from "./lib/server/edit-access-token.js";
58
+ export * from "./lib/server/edit-hint-token.js";
59
+ export * from "./lib/server/email-metering.js";
60
+ // Side-effecting on purpose (AGL-2409): evaluating this module INSTALLS the
61
+ // platform send-rate governor on `sendEmail`. Every server surface already
62
+ // imports this barrel, so nothing has to remember to call an installer.
63
+ export * from "./lib/server/campaign-conversion-attribution.js";
64
+ export * from "./lib/server/email-send-rate.js";
65
+ export * from "./lib/server/email-sender-reputation.js";
66
+ export * from "./lib/server/erase.js";
67
+ export * from "./lib/server/erase-person.js";
68
+ export * from "./lib/server/dynamic-list-materialize.js";
69
+ export * from "./lib/server/firebase-admin.js";
70
+ export * from "./lib/server/free-workspace-cap.js";
71
+ export * from "./lib/server/ga4-measurement-protocol.js";
72
+ export * from "./lib/server/host-memberships.js";
73
+ export * from "./lib/server/host-visitor-records.js";
74
+ export * from "./lib/server/list-members.js";
75
+ export * from "./lib/server/lockdown.js";
76
+ export * from "./lib/server/token-revocation.js";
77
+ export * from "./lib/server/tenant-write-lockdown.js";
78
+ export * from "./lib/server/host-email-tokens.js";
79
+ export * from "./lib/server/notifications.js";
80
+ export * from "./lib/server/org-billing.js";
81
+ export * from "./lib/server/organizations.js";
82
+ export * from "./lib/server/duplicate-activity.js";
83
+ export * from "./lib/server/duplicate-resource.js";
84
+ export * from "./lib/server/workspace-domains.js";
85
+ export * from "./lib/server/membership-recover-throttle.js";
86
+ export * from "./lib/server/password-reset-throttle.js";
87
+ export * from "./lib/server/rate-limit-store.js";
88
+ export * from "./lib/server/verify-email-cooldown.js";
89
+ export * from "./lib/server/vercel-drain-signature.js";
90
+ export * from "./lib/server/vercel-log-drain.js";
91
+ export * from "./lib/server/visitor-write-rate-limit.js";
92
+ export * from "./lib/server/console-api-rate-limit.js";
93
+ export * from "./lib/server/realm-plugins.js";
94
+ export * from "./lib/server/release-flags.js";
95
+ export * from "./lib/server/resolve-people.js";
96
+ export * from "./lib/server/member-photo.js";
97
+ export * from "./lib/server/personal-data-export.js";
98
+ export * from "./lib/server/media-delivery.js";
99
+ export * from "./lib/server/media-download-tokens.js";
100
+ export * from "./lib/server/media-quarantine.js";
101
+ export * from "./lib/server/media-signing.js";
102
+ export * from "./lib/server/media-storage-path.js";
103
+ export * from "./lib/server/safe-equal.js";
104
+ export * from "./lib/server/media-strong-digest.js";
105
+ export * from "./lib/server/media-tombstone.js";
106
+ export * from "./lib/server/media-variants.js";
107
+ export * from "./lib/server/serve-media-cdn.js";
108
+ export * from "./lib/server/serve-plugin-fetch.js";
109
+ export * from "./lib/server/sso-break-glass-owners.js";
110
+ export * from "./lib/server/sso-domain-policy.js";
111
+ export * from "./lib/server/sso-enforcement.js";
112
+ export * from "./lib/server/sso-provisioning.js";
113
+ export * from "./lib/server/update-existing.js";
114
+ export * from "./lib/server/contact-company-link.js";
115
+ export * from "./lib/server/contact-email-index.js";
116
+ export * from "./lib/server/contact-merge.js";
117
+ export * from "./lib/server/upsert-contact.js";
118
+ // The stage floor a won deal applies to its contact (AGL-2641).
119
+ export * from "./lib/server/contact-lifecycle-floor.js";
120
+ export * from "./lib/server/crm-records.js";
121
+ // The `nextTaskAtMs` a contact, a company and a deal carry, recomputed from
122
+ // their open tasks by every server-side task writer (AGL-2661).
123
+ export * from "./lib/server/crm-next-activity.js";
124
+ // Where a one-to-one email's activity row lives and how the delivery
125
+ // webhook advances it (AGL-2615).
126
+ export * from "./lib/server/crm-email-activity.js";
127
+ // What a confirmed booking files on the CRM record — the meeting and the
128
+ // follow-up (AGL-2660).
129
+ export * from "./lib/server/crm-booking-activity.js";
130
+ // The org's email capture token and the filing of one received message
131
+ // on the record it was with (AGL-2657).
132
+ export * from "./lib/server/crm-inbound-email.js";
133
+ // A member's own addresses in a workspace, and the signed link that
134
+ // confirms one (AGL-2975).
135
+ export * from "./lib/server/member-email-aliases.js";
136
+ export * from "./lib/server/user-profiles.js";
137
+ export * from "./lib/server/legal-acceptance.js";
138
+ // The person's decision about the platform's own product email, on their
139
+ // document and on the operator's marketing contact (AGL-3185).
140
+ export * from "./lib/server/platform-marketing-consent.js";
141
+
142
+ //# sourceMappingURL=tenancy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/tenant/data/admin/src/tenancy.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './lib/server/analytics-retention'\nexport * from './lib/server/api-http'\nexport * from './lib/server/api-keys'\nexport * from './lib/server/account-emails'\nexport * from './lib/server/auth-pools'\nexport * from './lib/server/client-error-report'\nexport * from './lib/server/connect-account-status'\nexport * from './lib/server/connect-payout-failure'\nexport * from './lib/server/stripe-account-mode'\nexport * from './lib/server/auth-handoff'\nexport * from './lib/server/console-domains'\nexport * from './lib/server/dns-probe'\nexport * from './lib/server/sending-domains'\nexport * from './lib/server/host-sending-domain'\nexport * from './lib/server/sending-domain-debt'\nexport * from './lib/server/sending-domain-recheck'\n// The hosting seam itself, so a door can ask whether this deployment is able\n// to register a name at all before it promises the caller one.\n// `workspace-domains` re-exports the pieces its own callers share with it; the\n// provider behind it is not among them.\nexport { domainProvider } from './lib/server/domain-provider'\nexport type {\n DomainProvider,\n DomainProviderId,\n DomainScope,\n} from './lib/server/domain-provider'\nexport * from './lib/server/platform-domain-names'\nexport * from './lib/server/consume-once'\nexport * from './lib/server/csp-aggregate'\nexport * from './lib/server/data-storage-gate'\nexport * from './lib/server/contact-suppression'\nexport * from './lib/server/email-suppression'\n// The double opt-in quarantine, after the module whose keying it shares and\n// whose `filterTopicSendable` is the reader that makes it a quarantine rather\n// than a stored fact.\nexport * from './lib/server/email-topic-confirmation'\nexport * from './lib/server/email-unsubscribe-link'\nexport * from './lib/server/email-flow-gate'\n// Side-effecting on purpose, for the reason `email-send-rate` below is:\n// evaluating this module INSTALLS the marketing gate on `sendEmail`, so the\n// unsubscribe header, the suppression check and the frequency ceiling reach\n// every bulk sender without a call at each server entrypoint.\nexport * from './lib/server/email-marketing-gate'\nexport * from './lib/server/sms-keywords'\nexport * from './lib/server/document-id'\nexport * from './lib/server/edit-access-authz'\nexport * from './lib/server/edit-access-token'\nexport * from './lib/server/edit-hint-token'\nexport * from './lib/server/email-metering'\n// Side-effecting on purpose (AGL-2409): evaluating this module INSTALLS the\n// platform send-rate governor on `sendEmail`. Every server surface already\n// imports this barrel, so nothing has to remember to call an installer.\nexport * from './lib/server/campaign-conversion-attribution'\nexport * from './lib/server/email-send-rate'\nexport * from './lib/server/email-sender-reputation'\nexport * from './lib/server/erase'\nexport * from './lib/server/erase-person'\nexport * from './lib/server/dynamic-list-materialize'\nexport * from './lib/server/firebase-admin'\nexport * from './lib/server/free-workspace-cap'\nexport * from './lib/server/ga4-measurement-protocol'\nexport * from './lib/server/host-memberships'\nexport * from './lib/server/host-visitor-records'\nexport * from './lib/server/list-members'\nexport * from './lib/server/lockdown'\nexport * from './lib/server/token-revocation'\nexport * from './lib/server/tenant-write-lockdown'\nexport * from './lib/server/host-email-tokens'\nexport * from './lib/server/notifications'\nexport * from './lib/server/org-billing'\nexport * from './lib/server/organizations'\nexport * from './lib/server/duplicate-activity'\nexport * from './lib/server/duplicate-resource'\nexport * from './lib/server/workspace-domains'\nexport * from './lib/server/membership-recover-throttle'\nexport * from './lib/server/password-reset-throttle'\nexport * from './lib/server/rate-limit-store'\nexport * from './lib/server/verify-email-cooldown'\nexport * from './lib/server/vercel-drain-signature'\nexport * from './lib/server/vercel-log-drain'\nexport * from './lib/server/visitor-write-rate-limit'\nexport * from './lib/server/console-api-rate-limit'\nexport * from './lib/server/realm-plugins'\nexport * from './lib/server/release-flags'\nexport * from './lib/server/resolve-people'\nexport * from './lib/server/member-photo'\nexport * from './lib/server/personal-data-export'\nexport * from './lib/server/media-delivery'\nexport * from './lib/server/media-download-tokens'\nexport * from './lib/server/media-quarantine'\nexport * from './lib/server/media-signing'\nexport * from './lib/server/media-storage-path'\nexport * from './lib/server/safe-equal'\nexport * from './lib/server/media-strong-digest'\nexport * from './lib/server/media-tombstone'\nexport * from './lib/server/media-variants'\nexport * from './lib/server/serve-media-cdn'\nexport * from './lib/server/serve-plugin-fetch'\nexport * from './lib/server/sso-break-glass-owners'\nexport * from './lib/server/sso-domain-policy'\nexport * from './lib/server/sso-enforcement'\nexport * from './lib/server/sso-provisioning'\nexport * from './lib/server/update-existing'\nexport * from './lib/server/contact-company-link'\nexport * from './lib/server/contact-email-index'\nexport * from './lib/server/contact-merge'\nexport * from './lib/server/upsert-contact'\n// The stage floor a won deal applies to its contact (AGL-2641).\nexport * from './lib/server/contact-lifecycle-floor'\nexport * from './lib/server/crm-records'\n// The `nextTaskAtMs` a contact, a company and a deal carry, recomputed from\n// their open tasks by every server-side task writer (AGL-2661).\nexport * from './lib/server/crm-next-activity'\n// Where a one-to-one email's activity row lives and how the delivery\n// webhook advances it (AGL-2615).\nexport * from './lib/server/crm-email-activity'\n// What a confirmed booking files on the CRM record — the meeting and the\n// follow-up (AGL-2660).\nexport * from './lib/server/crm-booking-activity'\n// The org's email capture token and the filing of one received message\n// on the record it was with (AGL-2657).\nexport * from './lib/server/crm-inbound-email'\n// A member's own addresses in a workspace, and the signed link that\n// confirms one (AGL-2975).\nexport * from './lib/server/member-email-aliases'\nexport * from './lib/server/user-profiles'\nexport * from './lib/server/legal-acceptance'\n// The person's decision about the platform's own product email, on their\n// document and on the operator's marketing contact (AGL-3185).\nexport * from './lib/server/platform-marketing-consent'\n"],"names":["domainProvider"],"mappings":"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"}