55 |
56 |
57 |
58 |
59 |
62 |
65 |
68 |
71 |
74 |
77 |
78 |
79 | );
80 | }
81 |
--------------------------------------------------------------------------------
/packages/polar-nextjs/src/customerPortal/customerPortal.ts:
--------------------------------------------------------------------------------
1 | import { Polar } from "@polar-sh/sdk";
2 | import { type NextRequest, NextResponse } from "next/server";
3 |
4 | interface CustomerPortalBaseConfig {
5 | accessToken: string;
6 | server: "sandbox" | "production";
7 | returnUrl?: string;
8 | }
9 |
10 | interface CustomerPortalCustomerIdConfig extends CustomerPortalBaseConfig {
11 | getCustomerId: (req: NextRequest) => Promise