@executor-js/plugin-graphql 0.1.0 → 1.4.20

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.
Files changed (37) hide show
  1. package/dist/AddGraphqlSource-3Z3DB4KQ.js +239 -0
  2. package/dist/AddGraphqlSource-3Z3DB4KQ.js.map +1 -0
  3. package/dist/EditGraphqlSource-F37RPNKV.js +251 -0
  4. package/dist/EditGraphqlSource-F37RPNKV.js.map +1 -0
  5. package/dist/GraphqlSourceSummary-6EYBXVD2.js +70 -0
  6. package/dist/GraphqlSourceSummary-6EYBXVD2.js.map +1 -0
  7. package/dist/api/group.d.ts +204 -13
  8. package/dist/api/handlers.d.ts +51 -3
  9. package/dist/api/index.d.ts +482 -0
  10. package/dist/chunk-445ZPXHU.js +148 -0
  11. package/dist/chunk-445ZPXHU.js.map +1 -0
  12. package/dist/chunk-EW4Y3KEX.js +182 -0
  13. package/dist/chunk-EW4Y3KEX.js.map +1 -0
  14. package/dist/chunk-M4SJY6CB.js +45 -0
  15. package/dist/chunk-M4SJY6CB.js.map +1 -0
  16. package/dist/chunk-PO2TPM5B.js +1636 -0
  17. package/dist/chunk-PO2TPM5B.js.map +1 -0
  18. package/dist/client.js +75 -0
  19. package/dist/client.js.map +1 -0
  20. package/dist/core.js +32 -10
  21. package/dist/index.js +2 -1
  22. package/dist/react/GraphqlSourceFields.d.ts +8 -0
  23. package/dist/react/GraphqlSourceSummary.d.ts +3 -1
  24. package/dist/react/atoms.d.ts +206 -10
  25. package/dist/react/client.d.ts +200 -12
  26. package/dist/sdk/index.d.ts +1 -1
  27. package/dist/sdk/introspect.d.ts +437 -43
  28. package/dist/sdk/invoke.d.ts +17 -3
  29. package/dist/sdk/plugin.d.ts +192 -170
  30. package/dist/sdk/store.d.ts +84 -11
  31. package/dist/sdk/types.d.ts +129 -30
  32. package/dist/testing/index.d.ts +52 -0
  33. package/dist/testing.js +131 -0
  34. package/dist/testing.js.map +1 -0
  35. package/package.json +18 -4
  36. package/dist/chunk-EIC5WI6C.js +0 -1225
  37. package/dist/chunk-EIC5WI6C.js.map +0 -1
@@ -1,2 +1,484 @@
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 {
14
+ readonly value: {
15
+ readonly text: string;
16
+ readonly kind: "text";
17
+ } | {
18
+ readonly secretId: string & import("effect/Brand").Brand<"SecretId">;
19
+ readonly kind: "secret";
20
+ readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
21
+ } | {
22
+ readonly connectionId: string & import("effect/Brand").Brand<"ConnectionId">;
23
+ readonly kind: "connection";
24
+ };
25
+ readonly createdAt: Date;
26
+ readonly sourceId: string;
27
+ readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
28
+ readonly updatedAt: Date;
29
+ readonly slot: string;
30
+ readonly sourceScopeId: string & import("effect/Brand").Brand<"ScopeId">;
31
+ }[], import("@executor-js/storage-core").StorageFailure, never>;
32
+ setSourceBinding: (input: import("../sdk").GraphqlSourceBindingInput) => import("effect/Effect").Effect<{
33
+ readonly value: {
34
+ readonly text: string;
35
+ readonly kind: "text";
36
+ } | {
37
+ readonly secretId: string & import("effect/Brand").Brand<"SecretId">;
38
+ readonly kind: "secret";
39
+ readonly secretScopeId?: (string & import("effect/Brand").Brand<"ScopeId">) | undefined;
40
+ } | {
41
+ readonly connectionId: string & import("effect/Brand").Brand<"ConnectionId">;
42
+ readonly kind: "connection";
43
+ };
44
+ readonly createdAt: Date;
45
+ readonly sourceId: string;
46
+ readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
47
+ readonly updatedAt: Date;
48
+ readonly slot: string;
49
+ readonly sourceScopeId: string & import("effect/Brand").Brand<"ScopeId">;
50
+ }, import("@executor-js/storage-core").StorageFailure, never>;
51
+ removeSourceBinding: (sourceId: string, sourceScope: string, slot: string, scope: string) => import("effect/Effect").Effect<void, import("@executor-js/storage-core").StorageFailure, never>;
52
+ }, import("../sdk").GraphqlStore, GraphqlPluginOptions, {
53
+ readonly graphql_source: {
54
+ readonly fields: {
55
+ readonly id: {
56
+ readonly type: "string";
57
+ readonly required: true;
58
+ };
59
+ readonly scope_id: {
60
+ readonly type: "string";
61
+ readonly required: true;
62
+ readonly index: true;
63
+ };
64
+ readonly name: {
65
+ readonly type: "string";
66
+ readonly required: true;
67
+ };
68
+ readonly endpoint: {
69
+ readonly type: "string";
70
+ readonly required: true;
71
+ };
72
+ readonly auth_kind: {
73
+ readonly type: ["none", "oauth2"];
74
+ readonly required: true;
75
+ readonly defaultValue: "none";
76
+ };
77
+ readonly auth_connection_slot: {
78
+ readonly type: "string";
79
+ readonly required: false;
80
+ };
81
+ };
82
+ };
83
+ readonly graphql_source_header: {
84
+ readonly fields: {
85
+ readonly id: {
86
+ readonly type: "string";
87
+ readonly required: true;
88
+ };
89
+ readonly scope_id: {
90
+ readonly type: "string";
91
+ readonly required: true;
92
+ readonly index: true;
93
+ };
94
+ readonly source_id: {
95
+ readonly type: "string";
96
+ readonly required: true;
97
+ readonly index: true;
98
+ };
99
+ readonly name: {
100
+ readonly type: "string";
101
+ readonly required: true;
102
+ };
103
+ readonly kind: {
104
+ readonly type: ["text", "binding"];
105
+ readonly required: true;
106
+ };
107
+ readonly text_value: {
108
+ readonly type: "string";
109
+ readonly required: false;
110
+ };
111
+ readonly slot_key: {
112
+ readonly type: "string";
113
+ readonly required: false;
114
+ };
115
+ readonly prefix: {
116
+ readonly type: "string";
117
+ readonly required: false;
118
+ };
119
+ };
120
+ };
121
+ readonly graphql_source_query_param: {
122
+ readonly fields: {
123
+ readonly id: {
124
+ readonly type: "string";
125
+ readonly required: true;
126
+ };
127
+ readonly scope_id: {
128
+ readonly type: "string";
129
+ readonly required: true;
130
+ readonly index: true;
131
+ };
132
+ readonly source_id: {
133
+ readonly type: "string";
134
+ readonly required: true;
135
+ readonly index: true;
136
+ };
137
+ readonly name: {
138
+ readonly type: "string";
139
+ readonly required: true;
140
+ };
141
+ readonly kind: {
142
+ readonly type: ["text", "binding"];
143
+ readonly required: true;
144
+ };
145
+ readonly text_value: {
146
+ readonly type: "string";
147
+ readonly required: false;
148
+ };
149
+ readonly slot_key: {
150
+ readonly type: "string";
151
+ readonly required: false;
152
+ };
153
+ readonly prefix: {
154
+ readonly type: "string";
155
+ readonly required: false;
156
+ };
157
+ };
158
+ };
159
+ readonly graphql_operation: {
160
+ readonly fields: {
161
+ readonly id: {
162
+ readonly type: "string";
163
+ readonly required: true;
164
+ };
165
+ readonly scope_id: {
166
+ readonly type: "string";
167
+ readonly required: true;
168
+ readonly index: true;
169
+ };
170
+ readonly source_id: {
171
+ readonly type: "string";
172
+ readonly required: true;
173
+ readonly index: true;
174
+ };
175
+ readonly binding: {
176
+ readonly type: "json";
177
+ readonly required: true;
178
+ };
179
+ };
180
+ };
181
+ }, 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<{
182
+ scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
183
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
184
+ readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
185
+ readonly endpoint: import("effect/Schema").String;
186
+ readonly name: import("effect/Schema").optional<import("effect/Schema").String>;
187
+ readonly introspectionJson: import("effect/Schema").optional<import("effect/Schema").String>;
188
+ readonly namespace: import("effect/Schema").optional<import("effect/Schema").String>;
189
+ readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
190
+ readonly secretId: import("effect/Schema").String;
191
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
192
+ readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
193
+ readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
194
+ }>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
195
+ readonly secretId: import("effect/Schema").String;
196
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
197
+ }>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
198
+ readonly kind: import("effect/Schema").Literal<"binding">;
199
+ readonly slot: import("effect/Schema").String;
200
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
201
+ }>]>]>>>;
202
+ readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
203
+ readonly secretId: import("effect/Schema").String;
204
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
205
+ readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
206
+ readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
207
+ }>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
208
+ readonly secretId: import("effect/Schema").String;
209
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
210
+ }>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
211
+ readonly kind: import("effect/Schema").Literal<"binding">;
212
+ readonly slot: import("effect/Schema").String;
213
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
214
+ }>]>]>>>;
215
+ readonly credentialTargetScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
216
+ readonly auth: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
217
+ readonly kind: import("effect/Schema").Literal<"none">;
218
+ }>, import("effect/Schema").Struct<{
219
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
220
+ readonly connectionSlot: import("effect/Schema").String;
221
+ }>]>, import("effect/Schema").Struct<{
222
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
223
+ readonly connectionId: import("effect/Schema").String;
224
+ }>]>>;
225
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
226
+ readonly toolCount: import("effect/Schema").Number;
227
+ readonly namespace: import("effect/Schema").String;
228
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
229
+ readonly message: string;
230
+ readonly _tag: "GraphqlIntrospectionError";
231
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
232
+ readonly message: import("effect/Schema").String;
233
+ }>], {
234
+ readonly message: string;
235
+ readonly _tag: "GraphqlIntrospectionError";
236
+ }>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
237
+ readonly message: import("effect/Schema").String;
238
+ }>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
239
+ readonly message: string;
240
+ readonly _tag: "GraphqlExtractionError";
241
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
242
+ readonly message: import("effect/Schema").String;
243
+ }>], {
244
+ readonly message: string;
245
+ readonly _tag: "GraphqlExtractionError";
246
+ }>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
247
+ readonly message: import("effect/Schema").String;
248
+ }>, 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<{
249
+ scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
250
+ namespace: import("effect/Schema").String;
251
+ }>>, 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<{
252
+ readonly namespace: import("effect/Schema").String;
253
+ readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
254
+ readonly name: import("effect/Schema").String;
255
+ readonly endpoint: import("effect/Schema").String;
256
+ readonly headers: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
257
+ readonly kind: import("effect/Schema").Literal<"binding">;
258
+ readonly slot: import("effect/Schema").String;
259
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
260
+ }>]>>;
261
+ readonly queryParams: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
262
+ readonly kind: import("effect/Schema").Literal<"binding">;
263
+ readonly slot: import("effect/Schema").String;
264
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
265
+ }>]>>;
266
+ readonly auth: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
267
+ readonly kind: import("effect/Schema").Literal<"none">;
268
+ }>, import("effect/Schema").Struct<{
269
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
270
+ readonly connectionSlot: import("effect/Schema").String;
271
+ }>]>;
272
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
273
+ readonly message: string;
274
+ readonly _tag: "GraphqlIntrospectionError";
275
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
276
+ readonly message: import("effect/Schema").String;
277
+ }>], {
278
+ readonly message: string;
279
+ readonly _tag: "GraphqlIntrospectionError";
280
+ }>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
281
+ readonly message: import("effect/Schema").String;
282
+ }>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
283
+ readonly message: string;
284
+ readonly _tag: "GraphqlExtractionError";
285
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
286
+ readonly message: import("effect/Schema").String;
287
+ }>], {
288
+ readonly message: string;
289
+ readonly _tag: "GraphqlExtractionError";
290
+ }>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
291
+ readonly message: import("effect/Schema").String;
292
+ }>, 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<{
293
+ scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
294
+ namespace: import("effect/Schema").String;
295
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
296
+ readonly sourceScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
297
+ readonly name: import("effect/Schema").optional<import("effect/Schema").String>;
298
+ readonly endpoint: import("effect/Schema").optional<import("effect/Schema").String>;
299
+ readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
300
+ readonly secretId: import("effect/Schema").String;
301
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
302
+ readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
303
+ readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
304
+ }>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
305
+ readonly secretId: import("effect/Schema").String;
306
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
307
+ }>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
308
+ readonly kind: import("effect/Schema").Literal<"binding">;
309
+ readonly slot: import("effect/Schema").String;
310
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
311
+ }>]>]>>>;
312
+ readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
313
+ readonly secretId: import("effect/Schema").String;
314
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
315
+ readonly targetScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
316
+ readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
317
+ }>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
318
+ readonly secretId: import("effect/Schema").String;
319
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
320
+ }>]>, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
321
+ readonly kind: import("effect/Schema").Literal<"binding">;
322
+ readonly slot: import("effect/Schema").String;
323
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
324
+ }>]>]>>>;
325
+ readonly credentialTargetScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
326
+ readonly auth: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
327
+ readonly kind: import("effect/Schema").Literal<"none">;
328
+ }>, import("effect/Schema").Struct<{
329
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
330
+ readonly connectionSlot: import("effect/Schema").String;
331
+ }>]>, import("effect/Schema").Struct<{
332
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
333
+ readonly connectionId: import("effect/Schema").String;
334
+ }>]>>;
335
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
336
+ readonly updated: import("effect/Schema").Boolean;
337
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
338
+ readonly message: string;
339
+ readonly _tag: "GraphqlIntrospectionError";
340
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
341
+ readonly message: import("effect/Schema").String;
342
+ }>], {
343
+ readonly message: string;
344
+ readonly _tag: "GraphqlIntrospectionError";
345
+ }>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
346
+ readonly message: import("effect/Schema").String;
347
+ }>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
348
+ readonly message: string;
349
+ readonly _tag: "GraphqlExtractionError";
350
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
351
+ readonly message: import("effect/Schema").String;
352
+ }>], {
353
+ readonly message: string;
354
+ readonly _tag: "GraphqlExtractionError";
355
+ }>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
356
+ readonly message: import("effect/Schema").String;
357
+ }>, 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<{
358
+ scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
359
+ namespace: import("effect/Schema").String;
360
+ sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
361
+ }>>, 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<import("effect/Schema").Struct<{
362
+ readonly sourceId: import("effect/Schema").String;
363
+ readonly sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
364
+ readonly scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
365
+ readonly slot: import("effect/Schema").String;
366
+ readonly value: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
367
+ readonly kind: import("effect/Schema").Literal<"text">;
368
+ readonly text: import("effect/Schema").String;
369
+ }>, import("effect/Schema").Struct<{
370
+ readonly kind: import("effect/Schema").Literal<"secret">;
371
+ readonly secretId: import("effect/Schema").brand<import("effect/Schema").String, "SecretId">;
372
+ readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
373
+ }>, import("effect/Schema").Struct<{
374
+ readonly kind: import("effect/Schema").Literal<"connection">;
375
+ readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
376
+ }>]>;
377
+ readonly createdAt: import("effect/Schema").Date;
378
+ readonly updatedAt: import("effect/Schema").Date;
379
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
380
+ readonly message: string;
381
+ readonly _tag: "GraphqlIntrospectionError";
382
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
383
+ readonly message: import("effect/Schema").String;
384
+ }>], {
385
+ readonly message: string;
386
+ readonly _tag: "GraphqlIntrospectionError";
387
+ }>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
388
+ readonly message: import("effect/Schema").String;
389
+ }>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
390
+ readonly message: string;
391
+ readonly _tag: "GraphqlExtractionError";
392
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
393
+ readonly message: import("effect/Schema").String;
394
+ }>], {
395
+ readonly message: string;
396
+ readonly _tag: "GraphqlExtractionError";
397
+ }>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
398
+ readonly message: import("effect/Schema").String;
399
+ }>, 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<{
400
+ scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
401
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
402
+ readonly sourceId: import("effect/Schema").String;
403
+ readonly sourceScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
404
+ readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
405
+ readonly slot: import("effect/Schema").String;
406
+ readonly value: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
407
+ readonly kind: import("effect/Schema").Literal<"text">;
408
+ readonly text: import("effect/Schema").String;
409
+ }>, import("effect/Schema").Struct<{
410
+ readonly kind: import("effect/Schema").Literal<"secret">;
411
+ readonly secretId: import("effect/Schema").brand<import("effect/Schema").String, "SecretId">;
412
+ readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
413
+ }>, import("effect/Schema").Struct<{
414
+ readonly kind: import("effect/Schema").Literal<"connection">;
415
+ readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
416
+ }>]>;
417
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
418
+ readonly sourceId: import("effect/Schema").String;
419
+ readonly sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
420
+ readonly scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
421
+ readonly slot: import("effect/Schema").String;
422
+ readonly value: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
423
+ readonly kind: import("effect/Schema").Literal<"text">;
424
+ readonly text: import("effect/Schema").String;
425
+ }>, import("effect/Schema").Struct<{
426
+ readonly kind: import("effect/Schema").Literal<"secret">;
427
+ readonly secretId: import("effect/Schema").brand<import("effect/Schema").String, "SecretId">;
428
+ readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
429
+ }>, import("effect/Schema").Struct<{
430
+ readonly kind: import("effect/Schema").Literal<"connection">;
431
+ readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
432
+ }>]>;
433
+ readonly createdAt: import("effect/Schema").Date;
434
+ readonly updatedAt: import("effect/Schema").Date;
435
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
436
+ readonly message: string;
437
+ readonly _tag: "GraphqlIntrospectionError";
438
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
439
+ readonly message: import("effect/Schema").String;
440
+ }>], {
441
+ readonly message: string;
442
+ readonly _tag: "GraphqlIntrospectionError";
443
+ }>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
444
+ readonly message: import("effect/Schema").String;
445
+ }>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
446
+ readonly message: string;
447
+ readonly _tag: "GraphqlExtractionError";
448
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
449
+ readonly message: import("effect/Schema").String;
450
+ }>], {
451
+ readonly message: string;
452
+ readonly _tag: "GraphqlExtractionError";
453
+ }>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
454
+ readonly message: import("effect/Schema").String;
455
+ }>, 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<{
456
+ scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
457
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
458
+ readonly sourceId: import("effect/Schema").String;
459
+ readonly sourceScope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
460
+ readonly slot: import("effect/Schema").String;
461
+ readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
462
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
463
+ readonly removed: import("effect/Schema").Boolean;
464
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
465
+ readonly message: string;
466
+ readonly _tag: "GraphqlIntrospectionError";
467
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
468
+ readonly message: import("effect/Schema").String;
469
+ }>], {
470
+ readonly message: string;
471
+ readonly _tag: "GraphqlIntrospectionError";
472
+ }>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
473
+ readonly message: import("effect/Schema").String;
474
+ }>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
475
+ readonly message: string;
476
+ readonly _tag: "GraphqlExtractionError";
477
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
478
+ readonly message: import("effect/Schema").String;
479
+ }>], {
480
+ readonly message: string;
481
+ readonly _tag: "GraphqlExtractionError";
482
+ }>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
483
+ readonly message: import("effect/Schema").String;
484
+ }>, never, never>>, never, never>, false>>;
@@ -0,0 +1,148 @@
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
+ ConfiguredCredentialValue,
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 = Schema2.Struct({
32
+ name: Schema2.String,
33
+ typeName: Schema2.String,
34
+ required: Schema2.Boolean,
35
+ description: Schema2.OptionFromOptional(Schema2.String)
36
+ });
37
+ var ExtractedField = Schema2.Struct({
38
+ /** e.g. "user", "createUser" */
39
+ fieldName: Schema2.String,
40
+ /** "query" or "mutation" */
41
+ kind: GraphqlOperationKind,
42
+ description: Schema2.OptionFromOptional(Schema2.String),
43
+ arguments: Schema2.Array(GraphqlArgument),
44
+ /** JSON Schema for the input (built from arguments) */
45
+ inputSchema: Schema2.OptionFromOptional(Schema2.Unknown),
46
+ /** The return type name for documentation */
47
+ returnTypeName: Schema2.String
48
+ });
49
+ var ExtractionResult = Schema2.Struct({
50
+ /** Schema name from introspection */
51
+ schemaName: Schema2.OptionFromOptional(Schema2.String),
52
+ fields: Schema2.Array(ExtractedField)
53
+ });
54
+ var OperationBinding = Schema2.Struct({
55
+ kind: GraphqlOperationKind,
56
+ fieldName: Schema2.String,
57
+ /** The full GraphQL query/mutation string */
58
+ operationString: Schema2.String,
59
+ /** Ordered variable names for mapping */
60
+ variableNames: Schema2.Array(Schema2.String)
61
+ });
62
+ var HeaderValue = SecretBackedValue;
63
+ var QueryParamValue = HeaderValue;
64
+ var ConfiguredGraphqlCredentialValue = ConfiguredCredentialValue;
65
+ var GraphqlCredentialInput = Schema2.Union([
66
+ ScopedSecretCredentialInput,
67
+ HeaderValue,
68
+ ConfiguredGraphqlCredentialValue
69
+ ]);
70
+ var graphqlHeaderSlot = (name) => credentialSlotKey("header", name);
71
+ var graphqlQueryParamSlot = (name) => credentialSlotKey("query_param", name);
72
+ var GRAPHQL_OAUTH_CONNECTION_SLOT = "auth:oauth2:connection";
73
+ var GraphqlSourceAuth = Schema2.Union([
74
+ Schema2.Struct({ kind: Schema2.Literal("none") }),
75
+ Schema2.Struct({
76
+ kind: Schema2.Literal("oauth2"),
77
+ connectionSlot: Schema2.String
78
+ })
79
+ ]);
80
+ var GraphqlSourceAuthInput = Schema2.Union([
81
+ GraphqlSourceAuth,
82
+ Schema2.Struct({
83
+ kind: Schema2.Literal("oauth2"),
84
+ connectionId: Schema2.String
85
+ })
86
+ ]);
87
+ var GraphqlSourceBindingValue = CredentialBindingValue;
88
+ var GraphqlSourceBindingInput = Schema2.Struct({
89
+ sourceId: Schema2.String,
90
+ sourceScope: ScopeId,
91
+ scope: ScopeId,
92
+ slot: Schema2.String,
93
+ value: GraphqlSourceBindingValue
94
+ });
95
+ var GraphqlSourceBindingRef = Schema2.Struct({
96
+ sourceId: Schema2.String,
97
+ sourceScopeId: ScopeId,
98
+ scopeId: ScopeId,
99
+ slot: Schema2.String,
100
+ value: GraphqlSourceBindingValue,
101
+ createdAt: Schema2.Date,
102
+ updatedAt: Schema2.Date
103
+ });
104
+ var InvocationConfig = Schema2.Struct({
105
+ /** The GraphQL endpoint URL */
106
+ endpoint: Schema2.String,
107
+ /** Headers applied to every request. Values can reference secrets. */
108
+ headers: Schema2.Record(Schema2.String, ConfiguredGraphqlCredentialValue).pipe(
109
+ Schema2.withDecodingDefault(Effect.succeed({})),
110
+ Schema2.withConstructorDefault(Effect.succeed({}))
111
+ ),
112
+ /** Query parameters applied to every request. Values can reference secrets. */
113
+ queryParams: Schema2.Record(Schema2.String, ConfiguredGraphqlCredentialValue).pipe(
114
+ Schema2.withDecodingDefault(Effect.succeed({})),
115
+ Schema2.withConstructorDefault(Effect.succeed({}))
116
+ )
117
+ });
118
+ var InvocationResult = Schema2.Struct({
119
+ status: Schema2.Number,
120
+ data: Schema2.NullOr(Schema2.Unknown),
121
+ errors: Schema2.NullOr(Schema2.Unknown)
122
+ });
123
+
124
+ export {
125
+ GraphqlIntrospectionError,
126
+ GraphqlExtractionError,
127
+ GraphqlInvocationError,
128
+ GraphqlOperationKind,
129
+ GraphqlArgument,
130
+ ExtractedField,
131
+ ExtractionResult,
132
+ OperationBinding,
133
+ HeaderValue,
134
+ QueryParamValue,
135
+ ConfiguredGraphqlCredentialValue,
136
+ GraphqlCredentialInput,
137
+ graphqlHeaderSlot,
138
+ graphqlQueryParamSlot,
139
+ GRAPHQL_OAUTH_CONNECTION_SLOT,
140
+ GraphqlSourceAuth,
141
+ GraphqlSourceAuthInput,
142
+ GraphqlSourceBindingValue,
143
+ GraphqlSourceBindingInput,
144
+ GraphqlSourceBindingRef,
145
+ InvocationConfig,
146
+ InvocationResult
147
+ };
148
+ //# sourceMappingURL=chunk-445ZPXHU.js.map