Next.js Subscription Payments Starter Repo: Mapping hash to jsonb fields
Unanswered
Northeast Congo Lion posted this in #help-forum
Northeast Congo LionOP
The Repo: https://github.com/vercel/nextjs-subscription-payments
Has anyone tried building upon this repo to add more fields to map to your Supabase tables? Specifically hash or jsonb fields? For instance when I try to add a column for package_dimensions from the products object I get the several typescript errors.
Here's how I have the field mapping payload defined in the
This part is underlined
P.S. I have already added a jsonb package_dimensions column to my products table in supabase and updated my types using the generate types script.
Just struggling with the right way to map these stripe hash fields over to supabase jsonb fields and wondering if anyone else ran into the same and figured it out.....
Has anyone tried building upon this repo to add more fields to map to your Supabase tables? Specifically hash or jsonb fields? For instance when I try to add a column for package_dimensions from the products object I get the several typescript errors.
Here's how I have the field mapping payload defined in the
supabase-admin.ts file:package_dimensions: product.package_dimensions ?? null,This part is underlined
package_dimensions: and I get these typescript errors:Type 'PackageDimensions | null' is not assignable to type 'Json | undefined'.
Type 'PackageDimensions' is not assignable to type 'Json | undefined'.
Type 'PackageDimensions' is not assignable to type '{ [key: string]: Json | undefined; }'.
Index signature for type 'string' is missing in type 'PackageDimensions'.P.S. I have already added a jsonb package_dimensions column to my products table in supabase and updated my types using the generate types script.
Just struggling with the right way to map these stripe hash fields over to supabase jsonb fields and wondering if anyone else ran into the same and figured it out.....