Condensed Consolidated Statements of Redeemable Convertible and Convertible Preferred Stock and Stockholders' Equity (Deficit) (unaudited) - USD ($) $ in Thousands | Total | Cumulative Effect, Period of Adoption, Adjustment [Member] | Series B Redeemable Convertible Preferred Shares [Member] | Series C1 Redeemable Convertible Preferred Shares [Member] | Series A Convertible Preferred Stock [Member] | Series B-1 Convertible Preferred Stock [Member] | Series B-2 Convertible Preferred Stock [Member] | Enterprise Junior Stock [Member] | Series D Redeemable Convertible Preferred Stock [Member] | Series C Convertible Preferred Stock [Member] | Common 1 Stock [Member] | Common Stock | Additional Paid-In Capital [Member] | (Accumulated Deficit) Retained Earnings [Member] | (Accumulated Deficit) Retained Earnings [Member]Cumulative Effect, Period of Adoption, Adjustment [Member] |
Balance at Dec. 31, 2018 | $ (48,869) | | | | | | | | | | | | | $ (54,648) | |
Temporary equity balance, Shares at Dec. 31, 2018 | | | 23,711,925 | 6,357,260 | 2,304,815 | | | | | | 1,953,442 | | | | |
Temporary equity balance, Value at Dec. 31, 2018 | | | $ 56,453 | $ 10,000 | $ 5,550 | | | | | | $ 229 | | | | |
Cumulative effect adjustment for adoption of Topic 606 at Dec. 31, 2018 | | $ 116,157 | | | | | | | | | | | | | $ 116,157 |
Exercise of warrant to purchase Series C1 redeemable convertible preferred shares | | | | $ 535 | | | | | | | | | | | |
Exercise of warrant to purchase Series C1 redeemable convertible preferred shares, Shares | | | | 95,359 | | | | | | | | | | | |
Distribution to holders of redeemable convertible and convertible preferred shares | (4,785) | | (29,065) | $ (10,150) | $ (867) | | | | | | | | | (3,918) | |
Reclassification of Series C1 redeemable convertible preferred shares to permanent equity | (385) | | | $ 385 | | | | | | | | | | | |
Reclassification of Series C1 redeemable convertible preferred shares to permanent equity, Shares | | | | 6,452,619 | | | | | | | | | | | |
Accretion of preferred return on Series B redeemable convertible preferred shares | (1,075) | | $ 1,075 | | | | | | | | | | | (1,075) | |
Equity-based compensation | 764 | | | | | | | | | | | | | 764 | |
Net income and comprehensive income | 35,605 | | | | | | | | | | | | | 35,605 | |
Balance at Mar. 31, 2019 | 98,182 | | | | | | | | | | | | | 92,885 | |
Temporary equity balance, Shares at Mar. 31, 2019 | | | 23,711,925 | 6,452,619 | 2,304,815 | | | | | | 1,953,442 | | | | |
Temporary equity balance, Value at Mar. 31, 2019 | | | $ 28,463 | $ 385 | $ 4,683 | | | | | | $ 229 | | | | |
Balance at Dec. 31, 2018 | (48,869) | | | | | | | | | | | | | (54,648) | |
Temporary equity balance, Shares at Dec. 31, 2018 | | | 23,711,925 | 6,357,260 | 2,304,815 | | | | | | 1,953,442 | | | | |
Temporary equity balance, Value at Dec. 31, 2018 | | | $ 56,453 | $ 10,000 | $ 5,550 | | | | | | $ 229 | | | | |
Cumulative effect adjustment for adoption of Topic 606 at Dec. 31, 2018 | | $ 116,157 | | | | | | | | | | | | | $ 116,157 |
Net income and comprehensive income | 20,848 | | | | | | | | | | | | | | |
Balance at Jun. 30, 2019 | 83,379 | | | | | | | | | | | | | 78,082 | |
Temporary equity balance, Shares at Jun. 30, 2019 | | | 23,711,925 | 6,452,619 | 2,304,815 | | | | | | 1,953,442 | | | | |
Temporary equity balance, Value at Jun. 30, 2019 | | | $ 29,006 | $ 385 | $ 4,683 | | | | | | $ 229 | | | | |
Balance at Mar. 31, 2019 | 98,182 | | | | | | | | | | | | | 92,885 | |
Temporary equity balance, Shares at Mar. 31, 2019 | | | 23,711,925 | 6,452,619 | 2,304,815 | | | | | | 1,953,442 | | | | |
Temporary equity balance, Value at Mar. 31, 2019 | | | $ 28,463 | $ 385 | $ 4,683 | | | | | | $ 229 | | | | |
Accretion of preferred return on Series B redeemable convertible preferred shares | (543) | | $ 543 | | | | | | | | | | | (543) | |
Equity-based compensation | 497 | | | | | | | | | | | | | 497 | |
Net income and comprehensive income | (14,757) | | | | | | | | | | | | | (14,757) | |
Balance at Jun. 30, 2019 | 83,379 | | | | | | | | | | | | | 78,082 | |
Temporary equity balance, Shares at Jun. 30, 2019 | | | 23,711,925 | 6,452,619 | 2,304,815 | | | | | | 1,953,442 | | | | |
Temporary equity balance, Value at Jun. 30, 2019 | | | $ 29,006 | $ 385 | $ 4,683 | | | | | | $ 229 | | | | |
Balance at Dec. 31, 2019 | 18,246 | | | | | | | | | | | | $ 1,116 | 16,740 | |
Temporary equity balance, Shares at Dec. 31, 2019 | | | | | 2,304,815 | 14,921,676 | 8,790,249 | 2,597,091 | 53,593,440 | 6,452,619 | | 2,250,696 | | | |
Temporary equity balance, Value at Dec. 31, 2019 | 138,516 | | | | $ 4,656 | $ 20,907 | $ 12,272 | $ 3 | $ 100,296 | $ 385 | | $ 2 | | | |
Accretion of cumulative dividends on Series D redeemable convertible preferred stock | (1,936) | | | | | | | | $ 1,936 | | | | | (1,936) | |
Equity-based compensation | 1,210 | | | | | | | | | | | | 1,210 | | |
Equity-based compensation, Shares | | | | | | | | 38,339 | | | | | | | |
Exercise of options to purchase common stock | 3 | | | | | | | | | | | | 3 | | |
Exercise of options to purchase common stock, Shares | | | | | | | | | | | | 496 | | | |
Exercise of warrant to purchase common stock | 12 | | | | | | | | | | | | 12 | | |
Exercise of warrant to purchase common stock, Shares | | | | | | | | | | | | 297,241 | | | |
Net income and comprehensive income | 11,230 | | | | | | | | | | | | | 11,230 | |
Balance at Mar. 31, 2020 | 28,765 | | | | | | | | | | | | 2,341 | 26,034 | |
Temporary equity balance, Shares at Mar. 31, 2020 | | | | | 2,304,815 | 14,921,676 | 8,790,249 | 2,635,430 | 53,593,440 | 6,452,619 | | 2,548,433 | | | |
Temporary equity balance, Value at Mar. 31, 2020 | | | | | $ 4,656 | $ 20,907 | $ 12,272 | $ 3 | $ 102,232 | $ 385 | | $ 2 | | | |
Balance at Dec. 31, 2019 | 18,246 | | | | | | | | | | | | 1,116 | 16,740 | |
Temporary equity balance, Shares at Dec. 31, 2019 | | | | | 2,304,815 | 14,921,676 | 8,790,249 | 2,597,091 | 53,593,440 | 6,452,619 | | 2,250,696 | | | |
Temporary equity balance, Value at Dec. 31, 2019 | $ 138,516 | | | | $ 4,656 | $ 20,907 | $ 12,272 | $ 3 | $ 100,296 | $ 385 | | $ 2 | | | |
Exercise of options to purchase common stock, Shares | 28,547 | | | | | | | | | | | | | | |
Net income and comprehensive income | $ (14,210) | | | | | | | | | | | | | | |
Balance at Jun. 30, 2020 | 438,497 | | | | | | | | | | | | 439,662 | (1,206) | |
Temporary equity balance, Shares at Jun. 30, 2020 | | | | | 0 | | 0 | | 0 | | | 41,016,181 | | | |
Temporary equity balance, Value at Jun. 30, 2020 | | | | | | | | | | | | $ 41 | | | |
Balance at Mar. 31, 2020 | 28,765 | | | | | | | | | | | | 2,341 | 26,034 | |
Temporary equity balance, Shares at Mar. 31, 2020 | | | | | 2,304,815 | 14,921,676 | 8,790,249 | 2,635,430 | 53,593,440 | 6,452,619 | | 2,548,433 | | | |
Temporary equity balance, Value at Mar. 31, 2020 | | | | | $ 4,656 | $ 20,907 | $ 12,272 | $ 3 | $ 102,232 | $ 385 | | $ 2 | | | |
Accretion of cumulative dividends on Series D redeemable convertible preferred stock | (1,800) | | | | | | | | 1,800 | | | | | (1,800) | |
Equity-based compensation | 1,256 | | | | | | | | | | | | 1,256 | | |
Equity-based compensation, Shares | | | | | | | | 25,440 | | | | | | | |
Conversion of redeemable convertible and convertible preferred stock into common stock | 141,867 | | | | $ (4,656) | $ (20,907) | $ (12,272) | | $ (104,032) | $ (385) | | $ 21 | 142,231 | | |
Conversion of redeemable convertible and convertible preferred stock into common stock, Shares | | | | | (2,304,815) | (14,921,676) | (8,790,249) | | (53,593,440) | (6,452,619) | | 20,349,223 | | | |
Conversion of enterprise junior stock into common stock | | | | | | | | $ (3) | | | | $ 2 | 1 | | |
Conversion of enterprise junior stock into common stock, Shares | | | | | | | | (2,660,870) | | | | 2,124,845 | | | |
Issuance of common stock from initial public offering, net of issuance costs | 293,707 | | | | | | | | | | | $ 16 | 293,691 | | |
Issuance of common stock from initial public offering, net of issuance costs, Shares | | | | | | | | | | | | 15,964,704 | | | |
Vesting of restricted common stock, Shares | | | | | | | | | | | | 925 | | | |
Exercise of options to purchase common stock | 142 | | | | | | | | | | | | 142 | | |
Exercise of options to purchase common stock, Shares | | | | | | | | | | | | 28,051 | | | |
Net income and comprehensive income | (25,440) | | | | | | | | | | | | | (25,440) | |
Balance at Jun. 30, 2020 | $ 438,497 | | | | | | | | | | | | $ 439,662 | $ (1,206) | |
Temporary equity balance, Shares at Jun. 30, 2020 | | | | | 0 | | 0 | | 0 | | | 41,016,181 | | | |
Temporary equity balance, Value at Jun. 30, 2020 | | | | | | | | | | | | $ 41 | | | |