Skip to content

Instantly share code, notes, and snippets.

View broguinn's full-sized avatar

Braden O'Guinn broguinn

View GitHub Profile
import * as dotenv from 'dotenv';
import { createZoomClient } from '@src/lib/clients/zoom';
dotenv.config();
async function run() {
const zoom = createZoomClient();
const userId = 'QlnQyO41TqycR_whw8ggJQ';
console.log('Creating Zoom client...');
diff --git a/apps/command-center/src/app/dashboard/gate-events/auto-recognition/instant-gate-support/page.tsx b/apps/command-center/src/app/dashboard/gate-events/auto-recognition/instant-gate-support/page.tsx
index cdbffec0..fb2942be 100644
--- a/apps/command-center/src/app/dashboard/gate-events/auto-recognition/instant-gate-support/page.tsx
+++ b/apps/command-center/src/app/dashboard/gate-events/auto-recognition/instant-gate-support/page.tsx
@@ -105,8 +105,10 @@ export default function InstantGateSupport() {
serialize: (v) => JSON.stringify(v),
});
- const [selectedTab, setSelectedTab] = useState(0);
- const [dropdownOption, setDropdownOption] = useState<DropdownOption>(DropdownOption.LOAD_STATUS);
diff --git a/apps/parking-web/src/apollo/client.ts b/apps/parking-web/src/apollo/client.ts
index 7da985b5..90f2b00f 100644
--- a/apps/parking-web/src/apollo/client.ts
+++ b/apps/parking-web/src/apollo/client.ts
@@ -57,6 +57,11 @@ const createApolloClient = () =>
},
},
}),
+ defaultOptions: {
+ watchQuery: {
diff --git a/apps/parking-web/src/sections/events/EventDetails/index.tsx b/apps/parking-web/src/sections/events/EventDetails/index.tsx
index 055f224a..73fdbd2a 100644
--- a/apps/parking-web/src/sections/events/EventDetails/index.tsx
+++ b/apps/parking-web/src/sections/events/EventDetails/index.tsx
@@ -2,8 +2,8 @@ import { DateTime } from 'luxon';
import styled from '@emotion/styled';
import { useQuery } from '@apollo/client';
import React, { useRef, useMemo, useState, useEffect } from 'react';
+import { ChipComponent, DriverSessionView, CameraEventCarousel } from 'shared';
import { formatContainerNumberForDisplay } from 'shared/src/utils/containerDisplay';
diff --git a/cloud/dashboard-web/src/enrollment/confirmDetails.tsx b/cloud/dashboard-web/src/enrollment/confirmDetails.tsx
index fe81d5678..a44e35041 100644
--- a/cloud/dashboard-web/src/enrollment/confirmDetails.tsx
+++ b/cloud/dashboard-web/src/enrollment/confirmDetails.tsx
@@ -1,5 +1,5 @@
import { H1, H3, SubHeader } from "@/theme/typography";
-import { useForm } from "react-hook-form";
+import { useForm, UseFormSetValue, UseFormWatch } from "react-hook-form";
import { Input, MonthDayInput } from "../component/input/input";
import {
diff --git a/cloud/db/resources/seed/local.sql b/cloud/db/resources/seed/local.sql
index f8a94e48d..d8fe27f9d 100644
--- a/cloud/db/resources/seed/local.sql
+++ b/cloud/db/resources/seed/local.sql
@@ -163,7 +163,7 @@ VALUES
INSERT INTO
gateway_config (gateway_serial, config_json)
VALUES
- (_GATEWAY_ID, '{}') ON CONFLICT (gateway_serial) DO NOTHING;
+ (_GATEWAY_ID, '{ "enable_automatic_backup": true }') ON CONFLICT (gateway_serial) DO NOTHING;
diff --git a/cloud/infra/init/ecr-policy.json b/cloud/infra/init/ecr-policy.json
index ab2d9c1b5..205c4b0d6 100644
--- a/cloud/infra/init/ecr-policy.json
+++ b/cloud/infra/init/ecr-policy.json
@@ -12,6 +12,19 @@
"action": {
"type": "expire"
}
+ },
+ {
diff --git a/cloud/dashboard-web/src/component/SignInTicket.tsx b/cloud/dashboard-web/src/component/SignInTicket.tsx
index 5baf6dec9..c9140602f 100644
--- a/cloud/dashboard-web/src/component/SignInTicket.tsx
+++ b/cloud/dashboard-web/src/component/SignInTicket.tsx
@@ -20,7 +20,7 @@ const TicketSignIn = (props: { nextRoute: string }) => {
}
if (user && signInProcessed) {
- navigate(`${props.nextRoute}?${searchParams.toString()}`);
+ return navigate(`${props.nextRoute}?${searchParams.toString()}`);
diff --git a/cloud/admin-api/src/main.go b/cloud/admin-api/src/main.go
index 280e42aed..ffbe71480 100644
--- a/cloud/admin-api/src/main.go
+++ b/cloud/admin-api/src/main.go
@@ -155,6 +155,7 @@ func main() {
"admin.AdminAPI": {clerkBearerAuth},
"admin.REPService": {clerkBearerAuth},
"admin.CommissioningService": {clerkBearerAuth},
+ "fleet.GatewayConfig": {clerkBearerAuth},
})
@broguinn
broguinn / Cases.ts
Created November 9, 2024 14:43
An attempt at type narrowing
// Original, working solution that uses explicit "type" property key.
export function Cases<Key extends string, Union extends { type: Key }, U>(
args: {
[key in Key]: (_: Extract<Union, { type: key }>) => U;
},
data: Extract<Union, { type: Key }>
) {
return args[data.type](data);
}