Fixed for the new integrations stuff
This commit is contained in:
@@ -2,10 +2,9 @@ import { conform, useForm } from "@conform-to/react";
|
||||
import { parse } from "@conform-to/zod";
|
||||
import { useFetcher, useLocation, useNavigation } from "@remix-run/react";
|
||||
import cuid from "cuid";
|
||||
import React, { useState } from "react";
|
||||
import { useState } from "react";
|
||||
import simplur from "simplur";
|
||||
import { useTextFilter } from "~/hooks/useTextFilter";
|
||||
import { ApiConnectionType } from "~/models/apiConnection.server";
|
||||
import { createSchema } from "~/routes/resources.connection.$organizationId.oauth2";
|
||||
import {
|
||||
ApiAuthenticationMethodOAuth2,
|
||||
@@ -15,7 +14,6 @@ import {
|
||||
import { cn } from "~/utils/cn";
|
||||
import { CodeBlock } from "../code/CodeBlock";
|
||||
import { Button } from "../primitives/Buttons";
|
||||
import { Callout } from "../primitives/Callout";
|
||||
import { Checkbox } from "../primitives/Checkbox";
|
||||
import { Fieldset } from "../primitives/Fieldset";
|
||||
import { FormError } from "../primitives/FormError";
|
||||
@@ -23,8 +21,9 @@ import { Header2, Header3 } from "../primitives/Headers";
|
||||
import { Input } from "../primitives/Input";
|
||||
import { InputGroup } from "../primitives/InputGroup";
|
||||
import { Label } from "../primitives/Label";
|
||||
import { NamedIcon, NamedIconInBox } from "../primitives/NamedIcon";
|
||||
import { NamedIcon } from "../primitives/NamedIcon";
|
||||
import { Paragraph } from "../primitives/Paragraph";
|
||||
import type { ConnectionType } from "@trigger.dev/database";
|
||||
|
||||
export type Status = "loading" | "idle";
|
||||
|
||||
@@ -39,7 +38,7 @@ export function ConnectToOAuthForm({
|
||||
authMethod: ApiAuthenticationMethodOAuth2;
|
||||
authMethodKey: string;
|
||||
organizationId: string;
|
||||
clientType: ApiConnectionType;
|
||||
clientType: ConnectionType;
|
||||
}) {
|
||||
const [id] = useState<string>(cuid());
|
||||
const transition = useNavigation();
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
Integration,
|
||||
} from "~/services/externalApis/types";
|
||||
import { RadioGroup, RadioGroupItem } from "../primitives/RadioButton";
|
||||
import { ApiConnectionType } from "~/models/apiConnection.server";
|
||||
import type { ConnectionType } from "@trigger.dev/database";
|
||||
import { Header2 } from "../primitives/Headers";
|
||||
import { ConnectToOAuthForm } from "./ConnectToOAuthForm";
|
||||
import { Paragraph } from "../primitives/Paragraph";
|
||||
@@ -24,7 +24,7 @@ export function SelectOAuthMethod({
|
||||
oAuthMethods.length === 1 ? oAuthMethods[0][0] : undefined
|
||||
);
|
||||
const [connectionType, setConnectionType] = useState<
|
||||
ApiConnectionType | undefined
|
||||
ConnectionType | undefined
|
||||
>();
|
||||
|
||||
const selectedOAuthMethod = oAuthKey
|
||||
@@ -42,7 +42,7 @@ export function SelectOAuthMethod({
|
||||
name="oauth-method"
|
||||
className="flex gap-2"
|
||||
value={oAuthKey}
|
||||
onValueChange={(v) => setOAuthKey(v)}
|
||||
onValueChange={(v: any) => setOAuthKey(v)}
|
||||
>
|
||||
{oAuthMethods.map(([key, auth]) => (
|
||||
<RadioGroupItem
|
||||
@@ -66,7 +66,7 @@ export function SelectOAuthMethod({
|
||||
name="connection-type"
|
||||
className="flex gap-2"
|
||||
value={connectionType}
|
||||
onValueChange={(v) => setConnectionType(v as ApiConnectionType)}
|
||||
onValueChange={(v: any) => setConnectionType(v as ConnectionType)}
|
||||
>
|
||||
<RadioGroupItem
|
||||
id="DEVELOPER"
|
||||
|
||||
Reference in New Issue
Block a user