@rapidmx/crm-plugin 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (888) hide show
  1. package/LICENSE +382 -0
  2. package/README.md +210 -0
  3. package/apps/admin-crm/_layout.tsx +46 -0
  4. package/apps/admin-crm/index.tsx +16 -0
  5. package/apps/crm/_layout.tsx +46 -0
  6. package/apps/crm/automations/[uid].tsx +16 -0
  7. package/apps/crm/automations/index.tsx +16 -0
  8. package/apps/crm/campaigns/[uid].tsx +16 -0
  9. package/apps/crm/campaigns/index.tsx +16 -0
  10. package/apps/crm/companies/[uid].tsx +16 -0
  11. package/apps/crm/companies/index.tsx +16 -0
  12. package/apps/crm/contacts/[uid].tsx +16 -0
  13. package/apps/crm/deals/[uid].tsx +16 -0
  14. package/apps/crm/deals/index.tsx +16 -0
  15. package/apps/crm/forms/index.tsx +16 -0
  16. package/apps/crm/imports/index.tsx +16 -0
  17. package/apps/crm/index.tsx +16 -0
  18. package/apps/crm/integrations/index.tsx +16 -0
  19. package/apps/crm/lists/index.tsx +16 -0
  20. package/apps/crm/pipelines/index.tsx +16 -0
  21. package/apps/crm/reports/index.tsx +16 -0
  22. package/apps/crm/scoring/index.tsx +16 -0
  23. package/apps/crm/segments/index.tsx +16 -0
  24. package/apps/crm/settings/index.tsx +16 -0
  25. package/apps/crm/tasks/index.tsx +16 -0
  26. package/apps/crm/templates/[uid].tsx +16 -0
  27. package/apps/crm/templates/index.tsx +16 -0
  28. package/apps/f/[formUid].tsx +11 -0
  29. package/apps/f/_layout.tsx +33 -0
  30. package/apps/f/index.tsx +15 -0
  31. package/apps/shared/components/CrmShell.tsx +229 -0
  32. package/apps/shared/components/FilterBuilder.tsx +204 -0
  33. package/apps/shared/components/FormManager.tsx +326 -0
  34. package/apps/shared/components/ImportWizard.tsx +251 -0
  35. package/apps/shared/components/Integrations.tsx +401 -0
  36. package/apps/shared/components/ListManager.tsx +206 -0
  37. package/apps/shared/components/RecordDetail.tsx +444 -0
  38. package/apps/shared/components/RecordList.tsx +446 -0
  39. package/apps/shared/components/ScoringRules.tsx +262 -0
  40. package/apps/shared/components/SegmentManager.tsx +245 -0
  41. package/apps/shared/components/TaskList.tsx +140 -0
  42. package/apps/shared/components/TemplateList.tsx +170 -0
  43. package/apps/shared/components/WorkspaceSettings.tsx +503 -0
  44. package/apps/shared/components/admin/CrmAdmin.tsx +129 -0
  45. package/apps/shared/components/automations/AutomationEditor.tsx +530 -0
  46. package/apps/shared/components/automations/AutomationList.tsx +147 -0
  47. package/apps/shared/components/automations/StepInspector.tsx +403 -0
  48. package/apps/shared/components/automations/flowModel.ts +331 -0
  49. package/apps/shared/components/campaigns/CampaignEditor.tsx +471 -0
  50. package/apps/shared/components/campaigns/CampaignList.tsx +164 -0
  51. package/apps/shared/components/campaigns/CampaignPage.tsx +30 -0
  52. package/apps/shared/components/campaigns/CampaignReport.tsx +345 -0
  53. package/apps/shared/components/campaigns/campaignUi.tsx +33 -0
  54. package/apps/shared/components/deals/ContactDeals.tsx +40 -0
  55. package/apps/shared/components/deals/DealBoard.tsx +287 -0
  56. package/apps/shared/components/deals/DealDetail.tsx +363 -0
  57. package/apps/shared/components/deals/PipelineManager.tsx +207 -0
  58. package/apps/shared/components/deals/dealUi.ts +24 -0
  59. package/apps/shared/components/designer/BlockView.tsx +92 -0
  60. package/apps/shared/components/designer/Canvas.tsx +206 -0
  61. package/apps/shared/components/designer/Inspector.tsx +339 -0
  62. package/apps/shared/components/designer/LazyTextBlockEditor.tsx +68 -0
  63. package/apps/shared/components/designer/MergeTagPicker.tsx +31 -0
  64. package/apps/shared/components/designer/PreviewModal.tsx +119 -0
  65. package/apps/shared/components/designer/TemplateDesigner.tsx +408 -0
  66. package/apps/shared/components/designer/TestSendModal.tsx +75 -0
  67. package/apps/shared/components/designer/TextBlockEditor.tsx +122 -0
  68. package/apps/shared/components/designer/designModel.ts +276 -0
  69. package/apps/shared/components/public/PublicPages.tsx +343 -0
  70. package/apps/shared/components/public/honeypot.ts +7 -0
  71. package/apps/shared/components/reports/Charts.tsx +315 -0
  72. package/apps/shared/components/reports/Reports.tsx +198 -0
  73. package/apps/shared/crmApi.ts +1046 -0
  74. package/apps/shared/fields.ts +175 -0
  75. package/apps/shared/publicApi.ts +50 -0
  76. package/apps/subscriptions/[token].tsx +11 -0
  77. package/apps/subscriptions/_layout.tsx +33 -0
  78. package/apps/subscriptions/confirm/[token].tsx +11 -0
  79. package/apps/subscriptions/index.tsx +11 -0
  80. package/apps/subscriptions/unsubscribe/[token].tsx +11 -0
  81. package/dist/apps/admin-crm/_layout.d.ts +15 -0
  82. package/dist/apps/admin-crm/_layout.js +8 -0
  83. package/dist/apps/admin-crm/index.d.ts +4 -0
  84. package/dist/apps/admin-crm/index.js +7 -0
  85. package/dist/apps/crm/_layout.d.ts +15 -0
  86. package/dist/apps/crm/_layout.js +8 -0
  87. package/dist/apps/crm/automations/[uid].d.ts +8 -0
  88. package/dist/apps/crm/automations/[uid].js +7 -0
  89. package/dist/apps/crm/automations/index.d.ts +4 -0
  90. package/dist/apps/crm/automations/index.js +7 -0
  91. package/dist/apps/crm/campaigns/[uid].d.ts +8 -0
  92. package/dist/apps/crm/campaigns/[uid].js +7 -0
  93. package/dist/apps/crm/campaigns/index.d.ts +4 -0
  94. package/dist/apps/crm/campaigns/index.js +7 -0
  95. package/dist/apps/crm/companies/[uid].d.ts +8 -0
  96. package/dist/apps/crm/companies/[uid].js +7 -0
  97. package/dist/apps/crm/companies/index.d.ts +4 -0
  98. package/dist/apps/crm/companies/index.js +7 -0
  99. package/dist/apps/crm/contacts/[uid].d.ts +8 -0
  100. package/dist/apps/crm/contacts/[uid].js +7 -0
  101. package/dist/apps/crm/deals/[uid].d.ts +8 -0
  102. package/dist/apps/crm/deals/[uid].js +7 -0
  103. package/dist/apps/crm/deals/index.d.ts +4 -0
  104. package/dist/apps/crm/deals/index.js +7 -0
  105. package/dist/apps/crm/forms/index.d.ts +4 -0
  106. package/dist/apps/crm/forms/index.js +7 -0
  107. package/dist/apps/crm/imports/index.d.ts +4 -0
  108. package/dist/apps/crm/imports/index.js +7 -0
  109. package/dist/apps/crm/index.d.ts +4 -0
  110. package/dist/apps/crm/index.js +7 -0
  111. package/dist/apps/crm/integrations/index.d.ts +4 -0
  112. package/dist/apps/crm/integrations/index.js +7 -0
  113. package/dist/apps/crm/lists/index.d.ts +4 -0
  114. package/dist/apps/crm/lists/index.js +7 -0
  115. package/dist/apps/crm/pipelines/index.d.ts +4 -0
  116. package/dist/apps/crm/pipelines/index.js +7 -0
  117. package/dist/apps/crm/reports/index.d.ts +4 -0
  118. package/dist/apps/crm/reports/index.js +7 -0
  119. package/dist/apps/crm/scoring/index.d.ts +4 -0
  120. package/dist/apps/crm/scoring/index.js +7 -0
  121. package/dist/apps/crm/segments/index.d.ts +4 -0
  122. package/dist/apps/crm/segments/index.js +7 -0
  123. package/dist/apps/crm/settings/index.d.ts +4 -0
  124. package/dist/apps/crm/settings/index.js +7 -0
  125. package/dist/apps/crm/tasks/index.d.ts +4 -0
  126. package/dist/apps/crm/tasks/index.js +7 -0
  127. package/dist/apps/crm/templates/[uid].d.ts +8 -0
  128. package/dist/apps/crm/templates/[uid].js +7 -0
  129. package/dist/apps/crm/templates/index.d.ts +4 -0
  130. package/dist/apps/crm/templates/index.js +7 -0
  131. package/dist/apps/f/[formUid].d.ts +7 -0
  132. package/dist/apps/f/[formUid].js +6 -0
  133. package/dist/apps/f/_layout.d.ts +8 -0
  134. package/dist/apps/f/_layout.js +8 -0
  135. package/dist/apps/f/index.d.ts +3 -0
  136. package/dist/apps/f/index.js +6 -0
  137. package/dist/apps/shared/components/CrmShell.d.ts +39 -0
  138. package/dist/apps/shared/components/CrmShell.js +127 -0
  139. package/dist/apps/shared/components/FilterBuilder.d.ts +34 -0
  140. package/dist/apps/shared/components/FilterBuilder.js +101 -0
  141. package/dist/apps/shared/components/FormManager.d.ts +7 -0
  142. package/dist/apps/shared/components/FormManager.js +132 -0
  143. package/dist/apps/shared/components/ImportWizard.d.ts +8 -0
  144. package/dist/apps/shared/components/ImportWizard.js +105 -0
  145. package/dist/apps/shared/components/Integrations.d.ts +13 -0
  146. package/dist/apps/shared/components/Integrations.js +164 -0
  147. package/dist/apps/shared/components/ListManager.d.ts +6 -0
  148. package/dist/apps/shared/components/ListManager.js +95 -0
  149. package/dist/apps/shared/components/RecordDetail.d.ts +30 -0
  150. package/dist/apps/shared/components/RecordDetail.js +244 -0
  151. package/dist/apps/shared/components/RecordList.d.ts +13 -0
  152. package/dist/apps/shared/components/RecordList.js +214 -0
  153. package/dist/apps/shared/components/ScoringRules.d.ts +13 -0
  154. package/dist/apps/shared/components/ScoringRules.js +128 -0
  155. package/dist/apps/shared/components/SegmentManager.d.ts +10 -0
  156. package/dist/apps/shared/components/SegmentManager.js +119 -0
  157. package/dist/apps/shared/components/TaskList.d.ts +3 -0
  158. package/dist/apps/shared/components/TaskList.js +62 -0
  159. package/dist/apps/shared/components/TemplateList.d.ts +3 -0
  160. package/dist/apps/shared/components/TemplateList.js +81 -0
  161. package/dist/apps/shared/components/WorkspaceSettings.d.ts +6 -0
  162. package/dist/apps/shared/components/WorkspaceSettings.js +239 -0
  163. package/dist/apps/shared/components/admin/CrmAdmin.d.ts +9 -0
  164. package/dist/apps/shared/components/admin/CrmAdmin.js +56 -0
  165. package/dist/apps/shared/components/automations/AutomationEditor.d.ts +15 -0
  166. package/dist/apps/shared/components/automations/AutomationEditor.js +219 -0
  167. package/dist/apps/shared/components/automations/AutomationList.d.ts +3 -0
  168. package/dist/apps/shared/components/automations/AutomationList.js +65 -0
  169. package/dist/apps/shared/components/automations/StepInspector.d.ts +40 -0
  170. package/dist/apps/shared/components/automations/StepInspector.js +177 -0
  171. package/dist/apps/shared/components/automations/flowModel.d.ts +67 -0
  172. package/dist/apps/shared/components/automations/flowModel.js +292 -0
  173. package/dist/apps/shared/components/campaigns/CampaignEditor.d.ts +11 -0
  174. package/dist/apps/shared/components/campaigns/CampaignEditor.js +163 -0
  175. package/dist/apps/shared/components/campaigns/CampaignList.d.ts +3 -0
  176. package/dist/apps/shared/components/campaigns/CampaignList.js +80 -0
  177. package/dist/apps/shared/components/campaigns/CampaignPage.d.ts +5 -0
  178. package/dist/apps/shared/components/campaigns/CampaignPage.js +24 -0
  179. package/dist/apps/shared/components/campaigns/CampaignReport.d.ts +13 -0
  180. package/dist/apps/shared/components/campaigns/CampaignReport.js +119 -0
  181. package/dist/apps/shared/components/campaigns/campaignUi.d.ts +10 -0
  182. package/dist/apps/shared/components/campaigns/campaignUi.js +24 -0
  183. package/dist/apps/shared/components/deals/ContactDeals.d.ts +5 -0
  184. package/dist/apps/shared/components/deals/ContactDeals.js +18 -0
  185. package/dist/apps/shared/components/deals/DealBoard.d.ts +7 -0
  186. package/dist/apps/shared/components/deals/DealBoard.js +134 -0
  187. package/dist/apps/shared/components/deals/DealDetail.d.ts +8 -0
  188. package/dist/apps/shared/components/deals/DealDetail.js +148 -0
  189. package/dist/apps/shared/components/deals/PipelineManager.d.ts +7 -0
  190. package/dist/apps/shared/components/deals/PipelineManager.js +62 -0
  191. package/dist/apps/shared/components/deals/dealUi.d.ts +7 -0
  192. package/dist/apps/shared/components/deals/dealUi.js +17 -0
  193. package/dist/apps/shared/components/designer/BlockView.d.ts +10 -0
  194. package/dist/apps/shared/components/designer/BlockView.js +37 -0
  195. package/dist/apps/shared/components/designer/Canvas.d.ts +31 -0
  196. package/dist/apps/shared/components/designer/Canvas.js +71 -0
  197. package/dist/apps/shared/components/designer/Inspector.d.ts +27 -0
  198. package/dist/apps/shared/components/designer/Inspector.js +102 -0
  199. package/dist/apps/shared/components/designer/LazyTextBlockEditor.d.ts +7 -0
  200. package/dist/apps/shared/components/designer/LazyTextBlockEditor.js +42 -0
  201. package/dist/apps/shared/components/designer/MergeTagPicker.d.ts +11 -0
  202. package/dist/apps/shared/components/designer/MergeTagPicker.js +15 -0
  203. package/dist/apps/shared/components/designer/PreviewModal.d.ts +15 -0
  204. package/dist/apps/shared/components/designer/PreviewModal.js +50 -0
  205. package/dist/apps/shared/components/designer/TemplateDesigner.d.ts +10 -0
  206. package/dist/apps/shared/components/designer/TemplateDesigner.js +194 -0
  207. package/dist/apps/shared/components/designer/TestSendModal.d.ts +11 -0
  208. package/dist/apps/shared/components/designer/TestSendModal.js +35 -0
  209. package/dist/apps/shared/components/designer/TextBlockEditor.d.ts +16 -0
  210. package/dist/apps/shared/components/designer/TextBlockEditor.js +81 -0
  211. package/dist/apps/shared/components/designer/designModel.d.ts +86 -0
  212. package/dist/apps/shared/components/designer/designModel.js +230 -0
  213. package/dist/apps/shared/components/public/PublicPages.d.ts +29 -0
  214. package/dist/apps/shared/components/public/PublicPages.js +155 -0
  215. package/dist/apps/shared/components/public/honeypot.d.ts +2 -0
  216. package/dist/apps/shared/components/public/honeypot.js +6 -0
  217. package/dist/apps/shared/components/reports/Charts.d.ts +32 -0
  218. package/dist/apps/shared/components/reports/Charts.js +121 -0
  219. package/dist/apps/shared/components/reports/Reports.d.ts +9 -0
  220. package/dist/apps/shared/components/reports/Reports.js +61 -0
  221. package/dist/apps/shared/crmApi.d.ts +909 -0
  222. package/dist/apps/shared/crmApi.js +240 -0
  223. package/dist/apps/shared/fields.d.ts +45 -0
  224. package/dist/apps/shared/fields.js +146 -0
  225. package/dist/apps/shared/publicApi.d.ts +48 -0
  226. package/dist/apps/shared/publicApi.js +17 -0
  227. package/dist/apps/subscriptions/[token].d.ts +7 -0
  228. package/dist/apps/subscriptions/[token].js +6 -0
  229. package/dist/apps/subscriptions/_layout.d.ts +8 -0
  230. package/dist/apps/subscriptions/_layout.js +8 -0
  231. package/dist/apps/subscriptions/confirm/[token].d.ts +7 -0
  232. package/dist/apps/subscriptions/confirm/[token].js +6 -0
  233. package/dist/apps/subscriptions/index.d.ts +3 -0
  234. package/dist/apps/subscriptions/index.js +6 -0
  235. package/dist/apps/subscriptions/unsubscribe/[token].d.ts +7 -0
  236. package/dist/apps/subscriptions/unsubscribe/[token].js +6 -0
  237. package/dist/lib/automation/Dates.js +85 -0
  238. package/dist/lib/automation/Dates.js.map +1 -0
  239. package/dist/lib/automation/Engine.js +384 -0
  240. package/dist/lib/automation/Engine.js.map +1 -0
  241. package/dist/lib/automation/Events.js +46 -0
  242. package/dist/lib/automation/Events.js.map +1 -0
  243. package/dist/lib/automation/Graph.js +296 -0
  244. package/dist/lib/automation/Graph.js.map +1 -0
  245. package/dist/lib/filters/Filter.js +343 -0
  246. package/dist/lib/filters/Filter.js.map +1 -0
  247. package/dist/lib/filters/fields.js +71 -0
  248. package/dist/lib/filters/fields.js.map +1 -0
  249. package/dist/lib/index.js +86 -0
  250. package/dist/lib/index.js.map +1 -0
  251. package/dist/lib/jobs/AutomationRunJob.js +110 -0
  252. package/dist/lib/jobs/AutomationRunJob.js.map +1 -0
  253. package/dist/lib/jobs/AutomationTriggerJob.js +126 -0
  254. package/dist/lib/jobs/AutomationTriggerJob.js.map +1 -0
  255. package/dist/lib/jobs/CampaignJob.js +285 -0
  256. package/dist/lib/jobs/CampaignJob.js.map +1 -0
  257. package/dist/lib/jobs/CrmImportJob.js +218 -0
  258. package/dist/lib/jobs/CrmImportJob.js.map +1 -0
  259. package/dist/lib/jobs/CrmJobBase.js +75 -0
  260. package/dist/lib/jobs/CrmJobBase.js.map +1 -0
  261. package/dist/lib/jobs/CrmMailEventJob.js +232 -0
  262. package/dist/lib/jobs/CrmMailEventJob.js.map +1 -0
  263. package/dist/lib/jobs/DateTriggerJob.js +155 -0
  264. package/dist/lib/jobs/DateTriggerJob.js.map +1 -0
  265. package/dist/lib/jobs/ScoringJob.js +75 -0
  266. package/dist/lib/jobs/ScoringJob.js.map +1 -0
  267. package/dist/lib/jobs/SegmentRefreshJob.js +84 -0
  268. package/dist/lib/jobs/SegmentRefreshJob.js.map +1 -0
  269. package/dist/lib/jobs/SendDispatchJob.js +277 -0
  270. package/dist/lib/jobs/SendDispatchJob.js.map +1 -0
  271. package/dist/lib/jobs/TaskReminderJob.js +70 -0
  272. package/dist/lib/jobs/TaskReminderJob.js.map +1 -0
  273. package/dist/lib/jobs/WebhookDeliveryJob.js +126 -0
  274. package/dist/lib/jobs/WebhookDeliveryJob.js.map +1 -0
  275. package/dist/lib/jobs/mongo/AutomationRunJobMongo.js +12 -0
  276. package/dist/lib/jobs/mongo/AutomationRunJobMongo.js.map +1 -0
  277. package/dist/lib/jobs/mongo/AutomationTriggerJobMongo.js +10 -0
  278. package/dist/lib/jobs/mongo/AutomationTriggerJobMongo.js.map +1 -0
  279. package/dist/lib/jobs/mongo/CampaignJobMongo.js +10 -0
  280. package/dist/lib/jobs/mongo/CampaignJobMongo.js.map +1 -0
  281. package/dist/lib/jobs/mongo/CrmImportJobMongo.js +14 -0
  282. package/dist/lib/jobs/mongo/CrmImportJobMongo.js.map +1 -0
  283. package/dist/lib/jobs/mongo/CrmMailEventJobMongo.js +10 -0
  284. package/dist/lib/jobs/mongo/CrmMailEventJobMongo.js.map +1 -0
  285. package/dist/lib/jobs/mongo/DateTriggerJobMongo.js +10 -0
  286. package/dist/lib/jobs/mongo/DateTriggerJobMongo.js.map +1 -0
  287. package/dist/lib/jobs/mongo/ScoringJobMongo.js +10 -0
  288. package/dist/lib/jobs/mongo/ScoringJobMongo.js.map +1 -0
  289. package/dist/lib/jobs/mongo/SegmentRefreshJobMongo.js +10 -0
  290. package/dist/lib/jobs/mongo/SegmentRefreshJobMongo.js.map +1 -0
  291. package/dist/lib/jobs/mongo/SendDispatchJobMongo.js +10 -0
  292. package/dist/lib/jobs/mongo/SendDispatchJobMongo.js.map +1 -0
  293. package/dist/lib/jobs/mongo/TaskReminderJobMongo.js +10 -0
  294. package/dist/lib/jobs/mongo/TaskReminderJobMongo.js.map +1 -0
  295. package/dist/lib/jobs/mongo/WebhookDeliveryJobMongo.js +10 -0
  296. package/dist/lib/jobs/mongo/WebhookDeliveryJobMongo.js.map +1 -0
  297. package/dist/lib/jobs/sql/AutomationRunJobSQL.js +12 -0
  298. package/dist/lib/jobs/sql/AutomationRunJobSQL.js.map +1 -0
  299. package/dist/lib/jobs/sql/AutomationTriggerJobSQL.js +10 -0
  300. package/dist/lib/jobs/sql/AutomationTriggerJobSQL.js.map +1 -0
  301. package/dist/lib/jobs/sql/CampaignJobSQL.js +10 -0
  302. package/dist/lib/jobs/sql/CampaignJobSQL.js.map +1 -0
  303. package/dist/lib/jobs/sql/CrmImportJobSQL.js +14 -0
  304. package/dist/lib/jobs/sql/CrmImportJobSQL.js.map +1 -0
  305. package/dist/lib/jobs/sql/CrmMailEventJobSQL.js +10 -0
  306. package/dist/lib/jobs/sql/CrmMailEventJobSQL.js.map +1 -0
  307. package/dist/lib/jobs/sql/DateTriggerJobSQL.js +10 -0
  308. package/dist/lib/jobs/sql/DateTriggerJobSQL.js.map +1 -0
  309. package/dist/lib/jobs/sql/ScoringJobSQL.js +10 -0
  310. package/dist/lib/jobs/sql/ScoringJobSQL.js.map +1 -0
  311. package/dist/lib/jobs/sql/SegmentRefreshJobSQL.js +10 -0
  312. package/dist/lib/jobs/sql/SegmentRefreshJobSQL.js.map +1 -0
  313. package/dist/lib/jobs/sql/SendDispatchJobSQL.js +10 -0
  314. package/dist/lib/jobs/sql/SendDispatchJobSQL.js.map +1 -0
  315. package/dist/lib/jobs/sql/TaskReminderJobSQL.js +10 -0
  316. package/dist/lib/jobs/sql/TaskReminderJobSQL.js.map +1 -0
  317. package/dist/lib/jobs/sql/WebhookDeliveryJobSQL.js +10 -0
  318. package/dist/lib/jobs/sql/WebhookDeliveryJobSQL.js.map +1 -0
  319. package/dist/lib/models/CrmModelClasses.js +44 -0
  320. package/dist/lib/models/CrmModelClasses.js.map +1 -0
  321. package/dist/lib/models/mongo/ApiKeyMongo.js +105 -0
  322. package/dist/lib/models/mongo/ApiKeyMongo.js.map +1 -0
  323. package/dist/lib/models/mongo/AutomationMongo.js +126 -0
  324. package/dist/lib/models/mongo/AutomationMongo.js.map +1 -0
  325. package/dist/lib/models/mongo/AutomationVersionMongo.js +82 -0
  326. package/dist/lib/models/mongo/AutomationVersionMongo.js.map +1 -0
  327. package/dist/lib/models/mongo/CampaignMongo.js +211 -0
  328. package/dist/lib/models/mongo/CampaignMongo.js.map +1 -0
  329. package/dist/lib/models/mongo/CrmCompanyMongo.js +126 -0
  330. package/dist/lib/models/mongo/CrmCompanyMongo.js.map +1 -0
  331. package/dist/lib/models/mongo/CrmContactMongo.js +156 -0
  332. package/dist/lib/models/mongo/CrmContactMongo.js.map +1 -0
  333. package/dist/lib/models/mongo/CrmEventMongo.js +92 -0
  334. package/dist/lib/models/mongo/CrmEventMongo.js.map +1 -0
  335. package/dist/lib/models/mongo/CrmFormMongo.js +139 -0
  336. package/dist/lib/models/mongo/CrmFormMongo.js.map +1 -0
  337. package/dist/lib/models/mongo/CrmImportMongo.js +190 -0
  338. package/dist/lib/models/mongo/CrmImportMongo.js.map +1 -0
  339. package/dist/lib/models/mongo/CrmNoteMongo.js +89 -0
  340. package/dist/lib/models/mongo/CrmNoteMongo.js.map +1 -0
  341. package/dist/lib/models/mongo/CrmSettingMongo.js +60 -0
  342. package/dist/lib/models/mongo/CrmSettingMongo.js.map +1 -0
  343. package/dist/lib/models/mongo/CrmTaskMongo.js +136 -0
  344. package/dist/lib/models/mongo/CrmTaskMongo.js.map +1 -0
  345. package/dist/lib/models/mongo/DealMongo.js +163 -0
  346. package/dist/lib/models/mongo/DealMongo.js.map +1 -0
  347. package/dist/lib/models/mongo/EmailTemplateMongo.js +90 -0
  348. package/dist/lib/models/mongo/EmailTemplateMongo.js.map +1 -0
  349. package/dist/lib/models/mongo/EngagementEventMongo.js +113 -0
  350. package/dist/lib/models/mongo/EngagementEventMongo.js.map +1 -0
  351. package/dist/lib/models/mongo/EnrollmentMongo.js +150 -0
  352. package/dist/lib/models/mongo/EnrollmentMongo.js.map +1 -0
  353. package/dist/lib/models/mongo/MailingListMongo.js +104 -0
  354. package/dist/lib/models/mongo/MailingListMongo.js.map +1 -0
  355. package/dist/lib/models/mongo/OutboundSendMongo.js +265 -0
  356. package/dist/lib/models/mongo/OutboundSendMongo.js.map +1 -0
  357. package/dist/lib/models/mongo/PipelineMongo.js +74 -0
  358. package/dist/lib/models/mongo/PipelineMongo.js.map +1 -0
  359. package/dist/lib/models/mongo/PropertyDefinitionMongo.js +105 -0
  360. package/dist/lib/models/mongo/PropertyDefinitionMongo.js.map +1 -0
  361. package/dist/lib/models/mongo/PropertyValueMongo.js +101 -0
  362. package/dist/lib/models/mongo/PropertyValueMongo.js.map +1 -0
  363. package/dist/lib/models/mongo/SavedBlockMongo.js +67 -0
  364. package/dist/lib/models/mongo/SavedBlockMongo.js.map +1 -0
  365. package/dist/lib/models/mongo/ScoringRuleMongo.js +112 -0
  366. package/dist/lib/models/mongo/ScoringRuleMongo.js.map +1 -0
  367. package/dist/lib/models/mongo/SegmentMongo.js +113 -0
  368. package/dist/lib/models/mongo/SegmentMongo.js.map +1 -0
  369. package/dist/lib/models/mongo/SubscriptionMongo.js +114 -0
  370. package/dist/lib/models/mongo/SubscriptionMongo.js.map +1 -0
  371. package/dist/lib/models/mongo/SuppressionMongo.js +77 -0
  372. package/dist/lib/models/mongo/SuppressionMongo.js.map +1 -0
  373. package/dist/lib/models/mongo/TimelineEventMongo.js +112 -0
  374. package/dist/lib/models/mongo/TimelineEventMongo.js.map +1 -0
  375. package/dist/lib/models/mongo/WebhookDeliveryMongo.js +128 -0
  376. package/dist/lib/models/mongo/WebhookDeliveryMongo.js.map +1 -0
  377. package/dist/lib/models/mongo/WebhookEndpointMongo.js +118 -0
  378. package/dist/lib/models/mongo/WebhookEndpointMongo.js.map +1 -0
  379. package/dist/lib/models/mongo/WorkspaceMemberMongo.js +92 -0
  380. package/dist/lib/models/mongo/WorkspaceMemberMongo.js.map +1 -0
  381. package/dist/lib/models/mongo/WorkspaceMongo.js +117 -0
  382. package/dist/lib/models/mongo/WorkspaceMongo.js.map +1 -0
  383. package/dist/lib/models/mongo/WorkspaceSenderMongo.js +100 -0
  384. package/dist/lib/models/mongo/WorkspaceSenderMongo.js.map +1 -0
  385. package/dist/lib/models/mongo/index.js +74 -0
  386. package/dist/lib/models/mongo/index.js.map +1 -0
  387. package/dist/lib/models/sql/ApiKeySQL.js +105 -0
  388. package/dist/lib/models/sql/ApiKeySQL.js.map +1 -0
  389. package/dist/lib/models/sql/AutomationSQL.js +126 -0
  390. package/dist/lib/models/sql/AutomationSQL.js.map +1 -0
  391. package/dist/lib/models/sql/AutomationVersionSQL.js +82 -0
  392. package/dist/lib/models/sql/AutomationVersionSQL.js.map +1 -0
  393. package/dist/lib/models/sql/CampaignSQL.js +211 -0
  394. package/dist/lib/models/sql/CampaignSQL.js.map +1 -0
  395. package/dist/lib/models/sql/CrmCompanySQL.js +126 -0
  396. package/dist/lib/models/sql/CrmCompanySQL.js.map +1 -0
  397. package/dist/lib/models/sql/CrmContactSQL.js +156 -0
  398. package/dist/lib/models/sql/CrmContactSQL.js.map +1 -0
  399. package/dist/lib/models/sql/CrmEventSQL.js +92 -0
  400. package/dist/lib/models/sql/CrmEventSQL.js.map +1 -0
  401. package/dist/lib/models/sql/CrmFormSQL.js +139 -0
  402. package/dist/lib/models/sql/CrmFormSQL.js.map +1 -0
  403. package/dist/lib/models/sql/CrmImportSQL.js +190 -0
  404. package/dist/lib/models/sql/CrmImportSQL.js.map +1 -0
  405. package/dist/lib/models/sql/CrmNoteSQL.js +89 -0
  406. package/dist/lib/models/sql/CrmNoteSQL.js.map +1 -0
  407. package/dist/lib/models/sql/CrmSettingSQL.js +60 -0
  408. package/dist/lib/models/sql/CrmSettingSQL.js.map +1 -0
  409. package/dist/lib/models/sql/CrmTaskSQL.js +136 -0
  410. package/dist/lib/models/sql/CrmTaskSQL.js.map +1 -0
  411. package/dist/lib/models/sql/DealSQL.js +163 -0
  412. package/dist/lib/models/sql/DealSQL.js.map +1 -0
  413. package/dist/lib/models/sql/EmailTemplateSQL.js +90 -0
  414. package/dist/lib/models/sql/EmailTemplateSQL.js.map +1 -0
  415. package/dist/lib/models/sql/EngagementEventSQL.js +113 -0
  416. package/dist/lib/models/sql/EngagementEventSQL.js.map +1 -0
  417. package/dist/lib/models/sql/EnrollmentSQL.js +150 -0
  418. package/dist/lib/models/sql/EnrollmentSQL.js.map +1 -0
  419. package/dist/lib/models/sql/MailingListSQL.js +104 -0
  420. package/dist/lib/models/sql/MailingListSQL.js.map +1 -0
  421. package/dist/lib/models/sql/OutboundSendSQL.js +265 -0
  422. package/dist/lib/models/sql/OutboundSendSQL.js.map +1 -0
  423. package/dist/lib/models/sql/PipelineSQL.js +74 -0
  424. package/dist/lib/models/sql/PipelineSQL.js.map +1 -0
  425. package/dist/lib/models/sql/PropertyDefinitionSQL.js +105 -0
  426. package/dist/lib/models/sql/PropertyDefinitionSQL.js.map +1 -0
  427. package/dist/lib/models/sql/PropertyValueSQL.js +101 -0
  428. package/dist/lib/models/sql/PropertyValueSQL.js.map +1 -0
  429. package/dist/lib/models/sql/SavedBlockSQL.js +67 -0
  430. package/dist/lib/models/sql/SavedBlockSQL.js.map +1 -0
  431. package/dist/lib/models/sql/ScoringRuleSQL.js +112 -0
  432. package/dist/lib/models/sql/ScoringRuleSQL.js.map +1 -0
  433. package/dist/lib/models/sql/SegmentSQL.js +113 -0
  434. package/dist/lib/models/sql/SegmentSQL.js.map +1 -0
  435. package/dist/lib/models/sql/SubscriptionSQL.js +114 -0
  436. package/dist/lib/models/sql/SubscriptionSQL.js.map +1 -0
  437. package/dist/lib/models/sql/SuppressionSQL.js +77 -0
  438. package/dist/lib/models/sql/SuppressionSQL.js.map +1 -0
  439. package/dist/lib/models/sql/TimelineEventSQL.js +112 -0
  440. package/dist/lib/models/sql/TimelineEventSQL.js.map +1 -0
  441. package/dist/lib/models/sql/WebhookDeliverySQL.js +128 -0
  442. package/dist/lib/models/sql/WebhookDeliverySQL.js.map +1 -0
  443. package/dist/lib/models/sql/WebhookEndpointSQL.js +118 -0
  444. package/dist/lib/models/sql/WebhookEndpointSQL.js.map +1 -0
  445. package/dist/lib/models/sql/WorkspaceMemberSQL.js +92 -0
  446. package/dist/lib/models/sql/WorkspaceMemberSQL.js.map +1 -0
  447. package/dist/lib/models/sql/WorkspaceSQL.js +117 -0
  448. package/dist/lib/models/sql/WorkspaceSQL.js.map +1 -0
  449. package/dist/lib/models/sql/WorkspaceSenderSQL.js +100 -0
  450. package/dist/lib/models/sql/WorkspaceSenderSQL.js.map +1 -0
  451. package/dist/lib/models/sql/index.js +74 -0
  452. package/dist/lib/models/sql/index.js.map +1 -0
  453. package/dist/lib/models/types.js +275 -0
  454. package/dist/lib/models/types.js.map +1 -0
  455. package/dist/lib/mongo.js +80 -0
  456. package/dist/lib/mongo.js.map +1 -0
  457. package/dist/lib/purge.js +68 -0
  458. package/dist/lib/purge.js.map +1 -0
  459. package/dist/lib/routes/BaseAnalyticsRoute.js +217 -0
  460. package/dist/lib/routes/BaseAnalyticsRoute.js.map +1 -0
  461. package/dist/lib/routes/BaseApiKeyRoute.js +76 -0
  462. package/dist/lib/routes/BaseApiKeyRoute.js.map +1 -0
  463. package/dist/lib/routes/BaseAutomationRoute.js +316 -0
  464. package/dist/lib/routes/BaseAutomationRoute.js.map +1 -0
  465. package/dist/lib/routes/BaseCampaignRoute.js +443 -0
  466. package/dist/lib/routes/BaseCampaignRoute.js.map +1 -0
  467. package/dist/lib/routes/BaseCompanyRoute.js +106 -0
  468. package/dist/lib/routes/BaseCompanyRoute.js.map +1 -0
  469. package/dist/lib/routes/BaseContactRoute.js +162 -0
  470. package/dist/lib/routes/BaseContactRoute.js.map +1 -0
  471. package/dist/lib/routes/BaseCrmAdminRoute.js +108 -0
  472. package/dist/lib/routes/BaseCrmAdminRoute.js.map +1 -0
  473. package/dist/lib/routes/BaseDealRoute.js +312 -0
  474. package/dist/lib/routes/BaseDealRoute.js.map +1 -0
  475. package/dist/lib/routes/BaseFormRoute.js +124 -0
  476. package/dist/lib/routes/BaseFormRoute.js.map +1 -0
  477. package/dist/lib/routes/BaseImportRoute.js +231 -0
  478. package/dist/lib/routes/BaseImportRoute.js.map +1 -0
  479. package/dist/lib/routes/BaseIntegrationRoute.js +181 -0
  480. package/dist/lib/routes/BaseIntegrationRoute.js.map +1 -0
  481. package/dist/lib/routes/BaseListRoute.js +89 -0
  482. package/dist/lib/routes/BaseListRoute.js.map +1 -0
  483. package/dist/lib/routes/BaseNoteRoute.js +69 -0
  484. package/dist/lib/routes/BaseNoteRoute.js.map +1 -0
  485. package/dist/lib/routes/BasePipelineRoute.js +149 -0
  486. package/dist/lib/routes/BasePipelineRoute.js.map +1 -0
  487. package/dist/lib/routes/BasePropertyDefinitionRoute.js +140 -0
  488. package/dist/lib/routes/BasePropertyDefinitionRoute.js.map +1 -0
  489. package/dist/lib/routes/BasePublicRoute.js +528 -0
  490. package/dist/lib/routes/BasePublicRoute.js.map +1 -0
  491. package/dist/lib/routes/BaseSavedBlockRoute.js +39 -0
  492. package/dist/lib/routes/BaseSavedBlockRoute.js.map +1 -0
  493. package/dist/lib/routes/BaseScoringRuleRoute.js +146 -0
  494. package/dist/lib/routes/BaseScoringRuleRoute.js.map +1 -0
  495. package/dist/lib/routes/BaseSegmentRoute.js +136 -0
  496. package/dist/lib/routes/BaseSegmentRoute.js.map +1 -0
  497. package/dist/lib/routes/BaseSubscriptionRoute.js +92 -0
  498. package/dist/lib/routes/BaseSubscriptionRoute.js.map +1 -0
  499. package/dist/lib/routes/BaseSuppressionRoute.js +48 -0
  500. package/dist/lib/routes/BaseSuppressionRoute.js.map +1 -0
  501. package/dist/lib/routes/BaseTaggedRecordRoute.js +312 -0
  502. package/dist/lib/routes/BaseTaggedRecordRoute.js.map +1 -0
  503. package/dist/lib/routes/BaseTaskRoute.js +116 -0
  504. package/dist/lib/routes/BaseTaskRoute.js.map +1 -0
  505. package/dist/lib/routes/BaseTemplateRoute.js +207 -0
  506. package/dist/lib/routes/BaseTemplateRoute.js.map +1 -0
  507. package/dist/lib/routes/BaseTimelineRoute.js +47 -0
  508. package/dist/lib/routes/BaseTimelineRoute.js.map +1 -0
  509. package/dist/lib/routes/BaseTrackingRoute.js +106 -0
  510. package/dist/lib/routes/BaseTrackingRoute.js.map +1 -0
  511. package/dist/lib/routes/BaseWebhookRoute.js +173 -0
  512. package/dist/lib/routes/BaseWebhookRoute.js.map +1 -0
  513. package/dist/lib/routes/BaseWorkspaceRecordRoute.js +220 -0
  514. package/dist/lib/routes/BaseWorkspaceRecordRoute.js.map +1 -0
  515. package/dist/lib/routes/BaseWorkspaceRoute.js +540 -0
  516. package/dist/lib/routes/BaseWorkspaceRoute.js.map +1 -0
  517. package/dist/lib/routes/CrmRouteBase.js +261 -0
  518. package/dist/lib/routes/CrmRouteBase.js.map +1 -0
  519. package/dist/lib/routes/mongo/AnalyticsRouteMongo.js +26 -0
  520. package/dist/lib/routes/mongo/AnalyticsRouteMongo.js.map +1 -0
  521. package/dist/lib/routes/mongo/ApiKeyRouteMongo.js +26 -0
  522. package/dist/lib/routes/mongo/ApiKeyRouteMongo.js.map +1 -0
  523. package/dist/lib/routes/mongo/AutomationRouteMongo.js +26 -0
  524. package/dist/lib/routes/mongo/AutomationRouteMongo.js.map +1 -0
  525. package/dist/lib/routes/mongo/CampaignRouteMongo.js +26 -0
  526. package/dist/lib/routes/mongo/CampaignRouteMongo.js.map +1 -0
  527. package/dist/lib/routes/mongo/CompanyRouteMongo.js +26 -0
  528. package/dist/lib/routes/mongo/CompanyRouteMongo.js.map +1 -0
  529. package/dist/lib/routes/mongo/ContactRouteMongo.js +26 -0
  530. package/dist/lib/routes/mongo/ContactRouteMongo.js.map +1 -0
  531. package/dist/lib/routes/mongo/CrmAdminRouteMongo.js +26 -0
  532. package/dist/lib/routes/mongo/CrmAdminRouteMongo.js.map +1 -0
  533. package/dist/lib/routes/mongo/DealRouteMongo.js +26 -0
  534. package/dist/lib/routes/mongo/DealRouteMongo.js.map +1 -0
  535. package/dist/lib/routes/mongo/FormRouteMongo.js +26 -0
  536. package/dist/lib/routes/mongo/FormRouteMongo.js.map +1 -0
  537. package/dist/lib/routes/mongo/ImportRouteMongo.js +26 -0
  538. package/dist/lib/routes/mongo/ImportRouteMongo.js.map +1 -0
  539. package/dist/lib/routes/mongo/IntegrationRouteMongo.js +28 -0
  540. package/dist/lib/routes/mongo/IntegrationRouteMongo.js.map +1 -0
  541. package/dist/lib/routes/mongo/ListRouteMongo.js +26 -0
  542. package/dist/lib/routes/mongo/ListRouteMongo.js.map +1 -0
  543. package/dist/lib/routes/mongo/NoteRouteMongo.js +26 -0
  544. package/dist/lib/routes/mongo/NoteRouteMongo.js.map +1 -0
  545. package/dist/lib/routes/mongo/PipelineRouteMongo.js +26 -0
  546. package/dist/lib/routes/mongo/PipelineRouteMongo.js.map +1 -0
  547. package/dist/lib/routes/mongo/PropertyDefinitionRouteMongo.js +26 -0
  548. package/dist/lib/routes/mongo/PropertyDefinitionRouteMongo.js.map +1 -0
  549. package/dist/lib/routes/mongo/PublicRouteMongo.js +28 -0
  550. package/dist/lib/routes/mongo/PublicRouteMongo.js.map +1 -0
  551. package/dist/lib/routes/mongo/SavedBlockRouteMongo.js +26 -0
  552. package/dist/lib/routes/mongo/SavedBlockRouteMongo.js.map +1 -0
  553. package/dist/lib/routes/mongo/ScoringRuleRouteMongo.js +26 -0
  554. package/dist/lib/routes/mongo/ScoringRuleRouteMongo.js.map +1 -0
  555. package/dist/lib/routes/mongo/SegmentRouteMongo.js +26 -0
  556. package/dist/lib/routes/mongo/SegmentRouteMongo.js.map +1 -0
  557. package/dist/lib/routes/mongo/SubscriptionRouteMongo.js +26 -0
  558. package/dist/lib/routes/mongo/SubscriptionRouteMongo.js.map +1 -0
  559. package/dist/lib/routes/mongo/SuppressionRouteMongo.js +26 -0
  560. package/dist/lib/routes/mongo/SuppressionRouteMongo.js.map +1 -0
  561. package/dist/lib/routes/mongo/TaskRouteMongo.js +26 -0
  562. package/dist/lib/routes/mongo/TaskRouteMongo.js.map +1 -0
  563. package/dist/lib/routes/mongo/TemplateRouteMongo.js +26 -0
  564. package/dist/lib/routes/mongo/TemplateRouteMongo.js.map +1 -0
  565. package/dist/lib/routes/mongo/TimelineRouteMongo.js +26 -0
  566. package/dist/lib/routes/mongo/TimelineRouteMongo.js.map +1 -0
  567. package/dist/lib/routes/mongo/TrackingRouteMongo.js +26 -0
  568. package/dist/lib/routes/mongo/TrackingRouteMongo.js.map +1 -0
  569. package/dist/lib/routes/mongo/WebhookRouteMongo.js +26 -0
  570. package/dist/lib/routes/mongo/WebhookRouteMongo.js.map +1 -0
  571. package/dist/lib/routes/mongo/WorkspaceRouteMongo.js +26 -0
  572. package/dist/lib/routes/mongo/WorkspaceRouteMongo.js.map +1 -0
  573. package/dist/lib/routes/sql/AnalyticsRouteSQL.js +26 -0
  574. package/dist/lib/routes/sql/AnalyticsRouteSQL.js.map +1 -0
  575. package/dist/lib/routes/sql/ApiKeyRouteSQL.js +26 -0
  576. package/dist/lib/routes/sql/ApiKeyRouteSQL.js.map +1 -0
  577. package/dist/lib/routes/sql/AutomationRouteSQL.js +26 -0
  578. package/dist/lib/routes/sql/AutomationRouteSQL.js.map +1 -0
  579. package/dist/lib/routes/sql/CampaignRouteSQL.js +26 -0
  580. package/dist/lib/routes/sql/CampaignRouteSQL.js.map +1 -0
  581. package/dist/lib/routes/sql/CompanyRouteSQL.js +26 -0
  582. package/dist/lib/routes/sql/CompanyRouteSQL.js.map +1 -0
  583. package/dist/lib/routes/sql/ContactRouteSQL.js +26 -0
  584. package/dist/lib/routes/sql/ContactRouteSQL.js.map +1 -0
  585. package/dist/lib/routes/sql/CrmAdminRouteSQL.js +26 -0
  586. package/dist/lib/routes/sql/CrmAdminRouteSQL.js.map +1 -0
  587. package/dist/lib/routes/sql/DealRouteSQL.js +26 -0
  588. package/dist/lib/routes/sql/DealRouteSQL.js.map +1 -0
  589. package/dist/lib/routes/sql/FormRouteSQL.js +26 -0
  590. package/dist/lib/routes/sql/FormRouteSQL.js.map +1 -0
  591. package/dist/lib/routes/sql/ImportRouteSQL.js +26 -0
  592. package/dist/lib/routes/sql/ImportRouteSQL.js.map +1 -0
  593. package/dist/lib/routes/sql/IntegrationRouteSQL.js +28 -0
  594. package/dist/lib/routes/sql/IntegrationRouteSQL.js.map +1 -0
  595. package/dist/lib/routes/sql/ListRouteSQL.js +26 -0
  596. package/dist/lib/routes/sql/ListRouteSQL.js.map +1 -0
  597. package/dist/lib/routes/sql/NoteRouteSQL.js +26 -0
  598. package/dist/lib/routes/sql/NoteRouteSQL.js.map +1 -0
  599. package/dist/lib/routes/sql/PipelineRouteSQL.js +26 -0
  600. package/dist/lib/routes/sql/PipelineRouteSQL.js.map +1 -0
  601. package/dist/lib/routes/sql/PropertyDefinitionRouteSQL.js +26 -0
  602. package/dist/lib/routes/sql/PropertyDefinitionRouteSQL.js.map +1 -0
  603. package/dist/lib/routes/sql/PublicRouteSQL.js +28 -0
  604. package/dist/lib/routes/sql/PublicRouteSQL.js.map +1 -0
  605. package/dist/lib/routes/sql/SavedBlockRouteSQL.js +26 -0
  606. package/dist/lib/routes/sql/SavedBlockRouteSQL.js.map +1 -0
  607. package/dist/lib/routes/sql/ScoringRuleRouteSQL.js +26 -0
  608. package/dist/lib/routes/sql/ScoringRuleRouteSQL.js.map +1 -0
  609. package/dist/lib/routes/sql/SegmentRouteSQL.js +26 -0
  610. package/dist/lib/routes/sql/SegmentRouteSQL.js.map +1 -0
  611. package/dist/lib/routes/sql/SubscriptionRouteSQL.js +26 -0
  612. package/dist/lib/routes/sql/SubscriptionRouteSQL.js.map +1 -0
  613. package/dist/lib/routes/sql/SuppressionRouteSQL.js +26 -0
  614. package/dist/lib/routes/sql/SuppressionRouteSQL.js.map +1 -0
  615. package/dist/lib/routes/sql/TaskRouteSQL.js +26 -0
  616. package/dist/lib/routes/sql/TaskRouteSQL.js.map +1 -0
  617. package/dist/lib/routes/sql/TemplateRouteSQL.js +26 -0
  618. package/dist/lib/routes/sql/TemplateRouteSQL.js.map +1 -0
  619. package/dist/lib/routes/sql/TimelineRouteSQL.js +26 -0
  620. package/dist/lib/routes/sql/TimelineRouteSQL.js.map +1 -0
  621. package/dist/lib/routes/sql/TrackingRouteSQL.js +26 -0
  622. package/dist/lib/routes/sql/TrackingRouteSQL.js.map +1 -0
  623. package/dist/lib/routes/sql/WebhookRouteSQL.js +26 -0
  624. package/dist/lib/routes/sql/WebhookRouteSQL.js.map +1 -0
  625. package/dist/lib/routes/sql/WorkspaceRouteSQL.js +26 -0
  626. package/dist/lib/routes/sql/WorkspaceRouteSQL.js.map +1 -0
  627. package/dist/lib/scoring/Scoring.js +105 -0
  628. package/dist/lib/scoring/Scoring.js.map +1 -0
  629. package/dist/lib/segments/Segments.js +125 -0
  630. package/dist/lib/segments/Segments.js.map +1 -0
  631. package/dist/lib/sending/Audience.js +87 -0
  632. package/dist/lib/sending/Audience.js.map +1 -0
  633. package/dist/lib/sending/CampaignRenderer.js +123 -0
  634. package/dist/lib/sending/CampaignRenderer.js.map +1 -0
  635. package/dist/lib/sending/Engagement.js +216 -0
  636. package/dist/lib/sending/Engagement.js.map +1 -0
  637. package/dist/lib/sending/Stats.js +70 -0
  638. package/dist/lib/sending/Stats.js.map +1 -0
  639. package/dist/lib/sending/Tracking.js +98 -0
  640. package/dist/lib/sending/Tracking.js.map +1 -0
  641. package/dist/lib/sql.js +80 -0
  642. package/dist/lib/sql.js.map +1 -0
  643. package/dist/lib/templates/Design.js +278 -0
  644. package/dist/lib/templates/Design.js.map +1 -0
  645. package/dist/lib/templates/MergeContext.js +57 -0
  646. package/dist/lib/templates/MergeContext.js.map +1 -0
  647. package/dist/lib/templates/Render.js +147 -0
  648. package/dist/lib/templates/Render.js.map +1 -0
  649. package/dist/lib/templates/Sanitize.js +98 -0
  650. package/dist/lib/templates/Sanitize.js.map +1 -0
  651. package/dist/lib/util/Csv.js +128 -0
  652. package/dist/lib/util/Csv.js.map +1 -0
  653. package/dist/lib/util/ImportMapping.js +206 -0
  654. package/dist/lib/util/ImportMapping.js.map +1 -0
  655. package/dist/lib/util/Mailer.js +43 -0
  656. package/dist/lib/util/Mailer.js.map +1 -0
  657. package/dist/lib/util/PropertyValues.js +145 -0
  658. package/dist/lib/util/PropertyValues.js.map +1 -0
  659. package/dist/lib/util/Secrets.js +31 -0
  660. package/dist/lib/util/Secrets.js.map +1 -0
  661. package/dist/lib/util/Tokens.js +58 -0
  662. package/dist/lib/util/Tokens.js.map +1 -0
  663. package/dist/lib/util/Validation.js +194 -0
  664. package/dist/lib/util/Validation.js.map +1 -0
  665. package/dist/lib/util/WorkspaceAccess.js +55 -0
  666. package/dist/lib/util/WorkspaceAccess.js.map +1 -0
  667. package/dist/lib/webhooks/Deliveries.js +47 -0
  668. package/dist/lib/webhooks/Deliveries.js.map +1 -0
  669. package/dist/lib/webhooks/Webhooks.js +132 -0
  670. package/dist/lib/webhooks/Webhooks.js.map +1 -0
  671. package/dist/types/automation/Dates.d.ts +42 -0
  672. package/dist/types/automation/Engine.d.ts +63 -0
  673. package/dist/types/automation/Events.d.ts +43 -0
  674. package/dist/types/automation/Graph.d.ts +77 -0
  675. package/dist/types/filters/Filter.d.ts +83 -0
  676. package/dist/types/filters/fields.d.ts +9 -0
  677. package/dist/types/index.d.ts +81 -0
  678. package/dist/types/jobs/AutomationRunJob.d.ts +18 -0
  679. package/dist/types/jobs/AutomationTriggerJob.d.ts +23 -0
  680. package/dist/types/jobs/CampaignJob.d.ts +45 -0
  681. package/dist/types/jobs/CrmImportJob.d.ts +44 -0
  682. package/dist/types/jobs/CrmJobBase.d.ts +26 -0
  683. package/dist/types/jobs/CrmMailEventJob.d.ts +102 -0
  684. package/dist/types/jobs/DateTriggerJob.d.ts +21 -0
  685. package/dist/types/jobs/ScoringJob.d.ts +13 -0
  686. package/dist/types/jobs/SegmentRefreshJob.d.ts +16 -0
  687. package/dist/types/jobs/SendDispatchJob.d.ts +52 -0
  688. package/dist/types/jobs/TaskReminderJob.d.ts +12 -0
  689. package/dist/types/jobs/WebhookDeliveryJob.d.ts +22 -0
  690. package/dist/types/jobs/mongo/AutomationRunJobMongo.d.ts +7 -0
  691. package/dist/types/jobs/mongo/AutomationTriggerJobMongo.d.ts +6 -0
  692. package/dist/types/jobs/mongo/CampaignJobMongo.d.ts +6 -0
  693. package/dist/types/jobs/mongo/CrmImportJobMongo.d.ts +8 -0
  694. package/dist/types/jobs/mongo/CrmMailEventJobMongo.d.ts +6 -0
  695. package/dist/types/jobs/mongo/DateTriggerJobMongo.d.ts +6 -0
  696. package/dist/types/jobs/mongo/ScoringJobMongo.d.ts +6 -0
  697. package/dist/types/jobs/mongo/SegmentRefreshJobMongo.d.ts +6 -0
  698. package/dist/types/jobs/mongo/SendDispatchJobMongo.d.ts +6 -0
  699. package/dist/types/jobs/mongo/TaskReminderJobMongo.d.ts +6 -0
  700. package/dist/types/jobs/mongo/WebhookDeliveryJobMongo.d.ts +6 -0
  701. package/dist/types/jobs/sql/AutomationRunJobSQL.d.ts +7 -0
  702. package/dist/types/jobs/sql/AutomationTriggerJobSQL.d.ts +6 -0
  703. package/dist/types/jobs/sql/CampaignJobSQL.d.ts +6 -0
  704. package/dist/types/jobs/sql/CrmImportJobSQL.d.ts +8 -0
  705. package/dist/types/jobs/sql/CrmMailEventJobSQL.d.ts +6 -0
  706. package/dist/types/jobs/sql/DateTriggerJobSQL.d.ts +6 -0
  707. package/dist/types/jobs/sql/ScoringJobSQL.d.ts +6 -0
  708. package/dist/types/jobs/sql/SegmentRefreshJobSQL.d.ts +6 -0
  709. package/dist/types/jobs/sql/SendDispatchJobSQL.d.ts +6 -0
  710. package/dist/types/jobs/sql/TaskReminderJobSQL.d.ts +6 -0
  711. package/dist/types/jobs/sql/WebhookDeliveryJobSQL.d.ts +6 -0
  712. package/dist/types/models/CrmModelClasses.d.ts +63 -0
  713. package/dist/types/models/mongo/ApiKeyMongo.d.ts +19 -0
  714. package/dist/types/models/mongo/AutomationMongo.d.ts +22 -0
  715. package/dist/types/models/mongo/AutomationVersionMongo.d.ts +16 -0
  716. package/dist/types/models/mongo/CampaignMongo.d.ts +34 -0
  717. package/dist/types/models/mongo/CrmCompanyMongo.d.ts +22 -0
  718. package/dist/types/models/mongo/CrmContactMongo.d.ts +26 -0
  719. package/dist/types/models/mongo/CrmEventMongo.d.ts +17 -0
  720. package/dist/types/models/mongo/CrmFormMongo.d.ts +24 -0
  721. package/dist/types/models/mongo/CrmImportMongo.d.ts +31 -0
  722. package/dist/types/models/mongo/CrmNoteMongo.d.ts +17 -0
  723. package/dist/types/models/mongo/CrmSettingMongo.d.ts +13 -0
  724. package/dist/types/models/mongo/CrmTaskMongo.d.ts +23 -0
  725. package/dist/types/models/mongo/DealMongo.d.ts +27 -0
  726. package/dist/types/models/mongo/EmailTemplateMongo.d.ts +17 -0
  727. package/dist/types/models/mongo/EngagementEventMongo.d.ts +20 -0
  728. package/dist/types/models/mongo/EnrollmentMongo.d.ts +25 -0
  729. package/dist/types/models/mongo/MailingListMongo.d.ts +19 -0
  730. package/dist/types/models/mongo/OutboundSendMongo.d.ts +41 -0
  731. package/dist/types/models/mongo/PipelineMongo.d.ts +15 -0
  732. package/dist/types/models/mongo/PropertyDefinitionMongo.d.ts +19 -0
  733. package/dist/types/models/mongo/PropertyValueMongo.d.ts +18 -0
  734. package/dist/types/models/mongo/SavedBlockMongo.d.ts +14 -0
  735. package/dist/types/models/mongo/ScoringRuleMongo.d.ts +20 -0
  736. package/dist/types/models/mongo/SegmentMongo.d.ts +20 -0
  737. package/dist/types/models/mongo/SubscriptionMongo.d.ts +20 -0
  738. package/dist/types/models/mongo/SuppressionMongo.d.ts +15 -0
  739. package/dist/types/models/mongo/TimelineEventMongo.d.ts +20 -0
  740. package/dist/types/models/mongo/WebhookDeliveryMongo.d.ts +22 -0
  741. package/dist/types/models/mongo/WebhookEndpointMongo.d.ts +21 -0
  742. package/dist/types/models/mongo/WorkspaceMemberMongo.d.ts +17 -0
  743. package/dist/types/models/mongo/WorkspaceMongo.d.ts +21 -0
  744. package/dist/types/models/mongo/WorkspaceSenderMongo.d.ts +18 -0
  745. package/dist/types/models/mongo/index.d.ts +3 -0
  746. package/dist/types/models/sql/ApiKeySQL.d.ts +19 -0
  747. package/dist/types/models/sql/AutomationSQL.d.ts +22 -0
  748. package/dist/types/models/sql/AutomationVersionSQL.d.ts +16 -0
  749. package/dist/types/models/sql/CampaignSQL.d.ts +34 -0
  750. package/dist/types/models/sql/CrmCompanySQL.d.ts +22 -0
  751. package/dist/types/models/sql/CrmContactSQL.d.ts +26 -0
  752. package/dist/types/models/sql/CrmEventSQL.d.ts +17 -0
  753. package/dist/types/models/sql/CrmFormSQL.d.ts +24 -0
  754. package/dist/types/models/sql/CrmImportSQL.d.ts +31 -0
  755. package/dist/types/models/sql/CrmNoteSQL.d.ts +17 -0
  756. package/dist/types/models/sql/CrmSettingSQL.d.ts +13 -0
  757. package/dist/types/models/sql/CrmTaskSQL.d.ts +23 -0
  758. package/dist/types/models/sql/DealSQL.d.ts +27 -0
  759. package/dist/types/models/sql/EmailTemplateSQL.d.ts +17 -0
  760. package/dist/types/models/sql/EngagementEventSQL.d.ts +20 -0
  761. package/dist/types/models/sql/EnrollmentSQL.d.ts +25 -0
  762. package/dist/types/models/sql/MailingListSQL.d.ts +19 -0
  763. package/dist/types/models/sql/OutboundSendSQL.d.ts +41 -0
  764. package/dist/types/models/sql/PipelineSQL.d.ts +15 -0
  765. package/dist/types/models/sql/PropertyDefinitionSQL.d.ts +19 -0
  766. package/dist/types/models/sql/PropertyValueSQL.d.ts +18 -0
  767. package/dist/types/models/sql/SavedBlockSQL.d.ts +14 -0
  768. package/dist/types/models/sql/ScoringRuleSQL.d.ts +20 -0
  769. package/dist/types/models/sql/SegmentSQL.d.ts +20 -0
  770. package/dist/types/models/sql/SubscriptionSQL.d.ts +20 -0
  771. package/dist/types/models/sql/SuppressionSQL.d.ts +15 -0
  772. package/dist/types/models/sql/TimelineEventSQL.d.ts +20 -0
  773. package/dist/types/models/sql/WebhookDeliverySQL.d.ts +22 -0
  774. package/dist/types/models/sql/WebhookEndpointSQL.d.ts +21 -0
  775. package/dist/types/models/sql/WorkspaceMemberSQL.d.ts +17 -0
  776. package/dist/types/models/sql/WorkspaceSQL.d.ts +21 -0
  777. package/dist/types/models/sql/WorkspaceSenderSQL.d.ts +18 -0
  778. package/dist/types/models/sql/index.d.ts +3 -0
  779. package/dist/types/models/types.d.ts +902 -0
  780. package/dist/types/mongo.d.ts +75 -0
  781. package/dist/types/purge.d.ts +32 -0
  782. package/dist/types/routes/BaseAnalyticsRoute.d.ts +87 -0
  783. package/dist/types/routes/BaseApiKeyRoute.d.ts +31 -0
  784. package/dist/types/routes/BaseAutomationRoute.d.ts +56 -0
  785. package/dist/types/routes/BaseCampaignRoute.d.ts +66 -0
  786. package/dist/types/routes/BaseCompanyRoute.d.ts +30 -0
  787. package/dist/types/routes/BaseContactRoute.d.ts +42 -0
  788. package/dist/types/routes/BaseCrmAdminRoute.d.ts +41 -0
  789. package/dist/types/routes/BaseDealRoute.d.ts +65 -0
  790. package/dist/types/routes/BaseFormRoute.d.ts +25 -0
  791. package/dist/types/routes/BaseImportRoute.d.ts +39 -0
  792. package/dist/types/routes/BaseIntegrationRoute.d.ts +46 -0
  793. package/dist/types/routes/BaseListRoute.d.ts +26 -0
  794. package/dist/types/routes/BaseNoteRoute.d.ts +15 -0
  795. package/dist/types/routes/BasePipelineRoute.d.ts +31 -0
  796. package/dist/types/routes/BasePropertyDefinitionRoute.d.ts +24 -0
  797. package/dist/types/routes/BasePublicRoute.d.ts +129 -0
  798. package/dist/types/routes/BaseSavedBlockRoute.d.ts +16 -0
  799. package/dist/types/routes/BaseScoringRuleRoute.d.ts +33 -0
  800. package/dist/types/routes/BaseSegmentRoute.d.ts +36 -0
  801. package/dist/types/routes/BaseSubscriptionRoute.d.ts +20 -0
  802. package/dist/types/routes/BaseSuppressionRoute.d.ts +17 -0
  803. package/dist/types/routes/BaseTaggedRecordRoute.d.ts +85 -0
  804. package/dist/types/routes/BaseTaskRoute.d.ts +18 -0
  805. package/dist/types/routes/BaseTemplateRoute.d.ts +52 -0
  806. package/dist/types/routes/BaseTimelineRoute.d.ts +10 -0
  807. package/dist/types/routes/BaseTrackingRoute.d.ts +21 -0
  808. package/dist/types/routes/BaseWebhookRoute.d.ts +49 -0
  809. package/dist/types/routes/BaseWorkspaceRecordRoute.d.ts +78 -0
  810. package/dist/types/routes/BaseWorkspaceRoute.d.ts +78 -0
  811. package/dist/types/routes/CrmRouteBase.d.ts +95 -0
  812. package/dist/types/routes/mongo/AnalyticsRouteMongo.d.ts +6 -0
  813. package/dist/types/routes/mongo/ApiKeyRouteMongo.d.ts +6 -0
  814. package/dist/types/routes/mongo/AutomationRouteMongo.d.ts +6 -0
  815. package/dist/types/routes/mongo/CampaignRouteMongo.d.ts +6 -0
  816. package/dist/types/routes/mongo/CompanyRouteMongo.d.ts +6 -0
  817. package/dist/types/routes/mongo/ContactRouteMongo.d.ts +6 -0
  818. package/dist/types/routes/mongo/CrmAdminRouteMongo.d.ts +6 -0
  819. package/dist/types/routes/mongo/DealRouteMongo.d.ts +6 -0
  820. package/dist/types/routes/mongo/FormRouteMongo.d.ts +6 -0
  821. package/dist/types/routes/mongo/ImportRouteMongo.d.ts +6 -0
  822. package/dist/types/routes/mongo/IntegrationRouteMongo.d.ts +7 -0
  823. package/dist/types/routes/mongo/ListRouteMongo.d.ts +6 -0
  824. package/dist/types/routes/mongo/NoteRouteMongo.d.ts +6 -0
  825. package/dist/types/routes/mongo/PipelineRouteMongo.d.ts +6 -0
  826. package/dist/types/routes/mongo/PropertyDefinitionRouteMongo.d.ts +6 -0
  827. package/dist/types/routes/mongo/PublicRouteMongo.d.ts +7 -0
  828. package/dist/types/routes/mongo/SavedBlockRouteMongo.d.ts +6 -0
  829. package/dist/types/routes/mongo/ScoringRuleRouteMongo.d.ts +6 -0
  830. package/dist/types/routes/mongo/SegmentRouteMongo.d.ts +6 -0
  831. package/dist/types/routes/mongo/SubscriptionRouteMongo.d.ts +6 -0
  832. package/dist/types/routes/mongo/SuppressionRouteMongo.d.ts +6 -0
  833. package/dist/types/routes/mongo/TaskRouteMongo.d.ts +6 -0
  834. package/dist/types/routes/mongo/TemplateRouteMongo.d.ts +6 -0
  835. package/dist/types/routes/mongo/TimelineRouteMongo.d.ts +6 -0
  836. package/dist/types/routes/mongo/TrackingRouteMongo.d.ts +6 -0
  837. package/dist/types/routes/mongo/WebhookRouteMongo.d.ts +6 -0
  838. package/dist/types/routes/mongo/WorkspaceRouteMongo.d.ts +6 -0
  839. package/dist/types/routes/sql/AnalyticsRouteSQL.d.ts +6 -0
  840. package/dist/types/routes/sql/ApiKeyRouteSQL.d.ts +6 -0
  841. package/dist/types/routes/sql/AutomationRouteSQL.d.ts +6 -0
  842. package/dist/types/routes/sql/CampaignRouteSQL.d.ts +6 -0
  843. package/dist/types/routes/sql/CompanyRouteSQL.d.ts +6 -0
  844. package/dist/types/routes/sql/ContactRouteSQL.d.ts +6 -0
  845. package/dist/types/routes/sql/CrmAdminRouteSQL.d.ts +6 -0
  846. package/dist/types/routes/sql/DealRouteSQL.d.ts +6 -0
  847. package/dist/types/routes/sql/FormRouteSQL.d.ts +6 -0
  848. package/dist/types/routes/sql/ImportRouteSQL.d.ts +6 -0
  849. package/dist/types/routes/sql/IntegrationRouteSQL.d.ts +7 -0
  850. package/dist/types/routes/sql/ListRouteSQL.d.ts +6 -0
  851. package/dist/types/routes/sql/NoteRouteSQL.d.ts +6 -0
  852. package/dist/types/routes/sql/PipelineRouteSQL.d.ts +6 -0
  853. package/dist/types/routes/sql/PropertyDefinitionRouteSQL.d.ts +6 -0
  854. package/dist/types/routes/sql/PublicRouteSQL.d.ts +7 -0
  855. package/dist/types/routes/sql/SavedBlockRouteSQL.d.ts +6 -0
  856. package/dist/types/routes/sql/ScoringRuleRouteSQL.d.ts +6 -0
  857. package/dist/types/routes/sql/SegmentRouteSQL.d.ts +6 -0
  858. package/dist/types/routes/sql/SubscriptionRouteSQL.d.ts +6 -0
  859. package/dist/types/routes/sql/SuppressionRouteSQL.d.ts +6 -0
  860. package/dist/types/routes/sql/TaskRouteSQL.d.ts +6 -0
  861. package/dist/types/routes/sql/TemplateRouteSQL.d.ts +6 -0
  862. package/dist/types/routes/sql/TimelineRouteSQL.d.ts +6 -0
  863. package/dist/types/routes/sql/TrackingRouteSQL.d.ts +6 -0
  864. package/dist/types/routes/sql/WebhookRouteSQL.d.ts +6 -0
  865. package/dist/types/routes/sql/WorkspaceRouteSQL.d.ts +6 -0
  866. package/dist/types/scoring/Scoring.d.ts +14 -0
  867. package/dist/types/segments/Segments.d.ts +46 -0
  868. package/dist/types/sending/Audience.d.ts +39 -0
  869. package/dist/types/sending/CampaignRenderer.d.ts +40 -0
  870. package/dist/types/sending/Engagement.d.ts +50 -0
  871. package/dist/types/sending/Stats.d.ts +17 -0
  872. package/dist/types/sending/Tracking.d.ts +39 -0
  873. package/dist/types/sql.d.ts +75 -0
  874. package/dist/types/templates/Design.d.ts +138 -0
  875. package/dist/types/templates/MergeContext.d.ts +27 -0
  876. package/dist/types/templates/Render.d.ts +46 -0
  877. package/dist/types/templates/Sanitize.d.ts +18 -0
  878. package/dist/types/util/Csv.d.ts +26 -0
  879. package/dist/types/util/ImportMapping.d.ts +23 -0
  880. package/dist/types/util/Mailer.d.ts +24 -0
  881. package/dist/types/util/PropertyValues.d.ts +31 -0
  882. package/dist/types/util/Secrets.d.ts +10 -0
  883. package/dist/types/util/Tokens.d.ts +30 -0
  884. package/dist/types/util/Validation.d.ts +59 -0
  885. package/dist/types/util/WorkspaceAccess.d.ts +24 -0
  886. package/dist/types/webhooks/Deliveries.d.ts +26 -0
  887. package/dist/types/webhooks/Webhooks.d.ts +43 -0
  888. package/package.json +226 -0
package/LICENSE ADDED
@@ -0,0 +1,382 @@
1
+ # Mozilla Public License Version 2.0
2
+
3
+ 1. Definitions
4
+
5
+ ---
6
+
7
+ 1.1. "Contributor"
8
+ means each individual or legal entity that creates, contributes to
9
+ the creation of, or owns Covered Software.
10
+
11
+ 1.2. "Contributor Version"
12
+ means the combination of the Contributions of others (if any) used
13
+ by a Contributor and that particular Contributor's Contribution.
14
+
15
+ 1.3. "Contribution"
16
+ means Covered Software of a particular Contributor.
17
+
18
+ 1.4. "Covered Software"
19
+ means Source Code Form to which the initial Contributor has attached
20
+ the notice in Exhibit A, the Executable Form of such Source Code
21
+ Form, and Modifications of such Source Code Form, in each case
22
+ including portions thereof.
23
+
24
+ 1.5. "Incompatible With Secondary Licenses"
25
+ means
26
+
27
+ (a) that the initial Contributor has attached the notice described
28
+ in Exhibit B to the Covered Software; or
29
+
30
+ (b) that the Covered Software was made available under the terms of
31
+ version 1.1 or earlier of the License, but not also under the
32
+ terms of a Secondary License.
33
+
34
+ 1.6. "Executable Form"
35
+ means any form of the work other than Source Code Form.
36
+
37
+ 1.7. "Larger Work"
38
+ means a work that combines Covered Software with other material, in
39
+ a separate file or files, that is not Covered Software.
40
+
41
+ 1.8. "License"
42
+ means this document.
43
+
44
+ 1.9. "Licensable"
45
+ means having the right to grant, to the maximum extent possible,
46
+ whether at the time of the initial grant or subsequently, any and
47
+ all of the rights conveyed by this License.
48
+
49
+ 1.10. "Modifications"
50
+ means any of the following:
51
+
52
+ (a) any file in Source Code Form that results from an addition to,
53
+ deletion from, or modification of the contents of Covered
54
+ Software; or
55
+
56
+ (b) any new file in Source Code Form that contains any Covered
57
+ Software.
58
+
59
+ 1.11. "Patent Claims" of a Contributor
60
+ means any patent claim(s), including without limitation, method,
61
+ process, and apparatus claims, in any patent Licensable by such
62
+ Contributor that would be infringed, but for the grant of the
63
+ License, by the making, using, selling, offering for sale, having
64
+ made, import, or transfer of either its Contributions or its
65
+ Contributor Version.
66
+
67
+ 1.12. "Secondary License"
68
+ means either the GNU General Public License, Version 2.0, the GNU
69
+ Lesser General Public License, Version 2.1, the GNU Affero General
70
+ Public License, Version 3.0, or any later versions of those
71
+ licenses.
72
+
73
+ 1.13. "Source Code Form"
74
+ means the form of the work preferred for making modifications.
75
+
76
+ 1.14. "You" (or "Your")
77
+ means an individual or a legal entity exercising rights under this
78
+ License. For legal entities, "You" includes any entity that
79
+ controls, is controlled by, or is under common control with You. For
80
+ purposes of this definition, "control" means (a) the power, direct
81
+ or indirect, to cause the direction or management of such entity,
82
+ whether by contract or otherwise, or (b) ownership of more than
83
+ fifty percent (50%) of the outstanding shares or beneficial
84
+ ownership of such entity.
85
+
86
+ 2. License Grants and Conditions
87
+
88
+ ---
89
+
90
+ 2.1. Grants
91
+
92
+ Each Contributor hereby grants You a world-wide, royalty-free,
93
+ non-exclusive license:
94
+
95
+ (a) under intellectual property rights (other than patent or trademark)
96
+ Licensable by such Contributor to use, reproduce, make available,
97
+ modify, display, perform, distribute, and otherwise exploit its
98
+ Contributions, either on an unmodified basis, with Modifications, or
99
+ as part of a Larger Work; and
100
+
101
+ (b) under Patent Claims of such Contributor to make, use, sell, offer
102
+ for sale, have made, import, and otherwise transfer either its
103
+ Contributions or its Contributor Version.
104
+
105
+ 2.2. Effective Date
106
+
107
+ The licenses granted in Section 2.1 with respect to any Contribution
108
+ become effective for each Contribution on the date the Contributor first
109
+ distributes such Contribution.
110
+
111
+ 2.3. Limitations on Grant Scope
112
+
113
+ The licenses granted in this Section 2 are the only rights granted under
114
+ this License. No additional rights or licenses will be implied from the
115
+ distribution or licensing of Covered Software under this License.
116
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
117
+ Contributor:
118
+
119
+ (a) for any code that a Contributor has removed from Covered Software;
120
+ or
121
+
122
+ (b) for infringements caused by: (i) Your and any other third party's
123
+ modifications of Covered Software, or (ii) the combination of its
124
+ Contributions with other software (except as part of its Contributor
125
+ Version); or
126
+
127
+ (c) under Patent Claims infringed by Covered Software in the absence of
128
+ its Contributions.
129
+
130
+ This License does not grant any rights in the trademarks, service marks,
131
+ or logos of any Contributor (except as may be necessary to comply with
132
+ the notice requirements in Section 3.4).
133
+
134
+ 2.4. Subsequent Licenses
135
+
136
+ No Contributor makes additional grants as a result of Your choice to
137
+ distribute the Covered Software under a subsequent version of this
138
+ License (see Section 10.2) or under the terms of a Secondary License (if
139
+ permitted under the terms of Section 3.3).
140
+
141
+ 2.5. Representation
142
+
143
+ Each Contributor represents that the Contributor believes its
144
+ Contributions are its original creation(s) or it has sufficient rights
145
+ to grant the rights to its Contributions conveyed by this License.
146
+
147
+ 2.6. Fair Use
148
+
149
+ This License is not intended to limit any rights You have under
150
+ applicable copyright doctrines of fair use, fair dealing, or other
151
+ equivalents.
152
+
153
+ 2.7. Conditions
154
+
155
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
156
+ in Section 2.1.
157
+
158
+ 3. Responsibilities
159
+
160
+ ---
161
+
162
+ 3.1. Distribution of Source Form
163
+
164
+ All distribution of Covered Software in Source Code Form, including any
165
+ Modifications that You create or to which You contribute, must be under
166
+ the terms of this License. You must inform recipients that the Source
167
+ Code Form of the Covered Software is governed by the terms of this
168
+ License, and how they can obtain a copy of this License. You may not
169
+ attempt to alter or restrict the recipients' rights in the Source Code
170
+ Form.
171
+
172
+ 3.2. Distribution of Executable Form
173
+
174
+ If You distribute Covered Software in Executable Form then:
175
+
176
+ (a) such Covered Software must also be made available in Source Code
177
+ Form, as described in Section 3.1, and You must inform recipients of
178
+ the Executable Form how they can obtain a copy of such Source Code
179
+ Form by reasonable means in a timely manner, at a charge no more
180
+ than the cost of distribution to the recipient; and
181
+
182
+ (b) You may distribute such Executable Form under the terms of this
183
+ License, or sublicense it under different terms, provided that the
184
+ license for the Executable Form does not attempt to limit or alter
185
+ the recipients' rights in the Source Code Form under this License.
186
+
187
+ 3.3. Distribution of a Larger Work
188
+
189
+ You may create and distribute a Larger Work under terms of Your choice,
190
+ provided that You also comply with the requirements of this License for
191
+ the Covered Software. If the Larger Work is a combination of Covered
192
+ Software with a work governed by one or more Secondary Licenses, and the
193
+ Covered Software is not Incompatible With Secondary Licenses, this
194
+ License permits You to additionally distribute such Covered Software
195
+ under the terms of such Secondary License(s), so that the recipient of
196
+ the Larger Work may, at their option, further distribute the Covered
197
+ Software under the terms of either this License or such Secondary
198
+ License(s).
199
+
200
+ 3.4. Notices
201
+
202
+ You may not remove or alter the substance of any license notices
203
+ (including copyright notices, patent notices, disclaimers of warranty,
204
+ or limitations of liability) contained within the Source Code Form of
205
+ the Covered Software, except that You may alter any license notices to
206
+ the extent required to remedy known factual inaccuracies.
207
+
208
+ 3.5. Application of Additional Terms
209
+
210
+ You may choose to offer, and to charge a fee for, warranty, support,
211
+ indemnity or liability obligations to one or more recipients of Covered
212
+ Software. However, You may do so only on Your own behalf, and not on
213
+ behalf of any Contributor. You must make it absolutely clear that any
214
+ such warranty, support, indemnity, or liability obligation is offered by
215
+ You alone, and You hereby agree to indemnify every Contributor for any
216
+ liability incurred by such Contributor as a result of warranty, support,
217
+ indemnity or liability terms You offer. You may include additional
218
+ disclaimers of warranty and limitations of liability specific to any
219
+ jurisdiction.
220
+
221
+ 4. Inability to Comply Due to Statute or Regulation
222
+
223
+ ---
224
+
225
+ If it is impossible for You to comply with any of the terms of this
226
+ License with respect to some or all of the Covered Software due to
227
+ statute, judicial order, or regulation then You must: (a) comply with
228
+ the terms of this License to the maximum extent possible; and (b)
229
+ describe the limitations and the code they affect. Such description must
230
+ be placed in a text file included with all distributions of the Covered
231
+ Software under this License. Except to the extent prohibited by statute
232
+ or regulation, such description must be sufficiently detailed for a
233
+ recipient of ordinary skill to be able to understand it.
234
+
235
+ 5. Termination
236
+
237
+ ---
238
+
239
+ 5.1. The rights granted under this License will terminate automatically
240
+ if You fail to comply with any of its terms. However, if You become
241
+ compliant, then the rights granted under this License from a particular
242
+ Contributor are reinstated (a) provisionally, unless and until such
243
+ Contributor explicitly and finally terminates Your grants, and (b) on an
244
+ ongoing basis, if such Contributor fails to notify You of the
245
+ non-compliance by some reasonable means prior to 60 days after You have
246
+ come back into compliance. Moreover, Your grants from a particular
247
+ Contributor are reinstated on an ongoing basis if such Contributor
248
+ notifies You of the non-compliance by some reasonable means, this is the
249
+ first time You have received notice of non-compliance with this License
250
+ from such Contributor, and You become compliant prior to 30 days after
251
+ Your receipt of the notice.
252
+
253
+ 5.2. If You initiate litigation against any entity by asserting a patent
254
+ infringement claim (excluding declaratory judgment actions,
255
+ counter-claims, and cross-claims) alleging that a Contributor Version
256
+ directly or indirectly infringes any patent, then the rights granted to
257
+ You by any and all Contributors for the Covered Software under Section
258
+ 2.1 of this License shall terminate.
259
+
260
+ 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
261
+ end user license agreements (excluding distributors and resellers) which
262
+ have been validly granted by You or Your distributors under this License
263
+ prior to termination shall survive termination.
264
+
265
+ ---
266
+
267
+ - *
268
+ - 6. Disclaimer of Warranty \*
269
+ - ------------------------- \*
270
+ - *
271
+ - Covered Software is provided under this License on an "as is" \*
272
+ - basis, without warranty of any kind, either expressed, implied, or \*
273
+ - statutory, including, without limitation, warranties that the \*
274
+ - Covered Software is free of defects, merchantable, fit for a \*
275
+ - particular purpose or non-infringing. The entire risk as to the \*
276
+ - quality and performance of the Covered Software is with You. \*
277
+ - Should any Covered Software prove defective in any respect, You \*
278
+ - (not any Contributor) assume the cost of any necessary servicing, \*
279
+ - repair, or correction. This disclaimer of warranty constitutes an \*
280
+ - essential part of this License. No use of any Covered Software is \*
281
+ - authorized under this License except under this disclaimer. \*
282
+ - *
283
+
284
+ ---
285
+
286
+ ---
287
+
288
+ - *
289
+ - 7. Limitation of Liability \*
290
+ - -------------------------- \*
291
+ - *
292
+ - Under no circumstances and under no legal theory, whether tort \*
293
+ - (including negligence), contract, or otherwise, shall any \*
294
+ - Contributor, or anyone who distributes Covered Software as \*
295
+ - permitted above, be liable to You for any direct, indirect, \*
296
+ - special, incidental, or consequential damages of any character \*
297
+ - including, without limitation, damages for lost profits, loss of \*
298
+ - goodwill, work stoppage, computer failure or malfunction, or any \*
299
+ - and all other commercial damages or losses, even if such party \*
300
+ - shall have been informed of the possibility of such damages. This \*
301
+ - limitation of liability shall not apply to liability for death or \*
302
+ - personal injury resulting from such party's negligence to the \*
303
+ - extent applicable law prohibits such limitation. Some \*
304
+ - jurisdictions do not allow the exclusion or limitation of \*
305
+ - incidental or consequential damages, so this exclusion and \*
306
+ - limitation may not apply to You. \*
307
+ - *
308
+
309
+ ---
310
+
311
+ 8. Litigation
312
+
313
+ ---
314
+
315
+ Any litigation relating to this License may be brought only in the
316
+ courts of a jurisdiction where the defendant maintains its principal
317
+ place of business and such litigation shall be governed by laws of that
318
+ jurisdiction, without reference to its conflict-of-law provisions.
319
+ Nothing in this Section shall prevent a party's ability to bring
320
+ cross-claims or counter-claims.
321
+
322
+ 9. Miscellaneous
323
+
324
+ ---
325
+
326
+ This License represents the complete agreement concerning the subject
327
+ matter hereof. If any provision of this License is held to be
328
+ unenforceable, such provision shall be reformed only to the extent
329
+ necessary to make it enforceable. Any law or regulation which provides
330
+ that the language of a contract shall be construed against the drafter
331
+ shall not be used to construe this License against a Contributor.
332
+
333
+ 10. Versions of the License
334
+
335
+ ---
336
+
337
+ 10.1. New Versions
338
+
339
+ Mozilla Foundation is the license steward. Except as provided in Section
340
+ 10.3, no one other than the license steward has the right to modify or
341
+ publish new versions of this License. Each version will be given a
342
+ distinguishing version number.
343
+
344
+ 10.2. Effect of New Versions
345
+
346
+ You may distribute the Covered Software under the terms of the version
347
+ of the License under which You originally received the Covered Software,
348
+ or under the terms of any subsequent version published by the license
349
+ steward.
350
+
351
+ 10.3. Modified Versions
352
+
353
+ If you create software not governed by this License, and you want to
354
+ create a new license for such software, you may create and use a
355
+ modified version of this License if you rename the license and remove
356
+ any references to the name of the license steward (except to note that
357
+ such modified license differs from this License).
358
+
359
+ 10.4. Distributing Source Code Form that is Incompatible With Secondary
360
+ Licenses
361
+
362
+ If You choose to distribute Source Code Form that is Incompatible With
363
+ Secondary Licenses under the terms of this version of the License, the
364
+ notice described in Exhibit B of this License must be attached.
365
+
366
+ ## Exhibit A - Source Code Form License Notice
367
+
368
+ This Source Code Form is subject to the terms of the Mozilla Public
369
+ License, v. 2.0. If a copy of the MPL was not distributed with this
370
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
371
+
372
+ If it is not possible or desirable to put the notice in a particular
373
+ file, then You may include the notice in a location (such as a LICENSE
374
+ file in a relevant directory) where a recipient would be likely to look
375
+ for such a notice.
376
+
377
+ You may add additional accurate notices of copyright ownership.
378
+
379
+ ## Exhibit B - "Incompatible With Secondary Licenses" Notice
380
+
381
+ This Source Code Form is "Incompatible With Secondary Licenses", as
382
+ defined by the Mozilla Public License, v. 2.0.
package/README.md ADDED
@@ -0,0 +1,210 @@
1
+ # @rapidmx/crm-plugin
2
+
3
+ A customer relationship management platform for [RapidMX](https://github.com/rapidmx/server), installed as a server plugin.
4
+
5
+ This first release covers the CRM core:
6
+
7
+ - **Workspaces** shared by a team, each member an owner, admin, editor or viewer. Members are added by the address of a mailbox
8
+ they own.
9
+ - **Contacts and companies** with their own fields, tags and **custom properties** (text, number, date, yes/no, dropdown and
10
+ multiple choice). A new contact is linked to the company whose web domain matches its email address.
11
+ - **Filtered search** across fields, tags and custom properties, with all/any conditions, a quick text search, sorting and paging.
12
+ - **Bulk actions** (tag, untag, set owner, delete) and **CSV export** of anything a search matches.
13
+ - **Notes, tasks and an activity timeline** on every contact and company.
14
+ - **CSV import** of contacts and companies, with a suggested column mapping, imported in the background.
15
+ - **Send-as addresses**: the mailboxes a workspace will send marketing mail from and receive replies in.
16
+ - **Mailing lists and subscriptions**, with the consent behind each (when, how, from what address), and list membership as a
17
+ filter.
18
+ - **Signup forms** at `/f/<form>`, linkable or embeddable in another site, with optional **double opt-in** by email.
19
+ - **A preference center** at `/subscriptions/<token>` where a subscriber chooses their lists or unsubscribes from all email, and
20
+ **one-click unsubscribe** links (RFC 8058) - no account needed, the links carry signed tokens.
21
+ - **A suppression list** of addresses never to email.
22
+ - **Email templates** built in a **drag-and-drop designer**. It offers:
23
+ - sections of up to four columns;
24
+ - heading, text, image, button, divider, spacer, social, footer and hand-written HTML blocks;
25
+ - inline text editing and a theme;
26
+ - merge tags such as `{{ contact.first_name }}` and custom properties;
27
+ - undo and redo, and reusable saved blocks;
28
+ - a preview for a sample reader or any contact, at desktop or phone width or as plain text;
29
+ - test sends.
30
+
31
+ Templates are laid out with MJML and filled in with Liquid; merged values are HTML-escaped.
32
+
33
+ - **Campaigns** to the subscribers of chosen lists, less those of excluded lists. They skip addresses that are suppressed,
34
+ unsubscribed, bounced or complained. A campaign can be sent now or scheduled, paused, resumed and cancelled. Before sending, a
35
+ checklist says what's missing: a sender, a list, an email with an unsubscribe link, or your postal address.
36
+ - **A/B tests**: up to four variants, each with its own subject line or template. They are tried on part of the audience, and the
37
+ variant with the best open, click or reply rate after a set number of hours goes to everyone else.
38
+ - **Deliverability headers** on every campaign message:
39
+ - `List-Unsubscribe` with RFC 8058 one-click, which Gmail and Yahoo require of bulk senders;
40
+ - `List-Id`, `Precedence: bulk` and a `Feedback-ID`;
41
+ - a per-message bounce address (VERP).
42
+
43
+ Sending is throttled deployment-wide.
44
+ - **Engagement tracking**:
45
+ - Opens are tracked with an invisible image, and clicks through signed redirects that can only go where the email's link went.
46
+ - Replies, bounces and spam complaints are learned from the sender's mailbox.
47
+ - Opens and clicks by mail scanners are told apart from people's.
48
+ - A hard bounce or a complaint suppresses the address.
49
+ - Everything lands on the contact's timeline and in the campaign's report: rates, links by clicks, variants, and a filterable
50
+ recipients list.
51
+
52
+ - **Segments**: named groups of contacts defined by a filter.
53
+ - A dynamic segment keeps up with its filter by itself; a static one is a snapshot, refreshed by hand.
54
+ - Segments are a contact filter field of their own.
55
+ - A campaign can go only to the subscribers in some segments, or leave the members of others out.
56
+ - **Lead scoring**: a contact's score is the sum of its workspace's rules.
57
+ - A property rule gives points to the contacts matching its filter.
58
+ - An activity rule gives points for each time a contact opened, clicked, replied, bounced, submitted a form, subscribed or
59
+ unsubscribed, optionally within the last N days and up to a limit.
60
+ - Scores update in the background, or on demand.
61
+
62
+ - **Automations**: workflows that react to what contacts do.
63
+ - **Triggers:** subscribing or unsubscribing, submitting a form, entering or leaving a segment, being created or changed,
64
+ opening, clicking, replying to or bouncing an email, a deal being created, moved, won or lost, an event your own systems
65
+ report through the integration API (optionally by name), or being put in by hand. A trigger can also take a contact filter.
66
+ - **Date triggers:** a contact's date property (a birthday, a renewal) or when they were added or last engaged - on the day or
67
+ a number of days before or after it, every year or once, from a chosen hour in the workspace's time zone. A "Birthday
68
+ greeting" starting point sets one up.
69
+ - **Steps:** waiting a while; waiting for an earlier email to be opened, clicked or replied to (with a timeout, and a branch
70
+ for each outcome); if/else on a contact filter; random splits; sending an email; setting a field; adding or removing a tag;
71
+ subscribing or unsubscribing; creating a task; notifying a member; putting the contact into another automation; posting to
72
+ a webhook; ending.
73
+ - **Editing:** a branching editor with ready-made starting points ("welcome, then follow up if there's no reply", welcome
74
+ series, form follow-up, win back). A publish checks the whole flow first.
75
+ - **Running:** contacts go through the version they entered. A goal takes them out early, and a re-entry rule decides whether
76
+ they can go through again. Each step shows live numbers, and every contact's run can be looked at or stopped.
77
+
78
+ - **Sales pipelines and deals**:
79
+ - Pipelines are made of stages, each with a win probability, a kind (open, won or lost) and optional "rotting" days. A workspace
80
+ gets a default "Sales" pipeline.
81
+ - Deals carry an amount, an owner, the contacts and company involved and an expected close date. They move across a kanban board
82
+ by drag and drop or menu; moving one to a lost stage asks why.
83
+ - A forecast gives open value and weighted value per stage, win rate and time to win.
84
+ - Each deal keeps its stage history, notes, tasks and activity. Moves show on the deal's and its contacts' timelines, and deals
85
+ won, lost or moved can start automations.
86
+ - **Task reminders** notify the assignee when a task comes due.
87
+ - **1:1 email logging** (per sender, opt-in): mail the sender's mailbox exchanges with contacts goes on their timelines.
88
+ - **Reports** over the last 7, 30, 90 or 365 days:
89
+ - email sent, opened, clicked, replied to, bounced and unsubscribed from, per day and as rates, with the top recipient domains;
90
+ - new contacts, subscribes and unsubscribes per day, and each list's subscribers;
91
+ - deals won (and their value), lost and open, and the win rate, for all pipelines or one.
92
+
93
+ Charts have a hover card, arrow-key navigation and a table view.
94
+ - **Webhooks**: what happens in a workspace (contacts created or changed, subscriptions, forms, segments, email engagement, deals,
95
+ custom events, automation steps) posted as signed JSON to `https://` addresses on the public internet. Failed posts are retried
96
+ with backoff; an endpoint that keeps failing is switched off. Each endpoint shows its recent deliveries and can be pinged.
97
+ - **An integration API** for a workspace's own systems, with **API keys** scoped to adding contacts, changing subscriptions or
98
+ reporting events.
99
+ - **A CRM page in the admin console** (`/admin/crm`): every workspace with its size, the deployment's sending numbers, and a switch
100
+ that stops a workspace's campaign and automation email (for abuse) without touching its data.
101
+
102
+ ## Installing
103
+
104
+ Install it from the admin console's **Plugins** page, or preinstall it by adding `@rapidmx/crm-plugin` to `system:plugins:defaults`.
105
+ The CRM then appears on the web client's app rail, at `/crm`. It requires `@rapidmx/restapi` 0.26 or later.
106
+ Replies, bounces and complaints are learned from restapi's mail event stream, so they need a restapi release that publishes it
107
+ (0.27) and an `events` Redis datastore.
108
+
109
+ ### Settings
110
+
111
+ | Key | Default | Meaning |
112
+ | --- | --- | --- |
113
+ | `mail:crm:public_url` | `https://<host>` | The site the public pages are served from; links in CRM emails point here. |
114
+ | `mail:crm:token_secret` | (generated) | The key public links are signed with. Left empty, one is generated and kept in the database. |
115
+ | `mail:crm:workspace_creator_roles` | (empty) | Comma-separated roles allowed to create workspaces. Empty lets every signed-in user. |
116
+ | `mail:crm:max_workspaces_per_user` | `10` | How many workspaces one user may create. |
117
+ | `mail:crm:max_members` | `500` | How many members one workspace may have. |
118
+ | `mail:crm:max_senders` | `50` | How many send-as addresses one workspace may have. |
119
+ | `mail:crm:export:max_rows` | `50000` | How many records one CSV export may hold. |
120
+ | `mail:crm:import:max_bytes` | `20971520` | The largest CSV file an import accepts. |
121
+ | `mail:crm:jobs:import:schedule` | `*/5 * * * * *` | How often queued imports are picked up. |
122
+ | `mail:crm:jobs:import:lease_seconds` | `300` | How long a server may work on an import before another may take it over. |
123
+ | `mail:crm:jobs:import:max_attempts` | `3` | How many times an import is started before it is failed. |
124
+ | `mail:crm:send_rate_per_minute` | `600` | The most campaign messages the whole deployment sends per minute. |
125
+ | `mail:crm:verp` | `true` | Give each campaign message its own bounce address (`<sender>+b-<token>@<domain>`). Needs plus-addressing. |
126
+ | `mail:crm:jobs:send:schedule`, `...:batch`, `...:lease_seconds`, `...:max_attempts` | `*/2 * * * * *`, `200`, `300`, `5` | How the dispatcher runs and retries. |
127
+ | `mail:crm:jobs:campaign:schedule`, `...:lease_seconds`, `...:pages_per_run`, `...:page_size`, `...:stats_seconds` | `*/5 * * * * *`, `120`, `20`, `500`, `60` | How campaigns are prepared and their stats counted. |
128
+ | `mail:crm:jobs:events:schedule` | `*/2 * * * * *` | How often the mail event stream is read. |
129
+ | `mail:crm:jobs:segments:schedule`, `...:refresh_seconds`, `...:batch` | `0 * * * * *`, `300`, `20` | How dynamic segments are kept current. |
130
+ | `mail:crm:jobs:scoring:schedule`, `...:interval_seconds`, `...:batch` | `30 * * * * *`, `3600`, `5` | How lead scores are kept current. |
131
+ | `mail:crm:jobs:triggers:schedule`, `...:batch`, `...:retention_days` | `*/5 * * * * *`, `200`, `30` | How contact events are handed to automations, and how long they are kept. |
132
+ | `mail:crm:jobs:reminders:schedule`, `...:lead_minutes` | `15 * * * * *`, `15` | How task reminders are sent, and how long before a task is due. |
133
+ | `mail:crm:jobs:automations:schedule`, `...:batch`, `...:lease_seconds`, `...:paused_retry_seconds` | `*/5 * * * * *`, `100`, `120`, `60` | How contacts are moved through automations. |
134
+ | `mail:crm:jobs:webhooks:schedule`, `...:max_attempts`, `...:retention_days` | `*/5 * * * * *`, `8`, `14` | How webhooks are posted and retried, and how long deliveries are kept. |
135
+ | `mail:crm:jobs:dates:schedule` | `20 * * * * *` | How often date-triggered automations are checked (each puts contacts in once a day). |
136
+
137
+ ## API
138
+
139
+ Every route is under `/api/mail/crm` and takes the workspace uid as its first path segment. Reading takes membership of the
140
+ workspace; changing records takes the editor role, and changing settings, members, senders and custom properties the admin role.
141
+ A deployment administrator has no access to a workspace they aren't a member of.
142
+
143
+ | Resource | Endpoints |
144
+ | --- | --- |
145
+ | `workspaces` | `GET /`, `POST /`, `GET/PUT/DELETE /:workspaceUid`, `GET/POST /:workspaceUid/members`, `PUT/DELETE /:workspaceUid/members/:userUid`, `GET/POST /:workspaceUid/senders`, `PUT/DELETE /:workspaceUid/senders/:senderUid` |
146
+ | `contacts`, `companies` | `GET /:workspaceUid`, `POST /:workspaceUid/search`, `POST /:workspaceUid/bulk`, `POST /:workspaceUid/export`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid` |
147
+ | `properties`, `notes`, `tasks` | `GET /:workspaceUid`, `POST /:workspaceUid/search`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid` |
148
+ | `timeline` | `GET /:workspaceUid/:subjectType/:subjectUid` |
149
+ | `imports` | `GET /:workspaceUid`, `POST /:workspaceUid?objectType=&fileName=` (raw CSV body), `POST /:workspaceUid/:uid/start`, `GET/DELETE /:workspaceUid/:uid` |
150
+ | `lists`, `suppressions`, `forms` | `GET /:workspaceUid`, `POST /:workspaceUid/search`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid` |
151
+ | `subscriptions` | `GET /:workspaceUid?listUid=&contactUid=&status=`, `POST /:workspaceUid` (`{ listUid, contactUids, status }`) |
152
+ | `templates` | `GET /:workspaceUid`, `POST /:workspaceUid/search`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid`, `GET /:workspaceUid/merge-tags`, `POST /:workspaceUid/render`, `POST /:workspaceUid/:uid/test`, `POST /:workspaceUid/:uid/duplicate` |
153
+ | `saved-blocks` | `GET /:workspaceUid`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid` |
154
+ | `campaigns` | `GET /:workspaceUid`, `POST /:workspaceUid/search`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid`, `POST /:workspaceUid/audience`, `GET /:workspaceUid/:uid/checklist`, `POST /:workspaceUid/:uid/schedule` (`{ sendAt? }`), `POST /:workspaceUid/:uid/unschedule\|pause\|resume\|cancel\|duplicate`, `GET /:workspaceUid/:uid/report`, `POST /:workspaceUid/:uid/recipients` |
155
+ | `segments` | `GET /:workspaceUid`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid`, `POST /:workspaceUid/preview` (`{ filter }`), `POST /:workspaceUid/:uid/refresh` |
156
+ | `scoring-rules` | `GET /:workspaceUid`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid` (admins), `POST /:workspaceUid/recalculate` |
157
+ | `automations` | `GET /:workspaceUid`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid`, `POST /:workspaceUid/:uid/publish\|pause\|resume`, `POST /:workspaceUid/:uid/enroll` (`{ contactUids }`), `GET /:workspaceUid/:uid/report`, `POST /:workspaceUid/:uid/enrollments`, `POST /:workspaceUid/:uid/enrollments/:enrollmentUid/exit` |
158
+ | `pipelines` | `GET /:workspaceUid` (makes a default pipeline if there is none), `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid` (admins) |
159
+ | `deals` | `GET /:workspaceUid?pipelineUid=&stageId=&status=&ownerUserUid=&companyUid=&contactUid=`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid`, `GET /:workspaceUid/forecast?pipelineUid=&days=` |
160
+ | `analytics` | `GET /:workspaceUid/email?days=`, `GET /:workspaceUid/growth?days=`, `GET /:workspaceUid/sales?days=&pipelineUid=` (`days` 1-365, 30 by default; UTC days) |
161
+ | `webhooks` | `GET /:workspaceUid`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid` (admins; answers the `secret` once), `POST /:workspaceUid/:uid/secret` (a new secret), `POST /:workspaceUid/:uid/test` (a `ping`), `GET /:workspaceUid/:uid/deliveries` |
162
+ | `api-keys` | `GET /:workspaceUid`, `GET/PUT/DELETE /:workspaceUid/:uid`, `POST /:workspaceUid` (admins; answers the `key` once) |
163
+ | `integrations` (API key) | `POST /:workspaceUid/contacts`, `POST /:workspaceUid/subscribe`, `POST /:workspaceUid/unsubscribe`, `POST /:workspaceUid/events`, `GET /:workspaceUid/lists` |
164
+ | `admin` (deployment administrators) | `GET /stats`, `GET /workspaces?limit=&page=`, `PUT /workspaces/:workspaceUid` (`{ sendingDisabled }`) |
165
+ | `public` (anonymous) | `GET/POST /forms/:formUid`, `POST /confirm/:token`, `GET/POST /preferences/:token`, `GET/POST /unsubscribe/:token` |
166
+ | `t` (anonymous) | `GET /o/:token` (open image), `GET /c/:token/:index?u=&s=` (tracked link) |
167
+
168
+ A search takes `{ filter, q, sort: { field, direction }, limit, page }` and answers `{ items, total }`. A filter is a condition
169
+ `{ field, op, value }` or a group `{ and: [...] }` / `{ or: [...] }`. Fields are a record's own fields, `tags`, or
170
+ `properties.<key>`. The comparisons are `eq`, `ne`, `contains`, `notContains`, `startsWith`, `gt`, `gte`, `lt`, `lte`, `between`,
171
+ `in`, `notIn`, `isSet` and `isNotSet`, each allowed on the types it makes sense for.
172
+
173
+ A template's `design` is `{ theme, sections: [{ columns: [{ blocks: [...] }] }] }`. It is checked and sanitized on every save:
174
+ - Text is limited to what the editor produces.
175
+ - Links must be web, mail, phone or merge-tag links, and images must use `https://`.
176
+ - HTML blocks may only be added or changed by workspace admins. Scripts, frames and forms are removed from them.
177
+ - A design that can't be laid out, or that has a broken merge tag, is refused.
178
+
179
+ `POST /render` returns `{ subject, html, text }`. A test is sent only to the address of a mailbox the caller can read.
180
+
181
+ ### Webhooks
182
+
183
+ Each delivery is a `POST` of JSON: `{ id, type, occurredAt, workspaceUid, contact?: { uid, email, firstName, lastName }, data }`.
184
+ `type` is the event (`contact.created`, `deal.won`, `custom`, `automation.webhook`, `ping`...). The `X-RapidMX-Signature` header is
185
+ `t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<body>" keyed with the endpoint's secret>`; check it, and refuse old timestamps.
186
+ A 2xx answer counts as delivered. Anything else is retried 1, 2, 4... minutes later, up to 8 times; after 20 failures in a row the
187
+ endpoint is switched off. Redirects aren't followed, and the address is resolved and checked for a public IP at every post.
188
+
189
+ ### Integration API
190
+
191
+ Call `/api/mail/crm/integrations/<workspaceUid>/...` with `Authorization: Bearer crm_...`. A missing, unknown or revoked key is a
192
+ 401; a key without the endpoint's scope a 403. Each key may make 600 calls a minute.
193
+
194
+ | Endpoint | Scope | Body | Answer |
195
+ | --- | --- | --- | --- |
196
+ | `POST /contacts` | `contacts` | `{ email, firstName?, lastName?, phone?, tags?, properties?, ... }` | `{ outcome: "created" \| "updated", uid }` |
197
+ | `POST /subscribe` | `subscriptions` | `{ email, listUid, ...contact fields }` | `{ contactUid, status }` |
198
+ | `POST /unsubscribe` | `subscriptions` | `{ email, listUid? }` - without a list, from every list and all email | `{ contactUid? }` |
199
+ | `POST /events` | `events` | `{ email, name, data? }` - starts automations whose trigger is a custom event (of that name) | `{ contactUid }` |
200
+ | `GET /lists` | any | | `[{ uid, name, publicName }]` |
201
+
202
+ ## Development
203
+
204
+ ```sh
205
+ yarn install
206
+ yarn build # lint, then compile the server code and the pages
207
+ yarn test:prod # every test on MongoDB and SQL, with the coverage gates
208
+ ```
209
+
210
+ To try it on a local server, `npm pack` this package and point the server's `system:plugins:sources` at the tarball.
@@ -0,0 +1,46 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2026 Jean-Philippe Steinmetz
3
+ // SPDX-License-Identifier: MPL-2.0
4
+ ///////////////////////////////////////////////////////////////////////////////
5
+ import React, { PropsWithChildren } from "react";
6
+ import { Branding } from "@rapidmx/web-client/lib/branding/brandingApi.js";
7
+ import { CUSTOM_STYLESHEET_LINK_ID } from "@rapidmx/web-client/lib/branding/useBranding.js";
8
+
9
+ export interface LayoutProps {
10
+ /**
11
+ * Supplied by the server's `AdminConsoleRoute` `fetchProps()`, which every `admin` plugin app's route extends. This file is a
12
+ * copy of `@rapidmx/web-client`'s `apps/admin/_layout.tsx`, since every app directory needs its own layout.
13
+ * `@rapidrest/react` spreads the same merged page props onto this
14
+ * layout as onto the page it wraps, so it renders correctly server-side on the very first byte of the
15
+ * response: no client-side flash from the stock defaults below, and a crawler reading the raw HTML
16
+ * sees the real branding too. `undefined` only on the framework's unwrapped `_500` fallback path,
17
+ * which doesn't receive props at all - falling back to the stock defaults there is acceptable.
18
+ */
19
+ branding?: Branding;
20
+ }
21
+
22
+ export default function Layout({ children, branding }: PropsWithChildren<LayoutProps>) {
23
+ const title = branding?.title || branding?.companyName ? `${branding?.title || branding?.companyName}: CRM administration` : "RapidMX: CRM administration";
24
+ const iconHref = branding?.iconUrl || branding?.logoUrl || "/images/logo.svg";
25
+ const stylesheetHref = branding?.stylesheetUrl;
26
+
27
+ return (
28
+ <html lang="en">
29
+ <head>
30
+ <meta charSet="utf-8" />
31
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
32
+ <title>{title}</title>
33
+ <link rel="icon" type="image/svg+xml" href={iconHref} />
34
+ <link rel="alternate icon" href="/favicon.ico" />
35
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
36
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
37
+ <link
38
+ rel="stylesheet"
39
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"
40
+ />
41
+ {stylesheetHref && <link rel="stylesheet" href={stylesheetHref} id={CUSTOM_STYLESHEET_LINK_ID} />}
42
+ </head>
43
+ <body>{children}</body>
44
+ </html>
45
+ );
46
+ }
@@ -0,0 +1,16 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2026 Jean-Philippe Steinmetz
3
+ // SPDX-License-Identifier: MPL-2.0
4
+ ///////////////////////////////////////////////////////////////////////////////
5
+ import React from "react";
6
+ import AdminShell, { AdminShellProps } from "@rapidmx/web-client/shared/components/admin/layout/AdminShell.js";
7
+ import CrmAdmin from "../shared/components/admin/CrmAdmin.js";
8
+
9
+ /** The CRM's page in the admin console. */
10
+ export default function CrmAdminPage(props: Omit<AdminShellProps, "active">) {
11
+ return (
12
+ <AdminShell {...props} active="crm">
13
+ <CrmAdmin />
14
+ </AdminShell>
15
+ );
16
+ }