diff options
| author | Dax Raad <[email protected]> | 2025-11-11 01:56:01 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-11-11 01:56:01 -0500 |
| commit | d685aa38ef6ab5e521d2e55874292aea95568ca3 (patch) | |
| tree | 9e0272a7187dfa93dd288a7d37b702ca7efd2bfd /packages/console/app/src | |
| parent | 995b23787cd9c35513fed0f928f85c4c928c2cdb (diff) | |
| download | opencode-d685aa38ef6ab5e521d2e55874292aea95568ca3.tar.gz opencode-d685aa38ef6ab5e521d2e55874292aea95568ca3.zip | |
type checks
Diffstat (limited to 'packages/console/app/src')
15 files changed, 24 insertions, 24 deletions
diff --git a/packages/console/app/src/routes/workspace.tsx b/packages/console/app/src/routes/workspace.tsx index 74c3edb83..35323da28 100644 --- a/packages/console/app/src/routes/workspace.tsx +++ b/packages/console/app/src/routes/workspace.tsx @@ -19,7 +19,7 @@ const getUserEmail = query(async (workspaceID: string) => { export default function WorkspaceLayout(props: RouteSectionProps) { const params = useParams() - const userEmail = createAsync(() => getUserEmail(params.id)) + const userEmail = createAsync(() => getUserEmail(params.id!)) return ( <main data-page="workspace"> <Link rel="icon" type="image/svg+xml" href="/favicon-zen.svg" /> diff --git a/packages/console/app/src/routes/workspace/[id].tsx b/packages/console/app/src/routes/workspace/[id].tsx index 327013aa4..d81200b9b 100644 --- a/packages/console/app/src/routes/workspace/[id].tsx +++ b/packages/console/app/src/routes/workspace/[id].tsx @@ -5,7 +5,7 @@ import "./[id].css" export default function WorkspaceLayout(props: RouteSectionProps) { const params = useParams() - const userInfo = createAsync(() => querySessionInfo(params.id)) + const userInfo = createAsync(() => querySessionInfo(params.id!)) return ( <main data-page="workspace"> diff --git a/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx index fe4e08b7c..e8403f9ae 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx @@ -27,7 +27,7 @@ const createSessionUrl = action(async (workspaceID: string, returnUrl: string) = export function BillingSection() { const params = useParams() // ORIGINAL CODE - COMMENTED OUT FOR TESTING - const billingInfo = createAsync(() => queryBillingInfo(params.id)) + const billingInfo = createAsync(() => queryBillingInfo(params.id!)) const checkoutAction = useAction(createCheckoutUrl) const checkoutSubmission = useSubmission(createCheckoutUrl) const sessionAction = useAction(createSessionUrl) @@ -51,7 +51,7 @@ export function BillingSection() { const amount = parseInt(store.addBalanceAmount) const baseUrl = window.location.href - const checkout = await checkoutAction(params.id, amount, baseUrl, baseUrl) + const checkout = await checkoutAction(params.id!, amount, baseUrl, baseUrl) if (checkout && checkout.data) { setStore("checkoutRedirecting", true) window.location.href = checkout.data @@ -60,7 +60,7 @@ export function BillingSection() { async function onClickSession() { const baseUrl = window.location.href - const sessionUrl = await sessionAction(params.id, baseUrl) + const sessionUrl = await sessionAction(params.id!, baseUrl) if (sessionUrl && sessionUrl.data) { setStore("sessionRedirecting", true) window.location.href = sessionUrl.data diff --git a/packages/console/app/src/routes/workspace/[id]/billing/index.tsx b/packages/console/app/src/routes/workspace/[id]/billing/index.tsx index f14dbffbf..feb646514 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/index.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/index.tsx @@ -8,8 +8,8 @@ import { queryBillingInfo, querySessionInfo } from "../../common" export default function () { const params = useParams() - const userInfo = createAsync(() => querySessionInfo(params.id)) - const billingInfo = createAsync(() => queryBillingInfo(params.id)) + const userInfo = createAsync(() => querySessionInfo(params.id!)) + const billingInfo = createAsync(() => queryBillingInfo(params.id!)) return ( <div data-page="workspace-[id]"> diff --git a/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx index 77c017964..9eb4758a3 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx @@ -30,7 +30,7 @@ export function MonthlyLimitSection() { const params = useParams() const submission = useSubmission(setMonthlyLimit) const [store, setStore] = createStore({ show: false }) - const billingInfo = createAsync(() => queryBillingInfo(params.id)) + const billingInfo = createAsync(() => queryBillingInfo(params.id!)) let input: HTMLInputElement diff --git a/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx index 0fb2a0df6..3712513bf 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx @@ -19,7 +19,7 @@ const downloadReceipt = action(async (workspaceID: string, paymentID: string) => export function PaymentSection() { const params = useParams() - const payments = createAsync(() => getPaymentsInfo(params.id)) + const payments = createAsync(() => getPaymentsInfo(params.id!)) const downloadReceiptAction = useAction(downloadReceipt) // DUMMY DATA FOR TESTING @@ -89,7 +89,7 @@ export function PaymentSection() { <td data-slot="payment-receipt"> <button onClick={async () => { - const receiptUrl = await downloadReceiptAction(params.id, payment.paymentID!) + const receiptUrl = await downloadReceiptAction(params.id!, payment.paymentID!) if (receiptUrl) { window.open(receiptUrl, "_blank") } diff --git a/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx index 8dcc4da92..99b593966 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx @@ -58,7 +58,7 @@ const setReload = action(async (form: FormData) => { export function ReloadSection() { const params = useParams() - const billingInfo = createAsync(() => queryBillingInfo(params.id)) + const billingInfo = createAsync(() => queryBillingInfo(params.id!)) const setReloadSubmission = useSubmission(setReload) const reloadSubmission = useSubmission(reload) const [store, setStore] = createStore({ diff --git a/packages/console/app/src/routes/workspace/[id]/index.tsx b/packages/console/app/src/routes/workspace/[id]/index.tsx index 45f67ca38..acf29d299 100644 --- a/packages/console/app/src/routes/workspace/[id]/index.tsx +++ b/packages/console/app/src/routes/workspace/[id]/index.tsx @@ -10,8 +10,8 @@ import { querySessionInfo, queryBillingInfo, createCheckoutUrl, formatBalance } export default function () { const params = useParams() - const userInfo = createAsync(() => querySessionInfo(params.id)) - const billingInfo = createAsync(() => queryBillingInfo(params.id)) + const userInfo = createAsync(() => querySessionInfo(params.id!)) + const billingInfo = createAsync(() => queryBillingInfo(params.id!)) const checkoutAction = useAction(createCheckoutUrl) const checkoutSubmission = useSubmission(createCheckoutUrl) const [store, setStore] = createStore({ @@ -21,7 +21,7 @@ export default function () { async function onClickCheckout() { const baseUrl = window.location.href - const checkout = await checkoutAction(params.id, billingInfo()!.reloadAmount, baseUrl, baseUrl) + const checkout = await checkoutAction(params.id!, billingInfo()!.reloadAmount, baseUrl, baseUrl) if (checkout && checkout.data) { setStore("checkoutRedirecting", true) window.location.href = checkout.data diff --git a/packages/console/app/src/routes/workspace/[id]/keys/key-section.tsx b/packages/console/app/src/routes/workspace/[id]/keys/key-section.tsx index 565981c7f..c55e0341a 100644 --- a/packages/console/app/src/routes/workspace/[id]/keys/key-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/keys/key-section.tsx @@ -45,7 +45,7 @@ const listKeys = query(async (workspaceID: string) => { export function KeySection() { const params = useParams() - const keys = createAsync(() => listKeys(params.id)) + const keys = createAsync(() => listKeys(params.id!)) const submission = useSubmission(createKey) const [store, setStore] = createStore({ show: false }) diff --git a/packages/console/app/src/routes/workspace/[id]/members/member-section.tsx b/packages/console/app/src/routes/workspace/[id]/members/member-section.tsx index 5aa1b969e..fd75bcec3 100644 --- a/packages/console/app/src/routes/workspace/[id]/members/member-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/members/member-section.tsx @@ -209,7 +209,7 @@ const roleOptions = [ export function MemberSection() { const params = useParams() - const data = createAsync(() => listMembers(params.id)) + const data = createAsync(() => listMembers(params.id!)) const submission = useSubmission(inviteMember) const [store, setStore] = createStore({ show: false, @@ -328,7 +328,7 @@ export function MemberSection() { {(member) => ( <MemberRow member={member} - workspaceID={params.id} + workspaceID={params.id!} actorID={data()!.actorID} actorRole={data()!.actorRole} /> diff --git a/packages/console/app/src/routes/workspace/[id]/model-section.tsx b/packages/console/app/src/routes/workspace/[id]/model-section.tsx index 7a1980ebe..9c4f87877 100644 --- a/packages/console/app/src/routes/workspace/[id]/model-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/model-section.tsx @@ -52,8 +52,8 @@ const updateModel = action(async (form: FormData) => { export function ModelSection() { const params = useParams() - const modelsInfo = createAsync(() => getModelsInfo(params.id)) - const userInfo = createAsync(() => querySessionInfo(params.id)) + const modelsInfo = createAsync(() => getModelsInfo(params.id!)) + const userInfo = createAsync(() => querySessionInfo(params.id!)) const modelsWithLab = createMemo(() => { const info = modelsInfo() diff --git a/packages/console/app/src/routes/workspace/[id]/new-user-section.tsx b/packages/console/app/src/routes/workspace/[id]/new-user-section.tsx index 65edc6847..30763ea31 100644 --- a/packages/console/app/src/routes/workspace/[id]/new-user-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/new-user-section.tsx @@ -21,8 +21,8 @@ const listKeys = query(async (workspaceID: string) => { export function NewUserSection() { const params = useParams() const [copiedKey, setCopiedKey] = createSignal(false) - const keys = createAsync(() => listKeys(params.id)) - const usage = createAsync(() => getUsageInfo(params.id)) + const keys = createAsync(() => listKeys(params.id!)) + const usage = createAsync(() => getUsageInfo(params.id!)) const isNew = createMemo(() => { const keysList = keys() const usageList = usage() diff --git a/packages/console/app/src/routes/workspace/[id]/provider-section.tsx b/packages/console/app/src/routes/workspace/[id]/provider-section.tsx index 5419ed7fb..ff2cc7dd0 100644 --- a/packages/console/app/src/routes/workspace/[id]/provider-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/provider-section.tsx @@ -54,7 +54,7 @@ const listProviders = query(async (workspaceID: string) => { function ProviderRow(props: { provider: Provider }) { const params = useParams() - const providers = createAsync(() => listProviders(params.id)) + const providers = createAsync(() => listProviders(params.id!)) const saveSubmission = useSubmission(saveProvider, ([fd]) => fd.get("provider")?.toString() === props.provider.key) const removeSubmission = useSubmission( removeProvider, diff --git a/packages/console/app/src/routes/workspace/[id]/settings/settings-section.tsx b/packages/console/app/src/routes/workspace/[id]/settings/settings-section.tsx index 828f1be7e..92169efee 100644 --- a/packages/console/app/src/routes/workspace/[id]/settings/settings-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/settings/settings-section.tsx @@ -46,7 +46,7 @@ const updateWorkspace = action(async (form: FormData) => { export function SettingsSection() { const params = useParams() - const workspaceInfo = createAsync(() => getWorkspaceInfo(params.id)) + const workspaceInfo = createAsync(() => getWorkspaceInfo(params.id!)) const submission = useSubmission(updateWorkspace) const [store, setStore] = createStore({ show: false }) diff --git a/packages/console/app/src/routes/workspace/[id]/usage-section.tsx b/packages/console/app/src/routes/workspace/[id]/usage-section.tsx index 47a2e43f7..3618bb7e2 100644 --- a/packages/console/app/src/routes/workspace/[id]/usage-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/usage-section.tsx @@ -15,7 +15,7 @@ const getUsageInfo = query(async (workspaceID: string) => { export function UsageSection() { const params = useParams() // ORIGINAL CODE - COMMENTED OUT FOR TESTING - const usage = createAsync(() => getUsageInfo(params.id)) + const usage = createAsync(() => getUsageInfo(params.id!)) // DUMMY DATA FOR TESTING // const usage = () => [ |
