@executor-js/plugin-graphql 1.5.6 → 1.5.8
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 → AddGraphqlSource-FGT7DNXV.js} +39 -64
- package/dist/AddGraphqlSource-FGT7DNXV.js.map +1 -0
- package/dist/{EditGraphqlSource-FVF67CTP.js → EditGraphqlSource-QELISUYT.js} +4 -4
- package/dist/GraphqlAccountsPanel-U62WSGHR.js +9 -0
- package/dist/api/group.d.ts +54 -21
- package/dist/api/handlers.d.ts +1 -1
- package/dist/api/index.d.ts +55 -22
- package/dist/{chunk-N5GJE7R6.js → chunk-732HGFSH.js} +57 -21
- package/dist/chunk-732HGFSH.js.map +1 -0
- package/dist/{chunk-2Y3J3CVO.js → chunk-HN5FB4DO.js} +35 -55
- package/dist/chunk-HN5FB4DO.js.map +1 -0
- package/dist/{chunk-VCYDSSIK.js → chunk-OGNJZCEF.js} +27 -28
- package/dist/chunk-OGNJZCEF.js.map +1 -0
- package/dist/{chunk-ADQTI2OK.js → chunk-OUZI3QNC.js} +119 -124
- package/dist/chunk-OUZI3QNC.js.map +1 -0
- package/dist/client.js +3 -3
- package/dist/core.js +124 -10
- package/dist/core.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/react/atoms.d.ts +83 -29
- package/dist/react/auth-method-config.d.ts +21 -8
- package/dist/react/client.d.ts +54 -21
- package/dist/react/defaults.d.ts +0 -11
- package/dist/sdk/index.d.ts +4 -1
- package/dist/sdk/introspection-blob-migration.d.ts +7 -0
- package/dist/sdk/migrate-config.d.ts +6 -0
- package/dist/sdk/plugin.d.ts +49 -22
- package/dist/sdk/store.d.ts +11 -1
- package/dist/sdk/types.d.ts +102 -47
- package/package.json +3 -3
- package/dist/AddGraphqlSource-P3D3UXRJ.js.map +0 -1
- package/dist/GraphqlAccountsPanel-GBNFHLFH.js +0 -9
- package/dist/chunk-2Y3J3CVO.js.map +0 -1
- package/dist/chunk-ADQTI2OK.js.map +0 -1
- package/dist/chunk-N5GJE7R6.js.map +0 -1
- package/dist/chunk-VCYDSSIK.js.map +0 -1
- /package/dist/{EditGraphqlSource-FVF67CTP.js.map → EditGraphqlSource-QELISUYT.js.map} +0 -0
- /package/dist/{GraphqlAccountsPanel-GBNFHLFH.js.map → GraphqlAccountsPanel-U62WSGHR.js.map} +0 -0
package/dist/react/atoms.d.ts
CHANGED
|
@@ -6,11 +6,19 @@ export declare const graphqlConfigAtom: (slug: IntegrationSlug) => Atom.Atom<Asy
|
|
|
6
6
|
readonly name: string;
|
|
7
7
|
readonly endpoint: string;
|
|
8
8
|
readonly authenticationTemplate: readonly ({
|
|
9
|
-
readonly name: string;
|
|
10
|
-
readonly in: "header" | "query";
|
|
11
9
|
readonly slug: string;
|
|
12
|
-
readonly kind: "
|
|
13
|
-
readonly
|
|
10
|
+
readonly kind: "apikey";
|
|
11
|
+
readonly placements: readonly {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly carrier: "header" | "query";
|
|
14
|
+
readonly variable?: string | undefined;
|
|
15
|
+
readonly prefix?: string | undefined;
|
|
16
|
+
readonly literal?: string | undefined;
|
|
17
|
+
}[];
|
|
18
|
+
readonly label?: string | undefined;
|
|
19
|
+
} | {
|
|
20
|
+
readonly slug: string;
|
|
21
|
+
readonly kind: "none";
|
|
14
22
|
} | {
|
|
15
23
|
readonly slug: string;
|
|
16
24
|
readonly kind: "oauth2";
|
|
@@ -20,7 +28,6 @@ export declare const graphqlConfigAtom: (slug: IntegrationSlug) => Atom.Atom<Asy
|
|
|
20
28
|
readonly headers?: {
|
|
21
29
|
readonly [x: string]: string;
|
|
22
30
|
} | undefined;
|
|
23
|
-
readonly introspectionJson?: string | undefined;
|
|
24
31
|
readonly queryParams?: {
|
|
25
32
|
readonly [x: string]: string;
|
|
26
33
|
} | undefined;
|
|
@@ -33,22 +40,35 @@ export declare const addGraphqlIntegration: Atom.AtomResultFn<{
|
|
|
33
40
|
readonly headers?: {
|
|
34
41
|
readonly [x: string]: string;
|
|
35
42
|
} | undefined;
|
|
36
|
-
readonly introspectionJson?: string | undefined;
|
|
37
43
|
readonly queryParams?: {
|
|
38
44
|
readonly [x: string]: string;
|
|
39
45
|
} | undefined;
|
|
40
46
|
readonly authenticationTemplate?: readonly ({
|
|
41
|
-
readonly
|
|
42
|
-
readonly
|
|
43
|
-
readonly
|
|
44
|
-
readonly
|
|
45
|
-
|
|
47
|
+
readonly type: "apiKey";
|
|
48
|
+
readonly slug?: string | undefined;
|
|
49
|
+
readonly label?: string | undefined;
|
|
50
|
+
readonly headers?: {
|
|
51
|
+
readonly [x: string]: string | readonly (string | {
|
|
52
|
+
readonly name: string;
|
|
53
|
+
readonly type: "variable";
|
|
54
|
+
})[];
|
|
55
|
+
} | undefined;
|
|
56
|
+
readonly queryParams?: {
|
|
57
|
+
readonly [x: string]: string | readonly (string | {
|
|
58
|
+
readonly name: string;
|
|
59
|
+
readonly type: "variable";
|
|
60
|
+
})[];
|
|
61
|
+
} | undefined;
|
|
62
|
+
} | {
|
|
63
|
+
readonly kind: "none";
|
|
64
|
+
readonly slug?: string | undefined;
|
|
46
65
|
} | {
|
|
47
|
-
readonly slug: string;
|
|
48
66
|
readonly kind: "oauth2";
|
|
49
67
|
readonly header?: string | undefined;
|
|
68
|
+
readonly slug?: string | undefined;
|
|
50
69
|
readonly prefix?: string | undefined;
|
|
51
70
|
})[] | undefined;
|
|
71
|
+
readonly introspectionJson?: string | undefined;
|
|
52
72
|
};
|
|
53
73
|
readonly responseMode?: "decoded-only" | undefined;
|
|
54
74
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
@@ -62,15 +82,28 @@ export declare const graphqlConfigure: Atom.AtomResultFn<{
|
|
|
62
82
|
};
|
|
63
83
|
readonly payload: {
|
|
64
84
|
readonly authenticationTemplate: readonly ({
|
|
65
|
-
readonly
|
|
66
|
-
readonly
|
|
67
|
-
readonly
|
|
68
|
-
readonly
|
|
69
|
-
|
|
85
|
+
readonly type: "apiKey";
|
|
86
|
+
readonly slug?: string | undefined;
|
|
87
|
+
readonly label?: string | undefined;
|
|
88
|
+
readonly headers?: {
|
|
89
|
+
readonly [x: string]: string | readonly (string | {
|
|
90
|
+
readonly name: string;
|
|
91
|
+
readonly type: "variable";
|
|
92
|
+
})[];
|
|
93
|
+
} | undefined;
|
|
94
|
+
readonly queryParams?: {
|
|
95
|
+
readonly [x: string]: string | readonly (string | {
|
|
96
|
+
readonly name: string;
|
|
97
|
+
readonly type: "variable";
|
|
98
|
+
})[];
|
|
99
|
+
} | undefined;
|
|
100
|
+
} | {
|
|
101
|
+
readonly kind: "none";
|
|
102
|
+
readonly slug?: string | undefined;
|
|
70
103
|
} | {
|
|
71
|
-
readonly slug: string;
|
|
72
104
|
readonly kind: "oauth2";
|
|
73
105
|
readonly header?: string | undefined;
|
|
106
|
+
readonly slug?: string | undefined;
|
|
74
107
|
readonly prefix?: string | undefined;
|
|
75
108
|
})[];
|
|
76
109
|
readonly mode?: "replace" | "merge" | undefined;
|
|
@@ -79,11 +112,19 @@ export declare const graphqlConfigure: Atom.AtomResultFn<{
|
|
|
79
112
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
80
113
|
}, {
|
|
81
114
|
readonly authenticationTemplate: readonly ({
|
|
82
|
-
readonly name: string;
|
|
83
|
-
readonly in: "header" | "query";
|
|
84
115
|
readonly slug: string;
|
|
85
|
-
readonly kind: "
|
|
86
|
-
readonly
|
|
116
|
+
readonly kind: "apikey";
|
|
117
|
+
readonly placements: readonly {
|
|
118
|
+
readonly name: string;
|
|
119
|
+
readonly carrier: "header" | "query";
|
|
120
|
+
readonly variable?: string | undefined;
|
|
121
|
+
readonly prefix?: string | undefined;
|
|
122
|
+
readonly literal?: string | undefined;
|
|
123
|
+
}[];
|
|
124
|
+
readonly label?: string | undefined;
|
|
125
|
+
} | {
|
|
126
|
+
readonly slug: string;
|
|
127
|
+
readonly kind: "none";
|
|
87
128
|
} | {
|
|
88
129
|
readonly slug: string;
|
|
89
130
|
readonly kind: "oauth2";
|
|
@@ -99,22 +140,35 @@ export declare const addGraphqlIntegrationOptimistic: Atom.AtomResultFn<{
|
|
|
99
140
|
readonly headers?: {
|
|
100
141
|
readonly [x: string]: string;
|
|
101
142
|
} | undefined;
|
|
102
|
-
readonly introspectionJson?: string | undefined;
|
|
103
143
|
readonly queryParams?: {
|
|
104
144
|
readonly [x: string]: string;
|
|
105
145
|
} | undefined;
|
|
106
146
|
readonly authenticationTemplate?: readonly ({
|
|
107
|
-
readonly
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
readonly
|
|
111
|
-
|
|
147
|
+
readonly type: "apiKey";
|
|
148
|
+
readonly slug?: string | undefined;
|
|
149
|
+
readonly label?: string | undefined;
|
|
150
|
+
readonly headers?: {
|
|
151
|
+
readonly [x: string]: string | readonly (string | {
|
|
152
|
+
readonly name: string;
|
|
153
|
+
readonly type: "variable";
|
|
154
|
+
})[];
|
|
155
|
+
} | undefined;
|
|
156
|
+
readonly queryParams?: {
|
|
157
|
+
readonly [x: string]: string | readonly (string | {
|
|
158
|
+
readonly name: string;
|
|
159
|
+
readonly type: "variable";
|
|
160
|
+
})[];
|
|
161
|
+
} | undefined;
|
|
162
|
+
} | {
|
|
163
|
+
readonly kind: "none";
|
|
164
|
+
readonly slug?: string | undefined;
|
|
112
165
|
} | {
|
|
113
|
-
readonly slug: string;
|
|
114
166
|
readonly kind: "oauth2";
|
|
115
167
|
readonly header?: string | undefined;
|
|
168
|
+
readonly slug?: string | undefined;
|
|
116
169
|
readonly prefix?: string | undefined;
|
|
117
170
|
})[] | undefined;
|
|
171
|
+
readonly introspectionJson?: string | undefined;
|
|
118
172
|
};
|
|
119
173
|
readonly responseMode?: "decoded-only" | undefined;
|
|
120
174
|
readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
+
import type { AuthTemplateEditorValue } from "@executor-js/react/components/auth-template-editor";
|
|
1
2
|
import type { AuthMethod, Placement } from "@executor-js/react/lib/auth-placements";
|
|
2
|
-
import type {
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare function
|
|
3
|
+
import type { GraphqlAuthMethod, GraphqlAuthMethodInput, GraphqlCanonicalAuthMethodInput } from "../sdk/types";
|
|
4
|
+
/** Convert a generic editor value into one GraphQL auth-method input (no slug
|
|
5
|
+
* — the backend assigns carrier-derived slugs). An apikey value keeps every
|
|
6
|
+
* named placement (headers and query params mix freely); one with no usable
|
|
7
|
+
* placement falls back to `none`. */
|
|
8
|
+
export declare function graphqlAuthMethodInputFromEditorValue(value: AuthTemplateEditorValue): GraphqlAuthMethodInput;
|
|
9
|
+
/** Convert one stored GraphQL method into the generic editor value. */
|
|
10
|
+
export declare function editorValueFromGraphqlAuthMethod(method: GraphqlAuthMethod): AuthTemplateEditorValue;
|
|
11
|
+
/** Project the stored methods into the generic `AuthMethod[]` the hub renders.
|
|
12
|
+
* Mirrors the server's `describeGraphqlAuthMethods`; `custom_` slugs mark
|
|
13
|
+
* user-created methods (removable from the hub). */
|
|
14
|
+
export declare function authMethodsFromConfig(methods: readonly GraphqlAuthMethod[]): AuthMethod[];
|
|
15
|
+
/** Build the GraphQL method input for a custom method from generic placements
|
|
16
|
+
* — ONE method carrying every named placement (header + query mix in a single
|
|
17
|
+
* method; each placement renders from its own input variable, or shares one).
|
|
18
|
+
* Empty when no placement is usable. */
|
|
19
|
+
export declare function graphqlAuthMethodInputsFromPlacements(placements: readonly Placement[]): GraphqlAuthMethodInput[];
|
|
20
|
+
/** Serialize a canonical method into the wire input union (apikey → the
|
|
21
|
+
* request-shaped dialect; none/oauth2 pass through). */
|
|
22
|
+
export declare const graphqlWireAuthInput: (method: GraphqlAuthMethod | GraphqlCanonicalAuthMethodInput) => GraphqlAuthMethodInput;
|
package/dist/react/client.d.ts
CHANGED
|
@@ -6,16 +6,25 @@ export declare const GraphqlClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
6
6
|
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
7
7
|
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
8
8
|
readonly authenticationTemplate: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly in: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
12
|
-
readonly name: import("effect/Schema").String;
|
|
13
|
-
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
9
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
10
|
+
readonly kind: import("effect/Schema").Literal<"none">;
|
|
14
11
|
}>, import("effect/Schema").Struct<{
|
|
12
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
15
13
|
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
16
|
-
readonly slug: import("effect/Schema").String;
|
|
17
14
|
readonly header: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
18
15
|
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
16
|
+
}>, import("effect/Schema").Struct<{
|
|
17
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
18
|
+
readonly type: import("effect/Schema").Literal<"apiKey">;
|
|
19
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
20
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
21
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
22
|
+
readonly name: import("effect/Schema").String;
|
|
23
|
+
}>]>>]>>>;
|
|
24
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
25
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
26
|
+
readonly name: import("effect/Schema").String;
|
|
27
|
+
}>]>>]>>>;
|
|
19
28
|
}>]>>>;
|
|
20
29
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
21
30
|
readonly slug: import("effect/Schema").String;
|
|
@@ -67,15 +76,22 @@ export declare const GraphqlClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
67
76
|
}>>, 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<{
|
|
68
77
|
readonly endpoint: import("effect/Schema").String;
|
|
69
78
|
readonly name: import("effect/Schema").String;
|
|
70
|
-
readonly introspectionJson: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
71
79
|
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
72
80
|
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
73
81
|
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
74
|
-
readonly kind: import("effect/Schema").Literal<"apiKey">;
|
|
75
82
|
readonly slug: import("effect/Schema").String;
|
|
76
|
-
readonly
|
|
77
|
-
|
|
78
|
-
readonly
|
|
83
|
+
readonly kind: import("effect/Schema").Literal<"none">;
|
|
84
|
+
}>, import("effect/Schema").Struct<{
|
|
85
|
+
readonly slug: import("effect/Schema").String;
|
|
86
|
+
readonly kind: import("effect/Schema").Literal<"apikey">;
|
|
87
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
88
|
+
readonly placements: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
89
|
+
readonly carrier: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
90
|
+
readonly name: import("effect/Schema").String;
|
|
91
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
92
|
+
readonly variable: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
93
|
+
readonly literal: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
94
|
+
}>>;
|
|
79
95
|
}>, import("effect/Schema").Struct<{
|
|
80
96
|
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
81
97
|
readonly slug: import("effect/Schema").String;
|
|
@@ -106,25 +122,42 @@ export declare const GraphqlClient: import("effect/unstable/reactivity/AtomHttpA
|
|
|
106
122
|
slug: import("effect/Schema").String;
|
|
107
123
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
108
124
|
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
109
|
-
readonly
|
|
110
|
-
readonly
|
|
111
|
-
readonly in: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
112
|
-
readonly name: import("effect/Schema").String;
|
|
113
|
-
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
125
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
126
|
+
readonly kind: import("effect/Schema").Literal<"none">;
|
|
114
127
|
}>, import("effect/Schema").Struct<{
|
|
128
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
115
129
|
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
116
|
-
readonly slug: import("effect/Schema").String;
|
|
117
130
|
readonly header: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
118
131
|
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
132
|
+
}>, import("effect/Schema").Struct<{
|
|
133
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
134
|
+
readonly type: import("effect/Schema").Literal<"apiKey">;
|
|
135
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
136
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
137
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
138
|
+
readonly name: import("effect/Schema").String;
|
|
139
|
+
}>]>>]>>>;
|
|
140
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
141
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
142
|
+
readonly name: import("effect/Schema").String;
|
|
143
|
+
}>]>>]>>>;
|
|
119
144
|
}>]>>;
|
|
120
145
|
readonly mode: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["merge", "replace"]>>;
|
|
121
146
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
122
147
|
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
123
|
-
readonly kind: import("effect/Schema").Literal<"apiKey">;
|
|
124
148
|
readonly slug: import("effect/Schema").String;
|
|
125
|
-
readonly
|
|
126
|
-
|
|
127
|
-
readonly
|
|
149
|
+
readonly kind: import("effect/Schema").Literal<"none">;
|
|
150
|
+
}>, import("effect/Schema").Struct<{
|
|
151
|
+
readonly slug: import("effect/Schema").String;
|
|
152
|
+
readonly kind: import("effect/Schema").Literal<"apikey">;
|
|
153
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
154
|
+
readonly placements: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
155
|
+
readonly carrier: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
156
|
+
readonly name: import("effect/Schema").String;
|
|
157
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
158
|
+
readonly variable: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
159
|
+
readonly literal: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
160
|
+
}>>;
|
|
128
161
|
}>, import("effect/Schema").Struct<{
|
|
129
162
|
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
130
163
|
readonly slug: import("effect/Schema").String;
|
package/dist/react/defaults.d.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import type { ConnectionName, Owner } from "@executor-js/sdk/shared";
|
|
2
|
-
/** The slug of the apiKey auth template the add flow declares + targets. */
|
|
3
|
-
export declare const GRAPHQL_APIKEY_TEMPLATE = "apiKey";
|
|
4
|
-
/** Build the apiKey auth template the integration stores. The connection's
|
|
5
|
-
* value is written to `headerName` at invoke time (no prefix — the user pastes
|
|
6
|
-
* the full header value, e.g. `Bearer ghp_…`). */
|
|
7
|
-
export declare const graphqlApiKeyAuthTemplate: (headerName: string) => {
|
|
8
|
-
readonly kind: "apiKey";
|
|
9
|
-
readonly slug: string;
|
|
10
|
-
readonly in: "header";
|
|
11
|
-
readonly name: string;
|
|
12
|
-
};
|
|
13
2
|
/** Deterministic connection name for a GraphQL integration + owner. Keeps a
|
|
14
3
|
* single owner-scoped credential per integration so re-adding overwrites
|
|
15
4
|
* rather than accumulating duplicates. */
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -4,4 +4,7 @@ export { invoke, invokeWithLayer } from "./invoke";
|
|
|
4
4
|
export { describeGraphqlAuthMethods, graphqlPlugin, type GraphqlPluginExtension, type GraphqlPluginOptions, type GraphqlAddIntegrationInput, type GraphqlConfigureInput, type GraphqlConfigureAuthInput, } from "./plugin";
|
|
5
5
|
export { makeDefaultGraphqlStore, type GraphqlStore, type StoredOperation } from "./store";
|
|
6
6
|
export { GraphqlIntrospectionError, GraphqlExtractionError, GraphqlInvocationError, GraphqlAuthRequiredError, } from "./errors";
|
|
7
|
-
export {
|
|
7
|
+
export { decodeGraphqlIntegrationConfig, decodeGraphqlIntegrationConfigOption, ExtractedField, ExtractionResult, GraphqlArgument, GraphqlAuthMethod, GraphqlAuthMethodInput, GraphqlIntegrationConfig, GraphqlOAuthMethod, GraphqlOperationKind, InvocationResult, normalizeGraphqlAuthMethods, OperationBinding, } from "./types";
|
|
8
|
+
export { migrateGraphqlAuthConfig } from "./migrate-config";
|
|
9
|
+
export { graphqlIntrospectionBlobDataMigration } from "./introspection-blob-migration";
|
|
10
|
+
export { variable, type ApiKeyAuthTemplate } from "@executor-js/sdk/http-auth";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { type SqliteDataMigrationClient } from "@executor-js/sdk/core";
|
|
3
|
+
/** Registry entry for the boot-time data-migration ledger. */
|
|
4
|
+
export declare const graphqlIntrospectionBlobDataMigration: {
|
|
5
|
+
name: string;
|
|
6
|
+
run: (client: SqliteDataMigrationClient) => Effect.Effect<void, import("@executor-js/sdk/core").DataMigrationError, never>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Rewrite a stored GraphQL integration config blob into the canonical shape.
|
|
2
|
+
* Returns the rewritten config, or `null` when no rewrite is needed (already
|
|
3
|
+
* canonical, or not this plugin's shape at all). Throws nothing: an
|
|
4
|
+
* unmigratable blob also returns `null` and stays untouched. Idempotent —
|
|
5
|
+
* feeding the output back returns `null`. */
|
|
6
|
+
export declare const migrateGraphqlAuthConfig: (config: unknown) => unknown | null;
|
package/dist/sdk/plugin.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { HttpClient } from "effect/unstable/http";
|
|
|
4
4
|
import { IntegrationAlreadyExistsError, type AuthMethodDescriptor, type IntegrationRecord, type PluginCtx, type StorageFailure } from "@executor-js/sdk/core";
|
|
5
5
|
import { GraphqlIntrospectionError } from "./errors";
|
|
6
6
|
import { type GraphqlStore } from "./store";
|
|
7
|
-
import {
|
|
7
|
+
import { GraphqlIntegrationConfig, type GraphqlAuthMethod } from "./types";
|
|
8
8
|
/** Register a GraphQL integration in the catalog. `endpoint` is the GraphQL URL;
|
|
9
9
|
* `slug` (defaulted from the endpoint) is the catalog id; `introspectionJson`
|
|
10
10
|
* supplies the schema when the endpoint disables live introspection; `headers`
|
|
@@ -19,16 +19,25 @@ declare const GraphqlAddIntegrationInputSchema: Schema.Struct<{
|
|
|
19
19
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
20
20
|
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
21
21
|
readonly authenticationTemplate: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
25
|
-
readonly name: Schema.String;
|
|
26
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
22
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
23
|
+
readonly kind: Schema.Literal<"none">;
|
|
27
24
|
}>, Schema.Struct<{
|
|
25
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
28
26
|
readonly kind: Schema.Literal<"oauth2">;
|
|
29
|
-
readonly slug: Schema.String;
|
|
30
27
|
readonly header: Schema.optional<Schema.String>;
|
|
31
28
|
readonly prefix: Schema.optional<Schema.String>;
|
|
29
|
+
}>, Schema.Struct<{
|
|
30
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
31
|
+
readonly type: Schema.Literal<"apiKey">;
|
|
32
|
+
readonly label: Schema.optional<Schema.String>;
|
|
33
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
34
|
+
readonly type: Schema.Literal<"variable">;
|
|
35
|
+
readonly name: Schema.String;
|
|
36
|
+
}>]>>]>>>;
|
|
37
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
38
|
+
readonly type: Schema.Literal<"variable">;
|
|
39
|
+
readonly name: Schema.String;
|
|
40
|
+
}>]>>]>>>;
|
|
32
41
|
}>]>>>;
|
|
33
42
|
}>;
|
|
34
43
|
export type GraphqlAddIntegrationInput = typeof GraphqlAddIntegrationInputSchema.Type;
|
|
@@ -38,36 +47,54 @@ declare const GraphqlConfigureInputSchema: Schema.Struct<{
|
|
|
38
47
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
39
48
|
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
40
49
|
readonly authenticationTemplate: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
41
|
-
readonly
|
|
42
|
-
readonly
|
|
43
|
-
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
44
|
-
readonly name: Schema.String;
|
|
45
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
50
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
51
|
+
readonly kind: Schema.Literal<"none">;
|
|
46
52
|
}>, Schema.Struct<{
|
|
53
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
47
54
|
readonly kind: Schema.Literal<"oauth2">;
|
|
48
|
-
readonly slug: Schema.String;
|
|
49
55
|
readonly header: Schema.optional<Schema.String>;
|
|
50
56
|
readonly prefix: Schema.optional<Schema.String>;
|
|
57
|
+
}>, Schema.Struct<{
|
|
58
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
59
|
+
readonly type: Schema.Literal<"apiKey">;
|
|
60
|
+
readonly label: Schema.optional<Schema.String>;
|
|
61
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
62
|
+
readonly type: Schema.Literal<"variable">;
|
|
63
|
+
readonly name: Schema.String;
|
|
64
|
+
}>]>>]>>>;
|
|
65
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
66
|
+
readonly type: Schema.Literal<"variable">;
|
|
67
|
+
readonly name: Schema.String;
|
|
68
|
+
}>]>>]>>>;
|
|
51
69
|
}>]>>>;
|
|
52
70
|
}>;
|
|
53
71
|
export type GraphqlConfigureInput = typeof GraphqlConfigureInputSchema.Type;
|
|
54
72
|
/** Input for the custom-method-create flow (HTTP `POST /graphql/integrations/
|
|
55
73
|
* :slug/config`). Unlike `configure` (which REPLACES the whole config for the
|
|
56
|
-
* generic repair path), `configureAuth` MERGE-APPENDS these
|
|
74
|
+
* generic repair path), `configureAuth` MERGE-APPENDS these methods onto the
|
|
57
75
|
* integration's existing `authenticationTemplate`, mirroring OpenAPI's
|
|
58
76
|
* `configure`. */
|
|
59
77
|
declare const GraphqlConfigureAuthInputSchema: Schema.Struct<{
|
|
60
78
|
readonly authenticationTemplate: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
-
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
64
|
-
readonly name: Schema.String;
|
|
65
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
79
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
80
|
+
readonly kind: Schema.Literal<"none">;
|
|
66
81
|
}>, Schema.Struct<{
|
|
82
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
67
83
|
readonly kind: Schema.Literal<"oauth2">;
|
|
68
|
-
readonly slug: Schema.String;
|
|
69
84
|
readonly header: Schema.optional<Schema.String>;
|
|
70
85
|
readonly prefix: Schema.optional<Schema.String>;
|
|
86
|
+
}>, Schema.Struct<{
|
|
87
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
88
|
+
readonly type: Schema.Literal<"apiKey">;
|
|
89
|
+
readonly label: Schema.optional<Schema.String>;
|
|
90
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
91
|
+
readonly type: Schema.Literal<"variable">;
|
|
92
|
+
readonly name: Schema.String;
|
|
93
|
+
}>]>>]>>>;
|
|
94
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
95
|
+
readonly type: Schema.Literal<"variable">;
|
|
96
|
+
readonly name: Schema.String;
|
|
97
|
+
}>]>>]>>>;
|
|
71
98
|
}>]>>;
|
|
72
99
|
readonly mode: Schema.optional<Schema.Literals<readonly ["merge", "replace"]>>;
|
|
73
100
|
}>;
|
|
@@ -88,7 +115,7 @@ declare const makeGraphqlExtension: (ctx: PluginCtx<GraphqlStore>) => {
|
|
|
88
115
|
/** Read the integration's decoded config (auth templates surfaced). */
|
|
89
116
|
getConfig: (slug: string) => Effect.Effect<GraphqlIntegrationConfig | null, StorageFailure>;
|
|
90
117
|
/** Merge-append custom auth methods (custom-method-create flow). */
|
|
91
|
-
configureAuth: (slug: string, input: GraphqlConfigureAuthInput) => Effect.Effect<readonly
|
|
118
|
+
configureAuth: (slug: string, input: GraphqlConfigureAuthInput) => Effect.Effect<readonly GraphqlAuthMethod[], StorageFailure>;
|
|
92
119
|
removeIntegration: (slug: string) => Effect.Effect<void, StorageFailure, never>;
|
|
93
120
|
configure: (slug: string, input: GraphqlConfigureInput) => Effect.Effect<void, StorageFailure, never>;
|
|
94
121
|
};
|
|
@@ -108,7 +135,7 @@ export declare const graphqlPlugin: import("@executor-js/sdk/core").ConfiguredPl
|
|
|
108
135
|
/** Read the integration's decoded config (auth templates surfaced). */
|
|
109
136
|
getConfig: (slug: string) => Effect.Effect<GraphqlIntegrationConfig | null, StorageFailure>;
|
|
110
137
|
/** Merge-append custom auth methods (custom-method-create flow). */
|
|
111
|
-
configureAuth: (slug: string, input: GraphqlConfigureAuthInput) => Effect.Effect<readonly
|
|
138
|
+
configureAuth: (slug: string, input: GraphqlConfigureAuthInput) => Effect.Effect<readonly GraphqlAuthMethod[], StorageFailure>;
|
|
112
139
|
removeIntegration: (slug: string) => Effect.Effect<void, StorageFailure, never>;
|
|
113
140
|
configure: (slug: string, input: GraphqlConfigureInput) => Effect.Effect<void, StorageFailure, never>;
|
|
114
141
|
}, GraphqlStore, GraphqlPluginOptions, undefined, Layer.Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
|
package/dist/sdk/store.d.ts
CHANGED
|
@@ -8,11 +8,21 @@ export interface StoredOperation {
|
|
|
8
8
|
readonly integration: string;
|
|
9
9
|
readonly binding: OperationBinding;
|
|
10
10
|
}
|
|
11
|
+
/** Blob key for an introspection snapshot's content hash. Content-addressed
|
|
12
|
+
* so re-puts are idempotent and identical schemas share one blob per
|
|
13
|
+
* partition. */
|
|
14
|
+
export declare const introspectionBlobKey: (introspectionHash: string) => string;
|
|
11
15
|
export interface GraphqlStore {
|
|
12
16
|
/** Replace the stored operation bindings for an integration. */
|
|
13
17
|
readonly replaceOperations: (integration: string, operations: readonly StoredOperation[]) => Effect.Effect<void, StorageFailure>;
|
|
14
18
|
readonly getOperation: (integration: string, toolName: string) => Effect.Effect<StoredOperation | null, StorageFailure>;
|
|
15
19
|
readonly listOperations: (integration: string) => Effect.Effect<readonly StoredOperation[], StorageFailure>;
|
|
16
20
|
readonly removeOperations: (integration: string) => Effect.Effect<void, StorageFailure>;
|
|
21
|
+
/** Persist an introspection JSON snapshot under its content hash. Org-owned
|
|
22
|
+
* and content-addressed; never removed on integration removal because
|
|
23
|
+
* another integration in the tenant may share the hash. */
|
|
24
|
+
readonly putIntrospection: (introspectionHash: string, introspectionJson: string) => Effect.Effect<void, StorageFailure>;
|
|
25
|
+
/** Load an introspection snapshot by content hash; null when absent. */
|
|
26
|
+
readonly getIntrospection: (introspectionHash: string) => Effect.Effect<string | null, StorageFailure>;
|
|
17
27
|
}
|
|
18
|
-
export declare const makeDefaultGraphqlStore: ({ pluginStorage }: StorageDeps) => GraphqlStore;
|
|
28
|
+
export declare const makeDefaultGraphqlStore: ({ pluginStorage, blobs }: StorageDeps) => GraphqlStore;
|