Skip to content

Commit 6dc6f36

Browse files
authored
ENG-907 Update to supabase client library (#461)
Update to supabase and vercel client libraries
1 parent c76f946 commit 6dc6f36

7 files changed

Lines changed: 838 additions & 442 deletions

File tree

apps/website/app/utils/supabase/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ export const createClient = () => {
1010
if (!url || !key) {
1111
throw new Error("Missing required Supabase environment variables");
1212
}
13-
return createSupabaseClient<Database, "public", Database["public"]>(url, key);
13+
return createSupabaseClient<Database, "public">(url, key);
1414
};

apps/website/app/utils/supabase/dbUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const getOrCreateEntity = async <
8888
insertData,
8989
uniqueOn = undefined,
9090
}: {
91-
supabase: SupabaseClient<Database, "public", Database["public"]>;
91+
supabase: SupabaseClient<Database, "public">;
9292
tableName: keyof Database["public"]["Tables"];
9393
insertData: TablesInsert<TableName>;
9494
uniqueOn?: (keyof TablesInsert<TableName>)[]; // Uses pKey otherwise
@@ -176,7 +176,7 @@ export const InsertValidatedBatch = async <
176176
items,
177177
uniqueOn = undefined,
178178
}: {
179-
supabase: SupabaseClient<Database, "public", Database["public"]>;
179+
supabase: SupabaseClient<Database, "public">;
180180
tableName: keyof Database["public"]["Tables"];
181181
items: TablesInsert<TableName>[];
182182
uniqueOn?: (keyof TablesInsert<TableName>)[]; // Uses pKey otherwise
@@ -220,7 +220,7 @@ export const validateAndInsertBatch = async <
220220
inputValidator = undefined,
221221
outputValidator = undefined,
222222
}: {
223-
supabase: SupabaseClient<Database, "public", Database["public"]>;
223+
supabase: SupabaseClient<Database, "public">;
224224
tableName: keyof Database["public"]["Tables"];
225225
items: TablesInsert<TableName>[];
226226
uniqueOn?: (keyof TablesInsert<TableName>)[]; // Uses pKey otherwise
@@ -359,7 +359,7 @@ export const processAndInsertBatch = async <
359359
inputProcessor,
360360
outputProcessor,
361361
}: {
362-
supabase: SupabaseClient<Database, "public", Database["public"]>;
362+
supabase: SupabaseClient<Database, "public">;
363363
tableName: keyof Database["public"]["Tables"];
364364
items: InputType[];
365365
uniqueOn?: (keyof TablesInsert<TableName>)[]; // Uses pKey otherwise

apps/website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@repo/ui": "*",
1717
"@repo/database": "*",
1818
"@sindresorhus/slugify": "^2.2.1",
19-
"@supabase/ssr": "^0.6.1",
19+
"@supabase/ssr": "^0.7.0",
2020
"gray-matter": "^4.0.3",
2121
"next": "^15",
2222
"openai": "^4.98.0",

0 commit comments

Comments
 (0)