subscriptions.ts 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761
  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 pendingSubscriptionChange: PaidSubscription = {
  402. manager_ids: ['abc123'],
  403. member_ids: [],
  404. invited_emails: [],
  405. groupPlan: false,
  406. membersLimit: 0,
  407. _id: 'def456',
  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. addOnDisplayPricesWithoutAdditionalLicense: {},
  438. isEligibleForGroupPlan: true,
  439. isEligibleForPause: false,
  440. isEligibleForDowngradeUpsell: false,
  441. },
  442. pendingPlan: {
  443. planCode: 'professional-annual',
  444. name: 'Professional Annual',
  445. price_in_cents: 42900,
  446. annual: true,
  447. featureDescription: [],
  448. },
  449. }
  450. export const groupActiveSubscription: GroupSubscription = {
  451. manager_ids: ['abc123'],
  452. member_ids: ['abc123'],
  453. invited_emails: [],
  454. groupPlan: true,
  455. teamName: 'GAS',
  456. membersLimit: 10,
  457. _id: 'bcd567',
  458. admin_id: 'abc123',
  459. teamInvites: [],
  460. planCode: 'group_collaborator_10_enterprise',
  461. plan: {
  462. planCode: 'group_collaborator_10_enterprise',
  463. name: 'Overleaf Standard (Collaborator) - Group Account (10 licenses) - Enterprise',
  464. hideFromUsers: true,
  465. price_in_cents: 129000,
  466. annual: true,
  467. groupPlan: true,
  468. membersLimit: 10,
  469. membersLimitAddOn: 'additional-license',
  470. canUseFlexibleLicensing: true,
  471. },
  472. payment: {
  473. taxRate: 0,
  474. billingDetailsLink: '/user/subscription/payment/billing-details',
  475. accountManagementLink: '/user/subscription/payment/account-management',
  476. additionalLicenses: 0,
  477. totalLicenses: 10,
  478. nextPaymentDueAt,
  479. nextPaymentDueDate,
  480. currency: 'USD',
  481. state: 'active',
  482. trialEndsAtFormatted: null,
  483. trialEndsAt: null,
  484. activeCoupons: [],
  485. accountEmail: 'fake@example.com',
  486. hasPastDueInvoice: false,
  487. displayPrice: '$1290.00',
  488. planOnlyDisplayPrice: '$1290.00',
  489. addOns: [],
  490. addOnDisplayPricesWithoutAdditionalLicense: {},
  491. isEligibleForGroupPlan: true,
  492. isEligibleForPause: false,
  493. isEligibleForDowngradeUpsell: false,
  494. },
  495. }
  496. export const groupProfessionalActiveSubscription: GroupSubscription = {
  497. manager_ids: ['abc123'],
  498. member_ids: ['abc123'],
  499. invited_emails: [],
  500. groupPlan: true,
  501. teamName: 'GAS',
  502. membersLimit: 2,
  503. _id: 'bcd567',
  504. admin_id: 'abc123',
  505. teamInvites: [],
  506. planCode: 'group_professional_2_enterprise',
  507. plan: {
  508. planCode: 'group_professional_2_enterprise',
  509. name: 'Group Professional Plan (2 licenses)',
  510. hideFromUsers: true,
  511. price_in_cents: 129000,
  512. annual: true,
  513. groupPlan: true,
  514. membersLimit: 2,
  515. membersLimitAddOn: 'additional-license',
  516. canUseFlexibleLicensing: true,
  517. },
  518. payment: {
  519. taxRate: 0,
  520. billingDetailsLink: '/user/subscription/payment/billing-details',
  521. accountManagementLink: '/user/subscription/payment/account-management',
  522. additionalLicenses: 0,
  523. totalLicenses: 10,
  524. nextPaymentDueAt,
  525. nextPaymentDueDate,
  526. currency: 'USD',
  527. state: 'active',
  528. trialEndsAtFormatted: null,
  529. trialEndsAt: null,
  530. activeCoupons: [],
  531. accountEmail: 'fake@example.com',
  532. hasPastDueInvoice: false,
  533. displayPrice: '$1290.00',
  534. planOnlyDisplayPrice: '$1290.00',
  535. addOns: [],
  536. addOnDisplayPricesWithoutAdditionalLicense: {},
  537. isEligibleForGroupPlan: true,
  538. isEligibleForPause: false,
  539. isEligibleForDowngradeUpsell: false,
  540. },
  541. }
  542. export const groupActiveSubscriptionWithPendingLicenseChange: GroupSubscription =
  543. {
  544. manager_ids: ['abc123'],
  545. member_ids: ['abc123'],
  546. invited_emails: [],
  547. groupPlan: true,
  548. teamName: 'GASWPLC',
  549. membersLimit: 10,
  550. _id: 'def456',
  551. admin_id: 'abc123',
  552. teamInvites: [],
  553. planCode: 'group_collaborator_10_enterprise',
  554. plan: {
  555. planCode: 'group_collaborator_10_enterprise',
  556. name: 'Overleaf Standard (Collaborator) - Group Account (10 licenses) - Enterprise',
  557. hideFromUsers: true,
  558. price_in_cents: 129000,
  559. annual: true,
  560. groupPlan: true,
  561. membersLimit: 10,
  562. membersLimitAddOn: 'additional-license',
  563. canUseFlexibleLicensing: true,
  564. },
  565. payment: {
  566. taxRate: 0,
  567. billingDetailsLink: '/user/subscription/payment/billing-details',
  568. accountManagementLink: '/user/subscription/payment/account-management',
  569. additionalLicenses: 11,
  570. totalLicenses: 21,
  571. nextPaymentDueAt,
  572. nextPaymentDueDate,
  573. currency: 'USD',
  574. state: 'active',
  575. trialEndsAtFormatted: null,
  576. trialEndsAt: null,
  577. activeCoupons: [],
  578. accountEmail: 'fake@example.com',
  579. hasPastDueInvoice: false,
  580. displayPrice: '$2967.00',
  581. pendingAdditionalLicenses: 13,
  582. pendingTotalLicenses: 23,
  583. planOnlyDisplayPrice: '$2967.00',
  584. addOns: [],
  585. addOnDisplayPricesWithoutAdditionalLicense: {},
  586. isEligibleForGroupPlan: true,
  587. isEligibleForPause: false,
  588. isEligibleForDowngradeUpsell: false,
  589. },
  590. pendingPlan: {
  591. planCode: 'group_collaborator_10_enterprise',
  592. name: 'Overleaf Standard (Collaborator) - Group Account (10 licenses) - Enterprise',
  593. hideFromUsers: true,
  594. price_in_cents: 129000,
  595. annual: true,
  596. groupPlan: true,
  597. membersLimit: 10,
  598. membersLimitAddOn: 'additional-license',
  599. },
  600. }
  601. export const trialSubscription: PaidSubscription = {
  602. manager_ids: ['abc123'],
  603. member_ids: [],
  604. invited_emails: [],
  605. groupPlan: false,
  606. membersLimit: 0,
  607. _id: 'def456',
  608. admin_id: 'abc123',
  609. teamInvites: [],
  610. planCode: 'paid-personal_free_trial_7_days',
  611. plan: {
  612. planCode: 'paid-personal_free_trial_7_days',
  613. name: 'Personal',
  614. price_in_cents: 1500,
  615. featureDescription: [],
  616. hideFromUsers: true,
  617. },
  618. payment: {
  619. taxRate: 0,
  620. billingDetailsLink: '/user/subscription/payment/billing-details',
  621. accountManagementLink: '/user/subscription/payment/account-management',
  622. additionalLicenses: 0,
  623. totalLicenses: 0,
  624. nextPaymentDueAt: sevenDaysFromTodayFormatted,
  625. nextPaymentDueDate: sevenDaysFromTodayFormatted,
  626. currency: 'USD',
  627. state: 'active',
  628. trialEndsAtFormatted: sevenDaysFromTodayFormatted,
  629. trialEndsAt: new Date(sevenDaysFromToday).toString(),
  630. activeCoupons: [],
  631. accountEmail: 'fake@example.com',
  632. hasPastDueInvoice: false,
  633. displayPrice: '$14.00',
  634. planOnlyDisplayPrice: '$14.00',
  635. addOns: [],
  636. addOnDisplayPricesWithoutAdditionalLicense: {},
  637. isEligibleForGroupPlan: true,
  638. isEligibleForPause: false,
  639. isEligibleForDowngradeUpsell: false,
  640. },
  641. }
  642. export const customSubscription: CustomSubscription = {
  643. manager_ids: ['abc123'],
  644. member_ids: [],
  645. invited_emails: [],
  646. groupPlan: false,
  647. membersLimit: 0,
  648. _id: 'def456',
  649. admin_id: 'abc123',
  650. teamInvites: [],
  651. planCode: 'collaborator-annual',
  652. plan: {
  653. planCode: 'collaborator-annual',
  654. name: 'Standard (Collaborator) Annual',
  655. price_in_cents: 21900,
  656. annual: true,
  657. featureDescription: [],
  658. },
  659. customAccount: true,
  660. }
  661. export const trialCollaboratorSubscription: PaidSubscription = {
  662. manager_ids: ['abc123'],
  663. member_ids: [],
  664. invited_emails: [],
  665. groupPlan: false,
  666. membersLimit: 0,
  667. _id: 'def456',
  668. admin_id: 'abc123',
  669. teamInvites: [],
  670. planCode: 'collaborator_free_trial_7_days',
  671. plan: {
  672. planCode: 'collaborator_free_trial_7_days',
  673. name: 'Standard (Collaborator)',
  674. price_in_cents: 2300,
  675. featureDescription: [],
  676. hideFromUsers: true,
  677. canUseFlexibleLicensing: false,
  678. },
  679. payment: {
  680. taxRate: 0,
  681. billingDetailsLink: '/user/subscription/payment/billing-details',
  682. accountManagementLink: '/user/subscription/payment/account-management',
  683. additionalLicenses: 0,
  684. totalLicenses: 0,
  685. nextPaymentDueAt: sevenDaysFromTodayFormatted,
  686. nextPaymentDueDate: sevenDaysFromTodayFormatted,
  687. currency: 'USD',
  688. state: 'active',
  689. trialEndsAtFormatted: sevenDaysFromTodayFormatted,
  690. trialEndsAt: new Date(sevenDaysFromToday).toString(),
  691. activeCoupons: [],
  692. accountEmail: 'foo@example.com',
  693. hasPastDueInvoice: false,
  694. displayPrice: '$21.00',
  695. planOnlyDisplayPrice: '$21.00',
  696. addOns: [],
  697. addOnDisplayPricesWithoutAdditionalLicense: {},
  698. isEligibleForGroupPlan: true,
  699. isEligibleForPause: true,
  700. isEligibleForDowngradeUpsell: false,
  701. },
  702. }
  703. export const monthlyActiveCollaborator: PaidSubscription = {
  704. manager_ids: ['abc123'],
  705. member_ids: [],
  706. invited_emails: [],
  707. groupPlan: false,
  708. membersLimit: 0,
  709. _id: 'def456',
  710. admin_id: 'abc123',
  711. teamInvites: [],
  712. planCode: 'collaborator',
  713. plan: {
  714. planCode: 'collaborator',
  715. name: 'Standard (Collaborator)',
  716. price_in_cents: 212300900,
  717. featureDescription: [],
  718. canUseFlexibleLicensing: false,
  719. },
  720. payment: {
  721. taxRate: 0,
  722. billingDetailsLink: '/user/subscription/payment/billing-details',
  723. accountManagementLink: '/user/subscription/payment/account-management',
  724. additionalLicenses: 0,
  725. totalLicenses: 0,
  726. nextPaymentDueAt,
  727. nextPaymentDueDate,
  728. currency: 'USD',
  729. state: 'active',
  730. trialEndsAtFormatted: null,
  731. trialEndsAt: null,
  732. activeCoupons: [],
  733. accountEmail: 'foo@example.com',
  734. hasPastDueInvoice: false,
  735. displayPrice: '$21.00',
  736. planOnlyDisplayPrice: '$21.00',
  737. addOns: [],
  738. addOnDisplayPricesWithoutAdditionalLicense: {},
  739. isEligibleForGroupPlan: true,
  740. isEligibleForPause: true,
  741. isEligibleForDowngradeUpsell: true,
  742. },
  743. }