Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bifrost/lib/clients/jawnTypes/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ type JsonValue = string | number | boolean | null | JsonArray | JsonObject;
interface JsonArray extends Array<JsonValue> {}
interface JsonObject { [key: string]: JsonValue; }

type JsonValue = string | number | boolean | null | JsonArray | JsonObject;
interface JsonArray extends Array<JsonValue> {}
interface JsonObject { [key: string]: JsonValue; }
Comment on lines +5 to +7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: Duplicate type definitions detected. These exact same types are already defined on lines 1-3, which will cause TypeScript compilation errors.


/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
Expand Down
104 changes: 20 additions & 84 deletions helicone-cron/src/db/database.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1587,39 +1587,6 @@ export type Database = {
},
]
}
ledger: {
Row: {
created_at: string
credit: number
debit: number
event_created_at: string
id: string
org_id: string
reference_id: string | null
reference_type: string | null
}
Insert: {
created_at?: string
credit: number
debit: number
event_created_at: string
id?: string
org_id: string
reference_id?: string | null
reference_type?: string | null
}
Update: {
created_at?: string
credit?: number
debit?: number
event_created_at?: string
id?: string
org_id?: string
reference_id?: string | null
reference_type?: string | null
}
Relationships: []
}
online_evaluators: {
Row: {
config: Json | null
Expand Down Expand Up @@ -1659,30 +1626,6 @@ export type Database = {
},
]
}
org_balance: {
Row: {
ch_credit_sum: number
ch_last_req_created_at: number
organization_id: string
pg_debit_sum: number
updated_at: string
}
Insert: {
ch_credit_sum?: number
ch_last_req_created_at?: number
organization_id: string
pg_debit_sum?: number
updated_at?: string
}
Update: {
ch_credit_sum?: number
ch_last_req_created_at?: number
organization_id?: string
pg_debit_sum?: number
updated_at?: string
}
Relationships: []
}
org_rate_limit_tracker: {
Row: {
created_at: string | null
Expand Down Expand Up @@ -2024,21 +1967,6 @@ export type Database = {
},
]
}
processed_webhook_events: {
Row: {
id: string
processed_at: string
}
Insert: {
id: string
processed_at?: string
}
Update: {
id?: string
processed_at?: string
}
Relationships: []
}
prompt_input_keys: {
Row: {
created_at: string | null
Expand Down Expand Up @@ -3189,6 +3117,10 @@ export type Database = {
}
}
Functions: {
bytea_to_text: {
Args: { data: string }
Returns: string
}
check_request_access: {
Args: { this_auth_hash: string; this_user_id: string }
Returns: boolean
Expand All @@ -3201,8 +3133,8 @@ export type Database = {
}
date_count: {
Args:
| { prev_period: string; time_increment: string }
| { time_increment: string }
| { time_increment: string; prev_period: string }
Returns: Record<string, unknown>[]
}
ensure_one_demo_org: {
Expand All @@ -3225,14 +3157,12 @@ export type Database = {
}
http_delete: {
Args:
| { content: string; content_type: string; uri: string }
| { uri: string }
| { content: string; content_type: string; uri: string }
| { uri: string; content: string; content_type: string }
Returns: Database["public"]["CompositeTypes"]["http_response"]
}
http_get: {
Args: { data: Json; uri: string } | { uri: string } | { uri: string; data: Json }
Args: { uri: string } | { uri: string; data: Json }
Returns: Database["public"]["CompositeTypes"]["http_response"]
}
http_head: {
Expand All @@ -3251,19 +3181,17 @@ export type Database = {
}[]
}
http_patch: {
Args: { content: string; content_type: string; uri: string } | { uri: string; content: string; content_type: string }
Args: { uri: string; content: string; content_type: string }
Returns: Database["public"]["CompositeTypes"]["http_response"]
}
http_post: {
Args:
| { content: string; content_type: string; uri: string }
| { data: Json; uri: string }
| { uri: string; content: string; content_type: string }
| { uri: string; data: Json }
Returns: Database["public"]["CompositeTypes"]["http_response"]
}
http_put: {
Args: { content: string; content_type: string; uri: string } | { uri: string; content: string; content_type: string }
Args: { uri: string; content: string; content_type: string }
Returns: Database["public"]["CompositeTypes"]["http_response"]
}
http_reset_curlopt: {
Expand All @@ -3276,17 +3204,25 @@ export type Database = {
}
insert_feedback_and_update_response: {
Args: {
response_id: string
feedback_metric_id: number
boolean_value: boolean
numerical_value: number
string_value: string
categorical_value: string
created_by: string
feedback_metric_id: number
name: string
numerical_value: number
response_id: string
string_value: string
}
Returns: number
}
text_to_bytea: {
Args: { data: string }
Returns: string
}
try_det_decrypt_utf8: {
Args: { ct: string; aad: string; key_id: string; nonce: string }
Returns: string
}
urlencode: {
Args: { data: Json } | { string: string } | { string: string }
Returns: string
Expand Down
104 changes: 20 additions & 84 deletions valhalla/jawn/src/lib/db/database.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1587,39 +1587,6 @@ export type Database = {
},
]
}
ledger: {
Row: {
created_at: string
credit: number
debit: number
event_created_at: string
id: string
org_id: string
reference_id: string | null
reference_type: string | null
}
Insert: {
created_at?: string
credit: number
debit: number
event_created_at: string
id?: string
org_id: string
reference_id?: string | null
reference_type?: string | null
}
Update: {
created_at?: string
credit?: number
debit?: number
event_created_at?: string
id?: string
org_id?: string
reference_id?: string | null
reference_type?: string | null
}
Relationships: []
}
online_evaluators: {
Row: {
config: Json | null
Expand Down Expand Up @@ -1659,30 +1626,6 @@ export type Database = {
},
]
}
org_balance: {
Row: {
ch_credit_sum: number
ch_last_req_created_at: number
organization_id: string
pg_debit_sum: number
updated_at: string
}
Insert: {
ch_credit_sum?: number
ch_last_req_created_at?: number
organization_id: string
pg_debit_sum?: number
updated_at?: string
}
Update: {
ch_credit_sum?: number
ch_last_req_created_at?: number
organization_id?: string
pg_debit_sum?: number
updated_at?: string
}
Relationships: []
}
org_rate_limit_tracker: {
Row: {
created_at: string | null
Expand Down Expand Up @@ -2024,21 +1967,6 @@ export type Database = {
},
]
}
processed_webhook_events: {
Row: {
id: string
processed_at: string
}
Insert: {
id: string
processed_at?: string
}
Update: {
id?: string
processed_at?: string
}
Relationships: []
}
prompt_input_keys: {
Row: {
created_at: string | null
Expand Down Expand Up @@ -3189,6 +3117,10 @@ export type Database = {
}
}
Functions: {
bytea_to_text: {
Args: { data: string }
Returns: string
}
check_request_access: {
Args: { this_auth_hash: string; this_user_id: string }
Returns: boolean
Expand All @@ -3201,8 +3133,8 @@ export type Database = {
}
date_count: {
Args:
| { prev_period: string; time_increment: string }
| { time_increment: string }
| { time_increment: string; prev_period: string }
Returns: Record<string, unknown>[]
}
ensure_one_demo_org: {
Expand All @@ -3225,14 +3157,12 @@ export type Database = {
}
http_delete: {
Args:
| { content: string; content_type: string; uri: string }
| { uri: string }
| { content: string; content_type: string; uri: string }
| { uri: string; content: string; content_type: string }
Returns: Database["public"]["CompositeTypes"]["http_response"]
}
http_get: {
Args: { data: Json; uri: string } | { uri: string } | { uri: string; data: Json }
Args: { uri: string } | { uri: string; data: Json }
Returns: Database["public"]["CompositeTypes"]["http_response"]
}
http_head: {
Expand All @@ -3251,19 +3181,17 @@ export type Database = {
}[]
}
http_patch: {
Args: { content: string; content_type: string; uri: string } | { uri: string; content: string; content_type: string }
Args: { uri: string; content: string; content_type: string }
Returns: Database["public"]["CompositeTypes"]["http_response"]
}
http_post: {
Args:
| { content: string; content_type: string; uri: string }
| { data: Json; uri: string }
| { uri: string; content: string; content_type: string }
| { uri: string; data: Json }
Returns: Database["public"]["CompositeTypes"]["http_response"]
}
http_put: {
Args: { content: string; content_type: string; uri: string } | { uri: string; content: string; content_type: string }
Args: { uri: string; content: string; content_type: string }
Returns: Database["public"]["CompositeTypes"]["http_response"]
}
http_reset_curlopt: {
Expand All @@ -3276,17 +3204,25 @@ export type Database = {
}
insert_feedback_and_update_response: {
Args: {
response_id: string
feedback_metric_id: number
boolean_value: boolean
numerical_value: number
string_value: string
categorical_value: string
created_by: string
feedback_metric_id: number
name: string
numerical_value: number
response_id: string
string_value: string
}
Returns: number
}
text_to_bytea: {
Args: { data: string }
Returns: string
}
try_det_decrypt_utf8: {
Args: { ct: string; aad: string; key_id: string; nonce: string }
Returns: string
}
urlencode: {
Args: { data: Json } | { string: string } | { string: string }
Returns: string
Expand Down
6 changes: 5 additions & 1 deletion web/components/layout/auth/authLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ const AuthLayout = (props: AuthLayoutProps) => {
const checkAuth = async () => {
try {
const user = await auth.getUser();
// Avoid redirecting while the auth client is still initializing
if (user.error === "Supabase client not found") {
return;
}
if (user.error || !user.data) {
router.push("/signin?unauthorized=true");
}
Expand All @@ -74,7 +78,7 @@ const AuthLayout = (props: AuthLayoutProps) => {
};

checkAuth();
}, [router]);
}, [router, auth]);

const currentPage = useMemo(() => {
const path = pathname.split("/")[1];
Expand Down
Loading
Loading