@executor-js/plugin-graphql 1.4.33 → 1.5.1
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/dist/AddGraphqlSource-P3D3UXRJ.js +179 -0
- package/dist/AddGraphqlSource-P3D3UXRJ.js.map +1 -0
- package/dist/EditGraphqlSource-FVF67CTP.js +38 -0
- package/dist/EditGraphqlSource-FVF67CTP.js.map +1 -0
- package/dist/GraphqlAccountsPanel-GBNFHLFH.js +9 -0
- package/dist/GraphqlAccountsPanel-GBNFHLFH.js.map +1 -0
- package/dist/api/group.d.ts +108 -119
- package/dist/api/handlers.d.ts +9 -7
- package/dist/api/index.d.ts +117 -104
- package/dist/chunk-2Y3J3CVO.js +191 -0
- package/dist/chunk-2Y3J3CVO.js.map +1 -0
- package/dist/chunk-ADQTI2OK.js +1309 -0
- package/dist/chunk-ADQTI2OK.js.map +1 -0
- package/dist/{chunk-UIAHATHP.js → chunk-N5GJE7R6.js} +42 -58
- package/dist/chunk-N5GJE7R6.js.map +1 -0
- package/dist/chunk-VCYDSSIK.js +79 -0
- package/dist/chunk-VCYDSSIK.js.map +1 -0
- package/dist/client.js +7 -7
- package/dist/client.js.map +1 -1
- package/dist/core.js +20 -28
- package/dist/index.js +2 -2
- package/dist/react/AddGraphqlSource.d.ts +1 -1
- package/dist/react/EditGraphqlSource.d.ts +2 -2
- package/dist/react/GraphqlAccountsPanel.d.ts +6 -0
- package/dist/react/GraphqlSignInButton.d.ts +6 -2
- package/dist/react/GraphqlSourceFields.d.ts +2 -2
- package/dist/react/atoms.d.ts +95 -205
- package/dist/react/auth-method-config.d.ts +9 -0
- package/dist/react/client.d.ts +108 -97
- package/dist/react/defaults.d.ts +16 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/source-plugin.d.ts +2 -2
- package/dist/sdk/errors.d.ts +8 -6
- package/dist/sdk/index.d.ts +5 -5
- package/dist/sdk/introspect.d.ts +1 -1
- package/dist/sdk/invoke.d.ts +1 -4
- package/dist/sdk/plugin.d.ts +94 -104
- package/dist/sdk/store.d.ts +11 -28
- package/dist/sdk/types.d.ts +110 -72
- package/package.json +5 -4
- package/dist/AddGraphqlSource-CJCUUYNM.js +0 -250
- package/dist/AddGraphqlSource-CJCUUYNM.js.map +0 -1
- package/dist/EditGraphqlSource-YLTPUYW4.js +0 -267
- package/dist/EditGraphqlSource-YLTPUYW4.js.map +0 -1
- package/dist/GraphqlSourceSummary-YWJX6ONU.js +0 -70
- package/dist/GraphqlSourceSummary-YWJX6ONU.js.map +0 -1
- package/dist/chunk-2252RTCE.js +0 -1730
- package/dist/chunk-2252RTCE.js.map +0 -1
- package/dist/chunk-D3FN3ZDA.js +0 -125
- package/dist/chunk-D3FN3ZDA.js.map +0 -1
- package/dist/chunk-M4SJY6CB.js +0 -45
- package/dist/chunk-M4SJY6CB.js.map +0 -1
- package/dist/chunk-UIAHATHP.js.map +0 -1
- package/dist/react/GraphqlSourceSummary.d.ts +0 -5
package/dist/sdk/store.d.ts
CHANGED
|
@@ -1,35 +1,18 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import { type StorageDeps, type StorageFailure } from "@executor-js/sdk/core";
|
|
3
|
-
import {
|
|
4
|
-
export declare const graphqlSchema: {};
|
|
5
|
-
export type GraphqlSchema = typeof graphqlSchema;
|
|
6
|
-
export interface StoredGraphqlSource {
|
|
7
|
-
readonly namespace: string;
|
|
8
|
-
readonly scope: string;
|
|
9
|
-
readonly name: string;
|
|
10
|
-
readonly endpoint: string;
|
|
11
|
-
readonly headers: Record<string, ConfiguredGraphqlCredentialValue>;
|
|
12
|
-
readonly queryParams: Record<string, ConfiguredGraphqlCredentialValue>;
|
|
13
|
-
readonly auth: GraphqlSourceAuth;
|
|
14
|
-
}
|
|
3
|
+
import { OperationBinding } from "./types";
|
|
15
4
|
export interface StoredOperation {
|
|
16
|
-
|
|
17
|
-
readonly
|
|
5
|
+
/** The tool's leaf name, e.g. `query.hello`. */
|
|
6
|
+
readonly toolName: string;
|
|
7
|
+
/** The owning integration slug. */
|
|
8
|
+
readonly integration: string;
|
|
18
9
|
readonly binding: OperationBinding;
|
|
19
10
|
}
|
|
20
11
|
export interface GraphqlStore {
|
|
21
|
-
|
|
22
|
-
readonly
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
readonly queryParams?: Record<string, ConfiguredGraphqlCredentialValue>;
|
|
27
|
-
readonly auth?: GraphqlSourceAuth;
|
|
28
|
-
}) => Effect.Effect<void, StorageFailure>;
|
|
29
|
-
readonly getSource: (namespace: string, scope: string) => Effect.Effect<StoredGraphqlSource | null, StorageFailure>;
|
|
30
|
-
readonly listSources: () => Effect.Effect<readonly StoredGraphqlSource[], StorageFailure>;
|
|
31
|
-
readonly getOperationByToolId: (toolId: string, scope: string) => Effect.Effect<StoredOperation | null, StorageFailure>;
|
|
32
|
-
readonly listOperationsBySource: (sourceId: string, scope: string) => Effect.Effect<readonly StoredOperation[], StorageFailure>;
|
|
33
|
-
readonly removeSource: (namespace: string, scope: string) => Effect.Effect<void, StorageFailure>;
|
|
12
|
+
/** Replace the stored operation bindings for an integration. */
|
|
13
|
+
readonly replaceOperations: (integration: string, operations: readonly StoredOperation[]) => Effect.Effect<void, StorageFailure>;
|
|
14
|
+
readonly getOperation: (integration: string, toolName: string) => Effect.Effect<StoredOperation | null, StorageFailure>;
|
|
15
|
+
readonly listOperations: (integration: string) => Effect.Effect<readonly StoredOperation[], StorageFailure>;
|
|
16
|
+
readonly removeOperations: (integration: string) => Effect.Effect<void, StorageFailure>;
|
|
34
17
|
}
|
|
35
|
-
export declare const makeDefaultGraphqlStore: ({ pluginStorage
|
|
18
|
+
export declare const makeDefaultGraphqlStore: ({ pluginStorage }: StorageDeps) => GraphqlStore;
|
package/dist/sdk/types.d.ts
CHANGED
|
@@ -57,88 +57,126 @@ export declare const OperationBinding: Schema.Struct<{
|
|
|
57
57
|
readonly variableNames: Schema.$Array<Schema.String>;
|
|
58
58
|
}>;
|
|
59
59
|
export type OperationBinding = typeof OperationBinding.Type;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
readonly
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
export declare const ConfiguredGraphqlCredentialValue: Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
71
|
-
readonly kind: Schema.Literal<"binding">;
|
|
72
|
-
readonly slot: Schema.String;
|
|
73
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
74
|
-
}>]>;
|
|
75
|
-
export type ConfiguredGraphqlCredentialValue = typeof ConfiguredGraphqlCredentialValue.Type;
|
|
76
|
-
export declare const GraphqlConfiguredValueInput: Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
77
|
-
readonly kind: Schema.Literal<"secret">;
|
|
60
|
+
/** An apiKey-style template: place the value in a header or query parameter,
|
|
61
|
+
* optionally prefixed (e.g. `Bearer `). */
|
|
62
|
+
export declare const ApiKeyAuthTemplate: Schema.Struct<{
|
|
63
|
+
readonly kind: Schema.Literal<"apiKey">;
|
|
64
|
+
/** The template slug a connection references via `connection.template`. */
|
|
65
|
+
readonly slug: Schema.String;
|
|
66
|
+
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
67
|
+
/** The header / query-parameter name the value is written to. */
|
|
68
|
+
readonly name: Schema.String;
|
|
69
|
+
/** Optional prefix prepended to the value (e.g. `Bearer `). */
|
|
78
70
|
readonly prefix: Schema.optional<Schema.String>;
|
|
79
|
-
}
|
|
80
|
-
export type
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
71
|
+
}>;
|
|
72
|
+
export type ApiKeyAuthTemplate = typeof ApiKeyAuthTemplate.Type;
|
|
73
|
+
/** An OAuth bearer template: write `Authorization: Bearer <access-token>`. The
|
|
74
|
+
* resolved (and refreshed) access token is `credential.value`. */
|
|
75
|
+
export declare const OAuthAuthTemplate: Schema.Struct<{
|
|
76
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
77
|
+
readonly slug: Schema.String;
|
|
78
|
+
/** The header to write the bearer token to. Defaults to `Authorization`. */
|
|
79
|
+
readonly header: Schema.optional<Schema.String>;
|
|
80
|
+
/** The token prefix. Defaults to `Bearer `. */
|
|
84
81
|
readonly prefix: Schema.optional<Schema.String>;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
readonly
|
|
82
|
+
}>;
|
|
83
|
+
export type OAuthAuthTemplate = typeof OAuthAuthTemplate.Type;
|
|
84
|
+
export declare const AuthTemplate: Schema.Union<readonly [Schema.Struct<{
|
|
85
|
+
readonly kind: Schema.Literal<"apiKey">;
|
|
86
|
+
/** The template slug a connection references via `connection.template`. */
|
|
87
|
+
readonly slug: Schema.String;
|
|
88
|
+
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
89
|
+
/** The header / query-parameter name the value is written to. */
|
|
90
|
+
readonly name: Schema.String;
|
|
91
|
+
/** Optional prefix prepended to the value (e.g. `Bearer `). */
|
|
89
92
|
readonly prefix: Schema.optional<Schema.String>;
|
|
90
|
-
}>, Schema.Struct<{
|
|
91
|
-
readonly kind: Schema.Literal<"connection">;
|
|
92
|
-
readonly connectionId: Schema.String;
|
|
93
|
-
}>]>;
|
|
94
|
-
export type GraphqlCredentialInput = typeof GraphqlCredentialInput.Type;
|
|
95
|
-
export declare const graphqlHeaderSlot: (name: string) => string;
|
|
96
|
-
export declare const graphqlQueryParamSlot: (name: string) => string;
|
|
97
|
-
export declare const GRAPHQL_OAUTH_CONNECTION_SLOT = "auth:oauth2:connection";
|
|
98
|
-
export declare const GraphqlSourceAuth: Schema.Union<readonly [Schema.Struct<{
|
|
99
|
-
readonly kind: Schema.Literal<"none">;
|
|
100
93
|
}>, Schema.Struct<{
|
|
101
94
|
readonly kind: Schema.Literal<"oauth2">;
|
|
102
|
-
readonly
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
readonly
|
|
107
|
-
}>, Schema.Struct<{
|
|
108
|
-
readonly oauth2: Schema.optional<Schema.Struct<{
|
|
109
|
-
readonly connection: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
110
|
-
readonly kind: Schema.Literal<"text">;
|
|
111
|
-
readonly text: Schema.String;
|
|
112
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
113
|
-
}>, Schema.Struct<{
|
|
114
|
-
readonly kind: Schema.Literal<"secret">;
|
|
115
|
-
readonly secretId: Schema.String;
|
|
116
|
-
readonly secretScope: Schema.optional<Schema.String>;
|
|
117
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
118
|
-
}>, Schema.Struct<{
|
|
119
|
-
readonly kind: Schema.Literal<"connection">;
|
|
120
|
-
readonly connectionId: Schema.String;
|
|
121
|
-
}>]>>;
|
|
122
|
-
}>>;
|
|
95
|
+
readonly slug: Schema.String;
|
|
96
|
+
/** The header to write the bearer token to. Defaults to `Authorization`. */
|
|
97
|
+
readonly header: Schema.optional<Schema.String>;
|
|
98
|
+
/** The token prefix. Defaults to `Bearer `. */
|
|
99
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
123
100
|
}>]>;
|
|
124
|
-
export type
|
|
125
|
-
export declare const
|
|
126
|
-
/** The GraphQL endpoint URL */
|
|
101
|
+
export type AuthTemplate = typeof AuthTemplate.Type;
|
|
102
|
+
export declare const GraphqlIntegrationConfig: Schema.Struct<{
|
|
103
|
+
/** The GraphQL endpoint URL. */
|
|
127
104
|
readonly endpoint: Schema.String;
|
|
128
|
-
/**
|
|
129
|
-
readonly
|
|
130
|
-
|
|
131
|
-
|
|
105
|
+
/** Display name for the integration. */
|
|
106
|
+
readonly name: Schema.String;
|
|
107
|
+
/** Optional introspection JSON text (when the endpoint doesn't support
|
|
108
|
+
* live introspection). */
|
|
109
|
+
readonly introspectionJson: Schema.optional<Schema.String>;
|
|
110
|
+
/** Static headers applied to every request (and to add-time introspection). */
|
|
111
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
112
|
+
/** Static query parameters applied to every request. */
|
|
113
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
114
|
+
/** Auth methods a connection can be applied through. */
|
|
115
|
+
readonly authenticationTemplate: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
116
|
+
readonly kind: Schema.Literal<"apiKey">;
|
|
117
|
+
/** The template slug a connection references via `connection.template`. */
|
|
118
|
+
readonly slug: Schema.String;
|
|
119
|
+
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
120
|
+
/** The header / query-parameter name the value is written to. */
|
|
121
|
+
readonly name: Schema.String;
|
|
122
|
+
/** Optional prefix prepended to the value (e.g. `Bearer `). */
|
|
132
123
|
readonly prefix: Schema.optional<Schema.String>;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
readonly
|
|
124
|
+
}>, Schema.Struct<{
|
|
125
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
126
|
+
readonly slug: Schema.String;
|
|
127
|
+
/** The header to write the bearer token to. Defaults to `Authorization`. */
|
|
128
|
+
readonly header: Schema.optional<Schema.String>;
|
|
129
|
+
/** The token prefix. Defaults to `Bearer `. */
|
|
138
130
|
readonly prefix: Schema.optional<Schema.String>;
|
|
139
|
-
}>]
|
|
131
|
+
}>]>>;
|
|
132
|
+
}>;
|
|
133
|
+
export type GraphqlIntegrationConfig = typeof GraphqlIntegrationConfig.Type;
|
|
134
|
+
export declare const decodeGraphqlIntegrationConfig: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
|
|
135
|
+
readonly name: string;
|
|
136
|
+
readonly endpoint: string;
|
|
137
|
+
readonly authenticationTemplate: readonly ({
|
|
138
|
+
readonly name: string;
|
|
139
|
+
readonly in: "header" | "query";
|
|
140
|
+
readonly slug: string;
|
|
141
|
+
readonly kind: "apiKey";
|
|
142
|
+
readonly prefix?: string | undefined;
|
|
143
|
+
} | {
|
|
144
|
+
readonly slug: string;
|
|
145
|
+
readonly kind: "oauth2";
|
|
146
|
+
readonly header?: string | undefined;
|
|
147
|
+
readonly prefix?: string | undefined;
|
|
148
|
+
})[];
|
|
149
|
+
readonly headers?: {
|
|
150
|
+
readonly [x: string]: string;
|
|
151
|
+
} | undefined;
|
|
152
|
+
readonly introspectionJson?: string | undefined;
|
|
153
|
+
readonly queryParams?: {
|
|
154
|
+
readonly [x: string]: string;
|
|
155
|
+
} | undefined;
|
|
156
|
+
}, Schema.SchemaError, never>;
|
|
157
|
+
export declare const decodeGraphqlIntegrationConfigOption: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Option").Option<{
|
|
158
|
+
readonly name: string;
|
|
159
|
+
readonly endpoint: string;
|
|
160
|
+
readonly authenticationTemplate: readonly ({
|
|
161
|
+
readonly name: string;
|
|
162
|
+
readonly in: "header" | "query";
|
|
163
|
+
readonly slug: string;
|
|
164
|
+
readonly kind: "apiKey";
|
|
165
|
+
readonly prefix?: string | undefined;
|
|
166
|
+
} | {
|
|
167
|
+
readonly slug: string;
|
|
168
|
+
readonly kind: "oauth2";
|
|
169
|
+
readonly header?: string | undefined;
|
|
170
|
+
readonly prefix?: string | undefined;
|
|
171
|
+
})[];
|
|
172
|
+
readonly headers?: {
|
|
173
|
+
readonly [x: string]: string;
|
|
174
|
+
} | undefined;
|
|
175
|
+
readonly introspectionJson?: string | undefined;
|
|
176
|
+
readonly queryParams?: {
|
|
177
|
+
readonly [x: string]: string;
|
|
178
|
+
} | undefined;
|
|
140
179
|
}>;
|
|
141
|
-
export type InvocationConfig = typeof InvocationConfig.Type;
|
|
142
180
|
export declare const InvocationResult: Schema.Struct<{
|
|
143
181
|
readonly status: Schema.Number;
|
|
144
182
|
readonly data: Schema.NullOr<Schema.Unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@executor-js/plugin-graphql",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/graphql",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/RhysSullivan/executor/issues"
|
|
@@ -53,9 +53,8 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@effect/platform-node": "4.0.0-beta.59",
|
|
56
|
-
"@executor-js/config": "1.
|
|
57
|
-
"@executor-js/sdk": "1.
|
|
58
|
-
"effect": "4.0.0-beta.59",
|
|
56
|
+
"@executor-js/config": "1.5.1",
|
|
57
|
+
"@executor-js/sdk": "1.5.1",
|
|
59
58
|
"graphql": "^16.12.0",
|
|
60
59
|
"graphql-yoga": "^5.17.0"
|
|
61
60
|
},
|
|
@@ -65,6 +64,7 @@
|
|
|
65
64
|
"@types/node": "^24.3.1",
|
|
66
65
|
"@types/react": "^19.1.0",
|
|
67
66
|
"bun-types": "^1.2.22",
|
|
67
|
+
"effect": "4.0.0-beta.59",
|
|
68
68
|
"react": "^19.1.0",
|
|
69
69
|
"tsup": "^8.5.0",
|
|
70
70
|
"vitest": "^4.1.5"
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@effect/atom-react": "4.0.0-beta.59",
|
|
74
74
|
"@tanstack/react-router": "^1.168.10",
|
|
75
|
+
"effect": "4.0.0-beta.59",
|
|
75
76
|
"react": "^19.1.0"
|
|
76
77
|
},
|
|
77
78
|
"peerDependenciesMeta": {
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GraphqlSourceFields
|
|
3
|
-
} from "./chunk-M4SJY6CB.js";
|
|
4
|
-
import {
|
|
5
|
-
addGraphqlSourceOptimistic
|
|
6
|
-
} from "./chunk-D3FN3ZDA.js";
|
|
7
|
-
import "./chunk-UIAHATHP.js";
|
|
8
|
-
|
|
9
|
-
// src/react/AddGraphqlSource.tsx
|
|
10
|
-
import { useCallback, useState } from "react";
|
|
11
|
-
import { useAtomSet } from "@effect/atom-react";
|
|
12
|
-
import * as Exit from "effect/Exit";
|
|
13
|
-
import * as Option from "effect/Option";
|
|
14
|
-
import * as Schema from "effect/Schema";
|
|
15
|
-
import { useScope } from "@executor-js/react/api/scope-context";
|
|
16
|
-
import { sourceWriteKeys } from "@executor-js/react/api/reactivity-keys";
|
|
17
|
-
import {
|
|
18
|
-
HttpCredentialsEditor,
|
|
19
|
-
httpCredentialsValid,
|
|
20
|
-
serializeConfigureHttpCredentials,
|
|
21
|
-
serializeHttpCredentials,
|
|
22
|
-
serializeTemplateHttpCredentials
|
|
23
|
-
} from "@executor-js/react/plugins/http-credentials";
|
|
24
|
-
import {
|
|
25
|
-
sourceDisplayNameFromUrl,
|
|
26
|
-
slugifyNamespace,
|
|
27
|
-
useSourceIdentity
|
|
28
|
-
} from "@executor-js/react/plugins/source-identity";
|
|
29
|
-
import {
|
|
30
|
-
oauthCallbackUrl,
|
|
31
|
-
oauthConnectionId,
|
|
32
|
-
useOAuthPopupFlow
|
|
33
|
-
} from "@executor-js/react/plugins/oauth-sign-in";
|
|
34
|
-
import {
|
|
35
|
-
CredentialControlField,
|
|
36
|
-
CredentialUsageRow,
|
|
37
|
-
useCredentialTargetScope
|
|
38
|
-
} from "@executor-js/react/plugins/credential-target-scope";
|
|
39
|
-
import { useSecretPickerSecrets } from "@executor-js/react/plugins/use-secret-picker-secrets";
|
|
40
|
-
import { Button } from "@executor-js/react/components/button";
|
|
41
|
-
import { FilterTabs } from "@executor-js/react/components/filter-tabs";
|
|
42
|
-
import { FloatActions } from "@executor-js/react/components/float-actions";
|
|
43
|
-
import { Spinner } from "@executor-js/react/components/spinner";
|
|
44
|
-
|
|
45
|
-
// src/react/defaults.ts
|
|
46
|
-
import {
|
|
47
|
-
emptyHttpCredentials
|
|
48
|
-
} from "@executor-js/react/plugins/http-credentials";
|
|
49
|
-
var initialGraphqlCredentials = () => emptyHttpCredentials();
|
|
50
|
-
|
|
51
|
-
// src/react/AddGraphqlSource.tsx
|
|
52
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
53
|
-
var ErrorMessage = Schema.Struct({ message: Schema.String });
|
|
54
|
-
var decodeErrorMessage = Schema.decodeUnknownOption(ErrorMessage);
|
|
55
|
-
var errorMessageFromExit = (exit, fallback) => Option.match(Option.flatMap(Exit.findErrorOption(exit), decodeErrorMessage), {
|
|
56
|
-
onNone: () => fallback,
|
|
57
|
-
onSome: ({ message }) => message
|
|
58
|
-
});
|
|
59
|
-
function AddGraphqlSource(props) {
|
|
60
|
-
const [endpoint, setEndpoint] = useState(props.initialUrl ?? "");
|
|
61
|
-
const identity = useSourceIdentity({
|
|
62
|
-
fallbackName: sourceDisplayNameFromUrl(endpoint, "GraphQL") ?? ""
|
|
63
|
-
});
|
|
64
|
-
const [credentials, setCredentials] = useState(initialGraphqlCredentials);
|
|
65
|
-
const [adding, setAdding] = useState(false);
|
|
66
|
-
const [addError, setAddError] = useState(null);
|
|
67
|
-
const [authMode, setAuthMode] = useState("none");
|
|
68
|
-
const [tokens, setTokens] = useState(null);
|
|
69
|
-
const scopeId = useScope();
|
|
70
|
-
const { credentialTargetScope: requestCredentialTargetScope } = useCredentialTargetScope();
|
|
71
|
-
const {
|
|
72
|
-
credentialTargetScope: oauthCredentialTargetScope,
|
|
73
|
-
setCredentialTargetScope: setOAuthCredentialTargetScope,
|
|
74
|
-
credentialScopeOptions
|
|
75
|
-
} = useCredentialTargetScope();
|
|
76
|
-
const doAdd = useAtomSet(addGraphqlSourceOptimistic(scopeId), {
|
|
77
|
-
mode: "promiseExit"
|
|
78
|
-
});
|
|
79
|
-
const secretList = useSecretPickerSecrets();
|
|
80
|
-
const oauth = useOAuthPopupFlow({
|
|
81
|
-
popupName: "graphql-oauth",
|
|
82
|
-
startErrorMessage: "Failed to start OAuth"
|
|
83
|
-
});
|
|
84
|
-
const canAdd = endpoint.trim().length > 0 && httpCredentialsValid(credentials) && (authMode === "none" || tokens !== null) && !oauth.busy;
|
|
85
|
-
const sourceIdentity = useCallback(() => {
|
|
86
|
-
const trimmedEndpoint = endpoint.trim();
|
|
87
|
-
const namespace = slugifyNamespace(identity.namespace) || slugifyNamespace(sourceDisplayNameFromUrl(trimmedEndpoint, "GraphQL") ?? "") || "graphql";
|
|
88
|
-
const displayName = identity.name.trim() || sourceDisplayNameFromUrl(trimmedEndpoint, "GraphQL") || namespace;
|
|
89
|
-
return { trimmedEndpoint, namespace, displayName };
|
|
90
|
-
}, [endpoint, identity.name, identity.namespace]);
|
|
91
|
-
const handleOAuth = useCallback(async () => {
|
|
92
|
-
if (!endpoint.trim() || !httpCredentialsValid(credentials)) return;
|
|
93
|
-
setAddError(null);
|
|
94
|
-
const { trimmedEndpoint, namespace, displayName } = sourceIdentity();
|
|
95
|
-
const { headers, queryParams } = serializeHttpCredentials(credentials);
|
|
96
|
-
await oauth.start({
|
|
97
|
-
payload: {
|
|
98
|
-
endpoint: trimmedEndpoint,
|
|
99
|
-
...Object.keys(headers).length > 0 ? { headers } : {},
|
|
100
|
-
...Object.keys(queryParams).length > 0 ? { queryParams } : {},
|
|
101
|
-
redirectUrl: oauthCallbackUrl(),
|
|
102
|
-
connectionId: oauthConnectionId({ pluginId: "graphql", namespace }),
|
|
103
|
-
tokenScope: oauthCredentialTargetScope,
|
|
104
|
-
strategy: { kind: "dynamic-dcr" },
|
|
105
|
-
pluginId: "graphql",
|
|
106
|
-
identityLabel: `${displayName} OAuth`
|
|
107
|
-
},
|
|
108
|
-
onSuccess: (result) => {
|
|
109
|
-
setTokens({
|
|
110
|
-
connectionId: result.connectionId,
|
|
111
|
-
expiresAt: result.expiresAt,
|
|
112
|
-
scope: result.scope
|
|
113
|
-
});
|
|
114
|
-
},
|
|
115
|
-
onError: setAddError
|
|
116
|
-
});
|
|
117
|
-
}, [endpoint, credentials, oauth, sourceIdentity, oauthCredentialTargetScope]);
|
|
118
|
-
const handleAdd = async () => {
|
|
119
|
-
setAdding(true);
|
|
120
|
-
setAddError(null);
|
|
121
|
-
const { headers: templateHeaders, queryParams: templateQueryParams } = serializeTemplateHttpCredentials(credentials);
|
|
122
|
-
const { headers: configureHeaders, queryParams: configureQueryParams } = serializeConfigureHttpCredentials(credentials, requestCredentialTargetScope);
|
|
123
|
-
const hasInitialCredentials = Object.keys(configureHeaders).length > 0 || Object.keys(configureQueryParams).length > 0 || authMode === "oauth2" && tokens;
|
|
124
|
-
const { trimmedEndpoint, namespace, displayName } = sourceIdentity();
|
|
125
|
-
const exit = await doAdd({
|
|
126
|
-
params: { scopeId },
|
|
127
|
-
payload: {
|
|
128
|
-
endpoint: trimmedEndpoint,
|
|
129
|
-
name: displayName,
|
|
130
|
-
namespace,
|
|
131
|
-
...Object.keys(templateHeaders).length > 0 ? { headers: templateHeaders } : {},
|
|
132
|
-
...Object.keys(templateQueryParams).length > 0 ? {
|
|
133
|
-
queryParams: templateQueryParams
|
|
134
|
-
} : {},
|
|
135
|
-
...hasInitialCredentials ? {
|
|
136
|
-
credentials: {
|
|
137
|
-
scope: requestCredentialTargetScope,
|
|
138
|
-
...Object.keys(configureHeaders).length > 0 ? { headers: configureHeaders } : {},
|
|
139
|
-
...Object.keys(configureQueryParams).length > 0 ? {
|
|
140
|
-
queryParams: configureQueryParams
|
|
141
|
-
} : {},
|
|
142
|
-
...authMode === "oauth2" && tokens ? {
|
|
143
|
-
auth: {
|
|
144
|
-
oauth2: {
|
|
145
|
-
connection: {
|
|
146
|
-
kind: "connection",
|
|
147
|
-
connectionId: tokens.connectionId
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
} : {}
|
|
152
|
-
}
|
|
153
|
-
} : {}
|
|
154
|
-
},
|
|
155
|
-
reactivityKeys: sourceWriteKeys
|
|
156
|
-
});
|
|
157
|
-
if (Exit.isFailure(exit)) {
|
|
158
|
-
setAddError(errorMessageFromExit(exit, "Failed to add source"));
|
|
159
|
-
setAdding(false);
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
props.onComplete();
|
|
163
|
-
};
|
|
164
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col gap-6", children: [
|
|
165
|
-
/* @__PURE__ */ jsx("h1", { className: "text-xl font-semibold text-foreground", children: "Add GraphQL Source" }),
|
|
166
|
-
/* @__PURE__ */ jsx(GraphqlSourceFields, { endpoint, onEndpointChange: setEndpoint, identity }),
|
|
167
|
-
/* @__PURE__ */ jsx(
|
|
168
|
-
HttpCredentialsEditor,
|
|
169
|
-
{
|
|
170
|
-
credentials,
|
|
171
|
-
onChange: setCredentials,
|
|
172
|
-
existingSecrets: secretList,
|
|
173
|
-
sourceName: identity.name,
|
|
174
|
-
targetScope: requestCredentialTargetScope,
|
|
175
|
-
credentialScopeOptions,
|
|
176
|
-
bindingScopeOptions: credentialScopeOptions
|
|
177
|
-
}
|
|
178
|
-
),
|
|
179
|
-
/* @__PURE__ */ jsxs("section", { className: "hidden space-y-2.5", children: [
|
|
180
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
181
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: "Authentication" }),
|
|
182
|
-
/* @__PURE__ */ jsx(
|
|
183
|
-
FilterTabs,
|
|
184
|
-
{
|
|
185
|
-
tabs: [
|
|
186
|
-
{ value: "none", label: "None" },
|
|
187
|
-
{ value: "oauth2", label: "OAuth" }
|
|
188
|
-
],
|
|
189
|
-
value: authMode,
|
|
190
|
-
onChange: (value) => {
|
|
191
|
-
setAuthMode(value);
|
|
192
|
-
setTokens(null);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
)
|
|
196
|
-
] }),
|
|
197
|
-
authMode === "oauth2" && /* @__PURE__ */ jsx(
|
|
198
|
-
CredentialUsageRow,
|
|
199
|
-
{
|
|
200
|
-
value: oauthCredentialTargetScope,
|
|
201
|
-
options: credentialScopeOptions,
|
|
202
|
-
onChange: (targetScope) => {
|
|
203
|
-
setOAuthCredentialTargetScope(targetScope);
|
|
204
|
-
setTokens(null);
|
|
205
|
-
},
|
|
206
|
-
label: "Connection saved to",
|
|
207
|
-
help: "Choose who can use the OAuth connection.",
|
|
208
|
-
children: /* @__PURE__ */ jsx(CredentialControlField, { label: "Connect via OAuth", help: "Start the provider OAuth flow.", children: /* @__PURE__ */ jsxs("div", { className: "flex min-h-9 items-center gap-2 rounded-md border border-border bg-muted/30 px-3 py-2", children: [
|
|
209
|
-
tokens ? /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-emerald-600 dark:text-emerald-400", children: "Authenticated" }) : /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Not connected" }),
|
|
210
|
-
/* @__PURE__ */ jsx(
|
|
211
|
-
Button,
|
|
212
|
-
{
|
|
213
|
-
type: "button",
|
|
214
|
-
variant: "outline",
|
|
215
|
-
size: "sm",
|
|
216
|
-
className: "ml-auto h-7 px-2 text-xs",
|
|
217
|
-
onClick: () => void handleOAuth(),
|
|
218
|
-
disabled: !endpoint.trim() || !httpCredentialsValid(credentials) || oauth.busy,
|
|
219
|
-
children: oauth.busy ? "Signing in..." : tokens ? "Reconnect" : "Sign in"
|
|
220
|
-
}
|
|
221
|
-
)
|
|
222
|
-
] }) })
|
|
223
|
-
}
|
|
224
|
-
)
|
|
225
|
-
] }),
|
|
226
|
-
addError && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2", children: /* @__PURE__ */ jsx("p", { className: "text-[12px] text-destructive", children: addError }) }),
|
|
227
|
-
/* @__PURE__ */ jsxs(FloatActions, { children: [
|
|
228
|
-
/* @__PURE__ */ jsx(
|
|
229
|
-
Button,
|
|
230
|
-
{
|
|
231
|
-
variant: "ghost",
|
|
232
|
-
onClick: () => {
|
|
233
|
-
oauth.cancel();
|
|
234
|
-
props.onCancel();
|
|
235
|
-
},
|
|
236
|
-
disabled: adding,
|
|
237
|
-
children: "Cancel"
|
|
238
|
-
}
|
|
239
|
-
),
|
|
240
|
-
/* @__PURE__ */ jsxs(Button, { onClick: handleAdd, disabled: !canAdd || adding, children: [
|
|
241
|
-
adding && /* @__PURE__ */ jsx(Spinner, { className: "size-3.5" }),
|
|
242
|
-
adding ? "Adding..." : "Add source"
|
|
243
|
-
] })
|
|
244
|
-
] })
|
|
245
|
-
] });
|
|
246
|
-
}
|
|
247
|
-
export {
|
|
248
|
-
AddGraphqlSource as default
|
|
249
|
-
};
|
|
250
|
-
//# sourceMappingURL=AddGraphqlSource-CJCUUYNM.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/AddGraphqlSource.tsx","../src/react/defaults.ts"],"sourcesContent":["import { useCallback, useState } from \"react\";\nimport { useAtomSet } from \"@effect/atom-react\";\nimport * as Exit from \"effect/Exit\";\nimport * as Option from \"effect/Option\";\nimport * as Schema from \"effect/Schema\";\n\nimport { useScope } from \"@executor-js/react/api/scope-context\";\nimport { sourceWriteKeys } from \"@executor-js/react/api/reactivity-keys\";\nimport {\n HttpCredentialsEditor,\n httpCredentialsValid,\n serializeConfigureHttpCredentials,\n serializeHttpCredentials,\n serializeTemplateHttpCredentials,\n type HttpCredentialsState,\n} from \"@executor-js/react/plugins/http-credentials\";\nimport {\n sourceDisplayNameFromUrl,\n slugifyNamespace,\n useSourceIdentity,\n} from \"@executor-js/react/plugins/source-identity\";\nimport {\n oauthCallbackUrl,\n oauthConnectionId,\n useOAuthPopupFlow,\n type OAuthCompletionPayload,\n} from \"@executor-js/react/plugins/oauth-sign-in\";\nimport {\n CredentialControlField,\n CredentialUsageRow,\n useCredentialTargetScope,\n} from \"@executor-js/react/plugins/credential-target-scope\";\nimport { useSecretPickerSecrets } from \"@executor-js/react/plugins/use-secret-picker-secrets\";\nimport { Button } from \"@executor-js/react/components/button\";\nimport { FilterTabs } from \"@executor-js/react/components/filter-tabs\";\nimport { FloatActions } from \"@executor-js/react/components/float-actions\";\nimport { Spinner } from \"@executor-js/react/components/spinner\";\nimport { addGraphqlSourceOptimistic } from \"./atoms\";\nimport { initialGraphqlCredentials } from \"./defaults\";\nimport { GraphqlSourceFields } from \"./GraphqlSourceFields\";\nimport type { GraphqlConfiguredValueInput, GraphqlCredentialInput } from \"../sdk/types\";\n\nconst ErrorMessage = Schema.Struct({ message: Schema.String });\nconst decodeErrorMessage = Schema.decodeUnknownOption(ErrorMessage);\n\nconst errorMessageFromExit = (exit: Exit.Exit<unknown, unknown>, fallback: string): string =>\n Option.match(Option.flatMap(Exit.findErrorOption(exit), decodeErrorMessage), {\n onNone: () => fallback,\n onSome: ({ message }) => message,\n });\n\ntype AuthMode = \"none\" | \"oauth2\";\n\nexport default function AddGraphqlSource(props: {\n onComplete: () => void;\n onCancel: () => void;\n initialUrl?: string;\n}) {\n const [endpoint, setEndpoint] = useState(props.initialUrl ?? \"\");\n const identity = useSourceIdentity({\n fallbackName: sourceDisplayNameFromUrl(endpoint, \"GraphQL\") ?? \"\",\n });\n const [credentials, setCredentials] = useState<HttpCredentialsState>(initialGraphqlCredentials);\n const [adding, setAdding] = useState(false);\n const [addError, setAddError] = useState<string | null>(null);\n const [authMode, setAuthMode] = useState<AuthMode>(\"none\");\n const [tokens, setTokens] = useState<OAuthCompletionPayload | null>(null);\n\n const scopeId = useScope();\n const { credentialTargetScope: requestCredentialTargetScope } = useCredentialTargetScope();\n const {\n credentialTargetScope: oauthCredentialTargetScope,\n setCredentialTargetScope: setOAuthCredentialTargetScope,\n credentialScopeOptions,\n } = useCredentialTargetScope();\n const doAdd = useAtomSet(addGraphqlSourceOptimistic(scopeId), {\n mode: \"promiseExit\",\n });\n const secretList = useSecretPickerSecrets();\n const oauth = useOAuthPopupFlow({\n popupName: \"graphql-oauth\",\n startErrorMessage: \"Failed to start OAuth\",\n });\n\n const canAdd =\n endpoint.trim().length > 0 &&\n httpCredentialsValid(credentials) &&\n (authMode === \"none\" || tokens !== null) &&\n !oauth.busy;\n\n const sourceIdentity = useCallback(() => {\n const trimmedEndpoint = endpoint.trim();\n const namespace =\n slugifyNamespace(identity.namespace) ||\n slugifyNamespace(sourceDisplayNameFromUrl(trimmedEndpoint, \"GraphQL\") ?? \"\") ||\n \"graphql\";\n const displayName =\n identity.name.trim() || sourceDisplayNameFromUrl(trimmedEndpoint, \"GraphQL\") || namespace;\n return { trimmedEndpoint, namespace, displayName };\n }, [endpoint, identity.name, identity.namespace]);\n\n const handleOAuth = useCallback(async () => {\n if (!endpoint.trim() || !httpCredentialsValid(credentials)) return;\n setAddError(null);\n const { trimmedEndpoint, namespace, displayName } = sourceIdentity();\n const { headers, queryParams } = serializeHttpCredentials(credentials);\n await oauth.start({\n payload: {\n endpoint: trimmedEndpoint,\n ...(Object.keys(headers).length > 0 ? { headers } : {}),\n ...(Object.keys(queryParams).length > 0 ? { queryParams } : {}),\n redirectUrl: oauthCallbackUrl(),\n connectionId: oauthConnectionId({ pluginId: \"graphql\", namespace }),\n tokenScope: oauthCredentialTargetScope,\n strategy: { kind: \"dynamic-dcr\" },\n pluginId: \"graphql\",\n identityLabel: `${displayName} OAuth`,\n },\n onSuccess: (result) => {\n setTokens({\n connectionId: result.connectionId,\n expiresAt: result.expiresAt,\n scope: result.scope,\n });\n },\n onError: setAddError,\n });\n }, [endpoint, credentials, oauth, sourceIdentity, oauthCredentialTargetScope]);\n\n const handleAdd = async () => {\n setAdding(true);\n setAddError(null);\n const { headers: templateHeaders, queryParams: templateQueryParams } =\n serializeTemplateHttpCredentials(credentials);\n const { headers: configureHeaders, queryParams: configureQueryParams } =\n serializeConfigureHttpCredentials(credentials, requestCredentialTargetScope);\n const hasInitialCredentials =\n Object.keys(configureHeaders).length > 0 ||\n Object.keys(configureQueryParams).length > 0 ||\n (authMode === \"oauth2\" && tokens);\n\n const { trimmedEndpoint, namespace, displayName } = sourceIdentity();\n const exit = await doAdd({\n params: { scopeId },\n payload: {\n endpoint: trimmedEndpoint,\n name: displayName,\n namespace,\n ...(Object.keys(templateHeaders).length > 0\n ? { headers: templateHeaders as Record<string, GraphqlConfiguredValueInput> }\n : {}),\n ...(Object.keys(templateQueryParams).length > 0\n ? {\n queryParams: templateQueryParams as Record<string, GraphqlConfiguredValueInput>,\n }\n : {}),\n ...(hasInitialCredentials\n ? {\n credentials: {\n scope: requestCredentialTargetScope,\n ...(Object.keys(configureHeaders).length > 0\n ? { headers: configureHeaders as Record<string, GraphqlCredentialInput> }\n : {}),\n ...(Object.keys(configureQueryParams).length > 0\n ? {\n queryParams: configureQueryParams as Record<string, GraphqlCredentialInput>,\n }\n : {}),\n ...(authMode === \"oauth2\" && tokens\n ? {\n auth: {\n oauth2: {\n connection: {\n kind: \"connection\" as const,\n connectionId: tokens.connectionId,\n },\n },\n },\n }\n : {}),\n },\n }\n : {}),\n },\n reactivityKeys: sourceWriteKeys,\n });\n if (Exit.isFailure(exit)) {\n setAddError(errorMessageFromExit(exit, \"Failed to add source\"));\n setAdding(false);\n return;\n }\n props.onComplete();\n };\n\n return (\n <div className=\"flex flex-1 flex-col gap-6\">\n <h1 className=\"text-xl font-semibold text-foreground\">Add GraphQL Source</h1>\n\n <GraphqlSourceFields endpoint={endpoint} onEndpointChange={setEndpoint} identity={identity} />\n\n <HttpCredentialsEditor\n credentials={credentials}\n onChange={setCredentials}\n existingSecrets={secretList}\n sourceName={identity.name}\n targetScope={requestCredentialTargetScope}\n credentialScopeOptions={credentialScopeOptions}\n bindingScopeOptions={credentialScopeOptions}\n />\n\n {/* Temporarily hidden while we revisit GraphQL OAuth discovery and UX. */}\n <section className=\"hidden space-y-2.5\">\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-sm font-medium text-foreground\">Authentication</span>\n <FilterTabs<AuthMode>\n tabs={[\n { value: \"none\", label: \"None\" },\n { value: \"oauth2\", label: \"OAuth\" },\n ]}\n value={authMode}\n onChange={(value) => {\n setAuthMode(value);\n setTokens(null);\n }}\n />\n </div>\n\n {authMode === \"oauth2\" && (\n <CredentialUsageRow\n value={oauthCredentialTargetScope}\n options={credentialScopeOptions}\n onChange={(targetScope) => {\n setOAuthCredentialTargetScope(targetScope);\n setTokens(null);\n }}\n label=\"Connection saved to\"\n help=\"Choose who can use the OAuth connection.\"\n >\n <CredentialControlField label=\"Connect via OAuth\" help=\"Start the provider OAuth flow.\">\n <div className=\"flex min-h-9 items-center gap-2 rounded-md border border-border bg-muted/30 px-3 py-2\">\n {tokens ? (\n <span className=\"text-xs font-medium text-emerald-600 dark:text-emerald-400\">\n Authenticated\n </span>\n ) : (\n <span className=\"text-xs text-muted-foreground\">Not connected</span>\n )}\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"ml-auto h-7 px-2 text-xs\"\n onClick={() => void handleOAuth()}\n disabled={!endpoint.trim() || !httpCredentialsValid(credentials) || oauth.busy}\n >\n {oauth.busy ? \"Signing in...\" : tokens ? \"Reconnect\" : \"Sign in\"}\n </Button>\n </div>\n </CredentialControlField>\n </CredentialUsageRow>\n )}\n </section>\n\n {/* Error */}\n {addError && (\n <div className=\"rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2\">\n <p className=\"text-[12px] text-destructive\">{addError}</p>\n </div>\n )}\n\n <FloatActions>\n <Button\n variant=\"ghost\"\n onClick={() => {\n oauth.cancel();\n props.onCancel();\n }}\n disabled={adding}\n >\n Cancel\n </Button>\n <Button onClick={handleAdd} disabled={!canAdd || adding}>\n {adding && <Spinner className=\"size-3.5\" />}\n {adding ? \"Adding...\" : \"Add source\"}\n </Button>\n </FloatActions>\n </div>\n );\n}\n","import {\n emptyHttpCredentials,\n type HttpCredentialsState,\n} from \"@executor-js/react/plugins/http-credentials\";\n\nexport const initialGraphqlCredentials = (): HttpCredentialsState => emptyHttpCredentials();\n"],"mappings":";;;;;;;;;AAAA,SAAS,aAAa,gBAAgB;AACtC,SAAS,kBAAkB;AAC3B,YAAY,UAAU;AACtB,YAAY,YAAY;AACxB,YAAY,YAAY;AAExB,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AA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