@aglyn/plugins-outreach 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 (282) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +93 -0
  3. package/package.json +52 -0
  4. package/src/index.d.ts +22 -0
  5. package/src/index.js +29 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/components/compliance-section.d.ts +20 -0
  8. package/src/lib/components/compliance-section.js +291 -0
  9. package/src/lib/components/compliance-section.js.map +1 -0
  10. package/src/lib/components/enroll-dialog.d.ts +36 -0
  11. package/src/lib/components/enroll-dialog.js +656 -0
  12. package/src/lib/components/enroll-dialog.js.map +1 -0
  13. package/src/lib/components/enrollments-table.d.ts +28 -0
  14. package/src/lib/components/enrollments-table.js +375 -0
  15. package/src/lib/components/enrollments-table.js.map +1 -0
  16. package/src/lib/components/mailbox-card.d.ts +46 -0
  17. package/src/lib/components/mailbox-card.js +517 -0
  18. package/src/lib/components/mailbox-card.js.map +1 -0
  19. package/src/lib/components/mailboxes-section.d.ts +24 -0
  20. package/src/lib/components/mailboxes-section.js +258 -0
  21. package/src/lib/components/mailboxes-section.js.map +1 -0
  22. package/src/lib/components/outreach-console-page.d.ts +17 -0
  23. package/src/lib/components/outreach-console-page.js +81 -0
  24. package/src/lib/components/outreach-console-page.js.map +1 -0
  25. package/src/lib/components/outreach-console-sections.d.ts +43 -0
  26. package/src/lib/components/outreach-console-sections.js +55 -0
  27. package/src/lib/components/outreach-console-sections.js.map +1 -0
  28. package/src/lib/components/outreach-ui.d.ts +51 -0
  29. package/src/lib/components/outreach-ui.js +171 -0
  30. package/src/lib/components/outreach-ui.js.map +1 -0
  31. package/src/lib/components/send-window-fields.d.ts +25 -0
  32. package/src/lib/components/send-window-fields.js +178 -0
  33. package/src/lib/components/send-window-fields.js.map +1 -0
  34. package/src/lib/components/sequence-detail.d.ts +54 -0
  35. package/src/lib/components/sequence-detail.js +435 -0
  36. package/src/lib/components/sequence-detail.js.map +1 -0
  37. package/src/lib/components/sequence-editor.d.ts +37 -0
  38. package/src/lib/components/sequence-editor.js +485 -0
  39. package/src/lib/components/sequence-editor.js.map +1 -0
  40. package/src/lib/components/sequence-mailbox-picker.d.ts +44 -0
  41. package/src/lib/components/sequence-mailbox-picker.js +137 -0
  42. package/src/lib/components/sequence-mailbox-picker.js.map +1 -0
  43. package/src/lib/components/sequence-preview.d.ts +27 -0
  44. package/src/lib/components/sequence-preview.js +146 -0
  45. package/src/lib/components/sequence-preview.js.map +1 -0
  46. package/src/lib/components/sequence-step-card.d.ts +31 -0
  47. package/src/lib/components/sequence-step-card.js +326 -0
  48. package/src/lib/components/sequence-step-card.js.map +1 -0
  49. package/src/lib/components/sequences-section.d.ts +40 -0
  50. package/src/lib/components/sequences-section.js +310 -0
  51. package/src/lib/components/sequences-section.js.map +1 -0
  52. package/src/lib/components/use-outreach-api.d.ts +38 -0
  53. package/src/lib/components/use-outreach-api.js +139 -0
  54. package/src/lib/components/use-outreach-api.js.map +1 -0
  55. package/src/lib/components/use-outreach-crm.d.ts +50 -0
  56. package/src/lib/components/use-outreach-crm.js +200 -0
  57. package/src/lib/components/use-outreach-crm.js.map +1 -0
  58. package/src/lib/components/use-outreach-data.d.ts +55 -0
  59. package/src/lib/components/use-outreach-data.js +199 -0
  60. package/src/lib/components/use-outreach-data.js.map +1 -0
  61. package/src/lib/components/use-outreach-mailbox-api.d.ts +30 -0
  62. package/src/lib/components/use-outreach-mailbox-api.js +101 -0
  63. package/src/lib/components/use-outreach-mailbox-api.js.map +1 -0
  64. package/src/lib/components/use-outreach-mailboxes.d.ts +22 -0
  65. package/src/lib/components/use-outreach-mailboxes.js +68 -0
  66. package/src/lib/components/use-outreach-mailboxes.js.map +1 -0
  67. package/src/lib/components/use-outreach-settings.d.ts +17 -0
  68. package/src/lib/components/use-outreach-settings.js +64 -0
  69. package/src/lib/components/use-outreach-settings.js.map +1 -0
  70. package/src/lib/constants/api-routes.d.ts +68 -0
  71. package/src/lib/constants/api-routes.js +57 -0
  72. package/src/lib/constants/api-routes.js.map +1 -0
  73. package/src/lib/constants/bundle-common.d.ts +46 -0
  74. package/src/lib/constants/bundle-common.js +55 -0
  75. package/src/lib/constants/bundle-common.js.map +1 -0
  76. package/src/lib/constants/runtime-jobs.d.ts +24 -0
  77. package/src/lib/constants/runtime-jobs.js +24 -0
  78. package/src/lib/constants/runtime-jobs.js.map +1 -0
  79. package/src/lib/declarations.console-server.d.ts +38 -0
  80. package/src/lib/declarations.console-server.js +99 -0
  81. package/src/lib/declarations.console-server.js.map +1 -0
  82. package/src/lib/engine/compose.d.ts +86 -0
  83. package/src/lib/engine/compose.js +212 -0
  84. package/src/lib/engine/compose.js.map +1 -0
  85. package/src/lib/engine/delivery-status.d.ts +53 -0
  86. package/src/lib/engine/delivery-status.js +184 -0
  87. package/src/lib/engine/delivery-status.js.map +1 -0
  88. package/src/lib/engine/do-not-contact.d.ts +18 -0
  89. package/src/lib/engine/do-not-contact.js +34 -0
  90. package/src/lib/engine/do-not-contact.js.map +1 -0
  91. package/src/lib/engine/enrollment-state.d.ts +156 -0
  92. package/src/lib/engine/enrollment-state.js +303 -0
  93. package/src/lib/engine/enrollment-state.js.map +1 -0
  94. package/src/lib/engine/gates.d.ts +125 -0
  95. package/src/lib/engine/gates.js +232 -0
  96. package/src/lib/engine/gates.js.map +1 -0
  97. package/src/lib/engine/index.d.ts +28 -0
  98. package/src/lib/engine/index.js +33 -0
  99. package/src/lib/engine/index.js.map +1 -0
  100. package/src/lib/engine/mailbox-health.d.ts +49 -0
  101. package/src/lib/engine/mailbox-health.js +83 -0
  102. package/src/lib/engine/mailbox-health.js.map +1 -0
  103. package/src/lib/engine/opt-out-intent.d.ts +41 -0
  104. package/src/lib/engine/opt-out-intent.js +220 -0
  105. package/src/lib/engine/opt-out-intent.js.map +1 -0
  106. package/src/lib/engine/recipient-country.d.ts +41 -0
  107. package/src/lib/engine/recipient-country.js +171 -0
  108. package/src/lib/engine/recipient-country.js.map +1 -0
  109. package/src/lib/engine/schedule.d.ts +70 -0
  110. package/src/lib/engine/schedule.js +115 -0
  111. package/src/lib/engine/schedule.js.map +1 -0
  112. package/src/lib/engine/sending-capacity.d.ts +96 -0
  113. package/src/lib/engine/sending-capacity.js +172 -0
  114. package/src/lib/engine/sending-capacity.js.map +1 -0
  115. package/src/lib/engine/sequence-validation.d.ts +90 -0
  116. package/src/lib/engine/sequence-validation.js +291 -0
  117. package/src/lib/engine/sequence-validation.js.map +1 -0
  118. package/src/lib/engine/thread-classification.d.ts +78 -0
  119. package/src/lib/engine/thread-classification.js +224 -0
  120. package/src/lib/engine/thread-classification.js.map +1 -0
  121. package/src/lib/engine/thread-message.d.ts +80 -0
  122. package/src/lib/engine/thread-message.js +143 -0
  123. package/src/lib/engine/thread-message.js.map +1 -0
  124. package/src/lib/enrollment/enroll-people.d.ts +81 -0
  125. package/src/lib/enrollment/enroll-people.js +250 -0
  126. package/src/lib/enrollment/enroll-people.js.map +1 -0
  127. package/src/lib/enrollment/gate-lookups.d.ts +32 -0
  128. package/src/lib/enrollment/gate-lookups.js +154 -0
  129. package/src/lib/enrollment/gate-lookups.js.map +1 -0
  130. package/src/lib/mailboxes/mailbox-api.d.ts +126 -0
  131. package/src/lib/mailboxes/mailbox-api.js +66 -0
  132. package/src/lib/mailboxes/mailbox-api.js.map +1 -0
  133. package/src/lib/mailboxes/mailbox-credentials.d.ts +95 -0
  134. package/src/lib/mailboxes/mailbox-credentials.js +102 -0
  135. package/src/lib/mailboxes/mailbox-credentials.js.map +1 -0
  136. package/src/lib/mailboxes/mailbox-erasure.d.ts +69 -0
  137. package/src/lib/mailboxes/mailbox-erasure.js +148 -0
  138. package/src/lib/mailboxes/mailbox-erasure.js.map +1 -0
  139. package/src/lib/mailboxes/mailbox-gate.d.ts +75 -0
  140. package/src/lib/mailboxes/mailbox-gate.js +98 -0
  141. package/src/lib/mailboxes/mailbox-gate.js.map +1 -0
  142. package/src/lib/mailboxes/mailbox-revoke.d.ts +59 -0
  143. package/src/lib/mailboxes/mailbox-revoke.js +41 -0
  144. package/src/lib/mailboxes/mailbox-revoke.js.map +1 -0
  145. package/src/lib/mailboxes/mailbox-routes.d.ts +119 -0
  146. package/src/lib/mailboxes/mailbox-routes.js +605 -0
  147. package/src/lib/mailboxes/mailbox-routes.js.map +1 -0
  148. package/src/lib/mailboxes/mailbox-settings.d.ts +110 -0
  149. package/src/lib/mailboxes/mailbox-settings.js +212 -0
  150. package/src/lib/mailboxes/mailbox-settings.js.map +1 -0
  151. package/src/lib/mailboxes/mailbox-transport.d.ts +64 -0
  152. package/src/lib/mailboxes/mailbox-transport.js +94 -0
  153. package/src/lib/mailboxes/mailbox-transport.js.map +1 -0
  154. package/src/lib/mailboxes/oauth-redirect.d.ts +41 -0
  155. package/src/lib/mailboxes/oauth-redirect.js +63 -0
  156. package/src/lib/mailboxes/oauth-redirect.js.map +1 -0
  157. package/src/lib/mailboxes/oauth-state.d.ts +152 -0
  158. package/src/lib/mailboxes/oauth-state.js +212 -0
  159. package/src/lib/mailboxes/oauth-state.js.map +1 -0
  160. package/src/lib/mailboxes/outreach-config.d.ts +64 -0
  161. package/src/lib/mailboxes/outreach-config.js +77 -0
  162. package/src/lib/mailboxes/outreach-config.js.map +1 -0
  163. package/src/lib/mailboxes/register-mailbox-routes.d.ts +47 -0
  164. package/src/lib/mailboxes/register-mailbox-routes.js +135 -0
  165. package/src/lib/mailboxes/register-mailbox-routes.js.map +1 -0
  166. package/src/lib/model/compliance-settings.d.ts +78 -0
  167. package/src/lib/model/compliance-settings.js +155 -0
  168. package/src/lib/model/compliance-settings.js.map +1 -0
  169. package/src/lib/model/outreach-api.d.ts +210 -0
  170. package/src/lib/model/outreach-api.js +28 -0
  171. package/src/lib/model/outreach-api.js.map +1 -0
  172. package/src/lib/model/outreach.types.d.ts +563 -0
  173. package/src/lib/model/outreach.types.js +225 -0
  174. package/src/lib/model/outreach.types.js.map +1 -0
  175. package/src/lib/model/sequence-draft.d.ts +84 -0
  176. package/src/lib/model/sequence-draft.js +239 -0
  177. package/src/lib/model/sequence-draft.js.map +1 -0
  178. package/src/lib/model/step-preview.d.ts +45 -0
  179. package/src/lib/model/step-preview.js +98 -0
  180. package/src/lib/model/step-preview.js.map +1 -0
  181. package/src/lib/model/stored-records.d.ts +23 -0
  182. package/src/lib/model/stored-records.js +84 -0
  183. package/src/lib/model/stored-records.js.map +1 -0
  184. package/src/lib/plugin.d.ts +46 -0
  185. package/src/lib/plugin.js +86 -0
  186. package/src/lib/plugin.js.map +1 -0
  187. package/src/lib/routes/enroll-routes.d.ts +64 -0
  188. package/src/lib/routes/enroll-routes.js +350 -0
  189. package/src/lib/routes/enroll-routes.js.map +1 -0
  190. package/src/lib/routes/enrollment-routes.d.ts +19 -0
  191. package/src/lib/routes/enrollment-routes.js +171 -0
  192. package/src/lib/routes/enrollment-routes.js.map +1 -0
  193. package/src/lib/routes/platform-deps.d.ts +51 -0
  194. package/src/lib/routes/platform-deps.js +66 -0
  195. package/src/lib/routes/platform-deps.js.map +1 -0
  196. package/src/lib/routes/preview-routes.d.ts +33 -0
  197. package/src/lib/routes/preview-routes.js +117 -0
  198. package/src/lib/routes/preview-routes.js.map +1 -0
  199. package/src/lib/routes/register-routes.d.ts +22 -0
  200. package/src/lib/routes/register-routes.js +92 -0
  201. package/src/lib/routes/register-routes.js.map +1 -0
  202. package/src/lib/routes/route-deps.d.ts +49 -0
  203. package/src/lib/routes/route-deps.js +27 -0
  204. package/src/lib/routes/route-deps.js.map +1 -0
  205. package/src/lib/routes/route-gate.d.ts +94 -0
  206. package/src/lib/routes/route-gate.js +87 -0
  207. package/src/lib/routes/route-gate.js.map +1 -0
  208. package/src/lib/routes/route-http.d.ts +32 -0
  209. package/src/lib/routes/route-http.js +62 -0
  210. package/src/lib/routes/route-http.js.map +1 -0
  211. package/src/lib/routes/sequence-routes.d.ts +32 -0
  212. package/src/lib/routes/sequence-routes.js +359 -0
  213. package/src/lib/routes/sequence-routes.js.map +1 -0
  214. package/src/lib/routes/settings-routes.d.ts +30 -0
  215. package/src/lib/routes/settings-routes.js +73 -0
  216. package/src/lib/routes/settings-routes.js.map +1 -0
  217. package/src/lib/runtime/enrollment-events.d.ts +86 -0
  218. package/src/lib/runtime/enrollment-events.js +141 -0
  219. package/src/lib/runtime/enrollment-events.js.map +1 -0
  220. package/src/lib/runtime/fixtures/fake-gmail.d.ts +121 -0
  221. package/src/lib/runtime/fixtures/fake-gmail.js +312 -0
  222. package/src/lib/runtime/fixtures/fake-gmail.js.map +1 -0
  223. package/src/lib/runtime/mailbox-health-store.d.ts +47 -0
  224. package/src/lib/runtime/mailbox-health-store.js +168 -0
  225. package/src/lib/runtime/mailbox-health-store.js.map +1 -0
  226. package/src/lib/runtime/person-erasure.d.ts +39 -0
  227. package/src/lib/runtime/person-erasure.js +57 -0
  228. package/src/lib/runtime/person-erasure.js.map +1 -0
  229. package/src/lib/runtime/platform-runtime-deps.d.ts +29 -0
  230. package/src/lib/runtime/platform-runtime-deps.js +98 -0
  231. package/src/lib/runtime/platform-runtime-deps.js.map +1 -0
  232. package/src/lib/runtime/runtime-deps.d.ts +77 -0
  233. package/src/lib/runtime/runtime-deps.js +18 -0
  234. package/src/lib/runtime/runtime-deps.js.map +1 -0
  235. package/src/lib/runtime/send-job.d.ts +42 -0
  236. package/src/lib/runtime/send-job.js +780 -0
  237. package/src/lib/runtime/send-job.js.map +1 -0
  238. package/src/lib/runtime/sync-job.d.ts +41 -0
  239. package/src/lib/runtime/sync-job.js +480 -0
  240. package/src/lib/runtime/sync-job.js.map +1 -0
  241. package/src/lib/runtime/timeline.d.ts +67 -0
  242. package/src/lib/runtime/timeline.js +93 -0
  243. package/src/lib/runtime/timeline.js.map +1 -0
  244. package/src/lib/runtime/unsubscribe-link.d.ts +75 -0
  245. package/src/lib/runtime/unsubscribe-link.js +121 -0
  246. package/src/lib/runtime/unsubscribe-link.js.map +1 -0
  247. package/src/lib/runtime/unsubscribe-route.d.ts +24 -0
  248. package/src/lib/runtime/unsubscribe-route.js +103 -0
  249. package/src/lib/runtime/unsubscribe-route.js.map +1 -0
  250. package/src/lib/server.d.ts +53 -0
  251. package/src/lib/server.js +94 -0
  252. package/src/lib/server.js.map +1 -0
  253. package/src/lib/storage/compliance-settings-store.d.ts +44 -0
  254. package/src/lib/storage/compliance-settings-store.js +78 -0
  255. package/src/lib/storage/compliance-settings-store.js.map +1 -0
  256. package/src/lib/storage/do-not-contact-store.d.ts +60 -0
  257. package/src/lib/storage/do-not-contact-store.js +168 -0
  258. package/src/lib/storage/do-not-contact-store.js.map +1 -0
  259. package/src/lib/storage/outreach-records.d.ts +33 -0
  260. package/src/lib/storage/outreach-records.js +35 -0
  261. package/src/lib/storage/outreach-records.js.map +1 -0
  262. package/src/lib/subprocessors.d.ts +48 -0
  263. package/src/lib/subprocessors.js +70 -0
  264. package/src/lib/subprocessors.js.map +1 -0
  265. package/src/lib/transport/gmail-client.d.ts +145 -0
  266. package/src/lib/transport/gmail-client.js +229 -0
  267. package/src/lib/transport/gmail-client.js.map +1 -0
  268. package/src/lib/transport/gmail-errors.d.ts +84 -0
  269. package/src/lib/transport/gmail-errors.js +138 -0
  270. package/src/lib/transport/gmail-errors.js.map +1 -0
  271. package/src/lib/transport/google-oauth.d.ts +138 -0
  272. package/src/lib/transport/google-oauth.js +247 -0
  273. package/src/lib/transport/google-oauth.js.map +1 -0
  274. package/src/lib/transport/http.d.ts +53 -0
  275. package/src/lib/transport/http.js +79 -0
  276. package/src/lib/transport/http.js.map +1 -0
  277. package/src/lib/transport/rfc5322.d.ts +116 -0
  278. package/src/lib/transport/rfc5322.js +330 -0
  279. package/src/lib/transport/rfc5322.js.map +1 -0
  280. package/src/lib/transport/send-message.d.ts +69 -0
  281. package/src/lib/transport/send-message.js +77 -0
  282. package/src/lib/transport/send-message.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/outreach/src/lib/components/use-outreach-mailbox-api.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'use client'\n\nimport { authorizedFetch } from '@aglyn/shared-util-http/authorized-token'\nimport { useUser } from '@aglyn/tenant-feature-instance'\nimport { useCallback, useMemo } from 'react'\nimport { OUTREACH_API_ROUTES } from '../constants/api-routes'\nimport type {\n OutreachApiRefusalReason,\n OutreachConnectCompleteResponse,\n OutreachConnectResponse,\n OutreachMailboxAvailability,\n OutreachMailboxDisconnectResponse,\n OutreachMailboxResponse,\n OutreachMailboxSettingsRequest,\n OutreachMailboxTestResponse,\n} from '../mailboxes/mailbox-api'\n\n/** A mailbox route's refusal, carrying the sentence and the stable reason. */\nexport class OutreachApiError extends Error {\n readonly reason: OutreachApiRefusalReason | 'unreachable'\n readonly status: number\n\n constructor(message: string, reason: OutreachApiRefusalReason | 'unreachable', status: number) {\n super(message)\n this.name = 'OutreachApiError'\n this.reason = reason\n this.status = status\n }\n}\n\n/** The mailbox routes, as the Mailboxes panel calls them. */\nexport interface OutreachMailboxApi {\n availability(): Promise<OutreachMailboxAvailability>\n /** Google's consent address for a new connect, or a reconnect. */\n connect(): Promise<string>\n complete(input: { code: string; state: string; timezone?: string }): Promise<OutreachConnectCompleteResponse>\n saveSettings(\n input: Omit<OutreachMailboxSettingsRequest, 'orgId'>,\n ): Promise<OutreachMailboxResponse>\n setPaused(mailboxId: string, paused: boolean): Promise<OutreachMailboxResponse>\n sendTest(mailboxId: string): Promise<OutreachMailboxTestResponse>\n disconnect(mailboxId: string): Promise<OutreachMailboxDisconnectResponse>\n}\n\n/**\n * The Mailboxes panel's one door to the mailbox routes (AGL-2978), with the\n * member's session attached and the organization named on every call — the\n * dispatcher's release gate reads it. A refusal is thrown as an\n * {@link OutreachApiError} carrying the route's own sentence, which is\n * written for the person reading it.\n */\nexport function useOutreachMailboxApi(orgId: string | null): OutreachMailboxApi {\n const { data: user } = useUser()\n\n const call = useCallback(\n async <T>(route: string, init: { method: 'GET' | 'POST'; body?: Record<string, unknown> }): Promise<T> => {\n if (!orgId) throw new OutreachApiError('Open an organization first.', 'org-required', 400)\n const path =\n init.method === 'GET'\n ? `/api/${route}?orgId=${encodeURIComponent(orgId)}`\n : `/api/${route}`\n const response = await authorizedFetch(user, path, {\n method: init.method,\n ...(init.method === 'POST'\n ? {\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ orgId, ...init.body }),\n }\n : {}),\n })\n const payload = (await response.json().catch(() => null)) as\n | (T & { error?: undefined })\n | { error?: string; reason?: OutreachApiRefusalReason }\n | null\n if (!response.ok || !payload) {\n const refusal = (payload ?? {}) as { error?: string; reason?: OutreachApiRefusalReason }\n throw new OutreachApiError(\n refusal.error || 'Sequences could not be reached. Try again.',\n refusal.reason ?? 'unreachable',\n response.status,\n )\n }\n return payload as T\n },\n [user, orgId],\n )\n\n return useMemo<OutreachMailboxApi>(\n () => ({\n availability: () =>\n call<OutreachMailboxAvailability>(OUTREACH_API_ROUTES.mailboxesAvailability, { method: 'GET' }),\n connect: async () =>\n (await call<OutreachConnectResponse>(OUTREACH_API_ROUTES.mailboxesConnect, { method: 'POST' })).url,\n complete: (input) =>\n call<OutreachConnectCompleteResponse>(OUTREACH_API_ROUTES.mailboxesConnectComplete, {\n method: 'POST',\n body: input,\n }),\n saveSettings: (input) =>\n call<OutreachMailboxResponse>(OUTREACH_API_ROUTES.mailboxesSettings, {\n method: 'POST',\n body: input as unknown as Record<string, unknown>,\n }),\n setPaused: (mailboxId, paused) =>\n call<OutreachMailboxResponse>(OUTREACH_API_ROUTES.mailboxesStatus, {\n method: 'POST',\n body: { mailboxId, paused },\n }),\n sendTest: (mailboxId) =>\n call<OutreachMailboxTestResponse>(OUTREACH_API_ROUTES.mailboxesTest, {\n method: 'POST',\n body: { mailboxId },\n }),\n disconnect: (mailboxId) =>\n call<OutreachMailboxDisconnectResponse>(OUTREACH_API_ROUTES.mailboxesDisconnect, {\n method: 'POST',\n body: { mailboxId },\n }),\n }),\n [call],\n )\n}\n"],"names":["authorizedFetch","useUser","useCallback","useMemo","OUTREACH_API_ROUTES","OutreachApiError","Error","message","reason","status","name","useOutreachMailboxApi","orgId","data","user","call","route","init","path","method","encodeURIComponent","response","headers","body","JSON","stringify","payload","json","catch","ok","refusal","error","availability","mailboxesAvailability","connect","mailboxesConnect","url","complete","input","mailboxesConnectComplete","saveSettings","mailboxesSettings","setPaused","mailboxId","paused","mailboxesStatus","sendTest","mailboxesTest","disconnect","mailboxesDisconnect"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;AAEA,SAASA,eAAe,QAAQ,2CAA0C;AAC1E,SAASC,OAAO,QAAQ,iCAAgC;AACxD,SAASC,WAAW,EAAEC,OAAO,QAAQ,QAAO;AAC5C,SAASC,mBAAmB,QAAQ,6BAAyB;AAY7D,4EAA4E,GAC5E,OAAO,MAAMC,yBAAyBC;IAIpC,YAAYC,OAAe,EAAEC,MAAgD,EAAEC,MAAc,CAAE;QAC7F,KAAK,CAACF;QACN,IAAI,CAACG,IAAI,GAAG;QACZ,IAAI,CAACF,MAAM,GAAGA;QACd,IAAI,CAACC,MAAM,GAAGA;IAChB;AACF;AAgBA;;;;;;CAMC,GACD,OAAO,SAASE,sBAAsBC,KAAoB;IACxD,MAAM,EAAEC,MAAMC,IAAI,EAAE,GAAGb;IAEvB,MAAMc,OAAOb,YACX,OAAUc,OAAeC;QACvB,IAAI,CAACL,OAAO,MAAM,IAAIP,iBAAiB,+BAA+B,gBAAgB;QACtF,MAAMa,OACJD,KAAKE,MAAM,KAAK,QACZ,CAAC,KAAK,EAAEH,MAAM,OAAO,EAAEI,mBAAmBR,QAAQ,GAClD,CAAC,KAAK,EAAEI,OAAO;QACrB,MAAMK,WAAW,MAAMrB,gBAAgBc,MAAMI,MAAM;YACjDC,QAAQF,KAAKE,MAAM;WACfF,KAAKE,MAAM,KAAK,SAChB;YACEG,SAAS;gBAAE,gBAAgB;YAAmB;YAC9CC,MAAMC,KAAKC,SAAS,CAAC;gBAAEb;eAAUK,KAAKM,IAAI;QAC5C,IACA,CAAC;QAEP,MAAMG,UAAW,MAAML,SAASM,IAAI,GAAGC,KAAK,CAAC,IAAM;QAInD,IAAI,CAACP,SAASQ,EAAE,IAAI,CAACH,SAAS;gBAI1BI;YAHF,MAAMA,UAAWJ,kBAAAA,UAAW,CAAC;YAC7B,MAAM,IAAIrB,iBACRyB,QAAQC,KAAK,IAAI,+CACjBD,kBAAAA,QAAQtB,MAAM,YAAdsB,kBAAkB,eAClBT,SAASZ,MAAM;QAEnB;QACA,OAAOiB;IACT,GACA;QAACZ;QAAMF;KAAM;IAGf,OAAOT,QACL,IAAO,CAAA;YACL6B,cAAc,IACZjB,KAAkCX,oBAAoB6B,qBAAqB,EAAE;oBAAEd,QAAQ;gBAAM;YAC/Fe,SAAS,UACP,AAAC,CAAA,MAAMnB,KAA8BX,oBAAoB+B,gBAAgB,EAAE;oBAAEhB,QAAQ;gBAAO,EAAC,EAAGiB,GAAG;YACrGC,UAAU,CAACC,QACTvB,KAAsCX,oBAAoBmC,wBAAwB,EAAE;oBAClFpB,QAAQ;oBACRI,MAAMe;gBACR;YACFE,cAAc,CAACF,QACbvB,KAA8BX,oBAAoBqC,iBAAiB,EAAE;oBACnEtB,QAAQ;oBACRI,MAAMe;gBACR;YACFI,WAAW,CAACC,WAAWC,SACrB7B,KAA8BX,oBAAoByC,eAAe,EAAE;oBACjE1B,QAAQ;oBACRI,MAAM;wBAAEoB;wBAAWC;oBAAO;gBAC5B;YACFE,UAAU,CAACH,YACT5B,KAAkCX,oBAAoB2C,aAAa,EAAE;oBACnE5B,QAAQ;oBACRI,MAAM;wBAAEoB;oBAAU;gBACpB;YACFK,YAAY,CAACL,YACX5B,KAAwCX,oBAAoB6C,mBAAmB,EAAE;oBAC/E9B,QAAQ;oBACRI,MAAM;wBAAEoB;oBAAU;gBACpB;QACJ,CAAA,GACA;QAAC5B;KAAK;AAEV"}
@@ -0,0 +1,22 @@
1
+ import { type OutreachMailbox } from '../model/outreach.types';
2
+ export type OutreachMailboxesResult = {
3
+ status: 'loading';
4
+ mailboxes: OutreachMailbox[];
5
+ } | {
6
+ status: 'ready';
7
+ mailboxes: OutreachMailbox[];
8
+ } | {
9
+ status: 'error';
10
+ mailboxes: OutreachMailbox[];
11
+ };
12
+ /**
13
+ * The organization's connected mailboxes, live (AGL-2978).
14
+ *
15
+ * Read straight from `orgs/{orgId}/outreachMailboxes`: the rules let an
16
+ * org-wide member holding `outreach.use` on an entitled organization read
17
+ * them, and every write goes through a route, so what this shows is what the
18
+ * routes wrote — a pause, a settings save, or the sending runtime marking a
19
+ * mailbox reconnect-required — the moment it lands. Credentials live
20
+ * elsewhere and no client can read them.
21
+ */
22
+ export declare function useOutreachMailboxes(orgId: string | null): OutreachMailboxesResult;
@@ -0,0 +1,68 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 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
+ */ 'use client';
17
+ import { _ as _extends } from "@swc/helpers/_/_extends";
18
+ import { useFirestore } from "@aglyn/tenant-feature-instance";
19
+ import { collection, onSnapshot } from "firebase/firestore";
20
+ import { useEffect, useState } from "react";
21
+ import { OUTREACH_COLLECTIONS } from "../model/outreach.types.js";
22
+ /**
23
+ * The organization's connected mailboxes, live (AGL-2978).
24
+ *
25
+ * Read straight from `orgs/{orgId}/outreachMailboxes`: the rules let an
26
+ * org-wide member holding `outreach.use` on an entitled organization read
27
+ * them, and every write goes through a route, so what this shows is what the
28
+ * routes wrote — a pause, a settings save, or the sending runtime marking a
29
+ * mailbox reconnect-required — the moment it lands. Credentials live
30
+ * elsewhere and no client can read them.
31
+ */ export function useOutreachMailboxes(orgId) {
32
+ const firestore = useFirestore();
33
+ const [result, setResult] = useState({
34
+ status: 'loading',
35
+ mailboxes: []
36
+ });
37
+ useEffect(()=>{
38
+ setResult({
39
+ status: 'loading',
40
+ mailboxes: []
41
+ });
42
+ if (!orgId) return undefined;
43
+ return onSnapshot(collection(firestore, 'orgs', orgId, OUTREACH_COLLECTIONS.mailboxes), (snapshot)=>{
44
+ const mailboxes = snapshot.docs.map((entry)=>_extends({}, entry.data(), {
45
+ id: entry.id
46
+ })).sort((a, b)=>{
47
+ var _a_createdAtMs, _b_createdAtMs;
48
+ return ((_a_createdAtMs = a.createdAtMs) != null ? _a_createdAtMs : 0) - ((_b_createdAtMs = b.createdAtMs) != null ? _b_createdAtMs : 0);
49
+ });
50
+ setResult({
51
+ status: 'ready',
52
+ mailboxes
53
+ });
54
+ }, (error)=>{
55
+ console.error('[outreach] mailboxes could not be read', error);
56
+ setResult({
57
+ status: 'error',
58
+ mailboxes: []
59
+ });
60
+ });
61
+ }, [
62
+ firestore,
63
+ orgId
64
+ ]);
65
+ return result;
66
+ }
67
+
68
+ //# sourceMappingURL=use-outreach-mailboxes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/outreach/src/lib/components/use-outreach-mailboxes.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'use client'\n\nimport { useFirestore } from '@aglyn/tenant-feature-instance'\nimport { collection, onSnapshot } from 'firebase/firestore'\nimport { useEffect, useState } from 'react'\nimport { OUTREACH_COLLECTIONS, type OutreachMailbox } from '../model/outreach.types'\n\nexport type OutreachMailboxesResult =\n | { status: 'loading'; mailboxes: OutreachMailbox[] }\n | { status: 'ready'; mailboxes: OutreachMailbox[] }\n | { status: 'error'; mailboxes: OutreachMailbox[] }\n\n/**\n * The organization's connected mailboxes, live (AGL-2978).\n *\n * Read straight from `orgs/{orgId}/outreachMailboxes`: the rules let an\n * org-wide member holding `outreach.use` on an entitled organization read\n * them, and every write goes through a route, so what this shows is what the\n * routes wrote — a pause, a settings save, or the sending runtime marking a\n * mailbox reconnect-required — the moment it lands. Credentials live\n * elsewhere and no client can read them.\n */\nexport function useOutreachMailboxes(orgId: string | null): OutreachMailboxesResult {\n const firestore = useFirestore()\n const [result, setResult] = useState<OutreachMailboxesResult>({ status: 'loading', mailboxes: [] })\n\n useEffect(() => {\n setResult({ status: 'loading', mailboxes: [] })\n if (!orgId) return undefined\n return onSnapshot(\n collection(firestore, 'orgs', orgId, OUTREACH_COLLECTIONS.mailboxes),\n (snapshot) => {\n const mailboxes = snapshot.docs\n .map((entry) => ({ ...(entry.data() as OutreachMailbox), id: entry.id }))\n .sort((a, b) => (a.createdAtMs ?? 0) - (b.createdAtMs ?? 0))\n setResult({ status: 'ready', mailboxes })\n },\n (error) => {\n console.error('[outreach] mailboxes could not be read', error)\n setResult({ status: 'error', mailboxes: [] })\n },\n )\n }, [firestore, orgId])\n\n return result\n}\n"],"names":["useFirestore","collection","onSnapshot","useEffect","useState","OUTREACH_COLLECTIONS","useOutreachMailboxes","orgId","firestore","result","setResult","status","mailboxes","undefined","snapshot","docs","map","entry","data","id","sort","a","b","createdAtMs","error","console"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;AAEA,SAASA,YAAY,QAAQ,iCAAgC;AAC7D,SAASC,UAAU,EAAEC,UAAU,QAAQ,qBAAoB;AAC3D,SAASC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAC3C,SAASC,oBAAoB,QAA8B,6BAAyB;AAOpF;;;;;;;;;CASC,GACD,OAAO,SAASC,qBAAqBC,KAAoB;IACvD,MAAMC,YAAYR;IAClB,MAAM,CAACS,QAAQC,UAAU,GAAGN,SAAkC;QAAEO,QAAQ;QAAWC,WAAW,EAAE;IAAC;IAEjGT,UAAU;QACRO,UAAU;YAAEC,QAAQ;YAAWC,WAAW,EAAE;QAAC;QAC7C,IAAI,CAACL,OAAO,OAAOM;QACnB,OAAOX,WACLD,WAAWO,WAAW,QAAQD,OAAOF,qBAAqBO,SAAS,GACnE,CAACE;YACC,MAAMF,YAAYE,SAASC,IAAI,CAC5BC,GAAG,CAAC,CAACC,QAAW,aAAMA,MAAMC,IAAI;oBAAwBC,IAAIF,MAAME,EAAE;oBACpEC,IAAI,CAAC,CAACC,GAAGC;oBAAOD,gBAAuBC;uBAAxB,EAACD,iBAAAA,EAAEE,WAAW,YAAbF,iBAAiB,OAAMC,iBAAAA,EAAEC,WAAW,YAAbD,iBAAiB;;YAC3DZ,UAAU;gBAAEC,QAAQ;gBAASC;YAAU;QACzC,GACA,CAACY;YACCC,QAAQD,KAAK,CAAC,0CAA0CA;YACxDd,UAAU;gBAAEC,QAAQ;gBAASC,WAAW,EAAE;YAAC;QAC7C;IAEJ,GAAG;QAACJ;QAAWD;KAAM;IAErB,OAAOE;AACT"}
@@ -0,0 +1,17 @@
1
+ import type { OutreachComplianceSettingsDocument } from '../model/outreach.types';
2
+ import { type OutreachApi } from './use-outreach-api';
3
+ import type { OutreachLoadStatus } from './use-outreach-data';
4
+ export interface OutreachSettingsLoad {
5
+ status: OutreachLoadStatus;
6
+ settings: OutreachComplianceSettingsDocument | null;
7
+ /** The route's sentence for an error or a refusal. */
8
+ message: string | null;
9
+ /** Reads the settings again — after a save elsewhere, or to retry. */
10
+ reload(): void;
11
+ }
12
+ /**
13
+ * The organization's compliance settings, read through `outreach/settings`
14
+ * (AGL-2980): the Compliance page edits them, and the sequence editor's
15
+ * preview prints the footer from them.
16
+ */
17
+ export declare function useOutreachComplianceSettings(api: OutreachApi, orgId: string | null): OutreachSettingsLoad;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 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
+ */ 'use client';
17
+ import { _ as _extends } from "@swc/helpers/_/_extends";
18
+ import { useCallback, useEffect, useState } from "react";
19
+ import { OutreachRouteError } from "./use-outreach-api.js";
20
+ /**
21
+ * The organization's compliance settings, read through `outreach/settings`
22
+ * (AGL-2980): the Compliance page edits them, and the sequence editor's
23
+ * preview prints the footer from them.
24
+ */ export function useOutreachComplianceSettings(api, orgId) {
25
+ const [state, setState] = useState({
26
+ status: 'loading',
27
+ settings: null,
28
+ message: null
29
+ });
30
+ const [attempt, setAttempt] = useState(0);
31
+ useEffect(()=>{
32
+ if (!orgId) return undefined;
33
+ let current = true;
34
+ setState((previous)=>_extends({}, previous, {
35
+ status: previous.settings ? previous.status : 'loading'
36
+ }));
37
+ api.readSettings().then((answer)=>current && setState({
38
+ status: 'ready',
39
+ settings: answer.settings,
40
+ message: null
41
+ })).catch((error)=>{
42
+ if (!current) return;
43
+ const refused = error instanceof OutreachRouteError && error.refused;
44
+ setState({
45
+ status: refused ? 'refused' : 'error',
46
+ settings: null,
47
+ message: error.message
48
+ });
49
+ });
50
+ return ()=>{
51
+ current = false;
52
+ };
53
+ }, [
54
+ api,
55
+ orgId,
56
+ attempt
57
+ ]);
58
+ const reload = useCallback(()=>setAttempt((count)=>count + 1), []);
59
+ return _extends({}, state, {
60
+ reload
61
+ });
62
+ }
63
+
64
+ //# sourceMappingURL=use-outreach-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/outreach/src/lib/components/use-outreach-settings.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'use client'\n\nimport { useCallback, useEffect, useState } from 'react'\nimport type { OutreachComplianceSettingsDocument } from '../model/outreach.types'\nimport { OutreachRouteError, type OutreachApi } from './use-outreach-api'\nimport type { OutreachLoadStatus } from './use-outreach-data'\n\nexport interface OutreachSettingsLoad {\n status: OutreachLoadStatus\n settings: OutreachComplianceSettingsDocument | null\n /** The route's sentence for an error or a refusal. */\n message: string | null\n /** Reads the settings again — after a save elsewhere, or to retry. */\n reload(): void\n}\n\n/**\n * The organization's compliance settings, read through `outreach/settings`\n * (AGL-2980): the Compliance page edits them, and the sequence editor's\n * preview prints the footer from them.\n */\nexport function useOutreachComplianceSettings(\n api: OutreachApi,\n orgId: string | null,\n): OutreachSettingsLoad {\n const [state, setState] = useState<Omit<OutreachSettingsLoad, 'reload'>>({\n status: 'loading',\n settings: null,\n message: null,\n })\n const [attempt, setAttempt] = useState(0)\n useEffect(() => {\n if (!orgId) return undefined\n let current = true\n setState((previous) => ({\n ...previous,\n status: previous.settings ? previous.status : 'loading',\n }))\n api\n .readSettings()\n .then(\n (answer) =>\n current &&\n setState({\n status: 'ready',\n settings: answer.settings,\n message: null,\n }),\n )\n .catch((error: unknown) => {\n if (!current) return\n const refused = error instanceof OutreachRouteError && error.refused\n setState({\n status: refused ? 'refused' : 'error',\n settings: null,\n message: (error as Error).message,\n })\n })\n return () => {\n current = false\n }\n }, [api, orgId, attempt])\n const reload = useCallback(() => setAttempt((count) => count + 1), [])\n return { ...state, reload }\n}\n"],"names":["useCallback","useEffect","useState","OutreachRouteError","useOutreachComplianceSettings","api","orgId","state","setState","status","settings","message","attempt","setAttempt","undefined","current","previous","readSettings","then","answer","catch","error","refused","reload","count"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;AAEA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAExD,SAASC,kBAAkB,QAA0B,wBAAoB;AAYzE;;;;CAIC,GACD,OAAO,SAASC,8BACdC,GAAgB,EAChBC,KAAoB;IAEpB,MAAM,CAACC,OAAOC,SAAS,GAAGN,SAA+C;QACvEO,QAAQ;QACRC,UAAU;QACVC,SAAS;IACX;IACA,MAAM,CAACC,SAASC,WAAW,GAAGX,SAAS;IACvCD,UAAU;QACR,IAAI,CAACK,OAAO,OAAOQ;QACnB,IAAIC,UAAU;QACdP,SAAS,CAACQ,WAAc,aACnBA;gBACHP,QAAQO,SAASN,QAAQ,GAAGM,SAASP,MAAM,GAAG;;QAEhDJ,IACGY,YAAY,GACZC,IAAI,CACH,CAACC,SACCJ,WACAP,SAAS;gBACPC,QAAQ;gBACRC,UAAUS,OAAOT,QAAQ;gBACzBC,SAAS;YACX,IAEHS,KAAK,CAAC,CAACC;YACN,IAAI,CAACN,SAAS;YACd,MAAMO,UAAUD,iBAAiBlB,sBAAsBkB,MAAMC,OAAO;YACpEd,SAAS;gBACPC,QAAQa,UAAU,YAAY;gBAC9BZ,UAAU;gBACVC,SAAS,AAACU,MAAgBV,OAAO;YACnC;QACF;QACF,OAAO;YACLI,UAAU;QACZ;IACF,GAAG;QAACV;QAAKC;QAAOM;KAAQ;IACxB,MAAMW,SAASvB,YAAY,IAAMa,WAAW,CAACW,QAAUA,QAAQ,IAAI,EAAE;IACrE,OAAO,aAAKjB;QAAOgB;;AACrB"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 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
+ /**
18
+ * Outreach's console API routes, as the dispatcher keys them (AGL-2974).
19
+ *
20
+ * One table both halves import, because the server registers the path and the
21
+ * client fetches it, and a route spelled twice is a route that 404s the day
22
+ * one spelling changes. Every path sits under the `outreach` prefix that
23
+ * `plugins.config.json` gives this plugin, which is what lets the console's
24
+ * `/api/[...pluginApi]` dispatcher gate a request on the plugin being enabled
25
+ * and released before the handler runs. Client-safe: constants only.
26
+ */
27
+ export declare const OUTREACH_API_ROUTES: {
28
+ /** `GET` — proves the server bundle loaded and registered; see `server.ts`. */
29
+ readonly ping: "outreach/ping";
30
+ /** `GET ?orgId` — whether this deployment can connect a Google mailbox. */
31
+ readonly mailboxesAvailability: "outreach/mailboxes/availability";
32
+ /** `POST` — Google's consent address for a new connect. */
33
+ readonly mailboxesConnect: "outreach/mailboxes/connect";
34
+ /**
35
+ * `GET` — Google's redirect back. It carries no bearer token: the signed
36
+ * state names the org and the member, and the route hands the code to the
37
+ * Mailboxes page in a fragment rather than acting on it.
38
+ */
39
+ readonly mailboxesOAuthCallback: "outreach/mailboxes/oauth/callback";
40
+ /** `POST` — finishes a connect with the member's own session. */
41
+ readonly mailboxesConnectComplete: "outreach/mailboxes/connect/complete";
42
+ /** `POST` — send-as, display name, daily cap, sending window, timezone. */
43
+ readonly mailboxesSettings: "outreach/mailboxes/settings";
44
+ /** `POST` — pause or resume. */
45
+ readonly mailboxesStatus: "outreach/mailboxes/status";
46
+ /** `POST` — a plain-text test to the account's own address. */
47
+ readonly mailboxesTest: "outreach/mailboxes/test";
48
+ /** `POST` — revoke the grant at Google and delete the mailbox. */
49
+ readonly mailboxesDisconnect: "outreach/mailboxes/disconnect";
50
+ /** `GET ?orgId` — the compliance settings; `POST` — save them. */
51
+ readonly settings: "outreach/settings";
52
+ /** `POST` — create a sequence, or save an edit to one. */
53
+ readonly sequencesSave: "outreach/sequences/save";
54
+ /** `POST` — activate, pause or archive a sequence. */
55
+ readonly sequencesStatus: "outreach/sequences/status";
56
+ /** `POST` — delete a draft nobody was enrolled in. */
57
+ readonly sequencesDelete: "outreach/sequences/delete";
58
+ /** `POST` — who a saved view or a search would enroll, and where each stands. */
59
+ readonly enrollPreview: "outreach/enroll/preview";
60
+ /** `POST` — enroll them, every gate checked again. */
61
+ readonly enroll: "outreach/enroll";
62
+ /** `POST` — pause, resume, stop, or mark do-not-contact. */
63
+ readonly enrollmentsAction: "outreach/enrollments/action";
64
+ /** `POST` — one email of a saved sequence, for a contact or a sample person. */
65
+ readonly preview: "outreach/preview";
66
+ /** `GET` and the RFC 8058 one-click `POST` — `?t=<signed token>`. */
67
+ readonly unsubscribe: "outreach/unsubscribe";
68
+ };
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 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
+ * Outreach's console API routes, as the dispatcher keys them (AGL-2974).
18
+ *
19
+ * One table both halves import, because the server registers the path and the
20
+ * client fetches it, and a route spelled twice is a route that 404s the day
21
+ * one spelling changes. Every path sits under the `outreach` prefix that
22
+ * `plugins.config.json` gives this plugin, which is what lets the console's
23
+ * `/api/[...pluginApi]` dispatcher gate a request on the plugin being enabled
24
+ * and released before the handler runs. Client-safe: constants only.
25
+ */ export const OUTREACH_API_ROUTES = {
26
+ /** `GET` — proves the server bundle loaded and registered; see `server.ts`. */ ping: 'outreach/ping',
27
+ // Mailboxes (AGL-2978). Every one names its org (`orgId`, query or body)
28
+ // so the dispatcher's release gate asks about that organization.
29
+ /** `GET ?orgId` — whether this deployment can connect a Google mailbox. */ mailboxesAvailability: 'outreach/mailboxes/availability',
30
+ /** `POST` — Google's consent address for a new connect. */ mailboxesConnect: 'outreach/mailboxes/connect',
31
+ /**
32
+ * `GET` — Google's redirect back. It carries no bearer token: the signed
33
+ * state names the org and the member, and the route hands the code to the
34
+ * Mailboxes page in a fragment rather than acting on it.
35
+ */ mailboxesOAuthCallback: 'outreach/mailboxes/oauth/callback',
36
+ /** `POST` — finishes a connect with the member's own session. */ mailboxesConnectComplete: 'outreach/mailboxes/connect/complete',
37
+ /** `POST` — send-as, display name, daily cap, sending window, timezone. */ mailboxesSettings: 'outreach/mailboxes/settings',
38
+ /** `POST` — pause or resume. */ mailboxesStatus: 'outreach/mailboxes/status',
39
+ /** `POST` — a plain-text test to the account's own address. */ mailboxesTest: 'outreach/mailboxes/test',
40
+ /** `POST` — revoke the grant at Google and delete the mailbox. */ mailboxesDisconnect: 'outreach/mailboxes/disconnect',
41
+ // Settings, sequences and enrollments (AGL-2980). Every one names its org
42
+ // (`orgId`, query or body); the contract is `model/outreach-api.ts`.
43
+ /** `GET ?orgId` — the compliance settings; `POST` — save them. */ settings: 'outreach/settings',
44
+ /** `POST` — create a sequence, or save an edit to one. */ sequencesSave: 'outreach/sequences/save',
45
+ /** `POST` — activate, pause or archive a sequence. */ sequencesStatus: 'outreach/sequences/status',
46
+ /** `POST` — delete a draft nobody was enrolled in. */ sequencesDelete: 'outreach/sequences/delete',
47
+ /** `POST` — who a saved view or a search would enroll, and where each stands. */ enrollPreview: 'outreach/enroll/preview',
48
+ /** `POST` — enroll them, every gate checked again. */ enroll: 'outreach/enroll',
49
+ /** `POST` — pause, resume, stop, or mark do-not-contact. */ enrollmentsAction: 'outreach/enrollments/action',
50
+ /** `POST` — one email of a saved sequence, for a contact or a sample person. */ preview: 'outreach/preview',
51
+ // The one route a RECIPIENT reaches (AGL-2981): no session, a signed
52
+ // token instead, and registered as a recipient link so it answers whether
53
+ // or not Outreach is released for the organization now.
54
+ /** `GET` and the RFC 8058 one-click `POST` — `?t=<signed token>`. */ unsubscribe: 'outreach/unsubscribe'
55
+ };
56
+
57
+ //# sourceMappingURL=api-routes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/outreach/src/lib/constants/api-routes.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 * Outreach's console API routes, as the dispatcher keys them (AGL-2974).\n *\n * One table both halves import, because the server registers the path and the\n * client fetches it, and a route spelled twice is a route that 404s the day\n * one spelling changes. Every path sits under the `outreach` prefix that\n * `plugins.config.json` gives this plugin, which is what lets the console's\n * `/api/[...pluginApi]` dispatcher gate a request on the plugin being enabled\n * and released before the handler runs. Client-safe: constants only.\n */\nexport const OUTREACH_API_ROUTES = {\n /** `GET` — proves the server bundle loaded and registered; see `server.ts`. */\n ping: 'outreach/ping',\n // Mailboxes (AGL-2978). Every one names its org (`orgId`, query or body)\n // so the dispatcher's release gate asks about that organization.\n /** `GET ?orgId` — whether this deployment can connect a Google mailbox. */\n mailboxesAvailability: 'outreach/mailboxes/availability',\n /** `POST` — Google's consent address for a new connect. */\n mailboxesConnect: 'outreach/mailboxes/connect',\n /**\n * `GET` — Google's redirect back. It carries no bearer token: the signed\n * state names the org and the member, and the route hands the code to the\n * Mailboxes page in a fragment rather than acting on it.\n */\n mailboxesOAuthCallback: 'outreach/mailboxes/oauth/callback',\n /** `POST` — finishes a connect with the member's own session. */\n mailboxesConnectComplete: 'outreach/mailboxes/connect/complete',\n /** `POST` — send-as, display name, daily cap, sending window, timezone. */\n mailboxesSettings: 'outreach/mailboxes/settings',\n /** `POST` — pause or resume. */\n mailboxesStatus: 'outreach/mailboxes/status',\n /** `POST` — a plain-text test to the account's own address. */\n mailboxesTest: 'outreach/mailboxes/test',\n /** `POST` — revoke the grant at Google and delete the mailbox. */\n mailboxesDisconnect: 'outreach/mailboxes/disconnect',\n // Settings, sequences and enrollments (AGL-2980). Every one names its org\n // (`orgId`, query or body); the contract is `model/outreach-api.ts`.\n /** `GET ?orgId` — the compliance settings; `POST` — save them. */\n settings: 'outreach/settings',\n /** `POST` — create a sequence, or save an edit to one. */\n sequencesSave: 'outreach/sequences/save',\n /** `POST` — activate, pause or archive a sequence. */\n sequencesStatus: 'outreach/sequences/status',\n /** `POST` — delete a draft nobody was enrolled in. */\n sequencesDelete: 'outreach/sequences/delete',\n /** `POST` — who a saved view or a search would enroll, and where each stands. */\n enrollPreview: 'outreach/enroll/preview',\n /** `POST` — enroll them, every gate checked again. */\n enroll: 'outreach/enroll',\n /** `POST` — pause, resume, stop, or mark do-not-contact. */\n enrollmentsAction: 'outreach/enrollments/action',\n /** `POST` — one email of a saved sequence, for a contact or a sample person. */\n preview: 'outreach/preview',\n // The one route a RECIPIENT reaches (AGL-2981): no session, a signed\n // token instead, and registered as a recipient link so it answers whether\n // or not Outreach is released for the organization now.\n /** `GET` and the RFC 8058 one-click `POST` — `?t=<signed token>`. */\n unsubscribe: 'outreach/unsubscribe',\n} as const\n"],"names":["OUTREACH_API_ROUTES","ping","mailboxesAvailability","mailboxesConnect","mailboxesOAuthCallback","mailboxesConnectComplete","mailboxesSettings","mailboxesStatus","mailboxesTest","mailboxesDisconnect","settings","sequencesSave","sequencesStatus","sequencesDelete","enrollPreview","enroll","enrollmentsAction","preview","unsubscribe"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;CASC,GACD,OAAO,MAAMA,sBAAsB;IACjC,6EAA6E,GAC7EC,MAAM;IACN,yEAAyE;IACzE,iEAAiE;IACjE,yEAAyE,GACzEC,uBAAuB;IACvB,yDAAyD,GACzDC,kBAAkB;IAClB;;;;GAIC,GACDC,wBAAwB;IACxB,+DAA+D,GAC/DC,0BAA0B;IAC1B,yEAAyE,GACzEC,mBAAmB;IACnB,8BAA8B,GAC9BC,iBAAiB;IACjB,6DAA6D,GAC7DC,eAAe;IACf,gEAAgE,GAChEC,qBAAqB;IACrB,0EAA0E;IAC1E,qEAAqE;IACrE,gEAAgE,GAChEC,UAAU;IACV,wDAAwD,GACxDC,eAAe;IACf,oDAAoD,GACpDC,iBAAiB;IACjB,oDAAoD,GACpDC,iBAAiB;IACjB,+EAA+E,GAC/EC,eAAe;IACf,oDAAoD,GACpDC,QAAQ;IACR,0DAA0D,GAC1DC,mBAAmB;IACnB,8EAA8E,GAC9EC,SAAS;IACT,qEAAqE;IACrE,0EAA0E;IAC1E,wDAAwD;IACxD,mEAAmE,GACnEC,aAAa;AACf,EAAU"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 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
+ import type { PluginPermission } from '@aglyn/aglyn';
18
+ /**
19
+ * The persisted plugin id (AGL-2974): stored in `org.enabledPlugins`, named in
20
+ * `plugins.config.json` and `FIRST_PARTY_PLUGINS`, and the owner of every
21
+ * `outreach/*` API route. Renaming it is a data change.
22
+ */
23
+ export declare const OUTREACH_PLUGIN_ID = "outreach";
24
+ /**
25
+ * The permission that opens Sequences.
26
+ *
27
+ * Dotted like the catalog's keys but declared by this plugin, so the console
28
+ * answers it from the resolved permission map and a custom role or a
29
+ * per-member override stores it by this exact string. The Firestore rules
30
+ * read the same string off the member's stamped `resolvedPermissions`.
31
+ */
32
+ export declare const OUTREACH_USE_PERMISSION = "outreach.use";
33
+ /**
34
+ * This plugin's declared permissions (AGL-435 registry). Registered by both
35
+ * halves, so the console gate and a route's resolution agree.
36
+ *
37
+ * Owners and admins hold it by default — `owner` resolves onto the admin
38
+ * tier — and editors and viewers do not: a sequence sends mail as a person
39
+ * from their own mailbox, which is a decision for the people who run the
40
+ * workspace to hand out, one member or one custom role at a time.
41
+ *
42
+ * The KEY is `outreach.use` and the LABEL reads "Use Sequences" (AGL-3199):
43
+ * the key is stored on custom roles and stamped on members, and the label is
44
+ * the only half anyone reads.
45
+ */
46
+ export declare const OUTREACH_PERMISSIONS: readonly PluginPermission[];
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 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
+ * The persisted plugin id (AGL-2974): stored in `org.enabledPlugins`, named in
18
+ * `plugins.config.json` and `FIRST_PARTY_PLUGINS`, and the owner of every
19
+ * `outreach/*` API route. Renaming it is a data change.
20
+ */ export const OUTREACH_PLUGIN_ID = 'outreach';
21
+ /**
22
+ * The permission that opens Sequences.
23
+ *
24
+ * Dotted like the catalog's keys but declared by this plugin, so the console
25
+ * answers it from the resolved permission map and a custom role or a
26
+ * per-member override stores it by this exact string. The Firestore rules
27
+ * read the same string off the member's stamped `resolvedPermissions`.
28
+ */ export const OUTREACH_USE_PERMISSION = 'outreach.use';
29
+ /**
30
+ * This plugin's declared permissions (AGL-435 registry). Registered by both
31
+ * halves, so the console gate and a route's resolution agree.
32
+ *
33
+ * Owners and admins hold it by default — `owner` resolves onto the admin
34
+ * tier — and editors and viewers do not: a sequence sends mail as a person
35
+ * from their own mailbox, which is a decision for the people who run the
36
+ * workspace to hand out, one member or one custom role at a time.
37
+ *
38
+ * The KEY is `outreach.use` and the LABEL reads "Use Sequences" (AGL-3199):
39
+ * the key is stored on custom roles and stamped on members, and the label is
40
+ * the only half anyone reads.
41
+ */ export const OUTREACH_PERMISSIONS = [
42
+ {
43
+ key: OUTREACH_USE_PERMISSION,
44
+ pluginId: OUTREACH_PLUGIN_ID,
45
+ label: 'Use Sequences',
46
+ description: 'Open Sequences, and work its email sequences and connected mailboxes.',
47
+ defaults: {
48
+ admin: true,
49
+ editor: false,
50
+ viewer: false
51
+ }
52
+ }
53
+ ];
54
+
55
+ //# sourceMappingURL=bundle-common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/outreach/src/lib/constants/bundle-common.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\nimport type { PluginPermission } from '@aglyn/aglyn'\n\n/**\n * The persisted plugin id (AGL-2974): stored in `org.enabledPlugins`, named in\n * `plugins.config.json` and `FIRST_PARTY_PLUGINS`, and the owner of every\n * `outreach/*` API route. Renaming it is a data change.\n */\nexport const OUTREACH_PLUGIN_ID = 'outreach'\n\n/**\n * The permission that opens Sequences.\n *\n * Dotted like the catalog's keys but declared by this plugin, so the console\n * answers it from the resolved permission map and a custom role or a\n * per-member override stores it by this exact string. The Firestore rules\n * read the same string off the member's stamped `resolvedPermissions`.\n */\nexport const OUTREACH_USE_PERMISSION = 'outreach.use'\n\n/**\n * This plugin's declared permissions (AGL-435 registry). Registered by both\n * halves, so the console gate and a route's resolution agree.\n *\n * Owners and admins hold it by default — `owner` resolves onto the admin\n * tier — and editors and viewers do not: a sequence sends mail as a person\n * from their own mailbox, which is a decision for the people who run the\n * workspace to hand out, one member or one custom role at a time.\n *\n * The KEY is `outreach.use` and the LABEL reads \"Use Sequences\" (AGL-3199):\n * the key is stored on custom roles and stamped on members, and the label is\n * the only half anyone reads.\n */\nexport const OUTREACH_PERMISSIONS: readonly PluginPermission[] = [\n {\n key: OUTREACH_USE_PERMISSION,\n pluginId: OUTREACH_PLUGIN_ID,\n label: 'Use Sequences',\n description:\n 'Open Sequences, and work its email sequences and connected mailboxes.',\n defaults: { admin: true, editor: false, viewer: false },\n },\n]\n"],"names":["OUTREACH_PLUGIN_ID","OUTREACH_USE_PERMISSION","OUTREACH_PERMISSIONS","key","pluginId","label","description","defaults","admin","editor","viewer"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAID;;;;CAIC,GACD,OAAO,MAAMA,qBAAqB,WAAU;AAE5C;;;;;;;CAOC,GACD,OAAO,MAAMC,0BAA0B,eAAc;AAErD;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMC,uBAAoD;IAC/D;QACEC,KAAKF;QACLG,UAAUJ;QACVK,OAAO;QACPC,aACE;QACFC,UAAU;YAAEC,OAAO;YAAMC,QAAQ;YAAOC,QAAQ;QAAM;IACxD;CACD,CAAA"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 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
+ /**
18
+ * The sending runtime's jobs on the console's `plugin-console-crons` tick
19
+ * (AGL-2981): each id is the job's row on `/api/health/crons` and its
20
+ * `platformCronBeats` mark. Named here, apart from the jobs, so the boot
21
+ * declarations name them without loading them.
22
+ */
23
+ export declare const OUTREACH_SEND_JOB_ID = "outreach-send";
24
+ export declare const OUTREACH_SYNC_JOB_ID = "outreach-sync";
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 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
+ * The sending runtime's jobs on the console's `plugin-console-crons` tick
18
+ * (AGL-2981): each id is the job's row on `/api/health/crons` and its
19
+ * `platformCronBeats` mark. Named here, apart from the jobs, so the boot
20
+ * declarations name them without loading them.
21
+ */ export const OUTREACH_SEND_JOB_ID = 'outreach-send';
22
+ export const OUTREACH_SYNC_JOB_ID = 'outreach-sync';
23
+
24
+ //# sourceMappingURL=runtime-jobs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/outreach/src/lib/constants/runtime-jobs.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 * The sending runtime's jobs on the console's `plugin-console-crons` tick\n * (AGL-2981): each id is the job's row on `/api/health/crons` and its\n * `platformCronBeats` mark. Named here, apart from the jobs, so the boot\n * declarations name them without loading them.\n */\nexport const OUTREACH_SEND_JOB_ID = 'outreach-send'\nexport const OUTREACH_SYNC_JOB_ID = 'outreach-sync'\n"],"names":["OUTREACH_SEND_JOB_ID","OUTREACH_SYNC_JOB_ID"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;CAKC,GACD,OAAO,MAAMA,uBAAuB,gBAAe;AACnD,OAAO,MAAMC,uBAAuB,gBAAe"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 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
+ /**
18
+ * Outreach's CONSOLE-ONLY server declarations (AGL-2978), named under
19
+ * `consoleServerDeclarations` in `plugins.config.json` and run at the
20
+ * console's boot.
21
+ *
22
+ * The erasers are registered here rather than from `serverDeclarations`,
23
+ * which the tenant runtime also loads: the workspace eraser revokes each
24
+ * rep's Google grant, and the account eraser (AGL-3106) revokes and deletes
25
+ * the person's own, and both open a sealed token with `OUTREACH_TOKEN_KEY`,
26
+ * which only the console holds. The tenant may not so much as bundle the code
27
+ * that does (`outreach-credential-isolation.spec.ts`). Every erasure runs in
28
+ * the console, so this is where the erasers are needed.
29
+ *
30
+ * The sending runtime (AGL-2981) is declared here too, for the same reason:
31
+ * the send and sync jobs open each rep's sealed grant, so they run on the
32
+ * console's `plugin-console-crons` tick and nowhere else, and the person
33
+ * eraser removes the enrollments a workspace kept about someone it erases.
34
+ *
35
+ * Light at boot: every module that does the work is imported when a job, an
36
+ * erasure or a tick first asks for it, so the boot cost is the registration.
37
+ */
38
+ export declare function registerOutreachConsoleServerDeclarations(): void;