diff --git a/example/convex/_generated/api.d.ts b/example/convex/_generated/api.d.ts index ba7e3d7..0858add 100644 --- a/example/convex/_generated/api.d.ts +++ b/example/convex/_generated/api.d.ts @@ -96,7 +96,6 @@ export declare const components: { "mutation", "internal", { - callback?: string; subscription: { amount: number | null; cancelAtPeriodEnd: boolean; @@ -204,6 +203,12 @@ export declare const components: { userId: string; } | null >; + insertCustomer: FunctionReference< + "mutation", + "internal", + { id: string; userId: string }, + string + >; listProducts: FunctionReference< "query", "internal", diff --git a/example/convex/example.ts b/example/convex/example.ts index e4523cd..4036c73 100644 --- a/example/convex/example.ts +++ b/example/convex/example.ts @@ -11,10 +11,15 @@ export const MAX_FREE_TODOS = 3; export const MAX_PREMIUM_TODOS = 6; export const { generateCheckoutLink } = polar.checkoutApi({ + products: { + premium: "5fde8344-5fca-4d0b-adeb-2052cddfd9ed", + premiumPlus: "db548a6f-ff8c-4969-8f02-5f7301a36e7c", + }, getUserInfo: async (ctx) => { const user = await ctx.runQuery(api.example.getCurrentUser); return { userId: user._id, + email: user.email, }; }, }); diff --git a/example/convex/seed.ts b/example/convex/seed.ts index 199014f..747a774 100644 --- a/example/convex/seed.ts +++ b/example/convex/seed.ts @@ -58,6 +58,7 @@ const seed = internalAction({ recurringInterval: "month", prices: [ { + amountType: "fixed", priceAmount: 1000, }, ], @@ -68,6 +69,7 @@ const seed = internalAction({ recurringInterval: "year", prices: [ { + amountType: "fixed", priceAmount: 10000, }, ], @@ -78,6 +80,7 @@ const seed = internalAction({ recurringInterval: "month", prices: [ { + amountType: "fixed", priceAmount: 2000, }, ], @@ -88,6 +91,7 @@ const seed = internalAction({ recurringInterval: "year", prices: [ { + amountType: "fixed", priceAmount: 20000, }, ], diff --git a/example/src/UpgradeCta.tsx b/example/src/UpgradeCta.tsx index 3c61447..f93b779 100644 --- a/example/src/UpgradeCta.tsx +++ b/example/src/UpgradeCta.tsx @@ -74,10 +74,7 @@ export function UpgradeCTA({ {!isPremium && !isPremiumPlus && ( - +