plansFeatures.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. const Settings = require('@overleaf/settings')
  2. const individualPlans = [
  3. {
  4. divider: false,
  5. items: [
  6. {
  7. feature: 'number_of_users',
  8. info: 'number_of_users_info',
  9. value: 'str',
  10. plans: {
  11. free: 'one_user',
  12. collaborator: 'one_user',
  13. professional: 'one_user',
  14. },
  15. },
  16. {
  17. feature: 'max_collab_per_project',
  18. info: 'max_collab_per_project_info',
  19. value: 'str',
  20. plans: {
  21. free: 'you_plus_1',
  22. collaborator: 'you_plus_10',
  23. professional: 'unlimited_bold',
  24. },
  25. },
  26. ],
  27. },
  28. {
  29. divider: true,
  30. dividerLabel: 'you_and_collaborators_get_access_to',
  31. dividerInfo: 'you_and_collaborators_get_access_to_info',
  32. items: [
  33. {
  34. feature: 'compile_timeout_short',
  35. info: 'compile_timeout_short_info',
  36. value: 'str',
  37. plans: {
  38. free: 'one_minute',
  39. collaborator: 'four_minutes',
  40. professional: 'four_minutes',
  41. },
  42. },
  43. {
  44. feature: 'compile_servers',
  45. info: 'compile_servers_info',
  46. value: 'str',
  47. plans: {
  48. free: 'fast',
  49. collaborator: 'fastest',
  50. professional: 'fastest',
  51. },
  52. },
  53. {
  54. feature: 'realtime_track_changes',
  55. info: 'realtime_track_changes_info_v2',
  56. value: 'bool',
  57. plans: {
  58. free: false,
  59. collaborator: true,
  60. professional: true,
  61. },
  62. },
  63. {
  64. feature: 'full_doc_history',
  65. info: 'full_doc_history_info_v2',
  66. value: 'bool',
  67. plans: {
  68. free: false,
  69. collaborator: true,
  70. professional: true,
  71. },
  72. },
  73. {
  74. feature: 'reference_search',
  75. info: 'reference_search_info_v2',
  76. value: 'bool',
  77. plans: {
  78. free: false,
  79. collaborator: true,
  80. professional: true,
  81. },
  82. },
  83. {
  84. feature: 'git_integration_lowercase',
  85. info: 'git_integration_lowercase_info',
  86. value: 'bool',
  87. plans: {
  88. free: false,
  89. collaborator: true,
  90. professional: true,
  91. },
  92. },
  93. ],
  94. },
  95. {
  96. divider: true,
  97. dividerLabel: 'you_get_access_to',
  98. dividerInfo: 'you_get_access_to_info',
  99. items: [
  100. {
  101. feature: 'powerful_latex_editor_and_realtime_collaboration',
  102. info: 'powerful_latex_editor_and_realtime_collaboration_info',
  103. value: 'bool',
  104. plans: {
  105. free: true,
  106. collaborator: true,
  107. professional: true,
  108. },
  109. },
  110. {
  111. feature: 'unlimited_projects',
  112. info: 'unlimited_projects_info',
  113. value: 'bool',
  114. plans: {
  115. free: true,
  116. collaborator: true,
  117. professional: true,
  118. },
  119. },
  120. {
  121. feature: 'thousands_templates',
  122. info: 'hundreds_templates_info',
  123. value: 'bool',
  124. plans: {
  125. free: true,
  126. collaborator: true,
  127. professional: true,
  128. },
  129. },
  130. {
  131. feature: 'symbol_palette',
  132. info: 'symbol_palette_info',
  133. value: 'bool',
  134. plans: {
  135. free: false,
  136. collaborator: true,
  137. professional: true,
  138. },
  139. },
  140. {
  141. feature: 'github_only_integration_lowercase',
  142. info: 'github_only_integration_lowercase_info',
  143. value: 'bool',
  144. plans: {
  145. free: false,
  146. collaborator: true,
  147. professional: true,
  148. },
  149. },
  150. {
  151. feature: 'dropbox_integration_lowercase',
  152. info: 'dropbox_integration_info',
  153. value: 'bool',
  154. plans: {
  155. free: false,
  156. collaborator: true,
  157. professional: true,
  158. },
  159. },
  160. {
  161. feature: 'mendeley_integration_lowercase',
  162. info: 'mendeley_integration_lowercase_info',
  163. value: 'bool',
  164. plans: {
  165. free: false,
  166. collaborator: true,
  167. professional: true,
  168. },
  169. },
  170. {
  171. feature: 'zotero_integration_lowercase',
  172. info: 'zotero_integration_lowercase_info',
  173. value: 'bool',
  174. plans: {
  175. free: false,
  176. collaborator: true,
  177. professional: true,
  178. },
  179. },
  180. {
  181. feature: 'priority_support',
  182. info: 'priority_support_info',
  183. value: 'bool',
  184. plans: {
  185. free: false,
  186. collaborator: true,
  187. professional: true,
  188. },
  189. },
  190. ],
  191. },
  192. ]
  193. const groupPlans = [
  194. {
  195. divider: false,
  196. items: [
  197. {
  198. feature: 'number_of_users',
  199. info: 'number_of_users_info',
  200. value: 'str',
  201. plans: {
  202. group_standard: 'two_users',
  203. group_professional: 'two_users',
  204. organization: 'contact_sales',
  205. },
  206. },
  207. {
  208. feature: 'max_collab_per_project',
  209. info: 'max_collab_per_project_info',
  210. value: 'str',
  211. plans: {
  212. group_standard: 'project_owner_plus_10',
  213. group_professional: 'unlimited_bold',
  214. organization: 'unlimited_bold',
  215. },
  216. },
  217. ],
  218. },
  219. {
  220. divider: true,
  221. dividerLabel: 'group_admins_get_access_to',
  222. dividerInfo: 'group_admins_get_access_to_info',
  223. items: [
  224. {
  225. feature: 'user_management',
  226. info: 'user_management_info',
  227. value: 'str',
  228. plans: {
  229. group_standard: 'subscription_admin_panel',
  230. group_professional: 'subscription_admin_panel',
  231. organization: 'automatic_user_registration',
  232. },
  233. },
  234. {
  235. feature: 'usage_metrics',
  236. info: 'usage_metrics_info',
  237. value: 'bool',
  238. plans: {
  239. group_standard: true,
  240. group_professional: true,
  241. organization: true,
  242. },
  243. },
  244. {
  245. feature: 'sso_integration',
  246. info: 'sso_integration_info',
  247. value: 'bool',
  248. plans: {
  249. group_standard: false,
  250. group_professional: false,
  251. organization: true,
  252. },
  253. },
  254. {
  255. feature: 'sitewide_option_available',
  256. info: 'sitewide_option_available_info',
  257. value: 'bool',
  258. plans: {
  259. group_standard: false,
  260. group_professional: false,
  261. organization: true,
  262. },
  263. },
  264. {
  265. feature: 'custom_resource_portal',
  266. info: 'custom_resource_portal_info',
  267. value: 'bool',
  268. plans: {
  269. group_standard: false,
  270. group_professional: false,
  271. organization: true,
  272. },
  273. },
  274. {
  275. feature: 'personalized_onboarding',
  276. info: 'personalized_onboarding_info',
  277. value: 'bool',
  278. plans: {
  279. group_standard: false,
  280. group_professional: false,
  281. organization: true,
  282. },
  283. },
  284. {
  285. feature: 'dedicated_account_manager',
  286. info: 'dedicated_account_manager_info',
  287. value: 'bool',
  288. plans: {
  289. group_standard: false,
  290. group_professional: false,
  291. organization: true,
  292. },
  293. },
  294. ],
  295. },
  296. {
  297. divider: true,
  298. dividerLabel: 'group_members_and_collaborators_get_access_to',
  299. dividerInfo: 'group_members_and_collaborators_get_access_to_info',
  300. items: [
  301. {
  302. feature: 'compile_timeout_short',
  303. info: 'compile_timeout_short_info',
  304. value: 'str',
  305. plans: {
  306. group_standard: 'four_minutes',
  307. group_professional: 'four_minutes',
  308. organization: 'four_minutes',
  309. },
  310. },
  311. {
  312. feature: 'realtime_track_changes',
  313. info: 'realtime_track_changes_info_v2',
  314. value: 'bool',
  315. plans: {
  316. group_standard: true,
  317. group_professional: true,
  318. organization: true,
  319. },
  320. },
  321. {
  322. feature: 'full_doc_history',
  323. info: 'full_doc_history_info_v2',
  324. value: 'bool',
  325. plans: {
  326. group_standard: true,
  327. group_professional: true,
  328. organization: true,
  329. },
  330. },
  331. {
  332. feature: 'reference_search',
  333. info: 'reference_search_info_v2',
  334. value: 'bool',
  335. plans: {
  336. group_standard: true,
  337. group_professional: true,
  338. organization: true,
  339. },
  340. },
  341. {
  342. feature: 'git_integration_lowercase',
  343. info: 'git_integration_lowercase_info',
  344. value: 'bool',
  345. plans: {
  346. group_standard: true,
  347. group_professional: true,
  348. organization: true,
  349. },
  350. },
  351. ],
  352. },
  353. {
  354. divider: true,
  355. dividerLabel: 'group_members_get_access_to',
  356. dividerInfo: 'group_members_get_access_to_info',
  357. items: [
  358. {
  359. feature: 'powerful_latex_editor_and_realtime_collaboration',
  360. info: 'powerful_latex_editor_and_realtime_collaboration_info',
  361. value: 'bool',
  362. plans: {
  363. group_standard: true,
  364. group_professional: true,
  365. organization: true,
  366. },
  367. },
  368. {
  369. feature: 'unlimited_projects',
  370. info: 'unlimited_projects_info',
  371. value: 'bool',
  372. plans: {
  373. group_standard: true,
  374. group_professional: true,
  375. organization: true,
  376. },
  377. },
  378. {
  379. feature: 'thousands_templates',
  380. info: 'hundreds_templates_info',
  381. value: 'bool',
  382. plans: {
  383. group_standard: true,
  384. group_professional: true,
  385. organization: true,
  386. },
  387. },
  388. {
  389. feature: 'symbol_palette',
  390. info: 'symbol_palette_info',
  391. value: 'bool',
  392. plans: {
  393. group_standard: true,
  394. group_professional: true,
  395. organization: true,
  396. },
  397. },
  398. {
  399. feature: 'github_only_integration_lowercase',
  400. info: 'github_only_integration_lowercase_info',
  401. value: 'bool',
  402. plans: {
  403. group_standard: true,
  404. group_professional: true,
  405. organization: true,
  406. },
  407. },
  408. {
  409. feature: 'dropbox_integration_lowercase',
  410. info: 'dropbox_integration_info',
  411. value: 'bool',
  412. plans: {
  413. group_standard: true,
  414. group_professional: true,
  415. organization: true,
  416. },
  417. },
  418. {
  419. feature: 'mendeley_integration_lowercase',
  420. info: 'mendeley_integration_lowercase_info',
  421. value: 'bool',
  422. plans: {
  423. group_standard: true,
  424. group_professional: true,
  425. organization: true,
  426. },
  427. },
  428. {
  429. feature: 'zotero_integration_lowercase',
  430. info: 'zotero_integration_lowercase_info',
  431. value: 'bool',
  432. plans: {
  433. group_standard: true,
  434. group_professional: true,
  435. organization: true,
  436. },
  437. },
  438. {
  439. feature: 'priority_support',
  440. info: 'priority_support_info',
  441. value: 'bool',
  442. plans: {
  443. group_standard: true,
  444. group_professional: true,
  445. organization: true,
  446. },
  447. },
  448. ],
  449. },
  450. ]
  451. const studentPlans = [
  452. {
  453. divider: false,
  454. items: [
  455. {
  456. feature: 'number_of_users',
  457. info: 'number_of_users_info',
  458. value: 'str',
  459. plans: {
  460. free: 'one_user',
  461. student: 'one_user',
  462. },
  463. },
  464. {
  465. feature: 'max_collab_per_project',
  466. info: 'max_collab_per_project_info',
  467. value: 'str',
  468. plans: {
  469. free: 'you_plus_1',
  470. student: 'you_plus_6',
  471. },
  472. },
  473. ],
  474. },
  475. {
  476. divider: true,
  477. dividerLabel: 'you_and_collaborators_get_access_to',
  478. dividerInfo: 'you_and_collaborators_get_access_to_info',
  479. items: [
  480. {
  481. feature: 'compile_timeout_short',
  482. info: 'compile_timeout_short_info',
  483. value: 'str',
  484. plans: {
  485. free: 'one_minute',
  486. student: 'four_minutes',
  487. },
  488. },
  489. {
  490. feature: 'realtime_track_changes',
  491. info: 'realtime_track_changes_info_v2',
  492. value: 'bool',
  493. plans: {
  494. free: false,
  495. student: true,
  496. },
  497. },
  498. {
  499. feature: 'full_doc_history',
  500. info: 'full_doc_history_info_v2',
  501. value: 'bool',
  502. plans: {
  503. free: false,
  504. student: true,
  505. },
  506. },
  507. {
  508. feature: 'reference_search',
  509. info: 'reference_search_info_v2',
  510. value: 'bool',
  511. plans: {
  512. free: false,
  513. student: true,
  514. },
  515. },
  516. {
  517. feature: 'git_integration_lowercase',
  518. info: 'git_integration_lowercase_info',
  519. value: 'bool',
  520. plans: {
  521. free: false,
  522. student: true,
  523. },
  524. },
  525. ],
  526. },
  527. {
  528. divider: true,
  529. dividerLabel: 'you_get_access_to',
  530. dividerInfo: 'you_get_access_to_info',
  531. items: [
  532. {
  533. feature: 'powerful_latex_editor_and_realtime_collaboration',
  534. info: 'powerful_latex_editor_and_realtime_collaboration_info',
  535. value: 'bool',
  536. plans: {
  537. free: true,
  538. student: true,
  539. },
  540. },
  541. {
  542. feature: 'unlimited_projects',
  543. info: 'unlimited_projects_info',
  544. value: 'bool',
  545. plans: {
  546. free: true,
  547. student: true,
  548. },
  549. },
  550. {
  551. feature: 'thousands_templates',
  552. info: 'thousands_templates_info',
  553. value: 'bool',
  554. plans: {
  555. free: true,
  556. student: true,
  557. },
  558. },
  559. {
  560. feature: 'symbol_palette',
  561. info: 'symbol_palette_info',
  562. value: 'bool',
  563. plans: {
  564. free: false,
  565. student: true,
  566. },
  567. },
  568. {
  569. feature: 'github_only_integration_lowercase',
  570. info: 'github_only_integration_lowercase_info',
  571. value: 'bool',
  572. plans: {
  573. free: false,
  574. student: true,
  575. },
  576. },
  577. {
  578. feature: 'dropbox_integration_lowercase',
  579. info: 'dropbox_integration_info',
  580. value: 'bool',
  581. plans: {
  582. free: false,
  583. student: true,
  584. },
  585. },
  586. {
  587. feature: 'mendeley_integration_lowercase',
  588. info: 'mendeley_integration_lowercase_info',
  589. value: 'bool',
  590. plans: {
  591. free: false,
  592. student: true,
  593. },
  594. },
  595. {
  596. feature: 'zotero_integration_lowercase',
  597. info: 'zotero_integration_lowercase_info',
  598. value: 'bool',
  599. plans: {
  600. free: false,
  601. student: true,
  602. },
  603. },
  604. {
  605. feature: 'priority_support',
  606. info: 'priority_support_info',
  607. value: 'bool',
  608. plans: {
  609. free: false,
  610. student: true,
  611. },
  612. },
  613. ],
  614. },
  615. ]
  616. if (Settings.managedUsers?.enabled) {
  617. const row = 2
  618. groupPlans[1].items.splice(row, 0, {
  619. feature: 'managed_users_accounts',
  620. info: 'managed_users_accounts_plan_info',
  621. value: 'bool',
  622. plans: {
  623. group_standard: false,
  624. group_professional: true,
  625. organization: false,
  626. },
  627. })
  628. }
  629. module.exports = {
  630. individual: individualPlans,
  631. group: groupPlans,
  632. student: studentPlans,
  633. }