@executor-js/plugin-graphql 0.0.2 → 0.2.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-LGXJQEAR.js +239 -0
- package/dist/AddGraphqlSource-LGXJQEAR.js.map +1 -0
- package/dist/EditGraphqlSource-5Y47ZAZ7.js +251 -0
- package/dist/EditGraphqlSource-5Y47ZAZ7.js.map +1 -0
- package/dist/GraphqlSourceSummary-F3JWR4YN.js +70 -0
- package/dist/GraphqlSourceSummary-F3JWR4YN.js.map +1 -0
- package/dist/api/group.d.ts +169 -13
- package/dist/api/handlers.d.ts +15 -3
- package/dist/api/index.d.ts +410 -0
- package/dist/chunk-7QSGNR4C.js +162 -0
- package/dist/chunk-7QSGNR4C.js.map +1 -0
- package/dist/chunk-HDPYOBBG.js +1633 -0
- package/dist/chunk-HDPYOBBG.js.map +1 -0
- package/dist/chunk-M4SJY6CB.js +45 -0
- package/dist/chunk-M4SJY6CB.js.map +1 -0
- package/dist/chunk-WPRU5C6M.js +182 -0
- package/dist/chunk-WPRU5C6M.js.map +1 -0
- package/dist/client.js +75 -0
- package/dist/client.js.map +1 -0
- package/dist/core.js +32 -10
- package/dist/index.js +2 -1
- package/dist/react/GraphqlSourceFields.d.ts +8 -0
- package/dist/react/GraphqlSourceSummary.d.ts +3 -1
- package/dist/react/atoms.d.ts +170 -10
- package/dist/react/client.d.ts +160 -341
- package/dist/react/plugin-client.d.ts +2 -0
- package/dist/react/source-plugin.d.ts +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/introspect.d.ts +437 -43
- package/dist/sdk/invoke.d.ts +3 -2
- package/dist/sdk/plugin.d.ts +121 -55
- package/dist/sdk/store.d.ts +84 -11
- package/dist/sdk/types.d.ts +107 -3
- package/dist/testing/index.d.ts +52 -0
- package/dist/testing.js +131 -0
- package/dist/testing.js.map +1 -0
- package/package.json +18 -4
- package/dist/chunk-ILBZO52O.js +0 -1090
- package/dist/chunk-ILBZO52O.js.map +0 -1
package/dist/api/index.d.ts
CHANGED
|
@@ -1,2 +1,412 @@
|
|
|
1
|
+
import { type GraphqlPluginOptions } from "../sdk/plugin";
|
|
2
|
+
import { GraphqlExtensionService } from "./handlers";
|
|
1
3
|
export { GraphqlGroup } from "./group";
|
|
2
4
|
export { GraphqlHandlers, GraphqlExtensionService } from "./handlers";
|
|
5
|
+
export declare const graphqlHttpPlugin: import("@executor-js/sdk/core").ConfiguredPlugin<"graphql", {
|
|
6
|
+
addSource: (config: import("../sdk").GraphqlSourceConfig) => import("effect/Effect").Effect<{
|
|
7
|
+
toolCount: number;
|
|
8
|
+
namespace: string;
|
|
9
|
+
}, import("@executor-js/storage-core").StorageFailure | import("../sdk").GraphqlIntrospectionError | import("../sdk").GraphqlExtractionError, never>;
|
|
10
|
+
removeSource: (namespace: string, scope: string) => import("effect/Effect").Effect<void, import("@executor-js/storage-core").StorageFailure, never>;
|
|
11
|
+
getSource: (namespace: string, scope: string) => import("effect/Effect").Effect<import("../sdk").StoredGraphqlSource | null, import("@executor-js/storage-core").StorageFailure, never>;
|
|
12
|
+
updateSource: (namespace: string, scope: string, input: import("../sdk").GraphqlUpdateSourceInput) => import("effect/Effect").Effect<void, import("@executor-js/storage-core").StorageFailure | import("../sdk").GraphqlIntrospectionError, never>;
|
|
13
|
+
listSourceBindings: (sourceId: string, sourceScope: string) => import("effect/Effect").Effect<readonly import("../sdk").GraphqlSourceBindingRef[], import("@executor-js/storage-core").StorageFailure, never>;
|
|
14
|
+
setSourceBinding: (input: import("../sdk").GraphqlSourceBindingInput) => import("effect/Effect").Effect<import("../sdk").GraphqlSourceBindingRef, import("@executor-js/storage-core").StorageFailure, never>;
|
|
15
|
+
removeSourceBinding: (sourceId: string, sourceScope: string, slot: string, scope: string) => import("effect/Effect").Effect<void, import("@executor-js/storage-core").StorageFailure, never>;
|
|
16
|
+
}, import("../sdk").GraphqlStore, GraphqlPluginOptions, {
|
|
17
|
+
readonly graphql_source: {
|
|
18
|
+
readonly fields: {
|
|
19
|
+
readonly id: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly required: true;
|
|
22
|
+
};
|
|
23
|
+
readonly scope_id: {
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly required: true;
|
|
26
|
+
readonly index: true;
|
|
27
|
+
};
|
|
28
|
+
readonly name: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
readonly required: true;
|
|
31
|
+
};
|
|
32
|
+
readonly endpoint: {
|
|
33
|
+
readonly type: "string";
|
|
34
|
+
readonly required: true;
|
|
35
|
+
};
|
|
36
|
+
readonly auth_kind: {
|
|
37
|
+
readonly type: ["none", "oauth2"];
|
|
38
|
+
readonly required: true;
|
|
39
|
+
readonly defaultValue: "none";
|
|
40
|
+
};
|
|
41
|
+
readonly auth_connection_slot: {
|
|
42
|
+
readonly type: "string";
|
|
43
|
+
readonly required: false;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
readonly graphql_source_header: {
|
|
48
|
+
readonly fields: {
|
|
49
|
+
readonly id: {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
readonly required: true;
|
|
52
|
+
};
|
|
53
|
+
readonly scope_id: {
|
|
54
|
+
readonly type: "string";
|
|
55
|
+
readonly required: true;
|
|
56
|
+
readonly index: true;
|
|
57
|
+
};
|
|
58
|
+
readonly source_id: {
|
|
59
|
+
readonly type: "string";
|
|
60
|
+
readonly required: true;
|
|
61
|
+
readonly index: true;
|
|
62
|
+
};
|
|
63
|
+
readonly name: {
|
|
64
|
+
readonly type: "string";
|
|
65
|
+
readonly required: true;
|
|
66
|
+
};
|
|
67
|
+
readonly kind: {
|
|
68
|
+
readonly type: ["text", "binding"];
|
|
69
|
+
readonly required: true;
|
|
70
|
+
};
|
|
71
|
+
readonly text_value: {
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
readonly required: false;
|
|
74
|
+
};
|
|
75
|
+
readonly slot_key: {
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
readonly required: false;
|
|
78
|
+
};
|
|
79
|
+
readonly prefix: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
readonly required: false;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
readonly graphql_source_query_param: {
|
|
86
|
+
readonly fields: {
|
|
87
|
+
readonly id: {
|
|
88
|
+
readonly type: "string";
|
|
89
|
+
readonly required: true;
|
|
90
|
+
};
|
|
91
|
+
readonly scope_id: {
|
|
92
|
+
readonly type: "string";
|
|
93
|
+
readonly required: true;
|
|
94
|
+
readonly index: true;
|
|
95
|
+
};
|
|
96
|
+
readonly source_id: {
|
|
97
|
+
readonly type: "string";
|
|
98
|
+
readonly required: true;
|
|
99
|
+
readonly index: true;
|
|
100
|
+
};
|
|
101
|
+
readonly name: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
readonly required: true;
|
|
104
|
+
};
|
|
105
|
+
readonly kind: {
|
|
106
|
+
readonly type: ["text", "binding"];
|
|
107
|
+
readonly required: true;
|
|
108
|
+
};
|
|
109
|
+
readonly text_value: {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
readonly required: false;
|
|
112
|
+
};
|
|
113
|
+
readonly slot_key: {
|
|
114
|
+
readonly type: "string";
|
|
115
|
+
readonly required: false;
|
|
116
|
+
};
|
|
117
|
+
readonly prefix: {
|
|
118
|
+
readonly type: "string";
|
|
119
|
+
readonly required: false;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
readonly graphql_operation: {
|
|
124
|
+
readonly fields: {
|
|
125
|
+
readonly id: {
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
readonly required: true;
|
|
128
|
+
};
|
|
129
|
+
readonly scope_id: {
|
|
130
|
+
readonly type: "string";
|
|
131
|
+
readonly required: true;
|
|
132
|
+
readonly index: true;
|
|
133
|
+
};
|
|
134
|
+
readonly source_id: {
|
|
135
|
+
readonly type: "string";
|
|
136
|
+
readonly required: true;
|
|
137
|
+
readonly index: true;
|
|
138
|
+
};
|
|
139
|
+
readonly binding: {
|
|
140
|
+
readonly type: "json";
|
|
141
|
+
readonly required: true;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
}, 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<"addSource", "POST", "/scopes/:scopeId/graphql/sources", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
146
|
+
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
147
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
148
|
+
readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
149
|
+
readonly endpoint: import("effect/Schema").String;
|
|
150
|
+
readonly name: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
151
|
+
readonly introspectionJson: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
152
|
+
readonly namespace: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
153
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
154
|
+
readonly secretId: import("effect/Schema").String;
|
|
155
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
156
|
+
readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
157
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
158
|
+
}>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
159
|
+
readonly secretId: import("effect/Schema").String;
|
|
160
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
161
|
+
}>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
162
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
163
|
+
readonly slot: import("effect/Schema").String;
|
|
164
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
165
|
+
}>]>]>>>;
|
|
166
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
167
|
+
readonly secretId: import("effect/Schema").String;
|
|
168
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
169
|
+
readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
170
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
171
|
+
}>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
172
|
+
readonly secretId: import("effect/Schema").String;
|
|
173
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
174
|
+
}>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
175
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
176
|
+
readonly slot: import("effect/Schema").String;
|
|
177
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
178
|
+
}>]>]>>>;
|
|
179
|
+
readonly credentialTargetScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
180
|
+
readonly auth: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
181
|
+
readonly kind: import("effect/Schema").Literal<"none">;
|
|
182
|
+
}>, import("effect/Schema").Struct<{
|
|
183
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
184
|
+
readonly connectionSlot: import("effect/Schema").String;
|
|
185
|
+
}>]>, import("effect/Schema").Struct<{
|
|
186
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
187
|
+
readonly connectionId: import("effect/Schema").String;
|
|
188
|
+
}>]>>;
|
|
189
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
190
|
+
readonly toolCount: import("effect/Schema").Number;
|
|
191
|
+
readonly namespace: import("effect/Schema").String;
|
|
192
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
|
|
193
|
+
readonly message: string;
|
|
194
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
195
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
196
|
+
readonly message: import("effect/Schema").String;
|
|
197
|
+
}>], {
|
|
198
|
+
readonly message: string;
|
|
199
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
200
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
201
|
+
readonly message: import("effect/Schema").String;
|
|
202
|
+
}>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
|
|
203
|
+
readonly message: string;
|
|
204
|
+
readonly _tag: "GraphqlExtractionError";
|
|
205
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
206
|
+
readonly message: import("effect/Schema").String;
|
|
207
|
+
}>], {
|
|
208
|
+
readonly message: string;
|
|
209
|
+
readonly _tag: "GraphqlExtractionError";
|
|
210
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
211
|
+
readonly message: import("effect/Schema").String;
|
|
212
|
+
}>, never, never>>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getSource", "GET", "/scopes/:scopeId/graphql/sources/:namespace", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
213
|
+
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
214
|
+
namespace: import("effect/Schema").String;
|
|
215
|
+
}>>, 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<{
|
|
216
|
+
readonly namespace: import("effect/Schema").String;
|
|
217
|
+
readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
218
|
+
readonly name: import("effect/Schema").String;
|
|
219
|
+
readonly endpoint: import("effect/Schema").String;
|
|
220
|
+
readonly headers: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
221
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
222
|
+
readonly slot: import("effect/Schema").String;
|
|
223
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
224
|
+
}>]>>;
|
|
225
|
+
readonly queryParams: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
226
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
227
|
+
readonly slot: import("effect/Schema").String;
|
|
228
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
229
|
+
}>]>>;
|
|
230
|
+
readonly auth: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
231
|
+
readonly kind: import("effect/Schema").Literal<"none">;
|
|
232
|
+
}>, import("effect/Schema").Struct<{
|
|
233
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
234
|
+
readonly connectionSlot: import("effect/Schema").String;
|
|
235
|
+
}>]>;
|
|
236
|
+
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
|
|
237
|
+
readonly message: string;
|
|
238
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
239
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
240
|
+
readonly message: import("effect/Schema").String;
|
|
241
|
+
}>], {
|
|
242
|
+
readonly message: string;
|
|
243
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
244
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
245
|
+
readonly message: import("effect/Schema").String;
|
|
246
|
+
}>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
|
|
247
|
+
readonly message: string;
|
|
248
|
+
readonly _tag: "GraphqlExtractionError";
|
|
249
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
250
|
+
readonly message: import("effect/Schema").String;
|
|
251
|
+
}>], {
|
|
252
|
+
readonly message: string;
|
|
253
|
+
readonly _tag: "GraphqlExtractionError";
|
|
254
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
255
|
+
readonly message: import("effect/Schema").String;
|
|
256
|
+
}>, never, never>>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"updateSource", "PATCH", "/scopes/:scopeId/graphql/sources/:namespace", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
257
|
+
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
258
|
+
namespace: import("effect/Schema").String;
|
|
259
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
260
|
+
readonly sourceScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
261
|
+
readonly name: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
262
|
+
readonly endpoint: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
263
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
264
|
+
readonly secretId: import("effect/Schema").String;
|
|
265
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
266
|
+
readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
267
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
268
|
+
}>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
269
|
+
readonly secretId: import("effect/Schema").String;
|
|
270
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
271
|
+
}>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
272
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
273
|
+
readonly slot: import("effect/Schema").String;
|
|
274
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
275
|
+
}>]>]>>>;
|
|
276
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
277
|
+
readonly secretId: import("effect/Schema").String;
|
|
278
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
279
|
+
readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
280
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
281
|
+
}>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
282
|
+
readonly secretId: import("effect/Schema").String;
|
|
283
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
284
|
+
}>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
285
|
+
readonly kind: import("effect/Schema").Literal<"binding">;
|
|
286
|
+
readonly slot: import("effect/Schema").String;
|
|
287
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
288
|
+
}>]>]>>>;
|
|
289
|
+
readonly credentialTargetScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
290
|
+
readonly auth: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
291
|
+
readonly kind: import("effect/Schema").Literal<"none">;
|
|
292
|
+
}>, import("effect/Schema").Struct<{
|
|
293
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
294
|
+
readonly connectionSlot: import("effect/Schema").String;
|
|
295
|
+
}>]>, import("effect/Schema").Struct<{
|
|
296
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
297
|
+
readonly connectionId: import("effect/Schema").String;
|
|
298
|
+
}>]>>;
|
|
299
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
300
|
+
readonly updated: import("effect/Schema").Boolean;
|
|
301
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
|
|
302
|
+
readonly message: string;
|
|
303
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
304
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
305
|
+
readonly message: import("effect/Schema").String;
|
|
306
|
+
}>], {
|
|
307
|
+
readonly message: string;
|
|
308
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
309
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
310
|
+
readonly message: import("effect/Schema").String;
|
|
311
|
+
}>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
|
|
312
|
+
readonly message: string;
|
|
313
|
+
readonly _tag: "GraphqlExtractionError";
|
|
314
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
315
|
+
readonly message: import("effect/Schema").String;
|
|
316
|
+
}>], {
|
|
317
|
+
readonly message: string;
|
|
318
|
+
readonly _tag: "GraphqlExtractionError";
|
|
319
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
320
|
+
readonly message: import("effect/Schema").String;
|
|
321
|
+
}>, never, never>>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listSourceBindings", "GET", "/scopes/:scopeId/graphql/sources/:namespace/base/:sourceScopeId/bindings", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
322
|
+
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
323
|
+
namespace: import("effect/Schema").String;
|
|
324
|
+
sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
325
|
+
}>>, 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").$Array<typeof import("../sdk").GraphqlSourceBindingRef>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
|
|
326
|
+
readonly message: string;
|
|
327
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
328
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
329
|
+
readonly message: import("effect/Schema").String;
|
|
330
|
+
}>], {
|
|
331
|
+
readonly message: string;
|
|
332
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
333
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
334
|
+
readonly message: import("effect/Schema").String;
|
|
335
|
+
}>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
|
|
336
|
+
readonly message: string;
|
|
337
|
+
readonly _tag: "GraphqlExtractionError";
|
|
338
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
339
|
+
readonly message: import("effect/Schema").String;
|
|
340
|
+
}>], {
|
|
341
|
+
readonly message: string;
|
|
342
|
+
readonly _tag: "GraphqlExtractionError";
|
|
343
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
344
|
+
readonly message: import("effect/Schema").String;
|
|
345
|
+
}>, never, never>>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"setSourceBinding", "POST", "/scopes/:scopeId/graphql/source-bindings", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
346
|
+
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
347
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
348
|
+
readonly sourceId: import("effect/Schema").String;
|
|
349
|
+
readonly sourceScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
350
|
+
readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
351
|
+
readonly slot: import("effect/Schema").String;
|
|
352
|
+
readonly value: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
353
|
+
readonly kind: import("effect/Schema").Literal<"text">;
|
|
354
|
+
readonly text: import("effect/Schema").String;
|
|
355
|
+
}>, import("effect/Schema").Struct<{
|
|
356
|
+
readonly kind: import("effect/Schema").Literal<"secret">;
|
|
357
|
+
readonly secretId: import("effect/Schema").brand<import("effect/Schema").String, "SecretId">;
|
|
358
|
+
readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
|
|
359
|
+
}>, import("effect/Schema").Struct<{
|
|
360
|
+
readonly kind: import("effect/Schema").Literal<"connection">;
|
|
361
|
+
readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
|
|
362
|
+
}>]>;
|
|
363
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../sdk").GraphqlSourceBindingRef>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
|
|
364
|
+
readonly message: string;
|
|
365
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
366
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
367
|
+
readonly message: import("effect/Schema").String;
|
|
368
|
+
}>], {
|
|
369
|
+
readonly message: string;
|
|
370
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
371
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
372
|
+
readonly message: import("effect/Schema").String;
|
|
373
|
+
}>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
|
|
374
|
+
readonly message: string;
|
|
375
|
+
readonly _tag: "GraphqlExtractionError";
|
|
376
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
377
|
+
readonly message: import("effect/Schema").String;
|
|
378
|
+
}>], {
|
|
379
|
+
readonly message: string;
|
|
380
|
+
readonly _tag: "GraphqlExtractionError";
|
|
381
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
382
|
+
readonly message: import("effect/Schema").String;
|
|
383
|
+
}>, never, never>>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"removeSourceBinding", "POST", "/scopes/:scopeId/graphql/source-bindings/remove", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
384
|
+
scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
385
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
386
|
+
readonly sourceId: import("effect/Schema").String;
|
|
387
|
+
readonly sourceScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
388
|
+
readonly slot: import("effect/Schema").String;
|
|
389
|
+
readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
|
|
390
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
391
|
+
readonly removed: import("effect/Schema").Boolean;
|
|
392
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
|
|
393
|
+
readonly message: string;
|
|
394
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
395
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
396
|
+
readonly message: import("effect/Schema").String;
|
|
397
|
+
}>], {
|
|
398
|
+
readonly message: string;
|
|
399
|
+
readonly _tag: "GraphqlIntrospectionError";
|
|
400
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
|
|
401
|
+
readonly message: import("effect/Schema").String;
|
|
402
|
+
}>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
|
|
403
|
+
readonly message: string;
|
|
404
|
+
readonly _tag: "GraphqlExtractionError";
|
|
405
|
+
}, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
406
|
+
readonly message: import("effect/Schema").String;
|
|
407
|
+
}>], {
|
|
408
|
+
readonly message: string;
|
|
409
|
+
readonly _tag: "GraphqlExtractionError";
|
|
410
|
+
}>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
|
|
411
|
+
readonly message: import("effect/Schema").String;
|
|
412
|
+
}>, never, never>>, never, never>, false>>;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
// src/sdk/errors.ts
|
|
2
|
+
import { Data, Schema } from "effect";
|
|
3
|
+
var GraphqlIntrospectionError = class extends Schema.TaggedErrorClass()(
|
|
4
|
+
"GraphqlIntrospectionError",
|
|
5
|
+
{
|
|
6
|
+
message: Schema.String
|
|
7
|
+
}
|
|
8
|
+
) {
|
|
9
|
+
};
|
|
10
|
+
var GraphqlExtractionError = class extends Schema.TaggedErrorClass()(
|
|
11
|
+
"GraphqlExtractionError",
|
|
12
|
+
{
|
|
13
|
+
message: Schema.String
|
|
14
|
+
}
|
|
15
|
+
) {
|
|
16
|
+
};
|
|
17
|
+
var GraphqlInvocationError = class extends Data.TaggedError("GraphqlInvocationError") {
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/sdk/types.ts
|
|
21
|
+
import { Effect, Schema as Schema2 } from "effect";
|
|
22
|
+
import {
|
|
23
|
+
ConfiguredCredentialValueSchema,
|
|
24
|
+
CredentialBindingValue,
|
|
25
|
+
credentialSlotKey,
|
|
26
|
+
ScopedSecretCredentialInput,
|
|
27
|
+
SecretBackedValue,
|
|
28
|
+
ScopeId
|
|
29
|
+
} from "@executor-js/sdk/core";
|
|
30
|
+
var GraphqlOperationKind = Schema2.Literals(["query", "mutation"]);
|
|
31
|
+
var GraphqlArgument = class extends Schema2.Class("GraphqlArgument")({
|
|
32
|
+
name: Schema2.String,
|
|
33
|
+
typeName: Schema2.String,
|
|
34
|
+
required: Schema2.Boolean,
|
|
35
|
+
description: Schema2.OptionFromOptional(Schema2.String)
|
|
36
|
+
}) {
|
|
37
|
+
};
|
|
38
|
+
var ExtractedField = class extends Schema2.Class("ExtractedField")({
|
|
39
|
+
/** e.g. "user", "createUser" */
|
|
40
|
+
fieldName: Schema2.String,
|
|
41
|
+
/** "query" or "mutation" */
|
|
42
|
+
kind: GraphqlOperationKind,
|
|
43
|
+
description: Schema2.OptionFromOptional(Schema2.String),
|
|
44
|
+
arguments: Schema2.Array(GraphqlArgument),
|
|
45
|
+
/** JSON Schema for the input (built from arguments) */
|
|
46
|
+
inputSchema: Schema2.OptionFromOptional(Schema2.Unknown),
|
|
47
|
+
/** The return type name for documentation */
|
|
48
|
+
returnTypeName: Schema2.String
|
|
49
|
+
}) {
|
|
50
|
+
};
|
|
51
|
+
var ExtractionResult = class extends Schema2.Class("ExtractionResult")({
|
|
52
|
+
/** Schema name from introspection */
|
|
53
|
+
schemaName: Schema2.OptionFromOptional(Schema2.String),
|
|
54
|
+
fields: Schema2.Array(ExtractedField)
|
|
55
|
+
}) {
|
|
56
|
+
};
|
|
57
|
+
var OperationBinding = class extends Schema2.Class("OperationBinding")({
|
|
58
|
+
kind: GraphqlOperationKind,
|
|
59
|
+
fieldName: Schema2.String,
|
|
60
|
+
/** The full GraphQL query/mutation string */
|
|
61
|
+
operationString: Schema2.String,
|
|
62
|
+
/** Ordered variable names for mapping */
|
|
63
|
+
variableNames: Schema2.Array(Schema2.String)
|
|
64
|
+
}) {
|
|
65
|
+
};
|
|
66
|
+
var HeaderValue = SecretBackedValue;
|
|
67
|
+
var QueryParamValue = HeaderValue;
|
|
68
|
+
var ConfiguredGraphqlCredentialValue = ConfiguredCredentialValueSchema;
|
|
69
|
+
var GraphqlCredentialInput = Schema2.Union([
|
|
70
|
+
ScopedSecretCredentialInput,
|
|
71
|
+
HeaderValue,
|
|
72
|
+
ConfiguredGraphqlCredentialValue
|
|
73
|
+
]);
|
|
74
|
+
var graphqlHeaderSlot = (name) => credentialSlotKey("header", name);
|
|
75
|
+
var graphqlQueryParamSlot = (name) => credentialSlotKey("query_param", name);
|
|
76
|
+
var GRAPHQL_OAUTH_CONNECTION_SLOT = "auth:oauth2:connection";
|
|
77
|
+
var GraphqlSourceAuth = Schema2.Union([
|
|
78
|
+
Schema2.Struct({ kind: Schema2.Literal("none") }),
|
|
79
|
+
Schema2.Struct({
|
|
80
|
+
kind: Schema2.Literal("oauth2"),
|
|
81
|
+
connectionSlot: Schema2.String
|
|
82
|
+
})
|
|
83
|
+
]);
|
|
84
|
+
var GraphqlSourceAuthInput = Schema2.Union([
|
|
85
|
+
GraphqlSourceAuth,
|
|
86
|
+
Schema2.Struct({
|
|
87
|
+
kind: Schema2.Literal("oauth2"),
|
|
88
|
+
connectionId: Schema2.String
|
|
89
|
+
})
|
|
90
|
+
]);
|
|
91
|
+
var GraphqlSourceBindingValue = CredentialBindingValue;
|
|
92
|
+
var GraphqlSourceBindingInputSchema = Schema2.Struct({
|
|
93
|
+
sourceId: Schema2.String,
|
|
94
|
+
sourceScope: ScopeId,
|
|
95
|
+
scope: ScopeId,
|
|
96
|
+
slot: Schema2.String,
|
|
97
|
+
value: GraphqlSourceBindingValue
|
|
98
|
+
});
|
|
99
|
+
var GraphqlSourceBindingInput = class extends Schema2.Class(
|
|
100
|
+
"GraphqlSourceBindingInput"
|
|
101
|
+
)(GraphqlSourceBindingInputSchema.fields) {
|
|
102
|
+
};
|
|
103
|
+
var GraphqlSourceBindingRef = class extends Schema2.Class(
|
|
104
|
+
"GraphqlSourceBindingRef"
|
|
105
|
+
)({
|
|
106
|
+
sourceId: Schema2.String,
|
|
107
|
+
sourceScopeId: ScopeId,
|
|
108
|
+
scopeId: ScopeId,
|
|
109
|
+
slot: Schema2.String,
|
|
110
|
+
value: GraphqlSourceBindingValue,
|
|
111
|
+
createdAt: Schema2.Date,
|
|
112
|
+
updatedAt: Schema2.Date
|
|
113
|
+
}) {
|
|
114
|
+
};
|
|
115
|
+
var InvocationConfig = class extends Schema2.Class("InvocationConfig")({
|
|
116
|
+
/** The GraphQL endpoint URL */
|
|
117
|
+
endpoint: Schema2.String,
|
|
118
|
+
/** Headers applied to every request. Values can reference secrets. */
|
|
119
|
+
headers: Schema2.Record(Schema2.String, ConfiguredGraphqlCredentialValue).pipe(
|
|
120
|
+
Schema2.withDecodingDefault(Effect.succeed({})),
|
|
121
|
+
Schema2.withConstructorDefault(Effect.succeed({}))
|
|
122
|
+
),
|
|
123
|
+
/** Query parameters applied to every request. Values can reference secrets. */
|
|
124
|
+
queryParams: Schema2.Record(Schema2.String, ConfiguredGraphqlCredentialValue).pipe(
|
|
125
|
+
Schema2.withDecodingDefault(Effect.succeed({})),
|
|
126
|
+
Schema2.withConstructorDefault(Effect.succeed({}))
|
|
127
|
+
)
|
|
128
|
+
}) {
|
|
129
|
+
};
|
|
130
|
+
var InvocationResult = class extends Schema2.Class("InvocationResult")({
|
|
131
|
+
status: Schema2.Number,
|
|
132
|
+
data: Schema2.NullOr(Schema2.Unknown),
|
|
133
|
+
errors: Schema2.NullOr(Schema2.Unknown)
|
|
134
|
+
}) {
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export {
|
|
138
|
+
GraphqlIntrospectionError,
|
|
139
|
+
GraphqlExtractionError,
|
|
140
|
+
GraphqlInvocationError,
|
|
141
|
+
GraphqlOperationKind,
|
|
142
|
+
GraphqlArgument,
|
|
143
|
+
ExtractedField,
|
|
144
|
+
ExtractionResult,
|
|
145
|
+
OperationBinding,
|
|
146
|
+
HeaderValue,
|
|
147
|
+
QueryParamValue,
|
|
148
|
+
ConfiguredGraphqlCredentialValue,
|
|
149
|
+
GraphqlCredentialInput,
|
|
150
|
+
graphqlHeaderSlot,
|
|
151
|
+
graphqlQueryParamSlot,
|
|
152
|
+
GRAPHQL_OAUTH_CONNECTION_SLOT,
|
|
153
|
+
GraphqlSourceAuth,
|
|
154
|
+
GraphqlSourceAuthInput,
|
|
155
|
+
GraphqlSourceBindingValue,
|
|
156
|
+
GraphqlSourceBindingInputSchema,
|
|
157
|
+
GraphqlSourceBindingInput,
|
|
158
|
+
GraphqlSourceBindingRef,
|
|
159
|
+
InvocationConfig,
|
|
160
|
+
InvocationResult
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=chunk-7QSGNR4C.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sdk/errors.ts","../src/sdk/types.ts"],"sourcesContent":["import { Data, Schema } from \"effect\";\nimport type { Option } from \"effect\";\n\nexport class GraphqlIntrospectionError extends Schema.TaggedErrorClass<GraphqlIntrospectionError>()(\n \"GraphqlIntrospectionError\",\n {\n message: Schema.String,\n },\n) {}\n\nexport class GraphqlExtractionError extends Schema.TaggedErrorClass<GraphqlExtractionError>()(\n \"GraphqlExtractionError\",\n {\n message: Schema.String,\n },\n) {}\n\nexport class GraphqlInvocationError extends Data.TaggedError(\"GraphqlInvocationError\")<{\n readonly message: string;\n readonly statusCode: Option.Option<number>;\n readonly cause?: unknown;\n}> {}\n","import { Effect, Schema } from \"effect\";\nimport {\n ConfiguredCredentialValueSchema,\n CredentialBindingValue,\n credentialSlotKey,\n ScopedSecretCredentialInput,\n SecretBackedValue,\n ScopeId,\n} from \"@executor-js/sdk/core\";\n\n// ---------------------------------------------------------------------------\n// GraphQL operation kind\n// ---------------------------------------------------------------------------\n\nexport const GraphqlOperationKind = Schema.Literals([\"query\", \"mutation\"]);\nexport type GraphqlOperationKind = typeof GraphqlOperationKind.Type;\n\n// ---------------------------------------------------------------------------\n// Extracted field (becomes a tool)\n// ---------------------------------------------------------------------------\n\nexport class GraphqlArgument extends Schema.Class<GraphqlArgument>(\"GraphqlArgument\")({\n name: Schema.String,\n typeName: Schema.String,\n required: Schema.Boolean,\n description: Schema.OptionFromOptional(Schema.String),\n}) {}\n\nexport class ExtractedField extends Schema.Class<ExtractedField>(\"ExtractedField\")({\n /** e.g. \"user\", \"createUser\" */\n fieldName: Schema.String,\n /** \"query\" or \"mutation\" */\n kind: GraphqlOperationKind,\n description: Schema.OptionFromOptional(Schema.String),\n arguments: Schema.Array(GraphqlArgument),\n /** JSON Schema for the input (built from arguments) */\n inputSchema: Schema.OptionFromOptional(Schema.Unknown),\n /** The return type name for documentation */\n returnTypeName: Schema.String,\n}) {}\n\nexport class ExtractionResult extends Schema.Class<ExtractionResult>(\"ExtractionResult\")({\n /** Schema name from introspection */\n schemaName: Schema.OptionFromOptional(Schema.String),\n fields: Schema.Array(ExtractedField),\n}) {}\n\n// ---------------------------------------------------------------------------\n// Operation binding — minimal data needed to invoke\n// ---------------------------------------------------------------------------\n\nexport class OperationBinding extends Schema.Class<OperationBinding>(\"OperationBinding\")({\n kind: GraphqlOperationKind,\n fieldName: Schema.String,\n /** The full GraphQL query/mutation string */\n operationString: Schema.String,\n /** Ordered variable names for mapping */\n variableNames: Schema.Array(Schema.String),\n}) {}\n\n// ---------------------------------------------------------------------------\n// Invocation\n// ---------------------------------------------------------------------------\n\nexport const HeaderValue = SecretBackedValue;\nexport type HeaderValue = typeof HeaderValue.Type;\nexport const QueryParamValue = HeaderValue;\nexport type QueryParamValue = typeof QueryParamValue.Type;\n\nexport const ConfiguredGraphqlCredentialValue = ConfiguredCredentialValueSchema;\nexport type ConfiguredGraphqlCredentialValue = typeof ConfiguredGraphqlCredentialValue.Type;\nexport const GraphqlCredentialInput = Schema.Union([\n ScopedSecretCredentialInput,\n HeaderValue,\n ConfiguredGraphqlCredentialValue,\n]);\nexport type GraphqlCredentialInput = typeof GraphqlCredentialInput.Type;\n\nexport const graphqlHeaderSlot = (name: string): string => credentialSlotKey(\"header\", name);\nexport const graphqlQueryParamSlot = (name: string): string =>\n credentialSlotKey(\"query_param\", name);\nexport const GRAPHQL_OAUTH_CONNECTION_SLOT = \"auth:oauth2:connection\";\n\n// ---------------------------------------------------------------------------\n// Source auth\n// ---------------------------------------------------------------------------\n\nexport const GraphqlSourceAuth = Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"none\") }),\n Schema.Struct({\n kind: Schema.Literal(\"oauth2\"),\n connectionSlot: Schema.String,\n }),\n]);\nexport type GraphqlSourceAuth = typeof GraphqlSourceAuth.Type;\n\nexport const GraphqlSourceAuthInput = Schema.Union([\n GraphqlSourceAuth,\n Schema.Struct({\n kind: Schema.Literal(\"oauth2\"),\n connectionId: Schema.String,\n }),\n]);\nexport type GraphqlSourceAuthInput = typeof GraphqlSourceAuthInput.Type;\n\nexport const GraphqlSourceBindingValue = CredentialBindingValue;\nexport type GraphqlSourceBindingValue = typeof GraphqlSourceBindingValue.Type;\n\nexport const GraphqlSourceBindingInputSchema = Schema.Struct({\n sourceId: Schema.String,\n sourceScope: ScopeId,\n scope: ScopeId,\n slot: Schema.String,\n value: GraphqlSourceBindingValue,\n});\n\nexport class GraphqlSourceBindingInput extends Schema.Class<GraphqlSourceBindingInput>(\n \"GraphqlSourceBindingInput\",\n)(GraphqlSourceBindingInputSchema.fields) {}\n\nexport class GraphqlSourceBindingRef extends Schema.Class<GraphqlSourceBindingRef>(\n \"GraphqlSourceBindingRef\",\n)({\n sourceId: Schema.String,\n sourceScopeId: ScopeId,\n scopeId: ScopeId,\n slot: Schema.String,\n value: GraphqlSourceBindingValue,\n createdAt: Schema.Date,\n updatedAt: Schema.Date,\n}) {}\n\nexport class InvocationConfig extends Schema.Class<InvocationConfig>(\"InvocationConfig\")({\n /** The GraphQL endpoint URL */\n endpoint: Schema.String,\n /** Headers applied to every request. Values can reference secrets. */\n headers: Schema.Record(Schema.String, ConfiguredGraphqlCredentialValue).pipe(\n Schema.withDecodingDefault(Effect.succeed({})),\n Schema.withConstructorDefault(Effect.succeed({})),\n ),\n /** Query parameters applied to every request. Values can reference secrets. */\n queryParams: Schema.Record(Schema.String, ConfiguredGraphqlCredentialValue).pipe(\n Schema.withDecodingDefault(Effect.succeed({})),\n Schema.withConstructorDefault(Effect.succeed({})),\n ),\n}) {}\n\nexport class InvocationResult extends Schema.Class<InvocationResult>(\"InvocationResult\")({\n status: Schema.Number,\n data: Schema.NullOr(Schema.Unknown),\n errors: Schema.NullOr(Schema.Unknown),\n}) {}\n"],"mappings":"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","names":["Schema"]}
|