@executor-js/plugin-graphql 1.5.3 → 1.5.5
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/api/group.d.ts +158 -0
- package/dist/api/handlers.d.ts +17 -0
- package/dist/api/index.d.ts +169 -0
- package/dist/react/AddGraphqlSource.d.ts +5 -0
- package/dist/react/EditGraphqlSource.d.ts +4 -0
- package/dist/react/GraphqlAccountsPanel.d.ts +6 -0
- package/dist/react/GraphqlSignInButton.d.ts +7 -0
- package/dist/react/GraphqlSourceFields.d.ts +8 -0
- package/dist/react/atoms.d.ts +124 -0
- package/dist/react/auth-method-config.d.ts +9 -0
- package/dist/react/client.d.ts +154 -0
- package/dist/react/defaults.d.ts +16 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/plugin-client.d.ts +2 -0
- package/dist/react/source-plugin.d.ts +2 -0
- package/dist/sdk/errors.d.ts +43 -0
- package/dist/sdk/extract.d.ts +11 -0
- package/dist/sdk/index.d.ts +7 -0
- package/dist/sdk/introspect.d.ts +440 -0
- package/dist/sdk/invoke.d.ts +20 -0
- package/dist/sdk/plugin.d.ts +115 -0
- package/dist/sdk/presets.d.ts +10 -0
- package/dist/sdk/store.d.ts +18 -0
- package/dist/sdk/types.d.ts +185 -0
- package/dist/testing/index.d.ts +70 -0
- package/package.json +3 -3
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { InternalError, IntegrationAlreadyExistsError } from "@executor-js/sdk/shared";
|
|
4
|
+
import { GraphqlIntrospectionError, GraphqlExtractionError } from "../sdk/errors";
|
|
5
|
+
export declare const GraphqlGroup: HttpApiGroup.HttpApiGroup<"graphql", HttpApiEndpoint.HttpApiEndpoint<"addIntegration", "POST", "/graphql/integrations", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
6
|
+
readonly endpoint: Schema.String;
|
|
7
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
8
|
+
readonly name: Schema.optional<Schema.String>;
|
|
9
|
+
readonly introspectionJson: Schema.optional<Schema.String>;
|
|
10
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
11
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
12
|
+
readonly authenticationTemplate: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
13
|
+
readonly kind: Schema.Literal<"apiKey">;
|
|
14
|
+
readonly slug: Schema.String;
|
|
15
|
+
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
16
|
+
readonly name: Schema.String;
|
|
17
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
18
|
+
}>, Schema.Struct<{
|
|
19
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
20
|
+
readonly slug: Schema.String;
|
|
21
|
+
readonly header: Schema.optional<Schema.String>;
|
|
22
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
23
|
+
}>]>>>;
|
|
24
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
25
|
+
readonly slug: Schema.String;
|
|
26
|
+
readonly name: Schema.String;
|
|
27
|
+
}>>, HttpApiEndpoint.Json<typeof IntegrationAlreadyExistsError | typeof InternalError | Schema.decodeTo<Schema.declareConstructor<GraphqlIntrospectionError, {
|
|
28
|
+
readonly message: string;
|
|
29
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
30
|
+
}, readonly [Schema.TaggedStruct<"GraphqlIntrospectionError", {
|
|
31
|
+
readonly message: Schema.String;
|
|
32
|
+
}>], {
|
|
33
|
+
readonly message: string;
|
|
34
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
35
|
+
}>, Schema.TaggedStruct<"GraphqlIntrospectionError", {
|
|
36
|
+
readonly message: Schema.String;
|
|
37
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GraphqlExtractionError, {
|
|
38
|
+
readonly message: string;
|
|
39
|
+
readonly _tag: "GraphqlExtractionError";
|
|
40
|
+
}, readonly [Schema.TaggedStruct<"GraphqlExtractionError", {
|
|
41
|
+
readonly message: Schema.String;
|
|
42
|
+
}>], {
|
|
43
|
+
readonly message: string;
|
|
44
|
+
readonly _tag: "GraphqlExtractionError";
|
|
45
|
+
}>, Schema.TaggedStruct<"GraphqlExtractionError", {
|
|
46
|
+
readonly message: Schema.String;
|
|
47
|
+
}>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getIntegration", "GET", "/graphql/integrations/:slug", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
48
|
+
slug: Schema.String;
|
|
49
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<Schema.Unknown>>, HttpApiEndpoint.Json<typeof IntegrationAlreadyExistsError | typeof InternalError | Schema.decodeTo<Schema.declareConstructor<GraphqlIntrospectionError, {
|
|
50
|
+
readonly message: string;
|
|
51
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
52
|
+
}, readonly [Schema.TaggedStruct<"GraphqlIntrospectionError", {
|
|
53
|
+
readonly message: Schema.String;
|
|
54
|
+
}>], {
|
|
55
|
+
readonly message: string;
|
|
56
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
57
|
+
}>, Schema.TaggedStruct<"GraphqlIntrospectionError", {
|
|
58
|
+
readonly message: Schema.String;
|
|
59
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GraphqlExtractionError, {
|
|
60
|
+
readonly message: string;
|
|
61
|
+
readonly _tag: "GraphqlExtractionError";
|
|
62
|
+
}, readonly [Schema.TaggedStruct<"GraphqlExtractionError", {
|
|
63
|
+
readonly message: Schema.String;
|
|
64
|
+
}>], {
|
|
65
|
+
readonly message: string;
|
|
66
|
+
readonly _tag: "GraphqlExtractionError";
|
|
67
|
+
}>, Schema.TaggedStruct<"GraphqlExtractionError", {
|
|
68
|
+
readonly message: Schema.String;
|
|
69
|
+
}>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getConfig", "GET", "/graphql/integrations/:slug/config", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
70
|
+
slug: Schema.String;
|
|
71
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<Schema.Struct<{
|
|
72
|
+
readonly endpoint: Schema.String;
|
|
73
|
+
readonly name: Schema.String;
|
|
74
|
+
readonly introspectionJson: Schema.optional<Schema.String>;
|
|
75
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
76
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
77
|
+
readonly authenticationTemplate: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
78
|
+
readonly kind: Schema.Literal<"apiKey">;
|
|
79
|
+
readonly slug: Schema.String;
|
|
80
|
+
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
81
|
+
readonly name: Schema.String;
|
|
82
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
83
|
+
}>, Schema.Struct<{
|
|
84
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
85
|
+
readonly slug: Schema.String;
|
|
86
|
+
readonly header: Schema.optional<Schema.String>;
|
|
87
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
88
|
+
}>]>>;
|
|
89
|
+
}>>>, HttpApiEndpoint.Json<typeof IntegrationAlreadyExistsError | typeof InternalError | Schema.decodeTo<Schema.declareConstructor<GraphqlIntrospectionError, {
|
|
90
|
+
readonly message: string;
|
|
91
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
92
|
+
}, readonly [Schema.TaggedStruct<"GraphqlIntrospectionError", {
|
|
93
|
+
readonly message: Schema.String;
|
|
94
|
+
}>], {
|
|
95
|
+
readonly message: string;
|
|
96
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
97
|
+
}>, Schema.TaggedStruct<"GraphqlIntrospectionError", {
|
|
98
|
+
readonly message: Schema.String;
|
|
99
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GraphqlExtractionError, {
|
|
100
|
+
readonly message: string;
|
|
101
|
+
readonly _tag: "GraphqlExtractionError";
|
|
102
|
+
}, readonly [Schema.TaggedStruct<"GraphqlExtractionError", {
|
|
103
|
+
readonly message: Schema.String;
|
|
104
|
+
}>], {
|
|
105
|
+
readonly message: string;
|
|
106
|
+
readonly _tag: "GraphqlExtractionError";
|
|
107
|
+
}>, Schema.TaggedStruct<"GraphqlExtractionError", {
|
|
108
|
+
readonly message: Schema.String;
|
|
109
|
+
}>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"configure", "POST", "/graphql/integrations/:slug/config", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
110
|
+
slug: Schema.String;
|
|
111
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
112
|
+
readonly authenticationTemplate: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
113
|
+
readonly kind: Schema.Literal<"apiKey">;
|
|
114
|
+
readonly slug: Schema.String;
|
|
115
|
+
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
116
|
+
readonly name: Schema.String;
|
|
117
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
118
|
+
}>, Schema.Struct<{
|
|
119
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
120
|
+
readonly slug: Schema.String;
|
|
121
|
+
readonly header: Schema.optional<Schema.String>;
|
|
122
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
123
|
+
}>]>>;
|
|
124
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["merge", "replace"]>>;
|
|
125
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
126
|
+
readonly authenticationTemplate: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
127
|
+
readonly kind: Schema.Literal<"apiKey">;
|
|
128
|
+
readonly slug: Schema.String;
|
|
129
|
+
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
130
|
+
readonly name: Schema.String;
|
|
131
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
132
|
+
}>, Schema.Struct<{
|
|
133
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
134
|
+
readonly slug: Schema.String;
|
|
135
|
+
readonly header: Schema.optional<Schema.String>;
|
|
136
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
137
|
+
}>]>>;
|
|
138
|
+
}>>, HttpApiEndpoint.Json<typeof IntegrationAlreadyExistsError | typeof InternalError | Schema.decodeTo<Schema.declareConstructor<GraphqlIntrospectionError, {
|
|
139
|
+
readonly message: string;
|
|
140
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
141
|
+
}, readonly [Schema.TaggedStruct<"GraphqlIntrospectionError", {
|
|
142
|
+
readonly message: Schema.String;
|
|
143
|
+
}>], {
|
|
144
|
+
readonly message: string;
|
|
145
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
146
|
+
}>, Schema.TaggedStruct<"GraphqlIntrospectionError", {
|
|
147
|
+
readonly message: Schema.String;
|
|
148
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GraphqlExtractionError, {
|
|
149
|
+
readonly message: string;
|
|
150
|
+
readonly _tag: "GraphqlExtractionError";
|
|
151
|
+
}, readonly [Schema.TaggedStruct<"GraphqlExtractionError", {
|
|
152
|
+
readonly message: Schema.String;
|
|
153
|
+
}>], {
|
|
154
|
+
readonly message: string;
|
|
155
|
+
readonly _tag: "GraphqlExtractionError";
|
|
156
|
+
}>, Schema.TaggedStruct<"GraphqlExtractionError", {
|
|
157
|
+
readonly message: Schema.String;
|
|
158
|
+
}>, never, never>>, never, never>, false>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Context, Effect } from "effect";
|
|
2
|
+
declare const GraphqlExtensionService_base: Context.ServiceClass<GraphqlExtensionService, "GraphqlExtensionService", {
|
|
3
|
+
addIntegration: (input: import("../sdk").GraphqlAddIntegrationInput) => Effect.Effect<{
|
|
4
|
+
slug: string;
|
|
5
|
+
name: string;
|
|
6
|
+
toolCount: number;
|
|
7
|
+
}, import("@executor-js/sdk").StorageFailure | import("@executor-js/sdk").IntegrationAlreadyExistsError | import("../sdk").GraphqlIntrospectionError | import("../sdk").GraphqlExtractionError, never>;
|
|
8
|
+
getIntegration: (slug: string) => Effect.Effect<unknown, import("@executor-js/sdk").StorageFailure, never>;
|
|
9
|
+
getConfig: (slug: string) => Effect.Effect<import("../sdk").GraphqlIntegrationConfig | null, import("@executor-js/sdk").StorageFailure>;
|
|
10
|
+
configureAuth: (slug: string, input: import("../sdk").GraphqlConfigureAuthInput) => Effect.Effect<readonly import("../sdk").AuthTemplate[], import("@executor-js/sdk").StorageFailure>;
|
|
11
|
+
removeIntegration: (slug: string) => Effect.Effect<void, import("@executor-js/sdk").StorageFailure, never>;
|
|
12
|
+
configure: (slug: string, input: import("../sdk").GraphqlConfigureInput) => Effect.Effect<void, import("@executor-js/sdk").StorageFailure, never>;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class GraphqlExtensionService extends GraphqlExtensionService_base {
|
|
15
|
+
}
|
|
16
|
+
export declare const GraphqlHandlers: import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").ApiGroup<"executor", "graphql">, never, import("effect/unstable/http/HttpRouter").Request<"Requires", GraphqlExtensionService>>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { type GraphqlPluginOptions } from "../sdk/plugin";
|
|
2
|
+
import { GraphqlExtensionService } from "./handlers";
|
|
3
|
+
export { GraphqlGroup } from "./group";
|
|
4
|
+
export { GraphqlHandlers, GraphqlExtensionService } from "./handlers";
|
|
5
|
+
export declare const graphqlHttpPlugin: import("@executor-js/sdk/core").ConfiguredPlugin<"graphql", {
|
|
6
|
+
addIntegration: (input: import("../sdk").GraphqlAddIntegrationInput) => import("effect/Effect").Effect<{
|
|
7
|
+
slug: string;
|
|
8
|
+
name: string;
|
|
9
|
+
toolCount: number;
|
|
10
|
+
}, import("@executor-js/sdk/core").StorageFailure | import("@executor-js/sdk/shared").IntegrationAlreadyExistsError | import("../sdk").GraphqlIntrospectionError | import("../sdk").GraphqlExtractionError, never>;
|
|
11
|
+
getIntegration: (slug: string) => import("effect/Effect").Effect<unknown, import("@executor-js/sdk/core").StorageFailure, never>;
|
|
12
|
+
getConfig: (slug: string) => import("effect/Effect").Effect<import("../sdk").GraphqlIntegrationConfig | null, import("@executor-js/sdk/core").StorageFailure>;
|
|
13
|
+
configureAuth: (slug: string, input: import("../sdk").GraphqlConfigureAuthInput) => import("effect/Effect").Effect<readonly import("../sdk").AuthTemplate[], import("@executor-js/sdk/core").StorageFailure>;
|
|
14
|
+
removeIntegration: (slug: string) => import("effect/Effect").Effect<void, import("@executor-js/sdk/core").StorageFailure, never>;
|
|
15
|
+
configure: (slug: string, input: import("../sdk").GraphqlConfigureInput) => import("effect/Effect").Effect<void, import("@executor-js/sdk/core").StorageFailure, never>;
|
|
16
|
+
}, import("../sdk").GraphqlStore, GraphqlPluginOptions, typeof GraphqlExtensionService, import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").ApiGroup<"executor", "graphql">, never, import("effect/unstable/http/HttpRouter").Request<"Requires", GraphqlExtensionService>>, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"graphql", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"addIntegration", "POST", "/graphql/integrations", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
17
|
+
readonly endpoint: import("effect/Schema").String;
|
|
18
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
19
|
+
readonly name: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
20
|
+
readonly introspectionJson: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
21
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
22
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
23
|
+
readonly authenticationTemplate: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
24
|
+
readonly kind: import("effect/Schema").Literal<"apiKey">;
|
|
25
|
+
readonly slug: import("effect/Schema").String;
|
|
26
|
+
readonly in: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
27
|
+
readonly name: import("effect/Schema").String;
|
|
28
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
29
|
+
}>, import("effect/Schema").Struct<{
|
|
30
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
31
|
+
readonly slug: import("effect/Schema").String;
|
|
32
|
+
readonly header: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
33
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
34
|
+
}>]>>>;
|
|
35
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
36
|
+
readonly slug: import("effect/Schema").String;
|
|
37
|
+
readonly name: import("effect/Schema").String;
|
|
38
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk/shared").IntegrationAlreadyExistsError | typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
|
|
39
|
+
readonly message: string;
|
|
40
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
41
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
42
|
+
readonly message: import("effect/Schema").String;
|
|
43
|
+
}>], {
|
|
44
|
+
readonly message: string;
|
|
45
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
46
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
47
|
+
readonly message: import("effect/Schema").String;
|
|
48
|
+
}>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
|
|
49
|
+
readonly message: string;
|
|
50
|
+
readonly _tag: "GraphqlExtractionError";
|
|
51
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
52
|
+
readonly message: import("effect/Schema").String;
|
|
53
|
+
}>], {
|
|
54
|
+
readonly message: string;
|
|
55
|
+
readonly _tag: "GraphqlExtractionError";
|
|
56
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
57
|
+
readonly message: import("effect/Schema").String;
|
|
58
|
+
}>, never, never>>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getIntegration", "GET", "/graphql/integrations/:slug", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
59
|
+
slug: import("effect/Schema").String;
|
|
60
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").NullOr<import("effect/Schema").Unknown>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk/shared").IntegrationAlreadyExistsError | typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
|
|
61
|
+
readonly message: string;
|
|
62
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
63
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
64
|
+
readonly message: import("effect/Schema").String;
|
|
65
|
+
}>], {
|
|
66
|
+
readonly message: string;
|
|
67
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
68
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
69
|
+
readonly message: import("effect/Schema").String;
|
|
70
|
+
}>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
|
|
71
|
+
readonly message: string;
|
|
72
|
+
readonly _tag: "GraphqlExtractionError";
|
|
73
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
74
|
+
readonly message: import("effect/Schema").String;
|
|
75
|
+
}>], {
|
|
76
|
+
readonly message: string;
|
|
77
|
+
readonly _tag: "GraphqlExtractionError";
|
|
78
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
79
|
+
readonly message: import("effect/Schema").String;
|
|
80
|
+
}>, never, never>>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getConfig", "GET", "/graphql/integrations/:slug/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
81
|
+
slug: import("effect/Schema").String;
|
|
82
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
83
|
+
readonly endpoint: import("effect/Schema").String;
|
|
84
|
+
readonly name: import("effect/Schema").String;
|
|
85
|
+
readonly introspectionJson: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
86
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
87
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
88
|
+
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
89
|
+
readonly kind: import("effect/Schema").Literal<"apiKey">;
|
|
90
|
+
readonly slug: import("effect/Schema").String;
|
|
91
|
+
readonly in: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
92
|
+
readonly name: import("effect/Schema").String;
|
|
93
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
94
|
+
}>, import("effect/Schema").Struct<{
|
|
95
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
96
|
+
readonly slug: import("effect/Schema").String;
|
|
97
|
+
readonly header: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
98
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
99
|
+
}>]>>;
|
|
100
|
+
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk/shared").IntegrationAlreadyExistsError | typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
|
|
101
|
+
readonly message: string;
|
|
102
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
103
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
104
|
+
readonly message: import("effect/Schema").String;
|
|
105
|
+
}>], {
|
|
106
|
+
readonly message: string;
|
|
107
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
108
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
109
|
+
readonly message: import("effect/Schema").String;
|
|
110
|
+
}>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
|
|
111
|
+
readonly message: string;
|
|
112
|
+
readonly _tag: "GraphqlExtractionError";
|
|
113
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
114
|
+
readonly message: import("effect/Schema").String;
|
|
115
|
+
}>], {
|
|
116
|
+
readonly message: string;
|
|
117
|
+
readonly _tag: "GraphqlExtractionError";
|
|
118
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
119
|
+
readonly message: import("effect/Schema").String;
|
|
120
|
+
}>, never, never>>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"configure", "POST", "/graphql/integrations/:slug/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
121
|
+
slug: import("effect/Schema").String;
|
|
122
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
123
|
+
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
124
|
+
readonly kind: import("effect/Schema").Literal<"apiKey">;
|
|
125
|
+
readonly slug: import("effect/Schema").String;
|
|
126
|
+
readonly in: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
127
|
+
readonly name: import("effect/Schema").String;
|
|
128
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
129
|
+
}>, import("effect/Schema").Struct<{
|
|
130
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
131
|
+
readonly slug: import("effect/Schema").String;
|
|
132
|
+
readonly header: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
133
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
134
|
+
}>]>>;
|
|
135
|
+
readonly mode: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["merge", "replace"]>>;
|
|
136
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
137
|
+
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
138
|
+
readonly kind: import("effect/Schema").Literal<"apiKey">;
|
|
139
|
+
readonly slug: import("effect/Schema").String;
|
|
140
|
+
readonly in: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
141
|
+
readonly name: import("effect/Schema").String;
|
|
142
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
143
|
+
}>, import("effect/Schema").Struct<{
|
|
144
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
145
|
+
readonly slug: import("effect/Schema").String;
|
|
146
|
+
readonly header: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
147
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
148
|
+
}>]>>;
|
|
149
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk/shared").IntegrationAlreadyExistsError | typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
|
|
150
|
+
readonly message: string;
|
|
151
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
152
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
153
|
+
readonly message: import("effect/Schema").String;
|
|
154
|
+
}>], {
|
|
155
|
+
readonly message: string;
|
|
156
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
157
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
158
|
+
readonly message: import("effect/Schema").String;
|
|
159
|
+
}>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
|
|
160
|
+
readonly message: string;
|
|
161
|
+
readonly _tag: "GraphqlExtractionError";
|
|
162
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
163
|
+
readonly message: import("effect/Schema").String;
|
|
164
|
+
}>], {
|
|
165
|
+
readonly message: string;
|
|
166
|
+
readonly _tag: "GraphqlExtractionError";
|
|
167
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
168
|
+
readonly message: import("effect/Schema").String;
|
|
169
|
+
}>, never, never>>, never, never>, false>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IntegrationAccountHandoff } from "@executor-js/sdk/client";
|
|
2
|
+
export default function GraphqlAccountsPanel(props: {
|
|
3
|
+
readonly sourceId: string;
|
|
4
|
+
readonly integrationName: string;
|
|
5
|
+
readonly accountHandoff?: IntegrationAccountHandoff | null;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IntegrationSlug, type Connection, type AuthTemplateSlug as AuthTemplateSlugType } from "@executor-js/sdk/shared";
|
|
2
|
+
export default function GraphqlSignInButton(props: {
|
|
3
|
+
readonly slug: IntegrationSlug;
|
|
4
|
+
readonly template: AuthTemplateSlugType;
|
|
5
|
+
readonly displayName: string;
|
|
6
|
+
readonly existing: readonly Connection[];
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type IntegrationIdentity } from "@executor-js/react/plugins/integration-identity";
|
|
2
|
+
export declare function GraphqlSourceFields(props: {
|
|
3
|
+
readonly endpoint: string;
|
|
4
|
+
readonly onEndpointChange: (endpoint: string) => void;
|
|
5
|
+
readonly identity: IntegrationIdentity;
|
|
6
|
+
readonly endpointDisabled?: boolean;
|
|
7
|
+
readonly namespaceReadOnly?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { IntegrationSlug } from "@executor-js/sdk/shared";
|
|
2
|
+
import * as Atom from "effect/unstable/reactivity/Atom";
|
|
3
|
+
import * as AsyncResult from "effect/unstable/reactivity/AsyncResult";
|
|
4
|
+
export declare const graphqlIntegrationConfigAtom: (slug: IntegrationSlug) => Atom.Atom<AsyncResult.AsyncResult<unknown, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").GraphqlIntrospectionError | import("../sdk").GraphqlExtractionError>>;
|
|
5
|
+
export declare const graphqlConfigAtom: (slug: IntegrationSlug) => Atom.Atom<AsyncResult.AsyncResult<{
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly endpoint: string;
|
|
8
|
+
readonly authenticationTemplate: readonly ({
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly in: "header" | "query";
|
|
11
|
+
readonly slug: string;
|
|
12
|
+
readonly kind: "apiKey";
|
|
13
|
+
readonly prefix?: string | undefined;
|
|
14
|
+
} | {
|
|
15
|
+
readonly slug: string;
|
|
16
|
+
readonly kind: "oauth2";
|
|
17
|
+
readonly header?: string | undefined;
|
|
18
|
+
readonly prefix?: string | undefined;
|
|
19
|
+
})[];
|
|
20
|
+
readonly headers?: {
|
|
21
|
+
readonly [x: string]: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
readonly introspectionJson?: string | undefined;
|
|
24
|
+
readonly queryParams?: {
|
|
25
|
+
readonly [x: string]: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
} | null, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").GraphqlIntrospectionError | import("../sdk").GraphqlExtractionError>>;
|
|
28
|
+
export declare const addGraphqlIntegration: Atom.AtomResultFn<{
|
|
29
|
+
readonly payload: {
|
|
30
|
+
readonly endpoint: string;
|
|
31
|
+
readonly name?: string | undefined;
|
|
32
|
+
readonly slug?: string | undefined;
|
|
33
|
+
readonly headers?: {
|
|
34
|
+
readonly [x: string]: string;
|
|
35
|
+
} | undefined;
|
|
36
|
+
readonly introspectionJson?: string | undefined;
|
|
37
|
+
readonly queryParams?: {
|
|
38
|
+
readonly [x: string]: string;
|
|
39
|
+
} | undefined;
|
|
40
|
+
readonly authenticationTemplate?: readonly ({
|
|
41
|
+
readonly name: string;
|
|
42
|
+
readonly in: "header" | "query";
|
|
43
|
+
readonly slug: string;
|
|
44
|
+
readonly kind: "apiKey";
|
|
45
|
+
readonly prefix?: string | undefined;
|
|
46
|
+
} | {
|
|
47
|
+
readonly slug: string;
|
|
48
|
+
readonly kind: "oauth2";
|
|
49
|
+
readonly header?: string | undefined;
|
|
50
|
+
readonly prefix?: string | undefined;
|
|
51
|
+
})[] | undefined;
|
|
52
|
+
};
|
|
53
|
+
readonly responseMode?: "decoded-only" | undefined;
|
|
54
|
+
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: string;
|
|
57
|
+
readonly slug: string;
|
|
58
|
+
}, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").GraphqlIntrospectionError | import("../sdk").GraphqlExtractionError>;
|
|
59
|
+
export declare const graphqlConfigure: Atom.AtomResultFn<{
|
|
60
|
+
readonly params: {
|
|
61
|
+
readonly slug: string;
|
|
62
|
+
};
|
|
63
|
+
readonly payload: {
|
|
64
|
+
readonly authenticationTemplate: readonly ({
|
|
65
|
+
readonly name: string;
|
|
66
|
+
readonly in: "header" | "query";
|
|
67
|
+
readonly slug: string;
|
|
68
|
+
readonly kind: "apiKey";
|
|
69
|
+
readonly prefix?: string | undefined;
|
|
70
|
+
} | {
|
|
71
|
+
readonly slug: string;
|
|
72
|
+
readonly kind: "oauth2";
|
|
73
|
+
readonly header?: string | undefined;
|
|
74
|
+
readonly prefix?: string | undefined;
|
|
75
|
+
})[];
|
|
76
|
+
readonly mode?: "replace" | "merge" | undefined;
|
|
77
|
+
};
|
|
78
|
+
readonly responseMode?: "decoded-only" | undefined;
|
|
79
|
+
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
80
|
+
}, {
|
|
81
|
+
readonly authenticationTemplate: readonly ({
|
|
82
|
+
readonly name: string;
|
|
83
|
+
readonly in: "header" | "query";
|
|
84
|
+
readonly slug: string;
|
|
85
|
+
readonly kind: "apiKey";
|
|
86
|
+
readonly prefix?: string | undefined;
|
|
87
|
+
} | {
|
|
88
|
+
readonly slug: string;
|
|
89
|
+
readonly kind: "oauth2";
|
|
90
|
+
readonly header?: string | undefined;
|
|
91
|
+
readonly prefix?: string | undefined;
|
|
92
|
+
})[];
|
|
93
|
+
}, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").GraphqlIntrospectionError | import("../sdk").GraphqlExtractionError>;
|
|
94
|
+
export declare const addGraphqlIntegrationOptimistic: Atom.AtomResultFn<{
|
|
95
|
+
readonly payload: {
|
|
96
|
+
readonly endpoint: string;
|
|
97
|
+
readonly name?: string | undefined;
|
|
98
|
+
readonly slug?: string | undefined;
|
|
99
|
+
readonly headers?: {
|
|
100
|
+
readonly [x: string]: string;
|
|
101
|
+
} | undefined;
|
|
102
|
+
readonly introspectionJson?: string | undefined;
|
|
103
|
+
readonly queryParams?: {
|
|
104
|
+
readonly [x: string]: string;
|
|
105
|
+
} | undefined;
|
|
106
|
+
readonly authenticationTemplate?: readonly ({
|
|
107
|
+
readonly name: string;
|
|
108
|
+
readonly in: "header" | "query";
|
|
109
|
+
readonly slug: string;
|
|
110
|
+
readonly kind: "apiKey";
|
|
111
|
+
readonly prefix?: string | undefined;
|
|
112
|
+
} | {
|
|
113
|
+
readonly slug: string;
|
|
114
|
+
readonly kind: "oauth2";
|
|
115
|
+
readonly header?: string | undefined;
|
|
116
|
+
readonly prefix?: string | undefined;
|
|
117
|
+
})[] | undefined;
|
|
118
|
+
};
|
|
119
|
+
readonly responseMode?: "decoded-only" | undefined;
|
|
120
|
+
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: string;
|
|
123
|
+
readonly slug: string;
|
|
124
|
+
}, import("@executor-js/sdk").IntegrationAlreadyExistsError | import("@executor-js/sdk").InternalError | import("../sdk").GraphqlIntrospectionError | import("../sdk").GraphqlExtractionError>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AuthMethod, Placement } from "@executor-js/react/lib/auth-placements";
|
|
2
|
+
import type { AuthTemplate } from "../sdk/types";
|
|
3
|
+
/** Map each stored GraphQL auth template to a generic `AuthMethod`. A `custom_`
|
|
4
|
+
* slug marks a user-defined method; everything else is spec-declared. */
|
|
5
|
+
export declare function authMethodsFromConfig(templates: readonly AuthTemplate[]): AuthMethod[];
|
|
6
|
+
/** Build GraphQL `apiKey` templates from generic placements. The optional
|
|
7
|
+
* `slug` names the FIRST emitted template (subsequent placements get an empty
|
|
8
|
+
* slug so the backend assigns a `custom_<id>` each). */
|
|
9
|
+
export declare function graphqlTemplatesFromPlacements(placements: readonly Placement[], slug?: string): AuthTemplate[];
|