@@ -0,0 +1,161 @@
|
|||||||
|
import { useTranslate } from "@probo/i18n";
|
||||||
|
import { graphql } from "react-relay";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Dialog,
|
||||||
|
DialogContent,
|
||||||
|
DialogFooter,
|
||||||
|
Field,
|
||||||
|
useDialogRef,
|
||||||
|
Breadcrumb,
|
||||||
|
} from "@probo/ui";
|
||||||
|
import { z } from "zod";
|
||||||
|
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||||
|
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||||
|
import type { ReactNode } from "react";
|
||||||
|
import type { CreateCustomDomainDialogMutation } from "./__generated__/CreateCustomDomainDialogMutation.graphql";
|
||||||
|
|
||||||
|
const createCustomDomainMutation = graphql`
|
||||||
|
mutation CreateCustomDomainDialogMutation($input: CreateCustomDomainInput!) {
|
||||||
|
createCustomDomain(input: $input) {
|
||||||
|
customDomain {
|
||||||
|
id
|
||||||
|
domain
|
||||||
|
sslStatus
|
||||||
|
dnsRecords {
|
||||||
|
type
|
||||||
|
name
|
||||||
|
value
|
||||||
|
ttl
|
||||||
|
purpose
|
||||||
|
}
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
verifiedAt
|
||||||
|
sslExpiresAt
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
const schema = z.object({
|
||||||
|
domain: z
|
||||||
|
.string()
|
||||||
|
.min(1, "Domain is required")
|
||||||
|
.regex(
|
||||||
|
/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/i,
|
||||||
|
"Please enter a valid domain (e.g., compliance.example.com)"
|
||||||
|
),
|
||||||
|
});
|
||||||
|
|
||||||
|
type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
|
interface CreateCustomDomainDialogProps {
|
||||||
|
children: ReactNode;
|
||||||
|
organizationId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function CreateCustomDomainDialog({
|
||||||
|
children,
|
||||||
|
organizationId,
|
||||||
|
}: CreateCustomDomainDialogProps) {
|
||||||
|
const { __ } = useTranslate();
|
||||||
|
const dialogRef = useDialogRef();
|
||||||
|
|
||||||
|
const { register, handleSubmit, formState, reset } = useFormWithSchema(
|
||||||
|
schema,
|
||||||
|
{
|
||||||
|
defaultValues: {
|
||||||
|
domain: "",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const [createCustomDomain, isCreating] =
|
||||||
|
useMutationWithToasts<CreateCustomDomainDialogMutation>(
|
||||||
|
createCustomDomainMutation,
|
||||||
|
{
|
||||||
|
successMessage: __(
|
||||||
|
"Domain added successfully. Configure the DNS records to verify and activate your domain."
|
||||||
|
),
|
||||||
|
errorMessage: __("Failed to add domain"),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const onSubmit = handleSubmit(async (data: FormData) => {
|
||||||
|
const normalizedDomain = data.domain
|
||||||
|
.trim()
|
||||||
|
.toLowerCase()
|
||||||
|
.replace(/^https?:\/\//, "")
|
||||||
|
.replace(/\/$/, "");
|
||||||
|
|
||||||
|
await createCustomDomain({
|
||||||
|
variables: {
|
||||||
|
input: {
|
||||||
|
organizationId,
|
||||||
|
domain: normalizedDomain,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
updater: (store, data) => {
|
||||||
|
// Update the cache by setting the new customDomain on the organization
|
||||||
|
const organizationRecord = store.get(organizationId);
|
||||||
|
if (organizationRecord && data?.createCustomDomain?.customDomain) {
|
||||||
|
const customDomainRecord = store.get(
|
||||||
|
data.createCustomDomain.customDomain.id
|
||||||
|
);
|
||||||
|
if (customDomainRecord) {
|
||||||
|
organizationRecord.setLinkedRecord(
|
||||||
|
customDomainRecord,
|
||||||
|
"customDomain"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSuccess: () => {
|
||||||
|
reset();
|
||||||
|
dialogRef.current?.close();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
ref={dialogRef}
|
||||||
|
trigger={children}
|
||||||
|
title={<Breadcrumb items={[__("Custom Domain"), __("Add Domain")]} />}
|
||||||
|
>
|
||||||
|
<form onSubmit={onSubmit}>
|
||||||
|
<DialogContent padded className="space-y-4">
|
||||||
|
<div>
|
||||||
|
<p className="text-sm text-txt-secondary mb-4">
|
||||||
|
{__(
|
||||||
|
"Enter your domain and we'll generate the DNS records you need to add"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Field
|
||||||
|
{...register("domain")}
|
||||||
|
label={__("Domain")}
|
||||||
|
type="text"
|
||||||
|
placeholder="compliance.example.com"
|
||||||
|
error={formState.errors.domain?.message}
|
||||||
|
autoFocus
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div className="bg-subtle rounded-lg p-4">
|
||||||
|
<p className="text-xs text-txt-secondary">
|
||||||
|
<strong>{__("Examples:")}</strong> compliance.example.com,
|
||||||
|
trust.example.com
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</DialogContent>
|
||||||
|
<DialogFooter>
|
||||||
|
<Button type="submit" disabled={isCreating || !formState.isValid}>
|
||||||
|
{isCreating ? __("Adding...") : __("Add Domain")}
|
||||||
|
</Button>
|
||||||
|
</DialogFooter>
|
||||||
|
</form>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,78 +1,11 @@
|
|||||||
import { useState } from "react";
|
|
||||||
import { useTranslate } from "@probo/i18n";
|
import { useTranslate } from "@probo/i18n";
|
||||||
import { graphql, useLazyLoadQuery, useMutation } from "react-relay";
|
import { Button, Card, Badge, IconPlusLarge } from "@probo/ui";
|
||||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||||
import {
|
import { graphql } from "relay-runtime";
|
||||||
Button,
|
|
||||||
Card,
|
|
||||||
Badge,
|
|
||||||
Field,
|
|
||||||
Dialog,
|
|
||||||
DialogContent,
|
|
||||||
DialogFooter,
|
|
||||||
useDialogRef,
|
|
||||||
useToast,
|
|
||||||
} from "@probo/ui";
|
|
||||||
import type { CustomDomainManagerQuery } from "./__generated__/CustomDomainManagerQuery.graphql";
|
|
||||||
import type { CustomDomainManagerCreateMutation } from "./__generated__/CustomDomainManagerCreateMutation.graphql";
|
|
||||||
import type { CustomDomainManagerDeleteMutation } from "./__generated__/CustomDomainManagerDeleteMutation.graphql";
|
import type { CustomDomainManagerDeleteMutation } from "./__generated__/CustomDomainManagerDeleteMutation.graphql";
|
||||||
|
import { CreateCustomDomainDialog } from "./CreateCustomDomainDialog";
|
||||||
const customDomainsQuery = graphql`
|
import { DeleteCustomDomainDialog } from "./DeleteCustomDomainDialog";
|
||||||
query CustomDomainManagerQuery($organizationId: ID!) {
|
import { DomainDetailsDialog } from "./DomainDetailsDialog";
|
||||||
organization: node(id: $organizationId) {
|
|
||||||
... on Organization {
|
|
||||||
id
|
|
||||||
customDomains(first: 100) {
|
|
||||||
edges {
|
|
||||||
node {
|
|
||||||
id
|
|
||||||
domain
|
|
||||||
sslStatus
|
|
||||||
isActive
|
|
||||||
dnsRecords {
|
|
||||||
type
|
|
||||||
name
|
|
||||||
value
|
|
||||||
ttl
|
|
||||||
purpose
|
|
||||||
}
|
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
verifiedAt
|
|
||||||
sslExpiresAt
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const createCustomDomainMutation = graphql`
|
|
||||||
mutation CustomDomainManagerCreateMutation($input: CreateCustomDomainInput!) {
|
|
||||||
createCustomDomain(input: $input) {
|
|
||||||
customDomainEdge {
|
|
||||||
node {
|
|
||||||
id
|
|
||||||
domain
|
|
||||||
sslStatus
|
|
||||||
isActive
|
|
||||||
dnsRecords {
|
|
||||||
type
|
|
||||||
name
|
|
||||||
value
|
|
||||||
ttl
|
|
||||||
purpose
|
|
||||||
}
|
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
verifiedAt
|
|
||||||
sslExpiresAt
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const deleteCustomDomainMutation = graphql`
|
const deleteCustomDomainMutation = graphql`
|
||||||
mutation CustomDomainManagerDeleteMutation($input: DeleteCustomDomainInput!) {
|
mutation CustomDomainManagerDeleteMutation($input: DeleteCustomDomainInput!) {
|
||||||
@@ -82,280 +15,56 @@ const deleteCustomDomainMutation = graphql`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
function DomainDetailsDialog({
|
interface CustomDomainManagerProps {
|
||||||
domain,
|
organizationId: string;
|
||||||
children,
|
customDomain:
|
||||||
onDelete,
|
| {
|
||||||
isDeletingDomain,
|
readonly id: string;
|
||||||
}: {
|
readonly domain: string;
|
||||||
domain: any;
|
readonly sslStatus: string;
|
||||||
children: React.ReactNode;
|
readonly dnsRecords?:
|
||||||
onDelete: (domainId: string, domainName: string) => void;
|
| readonly {
|
||||||
isDeletingDomain: boolean;
|
readonly type: string;
|
||||||
}) {
|
readonly name: string;
|
||||||
const { __ } = useTranslate();
|
readonly value: string;
|
||||||
const { toast } = useToast();
|
readonly ttl?: number;
|
||||||
const dialogRef = useDialogRef();
|
readonly purpose: string;
|
||||||
|
}[]
|
||||||
const getStatusBadge = (domain: any) => {
|
| null;
|
||||||
if (domain.sslStatus === "ACTIVE") {
|
readonly createdAt?: string | null;
|
||||||
return <Badge variant="success">{__("Active")}</Badge>;
|
readonly updatedAt?: string | null;
|
||||||
}
|
readonly verifiedAt?: string | null;
|
||||||
if (domain.sslStatus === "PROVISIONING" || domain.sslStatus === "RENEWING") {
|
readonly sslExpiresAt?: string | null;
|
||||||
return <Badge variant="warning">{__("Provisioning")}</Badge>;
|
|
||||||
}
|
|
||||||
if (domain.sslStatus === "PENDING") {
|
|
||||||
return <Badge variant="warning">{__("Pending")}</Badge>;
|
|
||||||
}
|
|
||||||
if (domain.sslStatus === "FAILED") {
|
|
||||||
return <Badge variant="danger">{__("Failed")}</Badge>;
|
|
||||||
}
|
|
||||||
if (domain.sslStatus === "EXPIRED") {
|
|
||||||
return <Badge variant="danger">{__("Expired")}</Badge>;
|
|
||||||
}
|
|
||||||
return <Badge variant="neutral">{__("Unknown")}</Badge>;
|
|
||||||
};
|
|
||||||
|
|
||||||
const copyToClipboard = (text: string) => {
|
|
||||||
navigator.clipboard.writeText(text);
|
|
||||||
toast({
|
|
||||||
title: __("Copied"),
|
|
||||||
description: __("Value copied to clipboard"),
|
|
||||||
variant: "success",
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Dialog
|
|
||||||
ref={dialogRef}
|
|
||||||
trigger={children}
|
|
||||||
title={
|
|
||||||
<div className="flex items-center gap-3">
|
|
||||||
<span>{domain.domain}</span>
|
|
||||||
{getStatusBadge(domain)}
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
>
|
| null
|
||||||
<DialogContent padded className="space-y-6">
|
| undefined;
|
||||||
{domain.verifiedAt && (
|
|
||||||
<p className="text-sm text-txt-secondary">
|
|
||||||
{__("Verified")} {new Date(domain.verifiedAt).toLocaleDateString()}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{domain.sslStatus === "ACTIVE" ? (
|
|
||||||
<div className="bg-level-2 rounded-lg p-4">
|
|
||||||
<div className="flex items-start">
|
|
||||||
<svg
|
|
||||||
className="w-5 h-5 text-green-500 mt-0.5 mr-3 flex-shrink-0"
|
|
||||||
fill="none"
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
strokeWidth="2"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
stroke="currentColor"
|
|
||||||
>
|
|
||||||
<path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
||||||
</svg>
|
|
||||||
<div>
|
|
||||||
<p className="font-medium mb-1">{__("Domain is active")}</p>
|
|
||||||
<p className="text-sm text-txt-secondary">
|
|
||||||
{__("Your custom domain is verified and SSL certificate is active")}
|
|
||||||
</p>
|
|
||||||
{domain.sslExpiresAt && (
|
|
||||||
<p className="text-xs text-txt-tertiary mt-2">
|
|
||||||
{__("SSL expires")} {new Date(domain.sslExpiresAt).toLocaleDateString()}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div>
|
|
||||||
<h4 className="font-medium mb-3">{__("DNS Configuration")}</h4>
|
|
||||||
<p className="text-sm text-txt-secondary mb-4">
|
|
||||||
{__("Add these DNS records to your domain to complete verification")}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div className="space-y-3">
|
|
||||||
{domain.dnsRecords?.map((record: any, index: number) => (
|
|
||||||
<div key={index} className="bg-level-2 rounded-lg p-4">
|
|
||||||
<div className="flex items-center justify-between mb-2">
|
|
||||||
<span className="text-sm font-medium">{record.type}</span>
|
|
||||||
<Badge variant="neutral">{record.purpose}</Badge>
|
|
||||||
</div>
|
|
||||||
<div className="space-y-2">
|
|
||||||
<div>
|
|
||||||
<label className="text-xs text-txt-tertiary">{__("Name")}</label>
|
|
||||||
<div className="flex items-center gap-2 mt-1">
|
|
||||||
<code className="flex-1 text-sm bg-level-3 px-2 py-1 rounded">
|
|
||||||
{record.name}
|
|
||||||
</code>
|
|
||||||
<Button
|
|
||||||
variant="secondary"
|
|
||||||
onClick={() => copyToClipboard(record.name)}
|
|
||||||
>
|
|
||||||
{__("Copy")}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label className="text-xs text-txt-tertiary">{__("Value")}</label>
|
|
||||||
<div className="flex items-center gap-2 mt-1">
|
|
||||||
<code className="flex-1 text-sm bg-level-3 px-2 py-1 rounded break-all">
|
|
||||||
{record.value}
|
|
||||||
</code>
|
|
||||||
<Button
|
|
||||||
variant="secondary"
|
|
||||||
onClick={() => copyToClipboard(record.value)}
|
|
||||||
>
|
|
||||||
{__("Copy")}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{record.ttl && (
|
|
||||||
<div className="text-xs text-txt-tertiary">
|
|
||||||
TTL: {record.ttl}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{domain.sslStatus === "PENDING" && (
|
|
||||||
<div className="bg-level-2 rounded-lg p-4 mt-4">
|
|
||||||
<p className="text-sm">
|
|
||||||
{__("After adding the DNS records, verification will happen automatically. This may take a few minutes to propagate.")}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="pt-4 border-t border-border">
|
|
||||||
<Button
|
|
||||||
variant="danger"
|
|
||||||
onClick={() => {
|
|
||||||
dialogRef.current?.close();
|
|
||||||
onDelete(domain.id, domain.domain);
|
|
||||||
}}
|
|
||||||
disabled={isDeletingDomain}
|
|
||||||
>
|
|
||||||
{__("Delete Domain")}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</DialogContent>
|
|
||||||
</Dialog>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function CustomDomainManager() {
|
export function CustomDomainManager({
|
||||||
|
organizationId,
|
||||||
|
customDomain,
|
||||||
|
}: CustomDomainManagerProps) {
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const { toast } = useToast();
|
|
||||||
const organizationId = useOrganizationId();
|
|
||||||
const dialogRef = useDialogRef();
|
|
||||||
|
|
||||||
const data = useLazyLoadQuery<CustomDomainManagerQuery>(
|
const [deleteCustomDomain] =
|
||||||
customDomainsQuery,
|
useMutationWithToasts<CustomDomainManagerDeleteMutation>(
|
||||||
{ organizationId },
|
deleteCustomDomainMutation,
|
||||||
{ fetchPolicy: "network-only" }
|
{
|
||||||
);
|
successMessage: __("Domain deleted successfully"),
|
||||||
|
errorMessage: __("Failed to delete domain"),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const [createCustomDomain, isCreatingDomain] =
|
const domain = customDomain;
|
||||||
useMutation<CustomDomainManagerCreateMutation>(createCustomDomainMutation);
|
|
||||||
const [deleteCustomDomain, isDeletingDomain] =
|
|
||||||
useMutation<CustomDomainManagerDeleteMutation>(deleteCustomDomainMutation);
|
|
||||||
|
|
||||||
const [newDomain, setNewDomain] = useState("");
|
|
||||||
|
|
||||||
const domains =
|
|
||||||
data.organization?.customDomains?.edges?.map((edge) => edge.node) || [];
|
|
||||||
|
|
||||||
const validateDomain = (domainInput: string): boolean => {
|
|
||||||
const domainRegex =
|
|
||||||
/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/i;
|
|
||||||
return domainRegex.test(domainInput);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleAddDomain = () => {
|
|
||||||
const trimmedDomain = newDomain
|
|
||||||
.trim()
|
|
||||||
.toLowerCase()
|
|
||||||
.replace(/^https?:\/\//, "")
|
|
||||||
.replace(/\/$/, "");
|
|
||||||
|
|
||||||
if (!validateDomain(trimmedDomain)) {
|
|
||||||
toast({
|
|
||||||
title: __("Invalid Domain"),
|
|
||||||
description: __(
|
|
||||||
"Please enter a valid domain (e.g., compliance.example.com)"
|
|
||||||
),
|
|
||||||
variant: "error",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
createCustomDomain({
|
|
||||||
variables: {
|
|
||||||
input: {
|
|
||||||
organizationId,
|
|
||||||
domain: trimmedDomain,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
onCompleted: () => {
|
|
||||||
setNewDomain("");
|
|
||||||
dialogRef.current?.close();
|
|
||||||
|
|
||||||
toast({
|
|
||||||
title: __("Domain Added Successfully"),
|
|
||||||
description: __(
|
|
||||||
"Configure the DNS records below to verify and activate your domain"
|
|
||||||
),
|
|
||||||
variant: "success",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onError: (error) => {
|
|
||||||
toast({
|
|
||||||
title: __("Failed to Add Domain"),
|
|
||||||
description: error.message,
|
|
||||||
variant: "error",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleDeleteDomain = (domainId: string, domainName: string) => {
|
|
||||||
if (!confirm(`${__("Are you sure you want to delete")} ${domainName}?`)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteCustomDomain({
|
|
||||||
variables: {
|
|
||||||
input: { domainId },
|
|
||||||
},
|
|
||||||
onCompleted: () => {
|
|
||||||
toast({
|
|
||||||
title: __("Domain Deleted"),
|
|
||||||
description: __("The domain has been removed"),
|
|
||||||
variant: "success",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onError: (error) => {
|
|
||||||
toast({
|
|
||||||
title: __("Failed to Delete Domain"),
|
|
||||||
description: error.message,
|
|
||||||
variant: "error",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const getStatusBadge = (domain: any) => {
|
const getStatusBadge = (domain: any) => {
|
||||||
if (domain.sslStatus === "ACTIVE") {
|
if (domain.sslStatus === "ACTIVE") {
|
||||||
return <Badge variant="success">{__("Active")}</Badge>;
|
return <Badge variant="success">{__("Active")}</Badge>;
|
||||||
}
|
}
|
||||||
if (domain.sslStatus === "PROVISIONING" || domain.sslStatus === "RENEWING") {
|
if (
|
||||||
|
domain.sslStatus === "PROVISIONING" ||
|
||||||
|
domain.sslStatus === "RENEWING"
|
||||||
|
) {
|
||||||
return <Badge variant="warning">{__("Provisioning")}</Badge>;
|
return <Badge variant="warning">{__("Provisioning")}</Badge>;
|
||||||
}
|
}
|
||||||
if (domain.sslStatus === "PENDING") {
|
if (domain.sslStatus === "PENDING") {
|
||||||
@@ -370,132 +79,73 @@ export function CustomDomainManager() {
|
|||||||
return <Badge variant="neutral">{__("Unknown")}</Badge>;
|
return <Badge variant="neutral">{__("Unknown")}</Badge>;
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
const handleDeleteDomain = async () => {
|
||||||
<div className="space-y-6">
|
return deleteCustomDomain({
|
||||||
<div className="flex justify-between items-center">
|
variables: {
|
||||||
<div>
|
input: { organizationId },
|
||||||
<h2 className="text-2xl font-semibold">{__("Custom Domains")}</h2>
|
},
|
||||||
<p className="text-sm text-txt-secondary mt-1">
|
updater: (store) => {
|
||||||
{__("Use your own domain for your trust center")}
|
// Update the cache by setting customDomain to null
|
||||||
|
const organizationRecord = store.get(organizationId);
|
||||||
|
if (organizationRecord) {
|
||||||
|
organizationRecord.setValue(null, "customDomain");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!domain) {
|
||||||
|
return (
|
||||||
|
<Card padded>
|
||||||
|
<div className="text-center py-8">
|
||||||
|
<h3 className="text-lg font-semibold mb-2">
|
||||||
|
{__("No custom domain configured")}
|
||||||
|
</h3>
|
||||||
|
<p className="text-txt-tertiary mb-4">
|
||||||
|
{__(
|
||||||
|
"Add your own domain to make your trust center more professional"
|
||||||
|
)}
|
||||||
</p>
|
</p>
|
||||||
|
<div className="flex justify-center">
|
||||||
|
<CreateCustomDomainDialog organizationId={organizationId}>
|
||||||
|
<Button icon={IconPlusLarge}>{__("Add Domain")}</Button>
|
||||||
|
</CreateCustomDomainDialog>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Button onClick={() => dialogRef.current?.open()}>
|
</Card>
|
||||||
{__("Add Domain")}
|
);
|
||||||
</Button>
|
}
|
||||||
</div>
|
|
||||||
|
|
||||||
{domains.length === 0 ? (
|
return (
|
||||||
<Card padded>
|
<Card>
|
||||||
<div className="text-center py-12">
|
<div className="p-4">
|
||||||
<div className="inline-flex items-center justify-center w-16 h-16 bg-level-2 rounded-full mb-4">
|
<div className="flex items-center justify-between">
|
||||||
<svg
|
<div className="flex items-center gap-3">
|
||||||
className="w-8 h-8 text-txt-tertiary"
|
|
||||||
fill="none"
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
strokeWidth="2"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
stroke="currentColor"
|
|
||||||
>
|
|
||||||
<path d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
<h3 className="text-lg font-medium mb-2">
|
|
||||||
{__("No custom domains yet")}
|
|
||||||
</h3>
|
|
||||||
<p className="text-sm text-txt-secondary mb-6">
|
|
||||||
{__(
|
|
||||||
"Add your own domain to make your trust center more professional"
|
|
||||||
)}
|
|
||||||
</p>
|
|
||||||
<Button onClick={() => dialogRef.current?.open()}>
|
|
||||||
{__("Add Your First Domain")}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</Card>
|
|
||||||
) : (
|
|
||||||
<Card>
|
|
||||||
<div className="divide-y divide-border">
|
|
||||||
{domains.map((domain: any) => (
|
|
||||||
<DomainDetailsDialog
|
|
||||||
key={domain.id}
|
|
||||||
domain={domain}
|
|
||||||
onDelete={handleDeleteDomain}
|
|
||||||
isDeletingDomain={isDeletingDomain}
|
|
||||||
>
|
|
||||||
<div className="p-4 cursor-pointer hover:bg-level-1 transition-colors">
|
|
||||||
<div className="flex items-center justify-between">
|
|
||||||
<div>
|
|
||||||
<div className="font-medium mb-1">{domain.domain}</div>
|
|
||||||
{getStatusBadge(domain)}
|
|
||||||
</div>
|
|
||||||
<svg
|
|
||||||
className="w-5 h-5 text-txt-tertiary"
|
|
||||||
fill="none"
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
strokeWidth="2"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
stroke="currentColor"
|
|
||||||
>
|
|
||||||
<path d="M9 5l7 7-7 7" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</DomainDetailsDialog>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</Card>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Dialog
|
|
||||||
ref={dialogRef}
|
|
||||||
onClose={() => {
|
|
||||||
setNewDomain("");
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<DialogContent className="max-w-md" padded>
|
|
||||||
<div className="space-y-4">
|
|
||||||
<div>
|
<div>
|
||||||
<h3 className="text-lg font-semibold mb-2">
|
<div className="font-medium mb-1">{domain.domain}</div>
|
||||||
{__("Add Custom Domain")}
|
<div className="text-sm text-txt-secondary">
|
||||||
</h3>
|
{domain.verifiedAt
|
||||||
<p className="text-sm text-txt-secondary">
|
? `${__("Verified")} ${new Date(domain.verifiedAt).toLocaleDateString()}`
|
||||||
{__(
|
: __("Pending verification")}
|
||||||
"Enter your domain and we'll generate the DNS records you need to add"
|
</div>
|
||||||
)}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Field
|
|
||||||
label={__("Domain")}
|
|
||||||
name="domain"
|
|
||||||
value={newDomain}
|
|
||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
|
|
||||||
setNewDomain(e.target.value)
|
|
||||||
}
|
|
||||||
placeholder="compliance.example.com"
|
|
||||||
help={__("Enter without http:// or https://")}
|
|
||||||
autoFocus
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div className="bg-level-2 rounded-lg p-3">
|
|
||||||
<p className="text-xs text-txt-secondary">
|
|
||||||
<strong>{__("Examples:")}</strong> compliance.example.com,
|
|
||||||
trust.example.com
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
{getStatusBadge(domain)}
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
|
||||||
<DialogFooter>
|
<div className="flex items-center gap-2">
|
||||||
<Button
|
<DomainDetailsDialog domain={domain}>
|
||||||
onClick={handleAddDomain}
|
<Button variant="secondary">{__("View Details")}</Button>
|
||||||
disabled={isCreatingDomain || !newDomain.trim()}
|
</DomainDetailsDialog>
|
||||||
>
|
|
||||||
{isCreatingDomain ? __("Adding...") : __("Add Domain")}
|
<DeleteCustomDomainDialog
|
||||||
</Button>
|
domainName={domain.domain}
|
||||||
</DialogFooter>
|
onConfirm={handleDeleteDomain}
|
||||||
</Dialog>
|
>
|
||||||
</div>
|
<Button variant="danger">{__("Delete")}</Button>
|
||||||
|
</DeleteCustomDomainDialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
import { useTranslate } from "@probo/i18n";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Dialog,
|
||||||
|
DialogContent,
|
||||||
|
DialogFooter,
|
||||||
|
Field,
|
||||||
|
useDialogRef,
|
||||||
|
IconTrashCan,
|
||||||
|
} from "@probo/ui";
|
||||||
|
import { useState, useEffect, type ReactNode } from "react";
|
||||||
|
import { sprintf } from "@probo/helpers";
|
||||||
|
|
||||||
|
interface DeleteCustomDomainDialogProps {
|
||||||
|
children: ReactNode;
|
||||||
|
domainName: string;
|
||||||
|
onConfirm: () => Promise<void>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function DeleteCustomDomainDialog({
|
||||||
|
children,
|
||||||
|
domainName,
|
||||||
|
onConfirm,
|
||||||
|
}: DeleteCustomDomainDialogProps) {
|
||||||
|
const { __ } = useTranslate();
|
||||||
|
const [inputValue, setInputValue] = useState("");
|
||||||
|
const [isDeleting, setIsDeleting] = useState(false);
|
||||||
|
const dialogRef = useDialogRef();
|
||||||
|
|
||||||
|
const isConfirmDisabled = inputValue !== domainName || isDeleting;
|
||||||
|
|
||||||
|
const handleConfirm = async () => {
|
||||||
|
if (inputValue === domainName && !isDeleting) {
|
||||||
|
setIsDeleting(true);
|
||||||
|
try {
|
||||||
|
await onConfirm();
|
||||||
|
dialogRef.current?.close();
|
||||||
|
} finally {
|
||||||
|
setIsDeleting(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!isDeleting) {
|
||||||
|
setInputValue("");
|
||||||
|
}
|
||||||
|
}, [isDeleting]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
className="max-w-lg"
|
||||||
|
ref={dialogRef}
|
||||||
|
trigger={children}
|
||||||
|
title={__("Delete Custom Domain")}
|
||||||
|
>
|
||||||
|
<DialogContent padded className="space-y-4">
|
||||||
|
<p className="text-txt-secondary text-sm">
|
||||||
|
{sprintf(
|
||||||
|
__(
|
||||||
|
"This will permanently delete the custom domain %s and all its configuration."
|
||||||
|
),
|
||||||
|
domainName
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p className="text-red-600 text-sm font-medium">
|
||||||
|
{__("This action cannot be undone.")}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<Field
|
||||||
|
label={sprintf(
|
||||||
|
__('To confirm deletion, type "%s" below:'),
|
||||||
|
domainName
|
||||||
|
)}
|
||||||
|
type="text"
|
||||||
|
value={inputValue}
|
||||||
|
onChange={(e) => setInputValue(e.target.value)}
|
||||||
|
placeholder={domainName}
|
||||||
|
disabled={isDeleting}
|
||||||
|
autoComplete="off"
|
||||||
|
autoFocus
|
||||||
|
/>
|
||||||
|
</DialogContent>
|
||||||
|
<DialogFooter>
|
||||||
|
<Button
|
||||||
|
variant="danger"
|
||||||
|
icon={IconTrashCan}
|
||||||
|
onClick={handleConfirm}
|
||||||
|
disabled={isConfirmDisabled}
|
||||||
|
>
|
||||||
|
{isDeleting ? __("Deleting...") : __("Delete Domain")}
|
||||||
|
</Button>
|
||||||
|
</DialogFooter>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
import { useTranslate } from "@probo/i18n";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Dialog,
|
||||||
|
DialogContent,
|
||||||
|
Badge,
|
||||||
|
useDialogRef,
|
||||||
|
useToast,
|
||||||
|
} from "@probo/ui";
|
||||||
|
import type { ReactNode } from "react";
|
||||||
|
|
||||||
|
interface DomainDetailsDialogProps {
|
||||||
|
children: ReactNode;
|
||||||
|
domain: {
|
||||||
|
readonly id: string;
|
||||||
|
readonly domain: string;
|
||||||
|
readonly sslStatus: string;
|
||||||
|
readonly dnsRecords?:
|
||||||
|
| readonly {
|
||||||
|
readonly type: string;
|
||||||
|
readonly name: string;
|
||||||
|
readonly value: string;
|
||||||
|
readonly ttl?: number;
|
||||||
|
readonly purpose: string;
|
||||||
|
}[]
|
||||||
|
| null;
|
||||||
|
readonly verifiedAt?: string | null;
|
||||||
|
readonly sslExpiresAt?: string | null;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function DomainDetailsDialog({
|
||||||
|
children,
|
||||||
|
domain,
|
||||||
|
}: DomainDetailsDialogProps) {
|
||||||
|
const { __ } = useTranslate();
|
||||||
|
const { toast } = useToast();
|
||||||
|
const dialogRef = useDialogRef();
|
||||||
|
|
||||||
|
const getStatusBadge = (domain: DomainDetailsDialogProps["domain"]) => {
|
||||||
|
if (domain.sslStatus === "ACTIVE") {
|
||||||
|
return <Badge variant="success">{__("Active")}</Badge>;
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
domain.sslStatus === "PROVISIONING" ||
|
||||||
|
domain.sslStatus === "RENEWING"
|
||||||
|
) {
|
||||||
|
return <Badge variant="warning">{__("Provisioning")}</Badge>;
|
||||||
|
}
|
||||||
|
if (domain.sslStatus === "PENDING") {
|
||||||
|
return <Badge variant="warning">{__("Pending")}</Badge>;
|
||||||
|
}
|
||||||
|
if (domain.sslStatus === "FAILED") {
|
||||||
|
return <Badge variant="danger">{__("Failed")}</Badge>;
|
||||||
|
}
|
||||||
|
if (domain.sslStatus === "EXPIRED") {
|
||||||
|
return <Badge variant="danger">{__("Expired")}</Badge>;
|
||||||
|
}
|
||||||
|
return <Badge variant="neutral">{__("Unknown")}</Badge>;
|
||||||
|
};
|
||||||
|
|
||||||
|
const copyToClipboard = (text: string) => {
|
||||||
|
navigator.clipboard.writeText(text);
|
||||||
|
toast({
|
||||||
|
title: __("Copied"),
|
||||||
|
description: __("Value copied to clipboard"),
|
||||||
|
variant: "success",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
ref={dialogRef}
|
||||||
|
trigger={children}
|
||||||
|
title={
|
||||||
|
<div className="flex items-center gap-3">
|
||||||
|
<span>{domain.domain}</span>
|
||||||
|
{getStatusBadge(domain)}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<DialogContent padded className="space-y-6">
|
||||||
|
{domain.verifiedAt && (
|
||||||
|
<p className="text-sm text-txt-secondary">
|
||||||
|
{__("Verified")} {new Date(domain.verifiedAt).toLocaleDateString()}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{domain.sslStatus === "ACTIVE" ? (
|
||||||
|
<div className="bg-subtle rounded-lg p-4">
|
||||||
|
<div className="flex items-start">
|
||||||
|
<svg
|
||||||
|
className="w-5 h-5 text-green-500 mt-0.5 mr-3 flex-shrink-0"
|
||||||
|
fill="none"
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
strokeWidth="2"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
stroke="currentColor"
|
||||||
|
>
|
||||||
|
<path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||||
|
</svg>
|
||||||
|
<div>
|
||||||
|
<p className="font-medium mb-1">{__("Domain is active")}</p>
|
||||||
|
<p className="text-sm text-txt-secondary">
|
||||||
|
{__(
|
||||||
|
"Your custom domain is verified and SSL certificate is active"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
{domain.sslExpiresAt && (
|
||||||
|
<p className="text-xs text-txt-tertiary mt-2">
|
||||||
|
{__("SSL expires")}{" "}
|
||||||
|
{new Date(domain.sslExpiresAt).toLocaleDateString()}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div>
|
||||||
|
<h4 className="font-medium mb-3">{__("DNS Configuration")}</h4>
|
||||||
|
<p className="text-sm text-txt-secondary mb-4">
|
||||||
|
{__(
|
||||||
|
"Add these DNS records to your domain to complete verification"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div className="space-y-3">
|
||||||
|
{domain.dnsRecords?.map((record, index) => (
|
||||||
|
<div key={index} className="bg-subtle rounded-lg p-4">
|
||||||
|
<div className="flex items-center justify-between mb-2">
|
||||||
|
<span className="text-sm font-medium">{record.type}</span>
|
||||||
|
<Badge variant="neutral">{record.purpose}</Badge>
|
||||||
|
</div>
|
||||||
|
<div className="space-y-2">
|
||||||
|
<div>
|
||||||
|
<label className="text-xs text-txt-tertiary">
|
||||||
|
{__("Name")}
|
||||||
|
</label>
|
||||||
|
<div className="flex items-center gap-2 mt-1">
|
||||||
|
<code className="flex-1 text-sm bg-subtle px-2 py-1 rounded">
|
||||||
|
{record.name}
|
||||||
|
</code>
|
||||||
|
<Button
|
||||||
|
variant="secondary"
|
||||||
|
onClick={() => copyToClipboard(record.name)}
|
||||||
|
>
|
||||||
|
{__("Copy")}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label className="text-xs text-txt-tertiary">
|
||||||
|
{__("Value")}
|
||||||
|
</label>
|
||||||
|
<div className="flex items-center gap-2 mt-1">
|
||||||
|
<code className="flex-1 text-sm bg-subtle px-2 py-1 rounded break-all">
|
||||||
|
{record.value}
|
||||||
|
</code>
|
||||||
|
<Button
|
||||||
|
variant="secondary"
|
||||||
|
onClick={() => copyToClipboard(record.value)}
|
||||||
|
>
|
||||||
|
{__("Copy")}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{record.ttl && (
|
||||||
|
<div className="text-xs text-txt-tertiary">
|
||||||
|
TTL: {record.ttl}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{domain.sslStatus === "PENDING" && (
|
||||||
|
<div className="bg-subtle rounded-lg p-4 mt-4">
|
||||||
|
<p className="text-sm">
|
||||||
|
{__(
|
||||||
|
"After adding the DNS records, verification will happen automatically. This may take a few minutes to propagate."
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
208
apps/console/src/components/customDomains/__generated__/CreateCustomDomainDialogMutation.graphql.ts
generated
Normal file
208
apps/console/src/components/customDomains/__generated__/CreateCustomDomainDialogMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
/**
|
||||||
|
* @generated SignedSource<<b8a660825f6c3e3413e6505179ae3e1e>>
|
||||||
|
* @lightSyntaxTransform
|
||||||
|
* @nogrep
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
|
export type SSLStatus = "ACTIVE" | "EXPIRED" | "FAILED" | "PENDING" | "PROVISIONING" | "RENEWING";
|
||||||
|
export type CreateCustomDomainInput = {
|
||||||
|
domain: string;
|
||||||
|
organizationId: string;
|
||||||
|
};
|
||||||
|
export type CreateCustomDomainDialogMutation$variables = {
|
||||||
|
input: CreateCustomDomainInput;
|
||||||
|
};
|
||||||
|
export type CreateCustomDomainDialogMutation$data = {
|
||||||
|
readonly createCustomDomain: {
|
||||||
|
readonly customDomain: {
|
||||||
|
readonly createdAt: any;
|
||||||
|
readonly dnsRecords: ReadonlyArray<{
|
||||||
|
readonly name: string;
|
||||||
|
readonly purpose: string;
|
||||||
|
readonly ttl: number;
|
||||||
|
readonly type: string;
|
||||||
|
readonly value: string;
|
||||||
|
}>;
|
||||||
|
readonly domain: string;
|
||||||
|
readonly id: string;
|
||||||
|
readonly sslExpiresAt: any | null | undefined;
|
||||||
|
readonly sslStatus: SSLStatus;
|
||||||
|
readonly updatedAt: any;
|
||||||
|
readonly verifiedAt: any | null | undefined;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type CreateCustomDomainDialogMutation = {
|
||||||
|
response: CreateCustomDomainDialogMutation$data;
|
||||||
|
variables: CreateCustomDomainDialogMutation$variables;
|
||||||
|
};
|
||||||
|
|
||||||
|
const node: ConcreteRequest = (function(){
|
||||||
|
var v0 = [
|
||||||
|
{
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "input"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
v1 = [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "input",
|
||||||
|
"variableName": "input"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"concreteType": "CreateCustomDomainPayload",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "createCustomDomain",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"concreteType": "CustomDomain",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "customDomain",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "id",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "domain",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "sslStatus",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"concreteType": "DNSRecordInstruction",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "dnsRecords",
|
||||||
|
"plural": true,
|
||||||
|
"selections": [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "type",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "name",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "value",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "ttl",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "purpose",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "createdAt",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "updatedAt",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "verifiedAt",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "sslExpiresAt",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
];
|
||||||
|
return {
|
||||||
|
"fragment": {
|
||||||
|
"argumentDefinitions": (v0/*: any*/),
|
||||||
|
"kind": "Fragment",
|
||||||
|
"metadata": null,
|
||||||
|
"name": "CreateCustomDomainDialogMutation",
|
||||||
|
"selections": (v1/*: any*/),
|
||||||
|
"type": "Mutation",
|
||||||
|
"abstractKey": null
|
||||||
|
},
|
||||||
|
"kind": "Request",
|
||||||
|
"operation": {
|
||||||
|
"argumentDefinitions": (v0/*: any*/),
|
||||||
|
"kind": "Operation",
|
||||||
|
"name": "CreateCustomDomainDialogMutation",
|
||||||
|
"selections": (v1/*: any*/)
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"cacheID": "9a6fad6d53811f74048b3ff0b64e0afe",
|
||||||
|
"id": null,
|
||||||
|
"metadata": {},
|
||||||
|
"name": "CreateCustomDomainDialogMutation",
|
||||||
|
"operationKind": "mutation",
|
||||||
|
"text": "mutation CreateCustomDomainDialogMutation(\n $input: CreateCustomDomainInput!\n) {\n createCustomDomain(input: $input) {\n customDomain {\n id\n domain\n sslStatus\n dnsRecords {\n type\n name\n value\n ttl\n purpose\n }\n createdAt\n updatedAt\n verifiedAt\n sslExpiresAt\n }\n }\n}\n"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
(node as any).hash = "312e66e894a78da19c28c7f03d03fe96";
|
||||||
|
|
||||||
|
export default node;
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
/**
|
|
||||||
* @generated SignedSource<<e1683e44614d1b0224fc8592dd72eb9f>>
|
|
||||||
* @lightSyntaxTransform
|
|
||||||
* @nogrep
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
// @ts-nocheck
|
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
|
||||||
export type SSLStatus = "ACTIVE" | "EXPIRED" | "EXPIRED" | "FAILED" | "PENDING" | "PROVISIONING" | "RENEWING";
|
|
||||||
export type CreateCustomDomainInput = {
|
|
||||||
domain: string;
|
|
||||||
organizationId: string;
|
|
||||||
};
|
|
||||||
export type CustomDomainManagerCreateMutation$variables = {
|
|
||||||
input: CreateCustomDomainInput;
|
|
||||||
};
|
|
||||||
export type CustomDomainManagerCreateMutation$data = {
|
|
||||||
readonly createCustomDomain: {
|
|
||||||
readonly customDomainEdge: {
|
|
||||||
readonly node: {
|
|
||||||
readonly createdAt: any;
|
|
||||||
readonly dnsRecords: ReadonlyArray<{
|
|
||||||
readonly name: string;
|
|
||||||
readonly purpose: string;
|
|
||||||
readonly ttl: number;
|
|
||||||
readonly type: string;
|
|
||||||
readonly value: string;
|
|
||||||
}>;
|
|
||||||
readonly domain: string;
|
|
||||||
readonly id: string;
|
|
||||||
readonly isActive: boolean;
|
|
||||||
readonly sslExpiresAt: any | null | undefined;
|
|
||||||
readonly sslStatus: SSLStatus;
|
|
||||||
readonly updatedAt: any;
|
|
||||||
readonly verifiedAt: any | null | undefined;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
export type CustomDomainManagerCreateMutation = {
|
|
||||||
response: CustomDomainManagerCreateMutation$data;
|
|
||||||
variables: CustomDomainManagerCreateMutation$variables;
|
|
||||||
};
|
|
||||||
|
|
||||||
const node: ConcreteRequest = (function(){
|
|
||||||
var v0 = [
|
|
||||||
{
|
|
||||||
"defaultValue": null,
|
|
||||||
"kind": "LocalArgument",
|
|
||||||
"name": "input"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
v1 = [
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": [
|
|
||||||
{
|
|
||||||
"kind": "Variable",
|
|
||||||
"name": "input",
|
|
||||||
"variableName": "input"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"concreteType": "CreateCustomDomainPayload",
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "createCustomDomain",
|
|
||||||
"plural": false,
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"concreteType": "CustomDomainEdge",
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "customDomainEdge",
|
|
||||||
"plural": false,
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"concreteType": "CustomDomain",
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "node",
|
|
||||||
"plural": false,
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "id",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "domain",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "sslStatus",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "isActive",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"concreteType": "DNSRecordInstruction",
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "dnsRecords",
|
|
||||||
"plural": true,
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "type",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "name",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "value",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "ttl",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "purpose",
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "createdAt",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "updatedAt",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "verifiedAt",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "sslExpiresAt",
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
];
|
|
||||||
return {
|
|
||||||
"fragment": {
|
|
||||||
"argumentDefinitions": (v0/*: any*/),
|
|
||||||
"kind": "Fragment",
|
|
||||||
"metadata": null,
|
|
||||||
"name": "CustomDomainManagerCreateMutation",
|
|
||||||
"selections": (v1/*: any*/),
|
|
||||||
"type": "Mutation",
|
|
||||||
"abstractKey": null
|
|
||||||
},
|
|
||||||
"kind": "Request",
|
|
||||||
"operation": {
|
|
||||||
"argumentDefinitions": (v0/*: any*/),
|
|
||||||
"kind": "Operation",
|
|
||||||
"name": "CustomDomainManagerCreateMutation",
|
|
||||||
"selections": (v1/*: any*/)
|
|
||||||
},
|
|
||||||
"params": {
|
|
||||||
"cacheID": "f10f04ab871fe2b42cc29c5789dc103a",
|
|
||||||
"id": null,
|
|
||||||
"metadata": {},
|
|
||||||
"name": "CustomDomainManagerCreateMutation",
|
|
||||||
"operationKind": "mutation",
|
|
||||||
"text": "mutation CustomDomainManagerCreateMutation(\n $input: CreateCustomDomainInput!\n) {\n createCustomDomain(input: $input) {\n customDomainEdge {\n node {\n id\n domain\n sslStatus\n isActive\n dnsRecords {\n type\n name\n value\n ttl\n purpose\n }\n createdAt\n updatedAt\n verifiedAt\n sslExpiresAt\n }\n }\n }\n}\n"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
|
|
||||||
(node as any).hash = "f2c706c80df1d0a9fa2e7ea4faa75fb3";
|
|
||||||
|
|
||||||
export default node;
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<869106a8eb759c253f8578a596b748a0>>
|
* @generated SignedSource<<b25e2b88094ba632cc451508af4df1e3>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
export type DeleteCustomDomainInput = {
|
export type DeleteCustomDomainInput = {
|
||||||
domainId: string;
|
organizationId: string;
|
||||||
};
|
};
|
||||||
export type CustomDomainManagerDeleteMutation$variables = {
|
export type CustomDomainManagerDeleteMutation$variables = {
|
||||||
input: DeleteCustomDomainInput;
|
input: DeleteCustomDomainInput;
|
||||||
|
|||||||
@@ -1,283 +0,0 @@
|
|||||||
/**
|
|
||||||
* @generated SignedSource<<04bd8d8635434cd05ea80edbb804b56f>>
|
|
||||||
* @lightSyntaxTransform
|
|
||||||
* @nogrep
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
// @ts-nocheck
|
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
|
||||||
export type SSLStatus = "ACTIVE" | "EXPIRED" | "EXPIRED" | "FAILED" | "PENDING" | "PROVISIONING" | "RENEWING";
|
|
||||||
export type CustomDomainManagerQuery$variables = {
|
|
||||||
organizationId: string;
|
|
||||||
};
|
|
||||||
export type CustomDomainManagerQuery$data = {
|
|
||||||
readonly organization: {
|
|
||||||
readonly customDomains?: {
|
|
||||||
readonly edges: ReadonlyArray<{
|
|
||||||
readonly node: {
|
|
||||||
readonly createdAt: any;
|
|
||||||
readonly dnsRecords: ReadonlyArray<{
|
|
||||||
readonly name: string;
|
|
||||||
readonly purpose: string;
|
|
||||||
readonly ttl: number;
|
|
||||||
readonly type: string;
|
|
||||||
readonly value: string;
|
|
||||||
}>;
|
|
||||||
readonly domain: string;
|
|
||||||
readonly id: string;
|
|
||||||
readonly isActive: boolean;
|
|
||||||
readonly sslExpiresAt: any | null | undefined;
|
|
||||||
readonly sslStatus: SSLStatus;
|
|
||||||
readonly updatedAt: any;
|
|
||||||
readonly verifiedAt: any | null | undefined;
|
|
||||||
};
|
|
||||||
}>;
|
|
||||||
};
|
|
||||||
readonly id?: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
export type CustomDomainManagerQuery = {
|
|
||||||
response: CustomDomainManagerQuery$data;
|
|
||||||
variables: CustomDomainManagerQuery$variables;
|
|
||||||
};
|
|
||||||
|
|
||||||
const node: ConcreteRequest = (function(){
|
|
||||||
var v0 = [
|
|
||||||
{
|
|
||||||
"defaultValue": null,
|
|
||||||
"kind": "LocalArgument",
|
|
||||||
"name": "organizationId"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
v1 = [
|
|
||||||
{
|
|
||||||
"kind": "Variable",
|
|
||||||
"name": "id",
|
|
||||||
"variableName": "organizationId"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
v2 = {
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "id",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
v3 = {
|
|
||||||
"alias": null,
|
|
||||||
"args": [
|
|
||||||
{
|
|
||||||
"kind": "Literal",
|
|
||||||
"name": "first",
|
|
||||||
"value": 100
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"concreteType": "CustomDomainConnection",
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "customDomains",
|
|
||||||
"plural": false,
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"concreteType": "CustomDomainEdge",
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "edges",
|
|
||||||
"plural": true,
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"concreteType": "CustomDomain",
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "node",
|
|
||||||
"plural": false,
|
|
||||||
"selections": [
|
|
||||||
(v2/*: any*/),
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "domain",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "sslStatus",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "isActive",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"concreteType": "DNSRecordInstruction",
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "dnsRecords",
|
|
||||||
"plural": true,
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "type",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "name",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "value",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "ttl",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "purpose",
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "createdAt",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "updatedAt",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "verifiedAt",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "sslExpiresAt",
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"storageKey": "customDomains(first:100)"
|
|
||||||
};
|
|
||||||
return {
|
|
||||||
"fragment": {
|
|
||||||
"argumentDefinitions": (v0/*: any*/),
|
|
||||||
"kind": "Fragment",
|
|
||||||
"metadata": null,
|
|
||||||
"name": "CustomDomainManagerQuery",
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": "organization",
|
|
||||||
"args": (v1/*: any*/),
|
|
||||||
"concreteType": null,
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "node",
|
|
||||||
"plural": false,
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"kind": "InlineFragment",
|
|
||||||
"selections": [
|
|
||||||
(v2/*: any*/),
|
|
||||||
(v3/*: any*/)
|
|
||||||
],
|
|
||||||
"type": "Organization",
|
|
||||||
"abstractKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "Query",
|
|
||||||
"abstractKey": null
|
|
||||||
},
|
|
||||||
"kind": "Request",
|
|
||||||
"operation": {
|
|
||||||
"argumentDefinitions": (v0/*: any*/),
|
|
||||||
"kind": "Operation",
|
|
||||||
"name": "CustomDomainManagerQuery",
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": "organization",
|
|
||||||
"args": (v1/*: any*/),
|
|
||||||
"concreteType": null,
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "node",
|
|
||||||
"plural": false,
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "__typename",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
(v2/*: any*/),
|
|
||||||
{
|
|
||||||
"kind": "InlineFragment",
|
|
||||||
"selections": [
|
|
||||||
(v3/*: any*/)
|
|
||||||
],
|
|
||||||
"type": "Organization",
|
|
||||||
"abstractKey": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"params": {
|
|
||||||
"cacheID": "c561676e49338e212721ed12e1069dd0",
|
|
||||||
"id": null,
|
|
||||||
"metadata": {},
|
|
||||||
"name": "CustomDomainManagerQuery",
|
|
||||||
"operationKind": "query",
|
|
||||||
"text": "query CustomDomainManagerQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n customDomains(first: 100) {\n edges {\n node {\n id\n domain\n sslStatus\n isActive\n dnsRecords {\n type\n name\n value\n ttl\n purpose\n }\n createdAt\n updatedAt\n verifiedAt\n sslExpiresAt\n }\n }\n }\n }\n id\n }\n}\n"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
|
|
||||||
(node as any).hash = "0aea6f600572fac571dbc0e1e6a3117c";
|
|
||||||
|
|
||||||
export default node;
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<148c6dc2b419fa0611529004e0a3535a>>
|
* @generated SignedSource<<7493102ba1f19bb7721e444d0e372629>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -61,20 +61,27 @@ v4 = {
|
|||||||
"name": "email",
|
"name": "email",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v5 = [
|
v5 = {
|
||||||
{
|
"alias": null,
|
||||||
"kind": "Literal",
|
"args": null,
|
||||||
"name": "first",
|
"kind": "ScalarField",
|
||||||
"value": 100
|
"name": "type",
|
||||||
}
|
"storageKey": null
|
||||||
],
|
},
|
||||||
v6 = {
|
v6 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "createdAt",
|
"name": "createdAt",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
};
|
},
|
||||||
|
v7 = [
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "first",
|
||||||
|
"value": 100
|
||||||
|
}
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
"fragment": {
|
"fragment": {
|
||||||
"argumentDefinitions": (v0/*: any*/),
|
"argumentDefinitions": (v0/*: any*/),
|
||||||
@@ -168,7 +175,89 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v5/*: any*/),
|
"args": null,
|
||||||
|
"concreteType": "CustomDomain",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "customDomain",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v2/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "domain",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "sslStatus",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"concreteType": "DNSRecordInstruction",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "dnsRecords",
|
||||||
|
"plural": true,
|
||||||
|
"selections": [
|
||||||
|
(v5/*: any*/),
|
||||||
|
(v3/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "value",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "ttl",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "purpose",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
(v6/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "updatedAt",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "verifiedAt",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "sslExpiresAt",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": (v7/*: any*/),
|
||||||
"concreteType": "UserConnection",
|
"concreteType": "UserConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "users",
|
"name": "users",
|
||||||
@@ -211,7 +300,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v5/*: any*/),
|
"args": (v7/*: any*/),
|
||||||
"concreteType": "ConnectorConnection",
|
"concreteType": "ConnectorConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "connectors",
|
"name": "connectors",
|
||||||
@@ -235,13 +324,7 @@ return {
|
|||||||
"selections": [
|
"selections": [
|
||||||
(v2/*: any*/),
|
(v2/*: any*/),
|
||||||
(v3/*: any*/),
|
(v3/*: any*/),
|
||||||
{
|
(v5/*: any*/),
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "type",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
(v6/*: any*/)
|
(v6/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
@@ -262,12 +345,12 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "c19271fc733cfb1de051ccdd98ae9bef",
|
"cacheID": "793d8f1eb4118deebe64f3025d3e8c31",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "OrganizationGraph_ViewQuery",
|
"name": "OrganizationGraph_ViewQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query OrganizationGraph_ViewQuery(\n $organizationId: ID!\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n name\n ...SettingsPageFragment\n }\n id\n }\n}\n\nfragment SettingsPageFragment on Organization {\n id\n name\n logoUrl\n description\n websiteUrl\n email\n headquarterAddress\n users(first: 100) {\n edges {\n node {\n id\n fullName\n email\n createdAt\n }\n }\n }\n connectors(first: 100) {\n edges {\n node {\n id\n name\n type\n createdAt\n }\n }\n }\n}\n"
|
"text": "query OrganizationGraph_ViewQuery(\n $organizationId: ID!\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n name\n ...SettingsPageFragment\n }\n id\n }\n}\n\nfragment SettingsPageFragment on Organization {\n id\n name\n logoUrl\n description\n websiteUrl\n email\n headquarterAddress\n customDomain {\n id\n domain\n sslStatus\n dnsRecords {\n type\n name\n value\n ttl\n purpose\n }\n createdAt\n updatedAt\n verifiedAt\n sslExpiresAt\n }\n users(first: 100) {\n edges {\n node {\n id\n fullName\n email\n createdAt\n }\n }\n }\n connectors(first: 100) {\n edges {\n node {\n id\n name\n type\n createdAt\n }\n }\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -62,6 +62,22 @@ const organizationFragment = graphql`
|
|||||||
websiteUrl
|
websiteUrl
|
||||||
email
|
email
|
||||||
headquarterAddress
|
headquarterAddress
|
||||||
|
customDomain {
|
||||||
|
id
|
||||||
|
domain
|
||||||
|
sslStatus
|
||||||
|
dnsRecords {
|
||||||
|
type
|
||||||
|
name
|
||||||
|
value
|
||||||
|
ttl
|
||||||
|
purpose
|
||||||
|
}
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
verifiedAt
|
||||||
|
sslExpiresAt
|
||||||
|
}
|
||||||
users(first: 100) {
|
users(first: 100) {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
@@ -117,8 +133,9 @@ export default function SettingsPage({ queryRef }: Props) {
|
|||||||
const [deleteOrganization, isDeleting] = useDeleteOrganizationMutation();
|
const [deleteOrganization, isDeleting] = useDeleteOrganizationMutation();
|
||||||
const users = organization.users.edges.map((edge) => edge.node);
|
const users = organization.users.edges.map((edge) => edge.node);
|
||||||
|
|
||||||
const { formState, handleSubmit, register, reset } =
|
const { formState, handleSubmit, register, reset } = useFormWithSchema(
|
||||||
useFormWithSchema(organizationSchema, {
|
organizationSchema,
|
||||||
|
{
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
name: organization.name || "",
|
name: organization.name || "",
|
||||||
description: organization.description || "",
|
description: organization.description || "",
|
||||||
@@ -126,7 +143,8 @@ export default function SettingsPage({ queryRef }: Props) {
|
|||||||
email: organization.email || "",
|
email: organization.email || "",
|
||||||
headquarterAddress: organization.headquarterAddress || "",
|
headquarterAddress: organization.headquarterAddress || "",
|
||||||
},
|
},
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
reset({
|
reset({
|
||||||
@@ -160,7 +178,9 @@ export default function SettingsPage({ queryRef }: Props) {
|
|||||||
onCompleted() {
|
onCompleted() {
|
||||||
toast({
|
toast({
|
||||||
title: __("Organization updated"),
|
title: __("Organization updated"),
|
||||||
description: __("Your organization details have been updated successfully."),
|
description: __(
|
||||||
|
"Your organization details have been updated successfully."
|
||||||
|
),
|
||||||
variant: "success",
|
variant: "success",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -220,80 +240,81 @@ export default function SettingsPage({ queryRef }: Props) {
|
|||||||
{formState.isSubmitting && <Spinner />}
|
{formState.isSubmitting && <Spinner />}
|
||||||
</div>
|
</div>
|
||||||
<Card padded className="space-y-4">
|
<Card padded className="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<Label>{__("Organization logo")}</Label>
|
<Label>{__("Organization logo")}</Label>
|
||||||
<div className="flex w-max items-center gap-4">
|
<div className="flex w-max items-center gap-4">
|
||||||
<Avatar
|
<Avatar
|
||||||
src={organization.logoUrl}
|
src={organization.logoUrl}
|
||||||
name={organization.name}
|
name={organization.name}
|
||||||
size="xl"
|
size="xl"
|
||||||
|
/>
|
||||||
|
<FileButton
|
||||||
|
disabled={formState.isSubmitting}
|
||||||
|
onChange={updateOrganizationLogo}
|
||||||
|
variant="secondary"
|
||||||
|
className="ml-auto"
|
||||||
|
>
|
||||||
|
{__("Change logo")}
|
||||||
|
</FileButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Field
|
||||||
|
{...register("name")}
|
||||||
|
readOnly={formState.isSubmitting}
|
||||||
|
name="name"
|
||||||
|
type="text"
|
||||||
|
label={__("Organization name")}
|
||||||
|
placeholder={__("Organization name")}
|
||||||
|
/>
|
||||||
|
<div>
|
||||||
|
<Label>{__("Description")}</Label>
|
||||||
|
<Textarea
|
||||||
|
{...register("description")}
|
||||||
|
readOnly={formState.isSubmitting}
|
||||||
|
name="description"
|
||||||
|
placeholder={__("Brief description of your organization")}
|
||||||
|
rows={3}
|
||||||
/>
|
/>
|
||||||
<FileButton
|
|
||||||
disabled={formState.isSubmitting}
|
|
||||||
onChange={updateOrganizationLogo}
|
|
||||||
variant="secondary"
|
|
||||||
className="ml-auto"
|
|
||||||
>
|
|
||||||
{__("Change logo")}
|
|
||||||
</FileButton>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||||
<Field
|
<Field
|
||||||
{...register("name")}
|
{...register("websiteUrl")}
|
||||||
readOnly={formState.isSubmitting}
|
readOnly={formState.isSubmitting}
|
||||||
name="name"
|
name="websiteUrl"
|
||||||
type="text"
|
type="url"
|
||||||
label={__("Organization name")}
|
label={__("Website URL")}
|
||||||
placeholder={__("Organization name")}
|
placeholder={__("https://example.com")}
|
||||||
/>
|
/>
|
||||||
<div>
|
<Field
|
||||||
<Label>{__("Description")}</Label>
|
{...register("email")}
|
||||||
<Textarea
|
readOnly={formState.isSubmitting}
|
||||||
{...register("description")}
|
name="email"
|
||||||
readOnly={formState.isSubmitting}
|
type="email"
|
||||||
name="description"
|
label={__("Email")}
|
||||||
placeholder={__("Brief description of your organization")}
|
placeholder={__("contact@example.com")}
|
||||||
rows={3}
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
||||||
<Field
|
|
||||||
{...register("websiteUrl")}
|
|
||||||
readOnly={formState.isSubmitting}
|
|
||||||
name="websiteUrl"
|
|
||||||
type="url"
|
|
||||||
label={__("Website URL")}
|
|
||||||
placeholder={__("https://example.com")}
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
{...register("email")}
|
|
||||||
readOnly={formState.isSubmitting}
|
|
||||||
name="email"
|
|
||||||
type="email"
|
|
||||||
label={__("Email")}
|
|
||||||
placeholder={__("contact@example.com")}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Label>{__("Headquarter Address")}</Label>
|
|
||||||
<Textarea
|
|
||||||
{...register("headquarterAddress")}
|
|
||||||
readOnly={formState.isSubmitting}
|
|
||||||
name="headquarterAddress"
|
|
||||||
placeholder={__("123 Main St, City, Country")}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{formState.isDirty && (
|
|
||||||
<div className="flex justify-end pt-6">
|
|
||||||
<Button type="submit" disabled={formState.isSubmitting}>
|
|
||||||
{formState.isSubmitting ? __("Updating...") : __("Update Organization")}
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
<div>
|
||||||
</Card>
|
<Label>{__("Headquarter Address")}</Label>
|
||||||
</div>
|
<Textarea
|
||||||
|
{...register("headquarterAddress")}
|
||||||
|
readOnly={formState.isSubmitting}
|
||||||
|
name="headquarterAddress"
|
||||||
|
placeholder={__("123 Main St, City, Country")}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{formState.isDirty && (
|
||||||
|
<div className="flex justify-end pt-6">
|
||||||
|
<Button type="submit" disabled={formState.isSubmitting}>
|
||||||
|
{formState.isSubmitting
|
||||||
|
? __("Updating...")
|
||||||
|
: __("Update Organization")}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{/* Integrations */}
|
{/* Integrations */}
|
||||||
@@ -322,14 +343,18 @@ export default function SettingsPage({ queryRef }: Props) {
|
|||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Custom Domains */}
|
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<h2 className="text-base font-medium">{__("Custom Domains")}</h2>
|
<h2 className="text-base font-medium">{__("Custom Domain")}</h2>
|
||||||
<CustomDomainManager />
|
<CustomDomainManager
|
||||||
|
organizationId={organization.id}
|
||||||
|
customDomain={organization.customDomain}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<h2 className="text-base font-medium text-red-600">{__("Danger Zone")}</h2>
|
<h2 className="text-base font-medium text-red-600">
|
||||||
|
{__("Danger Zone")}
|
||||||
|
</h2>
|
||||||
<Card padded className="border-red-200 flex items-center gap-3">
|
<Card padded className="border-red-200 flex items-center gap-3">
|
||||||
<div className="mr-auto">
|
<div className="mr-auto">
|
||||||
<h3 className="text-base font-semibold text-red-700">
|
<h3 className="text-base font-semibold text-red-700">
|
||||||
@@ -347,11 +372,7 @@ export default function SettingsPage({ queryRef }: Props) {
|
|||||||
onConfirm={handleDeleteOrganization}
|
onConfirm={handleDeleteOrganization}
|
||||||
isDeleting={isDeleting}
|
isDeleting={isDeleting}
|
||||||
>
|
>
|
||||||
<Button
|
<Button variant="danger" icon={IconTrashCan} disabled={isDeleting}>
|
||||||
variant="danger"
|
|
||||||
icon={IconTrashCan}
|
|
||||||
disabled={isDeleting}
|
|
||||||
>
|
|
||||||
{isDeleting ? __("Deleting...") : __("Delete Organization")}
|
{isDeleting ? __("Deleting...") : __("Delete Organization")}
|
||||||
</Button>
|
</Button>
|
||||||
</DeleteOrganizationDialog>
|
</DeleteOrganizationDialog>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<c071187d5ef9cecb128621c57f97393b>>
|
* @generated SignedSource<<75e8a41e9d070472ff42d71e17c47fa6>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { ReaderFragment } from 'relay-runtime';
|
import { ReaderFragment } from 'relay-runtime';
|
||||||
|
export type SSLStatus = "ACTIVE" | "EXPIRED" | "FAILED" | "PENDING" | "PROVISIONING" | "RENEWING";
|
||||||
import { FragmentRefs } from "relay-runtime";
|
import { FragmentRefs } from "relay-runtime";
|
||||||
export type SettingsPageFragment$data = {
|
export type SettingsPageFragment$data = {
|
||||||
readonly connectors: {
|
readonly connectors: {
|
||||||
@@ -21,6 +22,22 @@ export type SettingsPageFragment$data = {
|
|||||||
};
|
};
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
readonly customDomain: {
|
||||||
|
readonly createdAt: any;
|
||||||
|
readonly dnsRecords: ReadonlyArray<{
|
||||||
|
readonly name: string;
|
||||||
|
readonly purpose: string;
|
||||||
|
readonly ttl: number;
|
||||||
|
readonly type: string;
|
||||||
|
readonly value: string;
|
||||||
|
}>;
|
||||||
|
readonly domain: string;
|
||||||
|
readonly id: string;
|
||||||
|
readonly sslExpiresAt: any | null | undefined;
|
||||||
|
readonly sslStatus: SSLStatus;
|
||||||
|
readonly updatedAt: any;
|
||||||
|
readonly verifiedAt: any | null | undefined;
|
||||||
|
} | null | undefined;
|
||||||
readonly description: string | null | undefined;
|
readonly description: string | null | undefined;
|
||||||
readonly email: string | null | undefined;
|
readonly email: string | null | undefined;
|
||||||
readonly headquarterAddress: string | null | undefined;
|
readonly headquarterAddress: string | null | undefined;
|
||||||
@@ -67,20 +84,27 @@ v2 = {
|
|||||||
"name": "email",
|
"name": "email",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v3 = [
|
v3 = {
|
||||||
{
|
"alias": null,
|
||||||
"kind": "Literal",
|
"args": null,
|
||||||
"name": "first",
|
"kind": "ScalarField",
|
||||||
"value": 100
|
"name": "type",
|
||||||
}
|
"storageKey": null
|
||||||
],
|
},
|
||||||
v4 = {
|
v4 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "createdAt",
|
"name": "createdAt",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
};
|
},
|
||||||
|
v5 = [
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "first",
|
||||||
|
"value": 100
|
||||||
|
}
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
"argumentDefinitions": [],
|
"argumentDefinitions": [],
|
||||||
"kind": "Fragment",
|
"kind": "Fragment",
|
||||||
@@ -120,7 +144,89 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v3/*: any*/),
|
"args": null,
|
||||||
|
"concreteType": "CustomDomain",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "customDomain",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v0/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "domain",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "sslStatus",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"concreteType": "DNSRecordInstruction",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "dnsRecords",
|
||||||
|
"plural": true,
|
||||||
|
"selections": [
|
||||||
|
(v3/*: any*/),
|
||||||
|
(v1/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "value",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "ttl",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "purpose",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
(v4/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "updatedAt",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "verifiedAt",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "sslExpiresAt",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": (v5/*: any*/),
|
||||||
"concreteType": "UserConnection",
|
"concreteType": "UserConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "users",
|
"name": "users",
|
||||||
@@ -163,7 +269,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v3/*: any*/),
|
"args": (v5/*: any*/),
|
||||||
"concreteType": "ConnectorConnection",
|
"concreteType": "ConnectorConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "connectors",
|
"name": "connectors",
|
||||||
@@ -187,13 +293,7 @@ return {
|
|||||||
"selections": [
|
"selections": [
|
||||||
(v0/*: any*/),
|
(v0/*: any*/),
|
||||||
(v1/*: any*/),
|
(v1/*: any*/),
|
||||||
{
|
(v3/*: any*/),
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "type",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
(v4/*: any*/)
|
(v4/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
@@ -210,6 +310,6 @@ return {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "bdd548b7b3fa4c1cfef32569dc63d45d";
|
(node as any).hash = "9786965352e1978c1171509fcce34b56";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
Reference in New Issue
Block a user