subscriptions.ts 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  1. import {
  2. CustomSubscription,
  3. GroupSubscription,
  4. PaidSubscription,
  5. } from '../../../../../types/subscription/dashboard/subscription'
  6. import dateformat from 'dateformat'
  7. const today = new Date()
  8. const oneYearFromToday = new Date().setFullYear(today.getFullYear() + 1)
  9. const nextPaymentDueAt = dateformat(oneYearFromToday, 'dS mmmm yyyy')
  10. const nextPaymentDueDate = dateformat(oneYearFromToday, 'dS mmmm yyyy')
  11. const sevenDaysFromToday = new Date().setDate(today.getDate() + 7)
  12. const sevenDaysFromTodayFormatted = dateformat(
  13. sevenDaysFromToday,
  14. 'dS mmmm yyyy'
  15. )
  16. export const annualActiveSubscription: PaidSubscription = {
  17. manager_ids: ['abc123'],
  18. member_ids: [],
  19. invited_emails: [],
  20. groupPlan: false,
  21. membersLimit: 0,
  22. _id: 'def456',
  23. admin_id: 'abc123',
  24. teamInvites: [],
  25. planCode: 'collaborator-annual',
  26. plan: {
  27. planCode: 'collaborator-annual',
  28. name: 'Standard (Collaborator) Annual',
  29. price_in_cents: 21900,
  30. annual: true,
  31. featureDescription: [],
  32. canUseFlexibleLicensing: false,
  33. },
  34. payment: {
  35. taxRate: 0,
  36. billingDetailsLink: '/user/subscription/payment/billing-details',
  37. accountManagementLink: '/user/subscription/payment/account-management',
  38. additionalLicenses: 0,
  39. totalLicenses: 0,
  40. nextPaymentDueAt,
  41. nextPaymentDueDate,
  42. currency: 'USD',
  43. state: 'active',
  44. trialEndsAtFormatted: null,
  45. trialEndsAt: null,
  46. activeCoupons: [],
  47. accountEmail: 'fake@example.com',
  48. hasPastDueInvoice: false,
  49. displayPrice: '$199.00',
  50. planOnlyDisplayPrice: '$199.00',
  51. addOns: [],
  52. addOnDisplayPricesWithoutAdditionalLicense: {},
  53. isEligibleForGroupPlan: true,
  54. isEligibleForPause: false,
  55. isEligibleForDowngradeUpsell: false,
  56. },
  57. }
  58. export const annualActiveSubscriptionWithCoupons: PaidSubscription = {
  59. manager_ids: ['abc123'],
  60. member_ids: [],
  61. invited_emails: [],
  62. groupPlan: false,
  63. membersLimit: 0,
  64. _id: 'def456',
  65. admin_id: 'abc123',
  66. teamInvites: [],
  67. planCode: 'collaborator-annual',
  68. plan: {
  69. planCode: 'collaborator-annual',
  70. name: 'Standard (Collaborator) Annual',
  71. price_in_cents: 21900,
  72. annual: true,
  73. featureDescription: [],
  74. canUseFlexibleLicensing: false,
  75. },
  76. payment: {
  77. taxRate: 0,
  78. billingDetailsLink: '/user/subscription/payment/billing-details',
  79. accountManagementLink: '/user/subscription/payment/account-management',
  80. additionalLicenses: 0,
  81. totalLicenses: 0,
  82. nextPaymentDueAt,
  83. nextPaymentDueDate,
  84. currency: 'USD',
  85. state: 'active',
  86. trialEndsAtFormatted: null,
  87. trialEndsAt: null,
  88. activeCoupons: [
  89. { name: 'Coupon1', code: 'c1', description: 'Coupon1 for 10% off' },
  90. { name: 'Coupon2', code: 'c2', description: 'Coupon2 for 15% off' },
  91. ],
  92. accountEmail: 'fake@example.com',
  93. hasPastDueInvoice: false,
  94. displayPrice: '$199.00',
  95. planOnlyDisplayPrice: '$199.00',
  96. addOns: [],
  97. addOnDisplayPricesWithoutAdditionalLicense: {},
  98. isEligibleForGroupPlan: true,
  99. isEligibleForPause: false,
  100. isEligibleForDowngradeUpsell: false,
  101. },
  102. }
  103. export const pendingPausedSubscription: PaidSubscription = {
  104. manager_ids: ['abc123'],
  105. member_ids: [],
  106. invited_emails: [],
  107. groupPlan: false,
  108. membersLimit: 0,
  109. _id: 'def456',
  110. admin_id: 'abc123',
  111. teamInvites: [],
  112. planCode: 'collaborator-annual',
  113. plan: {
  114. planCode: 'collaborator-annual',
  115. name: 'Standard (Collaborator) Annual',
  116. price_in_cents: 21900,
  117. annual: true,
  118. featureDescription: [],
  119. canUseFlexibleLicensing: false,
  120. },
  121. payment: {
  122. taxRate: 0,
  123. billingDetailsLink: '/user/subscription/payment/billing-details',
  124. accountManagementLink: '/user/subscription/payment/account-management',
  125. additionalLicenses: 0,
  126. totalLicenses: 0,
  127. nextPaymentDueAt,
  128. nextPaymentDueDate,
  129. currency: 'USD',
  130. state: 'active',
  131. remainingPauseCycles: 1,
  132. trialEndsAtFormatted: null,
  133. trialEndsAt: null,
  134. activeCoupons: [],
  135. accountEmail: 'fake@example.com',
  136. hasPastDueInvoice: false,
  137. displayPrice: '$199.00',
  138. planOnlyDisplayPrice: '$199.00',
  139. addOns: [],
  140. addOnDisplayPricesWithoutAdditionalLicense: {},
  141. isEligibleForGroupPlan: true,
  142. isEligibleForPause: false,
  143. isEligibleForDowngradeUpsell: false,
  144. },
  145. }
  146. export const pausedSubscription: PaidSubscription = {
  147. manager_ids: ['abc123'],
  148. member_ids: [],
  149. invited_emails: [],
  150. groupPlan: false,
  151. membersLimit: 0,
  152. _id: 'def456',
  153. admin_id: 'abc123',
  154. teamInvites: [],
  155. planCode: 'collaborator-annual',
  156. plan: {
  157. planCode: 'collaborator-annual',
  158. name: 'Standard (Collaborator) Annual',
  159. price_in_cents: 21900,
  160. annual: true,
  161. featureDescription: [],
  162. canUseFlexibleLicensing: false,
  163. },
  164. payment: {
  165. taxRate: 0,
  166. billingDetailsLink: '/user/subscription/payment/billing-details',
  167. accountManagementLink: '/user/subscription/payment/account-management',
  168. additionalLicenses: 0,
  169. totalLicenses: 0,
  170. nextPaymentDueAt,
  171. nextPaymentDueDate,
  172. currency: 'USD',
  173. state: 'paused',
  174. remainingPauseCycles: 1,
  175. trialEndsAtFormatted: null,
  176. trialEndsAt: null,
  177. activeCoupons: [],
  178. accountEmail: 'fake@example.com',
  179. hasPastDueInvoice: false,
  180. displayPrice: '$199.00',
  181. planOnlyDisplayPrice: '$199.00',
  182. addOns: [],
  183. addOnDisplayPricesWithoutAdditionalLicense: {},
  184. isEligibleForGroupPlan: true,
  185. isEligibleForPause: false,
  186. isEligibleForDowngradeUpsell: false,
  187. },
  188. }
  189. export const annualActiveSubscriptionWithAddons: PaidSubscription = {
  190. manager_ids: ['abc123'],
  191. member_ids: [],
  192. invited_emails: [],
  193. groupPlan: false,
  194. membersLimit: 0,
  195. _id: 'def456',
  196. admin_id: 'abc123',
  197. teamInvites: [],
  198. planCode: 'collaborator-annual',
  199. plan: {
  200. planCode: 'collaborator-annual',
  201. name: 'Standard (Collaborator) Annual',
  202. price_in_cents: 21900,
  203. annual: true,
  204. featureDescription: [],
  205. canUseFlexibleLicensing: false,
  206. },
  207. payment: {
  208. taxRate: 0,
  209. billingDetailsLink: '/user/subscription/payment/billing-details',
  210. accountManagementLink: '/user/subscription/payment/account-management',
  211. additionalLicenses: 0,
  212. totalLicenses: 0,
  213. nextPaymentDueAt,
  214. nextPaymentDueDate,
  215. currency: 'USD',
  216. state: 'active',
  217. trialEndsAtFormatted: null,
  218. trialEndsAt: null,
  219. activeCoupons: [],
  220. accountEmail: 'fake@example.com',
  221. hasPastDueInvoice: false,
  222. displayPrice: '$199.00',
  223. planOnlyDisplayPrice: '$199.00',
  224. addOns: [],
  225. addOnDisplayPricesWithoutAdditionalLicense: {
  226. assistant: '$100.00',
  227. },
  228. isEligibleForGroupPlan: true,
  229. isEligibleForPause: false,
  230. isEligibleForDowngradeUpsell: false,
  231. },
  232. addOns: [{ addOnCode: 'assistant', quantity: 1, unitAmountInCents: 10000 }],
  233. }
  234. export const annualActiveSubscriptionEuro: PaidSubscription = {
  235. manager_ids: ['abc123'],
  236. member_ids: [],
  237. invited_emails: [],
  238. groupPlan: false,
  239. membersLimit: 0,
  240. _id: 'def456',
  241. admin_id: 'abc123',
  242. teamInvites: [],
  243. planCode: 'collaborator-annual',
  244. plan: {
  245. planCode: 'collaborator-annual',
  246. name: 'Standard (Collaborator) Annual',
  247. price_in_cents: 21900,
  248. annual: true,
  249. featureDescription: [],
  250. canUseFlexibleLicensing: false,
  251. },
  252. payment: {
  253. taxRate: 0.24,
  254. billingDetailsLink: '/user/subscription/payment/billing-details',
  255. accountManagementLink: '/user/subscription/payment/account-management',
  256. additionalLicenses: 0,
  257. totalLicenses: 0,
  258. nextPaymentDueAt,
  259. nextPaymentDueDate,
  260. currency: 'EUR',
  261. state: 'active',
  262. trialEndsAtFormatted: null,
  263. trialEndsAt: null,
  264. activeCoupons: [],
  265. accountEmail: 'fake@example.com',
  266. hasPastDueInvoice: false,
  267. displayPrice: '€221.96',
  268. planOnlyDisplayPrice: '€221.96',
  269. addOns: [],
  270. addOnDisplayPricesWithoutAdditionalLicense: {},
  271. isEligibleForGroupPlan: true,
  272. isEligibleForPause: true,
  273. isEligibleForDowngradeUpsell: false,
  274. },
  275. }
  276. export const annualActiveSubscriptionPro: PaidSubscription = {
  277. manager_ids: ['abc123'],
  278. member_ids: [],
  279. invited_emails: [],
  280. groupPlan: false,
  281. membersLimit: 0,
  282. _id: 'def456',
  283. admin_id: 'abc123',
  284. teamInvites: [],
  285. planCode: 'professional',
  286. plan: {
  287. planCode: 'professional',
  288. name: 'Professional',
  289. price_in_cents: 4500,
  290. featureDescription: [],
  291. canUseFlexibleLicensing: false,
  292. },
  293. payment: {
  294. taxRate: 0,
  295. billingDetailsLink: '/user/subscription/payment/billing-details',
  296. accountManagementLink: '/user/subscription/payment/account-management',
  297. additionalLicenses: 0,
  298. totalLicenses: 0,
  299. nextPaymentDueAt,
  300. nextPaymentDueDate,
  301. currency: 'USD',
  302. state: 'active',
  303. trialEndsAtFormatted: null,
  304. trialEndsAt: null,
  305. activeCoupons: [],
  306. accountEmail: 'fake@example.com',
  307. hasPastDueInvoice: false,
  308. displayPrice: '$42.00',
  309. planOnlyDisplayPrice: '$42.00',
  310. addOns: [],
  311. addOnDisplayPricesWithoutAdditionalLicense: {},
  312. isEligibleForGroupPlan: true,
  313. isEligibleForPause: true,
  314. isEligibleForDowngradeUpsell: false,
  315. },
  316. }
  317. export const pastDueExpiredSubscription: PaidSubscription = {
  318. manager_ids: ['abc123'],
  319. member_ids: [],
  320. invited_emails: [],
  321. groupPlan: false,
  322. membersLimit: 0,
  323. _id: 'def456',
  324. admin_id: 'abc123',
  325. teamInvites: [],
  326. planCode: 'collaborator-annual',
  327. plan: {
  328. planCode: 'collaborator-annual',
  329. name: 'Standard (Collaborator) Annual',
  330. price_in_cents: 21900,
  331. annual: true,
  332. featureDescription: [],
  333. canUseFlexibleLicensing: false,
  334. },
  335. payment: {
  336. taxRate: 0,
  337. billingDetailsLink: '/user/subscription/payment/billing-details',
  338. accountManagementLink: '/user/subscription/payment/account-management',
  339. additionalLicenses: 0,
  340. totalLicenses: 0,
  341. nextPaymentDueAt,
  342. nextPaymentDueDate,
  343. currency: 'USD',
  344. state: 'expired',
  345. trialEndsAtFormatted: null,
  346. trialEndsAt: null,
  347. activeCoupons: [],
  348. accountEmail: 'fake@example.com',
  349. hasPastDueInvoice: true,
  350. displayPrice: '$199.00',
  351. planOnlyDisplayPrice: '$199.00',
  352. addOns: [],
  353. addOnDisplayPricesWithoutAdditionalLicense: {},
  354. isEligibleForGroupPlan: true,
  355. isEligibleForPause: true,
  356. isEligibleForDowngradeUpsell: false,
  357. },
  358. }
  359. export const canceledSubscription: PaidSubscription = {
  360. manager_ids: ['abc123'],
  361. member_ids: [],
  362. invited_emails: [],
  363. groupPlan: false,
  364. membersLimit: 0,
  365. _id: 'def456',
  366. admin_id: 'abc123',
  367. teamInvites: [],
  368. planCode: 'collaborator-annual',
  369. plan: {
  370. planCode: 'collaborator-annual',
  371. name: 'Standard (Collaborator) Annual',
  372. price_in_cents: 21900,
  373. annual: true,
  374. featureDescription: [],
  375. canUseFlexibleLicensing: false,
  376. },
  377. payment: {
  378. taxRate: 0,
  379. billingDetailsLink: '/user/subscription/payment/billing-details',
  380. accountManagementLink: '/user/subscription/payment/account-management',
  381. additionalLicenses: 0,
  382. totalLicenses: 0,
  383. nextPaymentDueAt,
  384. nextPaymentDueDate,
  385. currency: 'USD',
  386. state: 'canceled',
  387. trialEndsAtFormatted: null,
  388. trialEndsAt: null,
  389. activeCoupons: [],
  390. accountEmail: 'fake@example.com',
  391. hasPastDueInvoice: false,
  392. displayPrice: '$199.00',
  393. planOnlyDisplayPrice: '$199.00',
  394. addOns: [],
  395. addOnDisplayPricesWithoutAdditionalLicense: {},
  396. isEligibleForGroupPlan: true,
  397. isEligibleForPause: true,
  398. isEligibleForDowngradeUpsell: false,
  399. },
  400. }
  401. export const pendingAddOnChange: PaidSubscription = {
  402. manager_ids: ['abc123'],
  403. member_ids: [],
  404. invited_emails: [],
  405. groupPlan: false,
  406. membersLimit: 0,
  407. _id: 'add-on-change-123',
  408. admin_id: 'abc123',
  409. teamInvites: [],
  410. planCode: 'collaborator-annual',
  411. plan: {
  412. planCode: 'collaborator-annual',
  413. name: 'Standard (Collaborator) Annual',
  414. price_in_cents: 21900,
  415. annual: true,
  416. featureDescription: [],
  417. canUseFlexibleLicensing: false,
  418. },
  419. payment: {
  420. taxRate: 0,
  421. billingDetailsLink: '/user/subscription/payment/billing-details',
  422. accountManagementLink: '/user/subscription/payment/account-management',
  423. additionalLicenses: 0,
  424. totalLicenses: 0,
  425. nextPaymentDueAt,
  426. nextPaymentDueDate,
  427. currency: 'USD',
  428. state: 'active',
  429. trialEndsAtFormatted: null,
  430. trialEndsAt: null,
  431. activeCoupons: [],
  432. accountEmail: 'fake@example.com',
  433. hasPastDueInvoice: false,
  434. displayPrice: '$199.00',
  435. planOnlyDisplayPrice: '$199.00',
  436. addOns: [
  437. {
  438. code: 'AI',
  439. quantity: 1,
  440. unitPrice: 1000,
  441. name: 'AI Add-on',
  442. },
  443. ],
  444. addOnDisplayPricesWithoutAdditionalLicense: {},
  445. isEligibleForGroupPlan: true,
  446. isEligibleForPause: false,
  447. isEligibleForDowngradeUpsell: false,
  448. },
  449. pendingPlan: {
  450. planCode: 'collaborator-annual',
  451. name: 'Standard (Collaborator) Annual',
  452. price_in_cents: 21900,
  453. annual: true,
  454. featureDescription: [],
  455. },
  456. }
  457. export const pendingSubscriptionChange: PaidSubscription = {
  458. manager_ids: ['abc123'],
  459. member_ids: [],
  460. invited_emails: [],
  461. groupPlan: false,
  462. membersLimit: 0,
  463. _id: 'def456',
  464. admin_id: 'abc123',
  465. teamInvites: [],
  466. planCode: 'collaborator-annual',
  467. plan: {
  468. planCode: 'collaborator-annual',
  469. name: 'Standard (Collaborator) Annual',
  470. price_in_cents: 21900,
  471. annual: true,
  472. featureDescription: [],
  473. canUseFlexibleLicensing: false,
  474. },
  475. payment: {
  476. taxRate: 0,
  477. billingDetailsLink: '/user/subscription/payment/billing-details',
  478. accountManagementLink: '/user/subscription/payment/account-management',
  479. additionalLicenses: 0,
  480. totalLicenses: 0,
  481. nextPaymentDueAt,
  482. nextPaymentDueDate,
  483. currency: 'USD',
  484. state: 'active',
  485. trialEndsAtFormatted: null,
  486. trialEndsAt: null,
  487. activeCoupons: [],
  488. accountEmail: 'fake@example.com',
  489. hasPastDueInvoice: false,
  490. displayPrice: '$199.00',
  491. planOnlyDisplayPrice: '$199.00',
  492. addOns: [],
  493. addOnDisplayPricesWithoutAdditionalLicense: {},
  494. isEligibleForGroupPlan: true,
  495. isEligibleForPause: false,
  496. isEligibleForDowngradeUpsell: false,
  497. },
  498. pendingPlan: {
  499. planCode: 'professional-annual',
  500. name: 'Professional Annual',
  501. price_in_cents: 42900,
  502. annual: true,
  503. featureDescription: [],
  504. },
  505. }
  506. export const groupActiveSubscription: GroupSubscription = {
  507. manager_ids: ['abc123'],
  508. member_ids: ['abc123'],
  509. invited_emails: [],
  510. groupPlan: true,
  511. teamName: 'GAS',
  512. membersLimit: 10,
  513. _id: 'bcd567',
  514. admin_id: 'abc123',
  515. teamInvites: [],
  516. planCode: 'group_collaborator_10_enterprise',
  517. plan: {
  518. planCode: 'group_collaborator_10_enterprise',
  519. name: 'Overleaf Standard (Collaborator) - Group Account (10 licenses) - Enterprise',
  520. hideFromUsers: true,
  521. price_in_cents: 129000,
  522. annual: true,
  523. groupPlan: true,
  524. membersLimit: 10,
  525. membersLimitAddOn: 'additional-license',
  526. canUseFlexibleLicensing: true,
  527. },
  528. payment: {
  529. taxRate: 0,
  530. billingDetailsLink: '/user/subscription/payment/billing-details',
  531. accountManagementLink: '/user/subscription/payment/account-management',
  532. additionalLicenses: 0,
  533. totalLicenses: 10,
  534. nextPaymentDueAt,
  535. nextPaymentDueDate,
  536. currency: 'USD',
  537. state: 'active',
  538. trialEndsAtFormatted: null,
  539. trialEndsAt: null,
  540. activeCoupons: [],
  541. accountEmail: 'fake@example.com',
  542. hasPastDueInvoice: false,
  543. displayPrice: '$1290.00',
  544. planOnlyDisplayPrice: '$1290.00',
  545. addOns: [],
  546. addOnDisplayPricesWithoutAdditionalLicense: {},
  547. isEligibleForGroupPlan: true,
  548. isEligibleForPause: false,
  549. isEligibleForDowngradeUpsell: false,
  550. },
  551. }
  552. export const groupProfessionalActiveSubscription: GroupSubscription = {
  553. manager_ids: ['abc123'],
  554. member_ids: ['abc123'],
  555. invited_emails: [],
  556. groupPlan: true,
  557. teamName: 'GAS',
  558. membersLimit: 2,
  559. _id: 'bcd567',
  560. admin_id: 'abc123',
  561. teamInvites: [],
  562. planCode: 'group_professional_2_enterprise',
  563. plan: {
  564. planCode: 'group_professional_2_enterprise',
  565. name: 'Group Professional Plan (2 licenses)',
  566. hideFromUsers: true,
  567. price_in_cents: 129000,
  568. annual: true,
  569. groupPlan: true,
  570. membersLimit: 2,
  571. membersLimitAddOn: 'additional-license',
  572. canUseFlexibleLicensing: true,
  573. },
  574. payment: {
  575. taxRate: 0,
  576. billingDetailsLink: '/user/subscription/payment/billing-details',
  577. accountManagementLink: '/user/subscription/payment/account-management',
  578. additionalLicenses: 0,
  579. totalLicenses: 10,
  580. nextPaymentDueAt,
  581. nextPaymentDueDate,
  582. currency: 'USD',
  583. state: 'active',
  584. trialEndsAtFormatted: null,
  585. trialEndsAt: null,
  586. activeCoupons: [],
  587. accountEmail: 'fake@example.com',
  588. hasPastDueInvoice: false,
  589. displayPrice: '$1290.00',
  590. planOnlyDisplayPrice: '$1290.00',
  591. addOns: [],
  592. addOnDisplayPricesWithoutAdditionalLicense: {},
  593. isEligibleForGroupPlan: true,
  594. isEligibleForPause: false,
  595. isEligibleForDowngradeUpsell: false,
  596. },
  597. }
  598. export const groupActiveSubscriptionWithPendingLicenseChange: GroupSubscription =
  599. {
  600. manager_ids: ['abc123'],
  601. member_ids: ['abc123'],
  602. invited_emails: [],
  603. groupPlan: true,
  604. teamName: 'GASWPLC',
  605. membersLimit: 10,
  606. _id: 'def456',
  607. admin_id: 'abc123',
  608. teamInvites: [],
  609. planCode: 'group_collaborator_10_enterprise',
  610. plan: {
  611. planCode: 'group_collaborator_10_enterprise',
  612. name: 'Overleaf Standard (Collaborator) - Group Account (10 licenses) - Enterprise',
  613. hideFromUsers: true,
  614. price_in_cents: 129000,
  615. annual: true,
  616. groupPlan: true,
  617. membersLimit: 10,
  618. membersLimitAddOn: 'additional-license',
  619. canUseFlexibleLicensing: true,
  620. },
  621. payment: {
  622. taxRate: 0,
  623. billingDetailsLink: '/user/subscription/payment/billing-details',
  624. accountManagementLink: '/user/subscription/payment/account-management',
  625. additionalLicenses: 11,
  626. totalLicenses: 21,
  627. nextPaymentDueAt,
  628. nextPaymentDueDate,
  629. currency: 'USD',
  630. state: 'active',
  631. trialEndsAtFormatted: null,
  632. trialEndsAt: null,
  633. activeCoupons: [],
  634. accountEmail: 'fake@example.com',
  635. hasPastDueInvoice: false,
  636. displayPrice: '$2967.00',
  637. pendingAdditionalLicenses: 13,
  638. pendingTotalLicenses: 23,
  639. planOnlyDisplayPrice: '$2967.00',
  640. addOns: [],
  641. addOnDisplayPricesWithoutAdditionalLicense: {},
  642. isEligibleForGroupPlan: true,
  643. isEligibleForPause: false,
  644. isEligibleForDowngradeUpsell: false,
  645. },
  646. pendingPlan: {
  647. planCode: 'group_collaborator_10_enterprise',
  648. name: 'Overleaf Standard (Collaborator) - Group Account (10 licenses) - Enterprise',
  649. hideFromUsers: true,
  650. price_in_cents: 129000,
  651. annual: true,
  652. groupPlan: true,
  653. membersLimit: 10,
  654. membersLimitAddOn: 'additional-license',
  655. },
  656. }
  657. export const trialSubscription: PaidSubscription = {
  658. manager_ids: ['abc123'],
  659. member_ids: [],
  660. invited_emails: [],
  661. groupPlan: false,
  662. membersLimit: 0,
  663. _id: 'def456',
  664. admin_id: 'abc123',
  665. teamInvites: [],
  666. planCode: 'paid-personal_free_trial_7_days',
  667. plan: {
  668. planCode: 'paid-personal_free_trial_7_days',
  669. name: 'Personal',
  670. price_in_cents: 1500,
  671. featureDescription: [],
  672. hideFromUsers: true,
  673. },
  674. payment: {
  675. taxRate: 0,
  676. billingDetailsLink: '/user/subscription/payment/billing-details',
  677. accountManagementLink: '/user/subscription/payment/account-management',
  678. additionalLicenses: 0,
  679. totalLicenses: 0,
  680. nextPaymentDueAt: sevenDaysFromTodayFormatted,
  681. nextPaymentDueDate: sevenDaysFromTodayFormatted,
  682. currency: 'USD',
  683. state: 'active',
  684. trialEndsAtFormatted: sevenDaysFromTodayFormatted,
  685. trialEndsAt: new Date(sevenDaysFromToday).toString(),
  686. activeCoupons: [],
  687. accountEmail: 'fake@example.com',
  688. hasPastDueInvoice: false,
  689. displayPrice: '$14.00',
  690. planOnlyDisplayPrice: '$14.00',
  691. addOns: [],
  692. addOnDisplayPricesWithoutAdditionalLicense: {},
  693. isEligibleForGroupPlan: true,
  694. isEligibleForPause: false,
  695. isEligibleForDowngradeUpsell: false,
  696. },
  697. }
  698. export const customSubscription: CustomSubscription = {
  699. manager_ids: ['abc123'],
  700. member_ids: [],
  701. invited_emails: [],
  702. groupPlan: false,
  703. membersLimit: 0,
  704. _id: 'def456',
  705. admin_id: 'abc123',
  706. teamInvites: [],
  707. planCode: 'collaborator-annual',
  708. plan: {
  709. planCode: 'collaborator-annual',
  710. name: 'Standard (Collaborator) Annual',
  711. price_in_cents: 21900,
  712. annual: true,
  713. featureDescription: [],
  714. },
  715. customAccount: true,
  716. }
  717. export const trialCollaboratorSubscription: PaidSubscription = {
  718. manager_ids: ['abc123'],
  719. member_ids: [],
  720. invited_emails: [],
  721. groupPlan: false,
  722. membersLimit: 0,
  723. _id: 'def456',
  724. admin_id: 'abc123',
  725. teamInvites: [],
  726. planCode: 'collaborator_free_trial_7_days',
  727. plan: {
  728. planCode: 'collaborator_free_trial_7_days',
  729. name: 'Standard (Collaborator)',
  730. price_in_cents: 2300,
  731. featureDescription: [],
  732. hideFromUsers: true,
  733. canUseFlexibleLicensing: false,
  734. },
  735. payment: {
  736. taxRate: 0,
  737. billingDetailsLink: '/user/subscription/payment/billing-details',
  738. accountManagementLink: '/user/subscription/payment/account-management',
  739. additionalLicenses: 0,
  740. totalLicenses: 0,
  741. nextPaymentDueAt: sevenDaysFromTodayFormatted,
  742. nextPaymentDueDate: sevenDaysFromTodayFormatted,
  743. currency: 'USD',
  744. state: 'active',
  745. trialEndsAtFormatted: sevenDaysFromTodayFormatted,
  746. trialEndsAt: new Date(sevenDaysFromToday).toString(),
  747. activeCoupons: [],
  748. accountEmail: 'foo@example.com',
  749. hasPastDueInvoice: false,
  750. displayPrice: '$21.00',
  751. planOnlyDisplayPrice: '$21.00',
  752. addOns: [],
  753. addOnDisplayPricesWithoutAdditionalLicense: {},
  754. isEligibleForGroupPlan: true,
  755. isEligibleForPause: true,
  756. isEligibleForDowngradeUpsell: false,
  757. },
  758. }
  759. export const monthlyActiveCollaborator: PaidSubscription = {
  760. manager_ids: ['abc123'],
  761. member_ids: [],
  762. invited_emails: [],
  763. groupPlan: false,
  764. membersLimit: 0,
  765. _id: 'def456',
  766. admin_id: 'abc123',
  767. teamInvites: [],
  768. planCode: 'collaborator',
  769. plan: {
  770. planCode: 'collaborator',
  771. name: 'Standard (Collaborator)',
  772. price_in_cents: 212300900,
  773. featureDescription: [],
  774. canUseFlexibleLicensing: false,
  775. },
  776. payment: {
  777. taxRate: 0,
  778. billingDetailsLink: '/user/subscription/payment/billing-details',
  779. accountManagementLink: '/user/subscription/payment/account-management',
  780. additionalLicenses: 0,
  781. totalLicenses: 0,
  782. nextPaymentDueAt,
  783. nextPaymentDueDate,
  784. currency: 'USD',
  785. state: 'active',
  786. trialEndsAtFormatted: null,
  787. trialEndsAt: null,
  788. activeCoupons: [],
  789. accountEmail: 'foo@example.com',
  790. hasPastDueInvoice: false,
  791. displayPrice: '$21.00',
  792. planOnlyDisplayPrice: '$21.00',
  793. addOns: [],
  794. addOnDisplayPricesWithoutAdditionalLicense: {},
  795. isEligibleForGroupPlan: true,
  796. isEligibleForPause: true,
  797. isEligibleForDowngradeUpsell: true,
  798. },
  799. }