attio 0.0.1-experimental.20240926 → 0.0.1-experimental.20240927
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/add-connection-definition.js +9 -5
- package/lib/api/fetch-connections.js +21 -0
- package/lib/api/handle-error.js +8 -1
- package/lib/api/remove-connection-definition.js +2 -3
- package/lib/client/forms/build.d.ts +1 -1
- package/lib/client/forms/connection.d.ts +17 -0
- package/lib/client/forms/index.d.ts +1 -0
- package/lib/client/forms/path.d.ts +7 -3
- package/lib/client/index.d.ts +1 -0
- package/lib/commands/connection/add.js +46 -15
- package/lib/commands/connection/list.js +52 -0
- package/lib/commands/connection/remove.js +35 -8
- package/lib/machines/add-connection-machine.js +213 -80
- package/lib/machines/list-connections-machine.js +119 -0
- package/lib/machines/remove-connection-machine.js +86 -25
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -7,14 +7,18 @@ const addConnectionSchema = z.object({
|
|
|
7
7
|
app_id: z.string(),
|
|
8
8
|
connection_definition_id: z.string(),
|
|
9
9
|
});
|
|
10
|
-
export async function addConnectionDefinition({ token, devSlug, appId,
|
|
10
|
+
export async function addConnectionDefinition({ token, devSlug, appId, slug, label, description, allowMultiple, global, connectionType, clientId, clientSecret, authorizeUrl, accessTokenUrl, major, scopes, }) {
|
|
11
11
|
const connectionDefinitionId = uuid();
|
|
12
12
|
const body = {
|
|
13
|
-
connection_type:
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
connection_type: connectionType,
|
|
14
|
+
slug,
|
|
15
|
+
label,
|
|
16
|
+
description,
|
|
17
|
+
allow_multiple: allowMultiple,
|
|
18
|
+
global,
|
|
19
|
+
major,
|
|
16
20
|
};
|
|
17
|
-
if (
|
|
21
|
+
if (connectionType === "oauth2-code") {
|
|
18
22
|
body.authorize_url = authorizeUrl;
|
|
19
23
|
body.access_token_url = accessTokenUrl;
|
|
20
24
|
body.client_id = clientId;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { API } from "../env.js";
|
|
3
|
+
import { handleError } from "./handle-error.js";
|
|
4
|
+
import { makeHeaders } from "./make-headers.js";
|
|
5
|
+
const connectionDefinitionsResponseSchema = z.object({
|
|
6
|
+
connection_definitions: z.record(z.string(), z.object({
|
|
7
|
+
label: z.string(),
|
|
8
|
+
connection_type: z.enum(["oauth2-code", "secret"]),
|
|
9
|
+
description: z.string().nullable(),
|
|
10
|
+
global: z.boolean(),
|
|
11
|
+
allow_multiple: z.boolean(),
|
|
12
|
+
})),
|
|
13
|
+
});
|
|
14
|
+
export async function fetchConnections({ token, devSlug, appId, major, }) {
|
|
15
|
+
const response = await fetch(`${API}/developer-portal/accounts/${devSlug}/apps/${appId}/versions/${major}/connection-definitions`, {
|
|
16
|
+
method: "GET",
|
|
17
|
+
headers: makeHeaders(token),
|
|
18
|
+
});
|
|
19
|
+
await handleError(response);
|
|
20
|
+
return connectionDefinitionsResponseSchema.parse(await response.json()).connection_definitions;
|
|
21
|
+
}
|
package/lib/api/handle-error.js
CHANGED
|
@@ -5,7 +5,14 @@ const serverErrorSchema = z.object({
|
|
|
5
5
|
export async function handleError(response) {
|
|
6
6
|
if (response.ok)
|
|
7
7
|
return;
|
|
8
|
-
const
|
|
8
|
+
const text = await response.text();
|
|
9
|
+
let json;
|
|
10
|
+
try {
|
|
11
|
+
json = JSON.parse(text);
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
throw new Error(`Error parsing JSON: ${JSON.stringify(text)}`);
|
|
15
|
+
}
|
|
9
16
|
const error = serverErrorSchema.parse(json);
|
|
10
17
|
throw new Error(error.message);
|
|
11
18
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { API } from "../env.js";
|
|
2
2
|
import { handleError } from "./handle-error.js";
|
|
3
3
|
import { makeHeaders } from "./make-headers.js";
|
|
4
|
-
export async function removeConnectionDefinition({ token, devSlug, appId, }) {
|
|
5
|
-
const
|
|
6
|
-
const response = await fetch(`${API}/developer-portal/accounts/${devSlug}/apps/${appId}/versions/${major}/connection-definitions`, {
|
|
4
|
+
export async function removeConnectionDefinition({ token, devSlug, appId, slug, major, }) {
|
|
5
|
+
const response = await fetch(`${API}/developer-portal/accounts/${devSlug}/apps/${appId}/versions/${major}/connection-definitions/${slug}`, {
|
|
7
6
|
method: "DELETE",
|
|
8
7
|
headers: makeHeaders(token),
|
|
9
8
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A connection form value.
|
|
3
|
+
*/
|
|
4
|
+
export interface FormConnection {
|
|
5
|
+
type: "connection";
|
|
6
|
+
isOptional: boolean;
|
|
7
|
+
optional(): FormConnection;
|
|
8
|
+
}
|
|
9
|
+
export interface Connection {
|
|
10
|
+
connectionId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create a new connection form value.
|
|
14
|
+
*/
|
|
15
|
+
export declare function connection({ connectionSlug }: {
|
|
16
|
+
connectionSlug: string;
|
|
17
|
+
}): FormConnection;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Prettify } from "../util/prettify";
|
|
2
2
|
import { FormArray } from "./array";
|
|
3
|
+
import { FormConnection, Connection } from "./connection";
|
|
3
4
|
import { FormNumber } from "./number";
|
|
4
5
|
import { FormString } from "./string";
|
|
5
6
|
type Assert<TCat, TAnimal> = TCat extends TAnimal ? TCat : never;
|
|
6
7
|
type Join<A extends string | number | null, B extends string | number> = A extends null ? B : `${A}.${B}`;
|
|
7
|
-
export type ValueType = "string" | "number" | "array";
|
|
8
|
-
export type SchemaNode = FormString | FormNumber | FormArray<any> | {
|
|
8
|
+
export type ValueType = "string" | "number" | "array" | "connection";
|
|
9
|
+
export type SchemaNode = FormString | FormNumber | FormConnection | FormArray<any> | {
|
|
9
10
|
type: "object";
|
|
10
11
|
};
|
|
11
12
|
type PathWithTypeRecursive<TState, TRoot extends string | number | null> = TState extends FormString ? {
|
|
@@ -14,6 +15,9 @@ type PathWithTypeRecursive<TState, TRoot extends string | number | null> = TStat
|
|
|
14
15
|
} : TState extends FormNumber ? {
|
|
15
16
|
path: TRoot;
|
|
16
17
|
type: "number";
|
|
18
|
+
} : TState extends FormConnection ? {
|
|
19
|
+
path: TRoot;
|
|
20
|
+
type: "connection";
|
|
17
21
|
} : TState extends FormArray<infer TElement> ? {
|
|
18
22
|
path: TRoot;
|
|
19
23
|
type: "array";
|
|
@@ -28,7 +32,7 @@ export type Path<TState> = PathWithType<TState>["path"];
|
|
|
28
32
|
export type PathTo<TState, TType extends ValueType> = Extract<PathWithType<TState>, {
|
|
29
33
|
type: TType;
|
|
30
34
|
}>["path"];
|
|
31
|
-
export type ValueOf<TState> = TState extends FormString ? string : TState extends FormNumber ? number : TState extends FormArray<infer TElement> ? Array<ValueOf<TElement>> : {
|
|
35
|
+
export type ValueOf<TState> = TState extends FormString ? string : TState extends FormNumber ? number : TState extends FormConnection ? Connection : TState extends FormArray<infer TElement> ? Array<ValueOf<TElement>> : {
|
|
32
36
|
[K in keyof TState]: K extends string ? ValueOf<TState[K]> : never;
|
|
33
37
|
};
|
|
34
38
|
export {};
|
package/lib/client/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export * as Forms from "./forms/index.js";
|
|
|
4
4
|
export { FormArray } from "./forms/array.js";
|
|
5
5
|
export { FormNumber } from "./forms/number.js";
|
|
6
6
|
export { FormString } from "./forms/string.js";
|
|
7
|
+
export { FormConnection, Connection } from "./forms/connection.js";
|
|
7
8
|
export * from "./forms/path.js";
|
|
8
9
|
export { Form } from "./forms/build.js";
|
|
@@ -8,17 +8,27 @@ import { z } from "zod";
|
|
|
8
8
|
import { InitialInstructions } from "../../components/InitialInstructions.js";
|
|
9
9
|
import { Logo } from "../../components/Logo.js";
|
|
10
10
|
import { Select } from "../../components/Select.js";
|
|
11
|
-
import { addConnectionMachine,
|
|
11
|
+
import { addConnectionMachine, connectionTypes } from "../../machines/add-connection-machine.js";
|
|
12
12
|
export const description = "Create a new connection for your Attio app";
|
|
13
13
|
export const options = z.object({
|
|
14
|
+
slug: z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe(option({ description: "A unique slug for your connection" })),
|
|
18
|
+
label: z
|
|
19
|
+
.string()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe(option({ description: "The label for your connection that will be displayed to users" })),
|
|
22
|
+
description: z
|
|
23
|
+
.string()
|
|
24
|
+
.optional()
|
|
25
|
+
.describe(option({
|
|
26
|
+
description: "A more detailed description of your connection that will be displayed to users",
|
|
27
|
+
})),
|
|
14
28
|
type: z
|
|
15
29
|
.enum(["secret", "oauth2-code"])
|
|
16
30
|
.optional()
|
|
17
31
|
.describe(option({ description: "The type of connection to create" })),
|
|
18
|
-
audience: z
|
|
19
|
-
.enum(["workspace", "workspace-member"])
|
|
20
|
-
.optional()
|
|
21
|
-
.describe(option({ description: "The audience for the connection" })),
|
|
22
32
|
authorizeUrl: z
|
|
23
33
|
.string()
|
|
24
34
|
.url("Invalid URL, e.g. https://authorization-server.com/authorize")
|
|
@@ -51,11 +61,13 @@ export const options = z.object({
|
|
|
51
61
|
.default(false)
|
|
52
62
|
.describe(option({ description: "Run in development mode (additional debugging info)" })),
|
|
53
63
|
});
|
|
54
|
-
export default function AddConnection({ options: { type: connectionType,
|
|
64
|
+
export default function AddConnection({ options: { slug, label, description, type: connectionType, authorizeUrl, accessTokenUrl, scopes, clientId, clientSecret, dev, }, }) {
|
|
55
65
|
const [snapshot, send] = useMachine(addConnectionMachine, {
|
|
56
66
|
input: {
|
|
67
|
+
slug,
|
|
68
|
+
label,
|
|
69
|
+
description,
|
|
57
70
|
connectionType,
|
|
58
|
-
audience,
|
|
59
71
|
authorizeUrl,
|
|
60
72
|
accessTokenUrl,
|
|
61
73
|
scopes,
|
|
@@ -69,22 +81,41 @@ export default function AddConnection({ options: { type: connectionType, audienc
|
|
|
69
81
|
React.createElement(Logo, null),
|
|
70
82
|
React.createElement(Box, { flexDirection: "column" },
|
|
71
83
|
snapshot.matches("Show config instructions") && (React.createElement(InitialInstructions, { reason: snapshot.context.configError })),
|
|
72
|
-
snapshot.matches("
|
|
84
|
+
snapshot.matches("Ask for slug") && (React.createElement(React.Fragment, null,
|
|
73
85
|
React.createElement(Box, null,
|
|
74
|
-
React.createElement(Text,
|
|
75
|
-
React.createElement(
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
React.createElement(Text, null, "Unique Slug: "),
|
|
87
|
+
React.createElement(TextInput, { value: snapshot.context.slug ?? "", placeholder: "my-access-token", onChange: (slug) => send({ type: "Update Slug", slug }), onSubmit: () => send({ type: "Submit" }) })))),
|
|
88
|
+
snapshot.matches("Ask for label") && (React.createElement(React.Fragment, null,
|
|
89
|
+
React.createElement(Box, null,
|
|
90
|
+
React.createElement(Text, null, "Provide a label for your connection. This will be displayed to users. (You can edit this later)")),
|
|
91
|
+
React.createElement(Box, null,
|
|
92
|
+
React.createElement(TextInput, { value: snapshot.context.label ?? "", placeholder: "My Awesome Connection", onChange: (label) => send({ type: "Update Label", label }), onSubmit: () => send({ type: "Submit" }) })))),
|
|
93
|
+
snapshot.matches("Ask for description") && (React.createElement(React.Fragment, null,
|
|
94
|
+
React.createElement(Box, null,
|
|
95
|
+
React.createElement(Text, null, "Provide an optional detailed description for your connection. This will be displayed to users. (You can edit this later)")),
|
|
96
|
+
React.createElement(Box, null,
|
|
97
|
+
React.createElement(TextInput, { value: snapshot.context.description ?? "", onChange: (description) => send({ type: "Update Description", description }), onSubmit: () => send({ type: "Submit" }) })))),
|
|
78
98
|
snapshot.matches("Ask for connection type") && (React.createElement(React.Fragment, null,
|
|
79
99
|
React.createElement(Box, null,
|
|
80
100
|
React.createElement(Text, null, "What type of connection will this be?")),
|
|
81
101
|
React.createElement(Box, null,
|
|
82
102
|
React.createElement(Select, { items: connectionTypes, onSelect: (connectionType) => send({ type: "Choose Connection Type", connectionType }) })))),
|
|
83
|
-
snapshot.matches("Ask for
|
|
103
|
+
snapshot.matches("Ask for global") && (React.createElement(React.Fragment, null,
|
|
104
|
+
React.createElement(Box, null,
|
|
105
|
+
React.createElement(Text, null, "Should users of your app be allowed to add multiple connections?")),
|
|
106
|
+
React.createElement(Box, null,
|
|
107
|
+
React.createElement(Select, { items: [
|
|
108
|
+
{ value: true, label: "Yes" },
|
|
109
|
+
{ value: false, label: "No" },
|
|
110
|
+
], onSelect: (global) => send({ type: "Choose Global", global }) })))),
|
|
111
|
+
snapshot.matches("Ask for allow multiple") && (React.createElement(React.Fragment, null,
|
|
84
112
|
React.createElement(Box, null,
|
|
85
|
-
React.createElement(Text, null, "
|
|
113
|
+
React.createElement(Text, null, "Should this connection be allowed to be used multiple times?")),
|
|
86
114
|
React.createElement(Box, null,
|
|
87
|
-
React.createElement(Select, { items:
|
|
115
|
+
React.createElement(Select, { items: [
|
|
116
|
+
{ value: true, label: "Yes" },
|
|
117
|
+
{ value: false, label: "No" },
|
|
118
|
+
], onSelect: (allowMultiple) => send({ type: "Choose Allow Multiple", allowMultiple }) })))),
|
|
88
119
|
snapshot.matches("Ask for Authorize URL") && (React.createElement(React.Fragment, null,
|
|
89
120
|
React.createElement(Box, null,
|
|
90
121
|
React.createElement(Text, null, "OAuth Authorize URL: "),
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useMachine } from "@xstate/react";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import Spinner from "ink-spinner";
|
|
4
|
+
import { option } from "pastel";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { InitialInstructions } from "../../components/InitialInstructions.js";
|
|
8
|
+
import { Logo } from "../../components/Logo.js";
|
|
9
|
+
import { Table } from "../../components/Table.js";
|
|
10
|
+
import { listConnectionsMachine } from "../../machines/list-connections-machine.js";
|
|
11
|
+
export const description = "List all connections for the current major version of your Attio app";
|
|
12
|
+
export const options = z.object({
|
|
13
|
+
dev: z
|
|
14
|
+
.boolean()
|
|
15
|
+
.default(false)
|
|
16
|
+
.describe(option({ description: "Run in development mode (additional debugging info)" })),
|
|
17
|
+
});
|
|
18
|
+
const connectionTypeNames = {
|
|
19
|
+
"oauth2-code": "OAuth 2.0",
|
|
20
|
+
"secret": "Secret",
|
|
21
|
+
};
|
|
22
|
+
export default function ListConnections({ options: { dev } }) {
|
|
23
|
+
const [snapshot] = useMachine(listConnectionsMachine);
|
|
24
|
+
return (React.createElement(Box, { flexDirection: "column" },
|
|
25
|
+
dev && (React.createElement(Box, null,
|
|
26
|
+
React.createElement(Text, null, JSON.stringify(snapshot.value, null, 2)))),
|
|
27
|
+
React.createElement(Logo, null),
|
|
28
|
+
snapshot.matches("Show config instructions") && (React.createElement(InitialInstructions, { reason: snapshot.context.configError })),
|
|
29
|
+
snapshot.matches("No Connections") && (React.createElement(Box, { flexDirection: "column" },
|
|
30
|
+
React.createElement(Box, null,
|
|
31
|
+
React.createElement(Text, { color: "redBright" }, "This app has no connections."),
|
|
32
|
+
React.createElement(Text, null, " To add one, use:")),
|
|
33
|
+
React.createElement(Box, { flexDirection: "column", borderStyle: "round", width: 27, paddingX: 1, marginBottom: 1 },
|
|
34
|
+
React.createElement(Text, null, "attio connection add")))),
|
|
35
|
+
snapshot.matches("Loading Connections") && (React.createElement(Box, { flexDirection: "column" },
|
|
36
|
+
React.createElement(Box, null,
|
|
37
|
+
React.createElement(Text, null, "Loading connections... "),
|
|
38
|
+
React.createElement(Text, { color: "green" },
|
|
39
|
+
React.createElement(Spinner, { type: "dots" }))))),
|
|
40
|
+
snapshot.matches("Error") && (React.createElement(Box, null,
|
|
41
|
+
React.createElement(Text, { color: "red" }, snapshot.context.error))),
|
|
42
|
+
snapshot.matches("Display Connections") &&
|
|
43
|
+
snapshot.context.connections &&
|
|
44
|
+
snapshot.context.connections && (React.createElement(Box, null,
|
|
45
|
+
React.createElement(Table, { rows: Object.entries(snapshot.context.connections).map(([slug, connection]) => ({
|
|
46
|
+
"Slug": slug,
|
|
47
|
+
"Label": connection.label,
|
|
48
|
+
"Global": connection.global ? "Yes" : "No",
|
|
49
|
+
"Allow Multiple": connection.allow_multiple ? "Yes" : "No",
|
|
50
|
+
"Type": connectionTypeNames[connection.connection_type],
|
|
51
|
+
})) })))));
|
|
52
|
+
}
|
|
@@ -6,6 +6,7 @@ import React from "react";
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { InitialInstructions } from "../../components/InitialInstructions.js";
|
|
8
8
|
import { Logo } from "../../components/Logo.js";
|
|
9
|
+
import { Select } from "../../components/Select.js";
|
|
9
10
|
import { removeConnectionMachine } from "../../machines/remove-connection-machine.js";
|
|
10
11
|
export const description = "Remove a connection from your Attio app";
|
|
11
12
|
export const options = z.object({
|
|
@@ -15,27 +16,53 @@ export const options = z.object({
|
|
|
15
16
|
.describe(option({ description: "Run in development mode (additional debugging info)" })),
|
|
16
17
|
});
|
|
17
18
|
export default function RemoveConnection({ options: { dev } }) {
|
|
18
|
-
const [snapshot] = useMachine(removeConnectionMachine);
|
|
19
|
+
const [snapshot, send] = useMachine(removeConnectionMachine);
|
|
19
20
|
return (React.createElement(Box, { flexDirection: "column" },
|
|
20
21
|
dev && (React.createElement(Box, null,
|
|
21
22
|
React.createElement(Text, null, JSON.stringify(snapshot.value, null, 2)))),
|
|
22
23
|
React.createElement(Logo, null),
|
|
23
24
|
snapshot.matches("Show config instructions") && (React.createElement(InitialInstructions, { reason: snapshot.context.configError })),
|
|
24
|
-
snapshot.matches("No
|
|
25
|
+
snapshot.matches("No Connections") && (React.createElement(Box, { flexDirection: "column" },
|
|
25
26
|
React.createElement(Box, null,
|
|
26
27
|
React.createElement(Text, { color: "redBright" }, "This app has no connections to remove."),
|
|
27
28
|
React.createElement(Text, null, " To add one, use:")),
|
|
28
29
|
React.createElement(Box, { flexDirection: "column", borderStyle: "round", width: 27, paddingX: 1, marginBottom: 1 },
|
|
29
30
|
React.createElement(Text, null, "attio connection add")))),
|
|
30
|
-
snapshot.matches("
|
|
31
|
+
snapshot.matches("Loading Connections") && (React.createElement(Box, { flexDirection: "column" },
|
|
31
32
|
React.createElement(Box, null,
|
|
32
|
-
React.createElement(Text, null, "
|
|
33
|
+
React.createElement(Text, null, "Loading connections... "),
|
|
33
34
|
React.createElement(Text, { color: "green" },
|
|
34
35
|
React.createElement(Spinner, { type: "dots" }))))),
|
|
35
|
-
snapshot.matches("
|
|
36
|
+
snapshot.matches("Choosing a Connection") && snapshot.context.connections && (React.createElement(Box, { flexDirection: "column" },
|
|
37
|
+
React.createElement(Box, null,
|
|
38
|
+
React.createElement(Text, null, "Which connection would you like to remove?")),
|
|
36
39
|
React.createElement(Box, null,
|
|
37
|
-
React.createElement(
|
|
38
|
-
|
|
40
|
+
React.createElement(Select, { items: Object.entries(snapshot.context.connections).map(([slug, value]) => ({
|
|
41
|
+
value: slug,
|
|
42
|
+
label: value.label,
|
|
43
|
+
})), onSelect: (slug) => send({ type: "Connection Chosen", slug }) })))),
|
|
44
|
+
snapshot.matches("Confirm Removal") &&
|
|
45
|
+
snapshot.context.chosenConnectionSlug &&
|
|
46
|
+
snapshot.context.connections && (React.createElement(Box, { flexDirection: "column" },
|
|
39
47
|
React.createElement(Box, null,
|
|
40
|
-
React.createElement(Text,
|
|
48
|
+
React.createElement(Text, null,
|
|
49
|
+
"Are you sure you want to remove \"",
|
|
50
|
+
snapshot.context.connections[snapshot.context.chosenConnectionSlug].label,
|
|
51
|
+
"\"?")),
|
|
52
|
+
React.createElement(Box, null,
|
|
53
|
+
React.createElement(Select, { items: [
|
|
54
|
+
{ value: "Confirm", label: "Yes, remove it" },
|
|
55
|
+
{ value: "Cancel", label: "Cancel" },
|
|
56
|
+
], onSelect: (type) => send({ type }) })))),
|
|
57
|
+
snapshot.matches("Removing connection definition") && (React.createElement(Box, { flexDirection: "column" },
|
|
58
|
+
React.createElement(Box, null,
|
|
59
|
+
React.createElement(Text, null, "Removing connection definition..."),
|
|
60
|
+
React.createElement(Text, { color: "green" },
|
|
61
|
+
React.createElement(Spinner, { type: "dots" }))))),
|
|
62
|
+
snapshot.matches("Cancelled") && (React.createElement(Box, null,
|
|
63
|
+
React.createElement(Text, null, "No connections have been removed."))),
|
|
64
|
+
snapshot.matches("Success") && (React.createElement(Box, null,
|
|
65
|
+
React.createElement(Text, { color: "green" }, "SUCCESS!! \uD83C\uDF89 Your connection has been removed."))),
|
|
66
|
+
snapshot.matches("Error") && (React.createElement(Box, null,
|
|
67
|
+
React.createElement(Text, { color: "red" }, snapshot.context.error)))));
|
|
41
68
|
}
|