@executor-js/plugin-graphql 0.0.1 → 0.0.2
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/README.md +25 -14
- package/dist/api/group.d.ts +138 -33
- package/dist/api/handlers.d.ts +2 -2
- package/dist/chunk-ILBZO52O.js +1090 -0
- package/dist/chunk-ILBZO52O.js.map +1 -0
- package/dist/core.js +12 -50
- package/dist/core.js.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/react/GraphqlSignInButton.d.ts +3 -0
- package/dist/react/atoms.d.ts +78 -0
- package/dist/react/client.d.ts +449 -3
- package/dist/react/defaults.d.ts +2 -0
- package/dist/react/source-plugin.d.ts +1 -1
- package/dist/sdk/errors.d.ts +6 -10
- package/dist/sdk/index.d.ts +4 -6
- package/dist/sdk/introspect.d.ts +2 -2
- package/dist/sdk/invoke.d.ts +7 -13
- package/dist/sdk/plugin.d.ts +115 -14
- package/dist/sdk/store.d.ts +94 -0
- package/dist/sdk/types.d.ts +57 -146
- package/package.json +10 -21
- package/dist/chunk-AC5VPNLE.js +0 -916
- package/dist/chunk-AC5VPNLE.js.map +0 -1
- package/dist/promise.d.ts +0 -7
- package/dist/sdk/config-file-store.d.ts +0 -10
- package/dist/sdk/extract.test.d.ts +0 -1
- package/dist/sdk/kv-operation-store.d.ts +0 -4
- package/dist/sdk/operation-store.d.ts +0 -31
- package/dist/sdk/plugin.test.d.ts +0 -1
- package/dist/sdk/stored-source.d.ts +0 -51
package/dist/sdk/plugin.d.ts
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
-
import { HttpClient } from "
|
|
2
|
+
import { HttpClient } from "effect/unstable/http";
|
|
3
3
|
import type { Layer } from "effect";
|
|
4
|
-
import { type
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
4
|
+
import { type StorageFailure } from "@executor-js/sdk/core";
|
|
5
|
+
import { type ConfigFileSink } from "@executor-js/config";
|
|
6
|
+
import { GraphqlExtractionError, GraphqlIntrospectionError } from "./errors";
|
|
7
|
+
import { type GraphqlStore, type StoredGraphqlSource } from "./store";
|
|
8
|
+
import { type GraphqlSourceAuth, type HeaderValue as HeaderValueValue, type QueryParamValue } from "./types";
|
|
7
9
|
export type HeaderValue = HeaderValueValue;
|
|
8
10
|
export interface GraphqlSourceConfig {
|
|
9
11
|
/** The GraphQL endpoint URL */
|
|
10
12
|
readonly endpoint: string;
|
|
13
|
+
/**
|
|
14
|
+
* Executor scope id that owns this source row. Must be one of the
|
|
15
|
+
* executor's configured scopes. Typical shape: an admin adds the
|
|
16
|
+
* source at the outermost (organization) scope so it's visible to
|
|
17
|
+
* every inner (per-user) scope via fall-through reads.
|
|
18
|
+
*/
|
|
19
|
+
readonly scope: string;
|
|
11
20
|
/** Display name for the source. Falls back to namespace if not provided. */
|
|
12
21
|
readonly name?: string;
|
|
13
22
|
/** Optional: introspection JSON text (if endpoint doesn't support introspection) */
|
|
@@ -16,25 +25,117 @@ export interface GraphqlSourceConfig {
|
|
|
16
25
|
readonly namespace?: string;
|
|
17
26
|
/** Headers applied to every request. Values can reference secrets. */
|
|
18
27
|
readonly headers?: Record<string, HeaderValue>;
|
|
28
|
+
/** Query parameters applied to every request. Values can reference secrets. */
|
|
29
|
+
readonly queryParams?: Record<string, QueryParamValue>;
|
|
30
|
+
/** Optional OAuth2 connection used as a Bearer token for every request. */
|
|
31
|
+
readonly auth?: GraphqlSourceAuth;
|
|
19
32
|
}
|
|
20
33
|
export interface GraphqlUpdateSourceInput {
|
|
21
34
|
readonly name?: string;
|
|
22
35
|
readonly endpoint?: string;
|
|
23
36
|
readonly headers?: Record<string, HeaderValue>;
|
|
37
|
+
readonly queryParams?: Record<string, QueryParamValue>;
|
|
38
|
+
readonly auth?: GraphqlSourceAuth;
|
|
24
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Errors any GraphQL extension method may surface. `GraphqlIntrospectionError`
|
|
42
|
+
* and `GraphqlExtractionError` are plugin-domain tagged errors that flow
|
|
43
|
+
* directly to clients (4xx, each carrying its own `HttpApiSchema` status).
|
|
44
|
+
* `StorageFailure` covers raw backend failures (`StorageError` plus
|
|
45
|
+
* `UniqueViolationError`); the HTTP edge (`@executor-js/api`'s `withCapture`)
|
|
46
|
+
* translates `StorageError` to the opaque `InternalError({ traceId })` at
|
|
47
|
+
* Layer composition.
|
|
48
|
+
*/
|
|
49
|
+
export type GraphqlExtensionFailure = GraphqlIntrospectionError | GraphqlExtractionError | StorageFailure;
|
|
25
50
|
export interface GraphqlPluginExtension {
|
|
26
51
|
/** Add a GraphQL endpoint and register its operations as tools */
|
|
27
52
|
readonly addSource: (config: GraphqlSourceConfig) => Effect.Effect<{
|
|
28
53
|
readonly toolCount: number;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
54
|
+
readonly namespace: string;
|
|
55
|
+
}, GraphqlExtensionFailure>;
|
|
56
|
+
/** Remove all tools from a previously added GraphQL source by namespace.
|
|
57
|
+
* `scope` pins the cleanup to the exact row — without it a shadowed
|
|
58
|
+
* outer-scope source with the same namespace could be wiped instead. */
|
|
59
|
+
readonly removeSource: (namespace: string, scope: string) => Effect.Effect<void, StorageFailure>;
|
|
60
|
+
/** Fetch the full stored source by namespace (or null if missing).
|
|
61
|
+
* `scope` returns the exact row at that scope. For fall-through
|
|
62
|
+
* reads across the executor's scope stack, use `executor.sources.*`. */
|
|
63
|
+
readonly getSource: (namespace: string, scope: string) => Effect.Effect<StoredGraphqlSource | null, StorageFailure>;
|
|
64
|
+
/** Update config (endpoint, headers) for an existing GraphQL source.
|
|
65
|
+
* Does NOT re-introspect or re-register tools — just patches the
|
|
66
|
+
* stored endpoint/headers used at invoke time. `scope` pins the
|
|
67
|
+
* mutation to a single row so shadowed rows at other scopes are
|
|
68
|
+
* untouched. */
|
|
69
|
+
readonly updateSource: (namespace: string, scope: string, input: GraphqlUpdateSourceInput) => Effect.Effect<void, StorageFailure>;
|
|
36
70
|
}
|
|
37
|
-
export
|
|
71
|
+
export interface GraphqlPluginOptions {
|
|
38
72
|
readonly httpClientLayer?: Layer.Layer<HttpClient.HttpClient>;
|
|
39
|
-
|
|
40
|
-
|
|
73
|
+
/** If provided, source add/remove is mirrored to executor.jsonc
|
|
74
|
+
* (best-effort — file errors are logged, not raised). */
|
|
75
|
+
readonly configFile?: ConfigFileSink;
|
|
76
|
+
}
|
|
77
|
+
export declare const graphqlPlugin: import("@executor-js/sdk/core").ConfiguredPlugin<"graphql", {
|
|
78
|
+
addSource: (config: GraphqlSourceConfig) => Effect.Effect<{
|
|
79
|
+
readonly toolCount: number;
|
|
80
|
+
readonly namespace: string;
|
|
81
|
+
}, StorageFailure | GraphqlIntrospectionError | GraphqlExtractionError, never>;
|
|
82
|
+
removeSource: (namespace: string, scope: string) => Effect.Effect<void, StorageFailure, never>;
|
|
83
|
+
getSource: (namespace: string, scope: string) => Effect.Effect<StoredGraphqlSource | null, StorageFailure, never>;
|
|
84
|
+
updateSource: (namespace: string, scope: string, input: GraphqlUpdateSourceInput) => Effect.Effect<void, StorageFailure, never>;
|
|
85
|
+
}, GraphqlStore, GraphqlPluginOptions, {
|
|
86
|
+
readonly graphql_source: {
|
|
87
|
+
readonly fields: {
|
|
88
|
+
readonly id: {
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
readonly required: true;
|
|
91
|
+
};
|
|
92
|
+
readonly scope_id: {
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
readonly required: true;
|
|
95
|
+
readonly index: true;
|
|
96
|
+
};
|
|
97
|
+
readonly name: {
|
|
98
|
+
readonly type: "string";
|
|
99
|
+
readonly required: true;
|
|
100
|
+
};
|
|
101
|
+
readonly endpoint: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
readonly required: true;
|
|
104
|
+
};
|
|
105
|
+
readonly headers: {
|
|
106
|
+
readonly type: "json";
|
|
107
|
+
readonly required: false;
|
|
108
|
+
};
|
|
109
|
+
readonly query_params: {
|
|
110
|
+
readonly type: "json";
|
|
111
|
+
readonly required: false;
|
|
112
|
+
};
|
|
113
|
+
readonly auth: {
|
|
114
|
+
readonly type: "json";
|
|
115
|
+
readonly required: false;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
readonly graphql_operation: {
|
|
120
|
+
readonly fields: {
|
|
121
|
+
readonly id: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly required: true;
|
|
124
|
+
};
|
|
125
|
+
readonly scope_id: {
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
readonly required: true;
|
|
128
|
+
readonly index: true;
|
|
129
|
+
};
|
|
130
|
+
readonly source_id: {
|
|
131
|
+
readonly type: "string";
|
|
132
|
+
readonly required: true;
|
|
133
|
+
readonly index: true;
|
|
134
|
+
};
|
|
135
|
+
readonly binding: {
|
|
136
|
+
readonly type: "json";
|
|
137
|
+
readonly required: true;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
}>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { type StorageDeps, type StorageFailure } from "@executor-js/sdk/core";
|
|
3
|
+
import { OperationBinding, type GraphqlSourceAuth, type HeaderValue, type QueryParamValue } from "./types";
|
|
4
|
+
export declare const graphqlSchema: {
|
|
5
|
+
readonly graphql_source: {
|
|
6
|
+
readonly fields: {
|
|
7
|
+
readonly id: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly required: true;
|
|
10
|
+
};
|
|
11
|
+
readonly scope_id: {
|
|
12
|
+
readonly type: "string";
|
|
13
|
+
readonly required: true;
|
|
14
|
+
readonly index: true;
|
|
15
|
+
};
|
|
16
|
+
readonly name: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
readonly required: true;
|
|
19
|
+
};
|
|
20
|
+
readonly endpoint: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
readonly required: true;
|
|
23
|
+
};
|
|
24
|
+
readonly headers: {
|
|
25
|
+
readonly type: "json";
|
|
26
|
+
readonly required: false;
|
|
27
|
+
};
|
|
28
|
+
readonly query_params: {
|
|
29
|
+
readonly type: "json";
|
|
30
|
+
readonly required: false;
|
|
31
|
+
};
|
|
32
|
+
readonly auth: {
|
|
33
|
+
readonly type: "json";
|
|
34
|
+
readonly required: false;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
readonly graphql_operation: {
|
|
39
|
+
readonly fields: {
|
|
40
|
+
readonly id: {
|
|
41
|
+
readonly type: "string";
|
|
42
|
+
readonly required: true;
|
|
43
|
+
};
|
|
44
|
+
readonly scope_id: {
|
|
45
|
+
readonly type: "string";
|
|
46
|
+
readonly required: true;
|
|
47
|
+
readonly index: true;
|
|
48
|
+
};
|
|
49
|
+
readonly source_id: {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
readonly required: true;
|
|
52
|
+
readonly index: true;
|
|
53
|
+
};
|
|
54
|
+
readonly binding: {
|
|
55
|
+
readonly type: "json";
|
|
56
|
+
readonly required: true;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export type GraphqlSchema = typeof graphqlSchema;
|
|
62
|
+
export interface StoredGraphqlSource {
|
|
63
|
+
readonly namespace: string;
|
|
64
|
+
/** Executor scope id this source row lives in. Writes stamp this on
|
|
65
|
+
* `scope_id`; reads return whichever scope's row the adapter's
|
|
66
|
+
* fall-through walk surfaced first. */
|
|
67
|
+
readonly scope: string;
|
|
68
|
+
readonly name: string;
|
|
69
|
+
readonly endpoint: string;
|
|
70
|
+
readonly headers: Record<string, HeaderValue>;
|
|
71
|
+
readonly queryParams: Record<string, QueryParamValue>;
|
|
72
|
+
readonly auth: GraphqlSourceAuth;
|
|
73
|
+
}
|
|
74
|
+
export interface StoredOperation {
|
|
75
|
+
readonly toolId: string;
|
|
76
|
+
readonly sourceId: string;
|
|
77
|
+
readonly binding: OperationBinding;
|
|
78
|
+
}
|
|
79
|
+
export interface GraphqlStore {
|
|
80
|
+
readonly upsertSource: (input: StoredGraphqlSource, operations: readonly StoredOperation[]) => Effect.Effect<void, StorageFailure>;
|
|
81
|
+
readonly updateSourceMeta: (namespace: string, scope: string, patch: {
|
|
82
|
+
readonly name?: string;
|
|
83
|
+
readonly endpoint?: string;
|
|
84
|
+
readonly headers?: Record<string, HeaderValue>;
|
|
85
|
+
readonly queryParams?: Record<string, QueryParamValue>;
|
|
86
|
+
readonly auth?: GraphqlSourceAuth;
|
|
87
|
+
}) => Effect.Effect<void, StorageFailure>;
|
|
88
|
+
readonly getSource: (namespace: string, scope: string) => Effect.Effect<StoredGraphqlSource | null, StorageFailure>;
|
|
89
|
+
readonly listSources: () => Effect.Effect<readonly StoredGraphqlSource[], StorageFailure>;
|
|
90
|
+
readonly getOperationByToolId: (toolId: string, scope: string) => Effect.Effect<StoredOperation | null, StorageFailure>;
|
|
91
|
+
readonly listOperationsBySource: (sourceId: string, scope: string) => Effect.Effect<readonly StoredOperation[], StorageFailure>;
|
|
92
|
+
readonly removeSource: (namespace: string, scope: string) => Effect.Effect<void, StorageFailure>;
|
|
93
|
+
}
|
|
94
|
+
export declare const makeDefaultGraphqlStore: ({ adapter: db, }: StorageDeps<GraphqlSchema>) => GraphqlStore;
|
package/dist/sdk/types.d.ts
CHANGED
|
@@ -1,172 +1,83 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
export declare const GraphqlOperationKind: Schema.
|
|
2
|
+
export declare const GraphqlOperationKind: Schema.Literals<readonly ["query", "mutation"]>;
|
|
3
3
|
export type GraphqlOperationKind = typeof GraphqlOperationKind.Type;
|
|
4
|
-
declare const GraphqlArgument_base: Schema.Class<GraphqlArgument, {
|
|
5
|
-
name:
|
|
6
|
-
typeName:
|
|
7
|
-
required:
|
|
8
|
-
description: Schema.
|
|
9
|
-
|
|
10
|
-
}>;
|
|
11
|
-
}, Schema.Struct.Encoded<{
|
|
12
|
-
name: typeof Schema.String;
|
|
13
|
-
typeName: typeof Schema.String;
|
|
14
|
-
required: typeof Schema.Boolean;
|
|
15
|
-
description: Schema.optionalWith<typeof Schema.String, {
|
|
16
|
-
as: "Option";
|
|
17
|
-
}>;
|
|
18
|
-
}>, never, {
|
|
19
|
-
readonly name: string;
|
|
20
|
-
} & {
|
|
21
|
-
readonly description: import("effect/Option").Option<string>;
|
|
22
|
-
} & {
|
|
23
|
-
readonly required: boolean;
|
|
24
|
-
} & {
|
|
25
|
-
readonly typeName: string;
|
|
26
|
-
}, {}, {}>;
|
|
4
|
+
declare const GraphqlArgument_base: Schema.Class<GraphqlArgument, Schema.Struct<{
|
|
5
|
+
readonly name: Schema.String;
|
|
6
|
+
readonly typeName: Schema.String;
|
|
7
|
+
readonly required: Schema.Boolean;
|
|
8
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
9
|
+
}>, {}>;
|
|
27
10
|
export declare class GraphqlArgument extends GraphqlArgument_base {
|
|
28
11
|
}
|
|
29
|
-
declare const ExtractedField_base: Schema.Class<ExtractedField, {
|
|
12
|
+
declare const ExtractedField_base: Schema.Class<ExtractedField, Schema.Struct<{
|
|
30
13
|
/** e.g. "user", "createUser" */
|
|
31
|
-
fieldName:
|
|
14
|
+
readonly fieldName: Schema.String;
|
|
32
15
|
/** "query" or "mutation" */
|
|
33
|
-
kind: Schema.
|
|
34
|
-
description: Schema.
|
|
35
|
-
|
|
36
|
-
}>;
|
|
37
|
-
arguments: Schema.Array$<typeof GraphqlArgument>;
|
|
16
|
+
readonly kind: Schema.Literals<readonly ["query", "mutation"]>;
|
|
17
|
+
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
18
|
+
readonly arguments: Schema.$Array<typeof GraphqlArgument>;
|
|
38
19
|
/** JSON Schema for the input (built from arguments) */
|
|
39
|
-
inputSchema: Schema.
|
|
40
|
-
as: "Option";
|
|
41
|
-
}>;
|
|
20
|
+
readonly inputSchema: Schema.OptionFromOptional<Schema.Unknown>;
|
|
42
21
|
/** The return type name for documentation */
|
|
43
|
-
returnTypeName:
|
|
44
|
-
}
|
|
45
|
-
/** e.g. "user", "createUser" */
|
|
46
|
-
fieldName: typeof Schema.String;
|
|
47
|
-
/** "query" or "mutation" */
|
|
48
|
-
kind: Schema.Literal<["query", "mutation"]>;
|
|
49
|
-
description: Schema.optionalWith<typeof Schema.String, {
|
|
50
|
-
as: "Option";
|
|
51
|
-
}>;
|
|
52
|
-
arguments: Schema.Array$<typeof GraphqlArgument>;
|
|
53
|
-
/** JSON Schema for the input (built from arguments) */
|
|
54
|
-
inputSchema: Schema.optionalWith<typeof Schema.Unknown, {
|
|
55
|
-
as: "Option";
|
|
56
|
-
}>;
|
|
57
|
-
/** The return type name for documentation */
|
|
58
|
-
returnTypeName: typeof Schema.String;
|
|
59
|
-
}>, never, {
|
|
60
|
-
readonly description: import("effect/Option").Option<string>;
|
|
61
|
-
} & {
|
|
62
|
-
readonly inputSchema: import("effect/Option").Option<unknown>;
|
|
63
|
-
} & {
|
|
64
|
-
readonly kind: "query" | "mutation";
|
|
65
|
-
} & {
|
|
66
|
-
readonly fieldName: string;
|
|
67
|
-
} & {
|
|
68
|
-
readonly returnTypeName: string;
|
|
69
|
-
} & {
|
|
70
|
-
readonly arguments: readonly GraphqlArgument[];
|
|
71
|
-
}, {}, {}>;
|
|
22
|
+
readonly returnTypeName: Schema.String;
|
|
23
|
+
}>, {}>;
|
|
72
24
|
export declare class ExtractedField extends ExtractedField_base {
|
|
73
25
|
}
|
|
74
|
-
declare const ExtractionResult_base: Schema.Class<ExtractionResult, {
|
|
75
|
-
/** Schema name from introspection */
|
|
76
|
-
schemaName: Schema.optionalWith<typeof Schema.String, {
|
|
77
|
-
as: "Option";
|
|
78
|
-
}>;
|
|
79
|
-
fields: Schema.Array$<typeof ExtractedField>;
|
|
80
|
-
}, Schema.Struct.Encoded<{
|
|
26
|
+
declare const ExtractionResult_base: Schema.Class<ExtractionResult, Schema.Struct<{
|
|
81
27
|
/** Schema name from introspection */
|
|
82
|
-
schemaName: Schema.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
fields: Schema.Array$<typeof ExtractedField>;
|
|
86
|
-
}>, never, {
|
|
87
|
-
readonly fields: readonly ExtractedField[];
|
|
88
|
-
} & {
|
|
89
|
-
readonly schemaName: import("effect/Option").Option<string>;
|
|
90
|
-
}, {}, {}>;
|
|
28
|
+
readonly schemaName: Schema.OptionFromOptional<Schema.String>;
|
|
29
|
+
readonly fields: Schema.$Array<typeof ExtractedField>;
|
|
30
|
+
}>, {}>;
|
|
91
31
|
export declare class ExtractionResult extends ExtractionResult_base {
|
|
92
32
|
}
|
|
93
|
-
declare const OperationBinding_base: Schema.Class<OperationBinding, {
|
|
94
|
-
kind: Schema.
|
|
95
|
-
fieldName:
|
|
33
|
+
declare const OperationBinding_base: Schema.Class<OperationBinding, Schema.Struct<{
|
|
34
|
+
readonly kind: Schema.Literals<readonly ["query", "mutation"]>;
|
|
35
|
+
readonly fieldName: Schema.String;
|
|
96
36
|
/** The full GraphQL query/mutation string */
|
|
97
|
-
operationString:
|
|
37
|
+
readonly operationString: Schema.String;
|
|
98
38
|
/** Ordered variable names for mapping */
|
|
99
|
-
variableNames: Schema
|
|
100
|
-
}
|
|
101
|
-
kind: Schema.Literal<["query", "mutation"]>;
|
|
102
|
-
fieldName: typeof Schema.String;
|
|
103
|
-
/** The full GraphQL query/mutation string */
|
|
104
|
-
operationString: typeof Schema.String;
|
|
105
|
-
/** Ordered variable names for mapping */
|
|
106
|
-
variableNames: Schema.Array$<typeof Schema.String>;
|
|
107
|
-
}>, never, {
|
|
108
|
-
readonly kind: "query" | "mutation";
|
|
109
|
-
} & {
|
|
110
|
-
readonly fieldName: string;
|
|
111
|
-
} & {
|
|
112
|
-
readonly operationString: string;
|
|
113
|
-
} & {
|
|
114
|
-
readonly variableNames: readonly string[];
|
|
115
|
-
}, {}, {}>;
|
|
39
|
+
readonly variableNames: Schema.$Array<Schema.String>;
|
|
40
|
+
}>, {}>;
|
|
116
41
|
export declare class OperationBinding extends OperationBinding_base {
|
|
117
42
|
}
|
|
118
|
-
export declare const HeaderValue: Schema.Union<[
|
|
119
|
-
secretId:
|
|
120
|
-
prefix: Schema.optional<
|
|
43
|
+
export declare const HeaderValue: Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
44
|
+
readonly secretId: Schema.String;
|
|
45
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
121
46
|
}>]>;
|
|
122
47
|
export type HeaderValue = typeof HeaderValue.Type;
|
|
123
|
-
declare const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
48
|
+
export declare const QueryParamValue: Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
49
|
+
readonly secretId: Schema.String;
|
|
50
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
51
|
+
}>]>;
|
|
52
|
+
export type QueryParamValue = typeof QueryParamValue.Type;
|
|
53
|
+
export declare const GraphqlSourceAuth: Schema.Union<readonly [Schema.Struct<{
|
|
54
|
+
readonly kind: Schema.Literal<"none">;
|
|
55
|
+
}>, Schema.Struct<{
|
|
56
|
+
readonly kind: Schema.Literal<"oauth2">;
|
|
57
|
+
readonly connectionId: Schema.String;
|
|
58
|
+
}>]>;
|
|
59
|
+
export type GraphqlSourceAuth = typeof GraphqlSourceAuth.Type;
|
|
60
|
+
declare const InvocationConfig_base: Schema.Class<InvocationConfig, Schema.Struct<{
|
|
134
61
|
/** The GraphQL endpoint URL */
|
|
135
|
-
endpoint:
|
|
62
|
+
readonly endpoint: Schema.String;
|
|
136
63
|
/** Headers applied to every request. Values can reference secrets. */
|
|
137
|
-
headers: Schema.
|
|
138
|
-
secretId:
|
|
139
|
-
prefix: Schema.optional<
|
|
140
|
-
}>]
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
readonly [x: string]: string | {
|
|
148
|
-
readonly secretId: string;
|
|
149
|
-
readonly prefix?: string | undefined;
|
|
150
|
-
};
|
|
151
|
-
} | undefined;
|
|
152
|
-
}, {}, {}>;
|
|
64
|
+
readonly headers: Schema.withConstructorDefault<Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
65
|
+
readonly secretId: Schema.String;
|
|
66
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
67
|
+
}>]>>>>;
|
|
68
|
+
/** Query parameters applied to every request. Values can reference secrets. */
|
|
69
|
+
readonly queryParams: Schema.withConstructorDefault<Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
70
|
+
readonly secretId: Schema.String;
|
|
71
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
72
|
+
}>]>>>>;
|
|
73
|
+
}>, {}>;
|
|
153
74
|
export declare class InvocationConfig extends InvocationConfig_base {
|
|
154
75
|
}
|
|
155
|
-
declare const InvocationResult_base: Schema.Class<InvocationResult, {
|
|
156
|
-
status:
|
|
157
|
-
data: Schema.NullOr<
|
|
158
|
-
errors: Schema.NullOr<
|
|
159
|
-
}
|
|
160
|
-
status: typeof Schema.Number;
|
|
161
|
-
data: Schema.NullOr<typeof Schema.Unknown>;
|
|
162
|
-
errors: Schema.NullOr<typeof Schema.Unknown>;
|
|
163
|
-
}>, never, {
|
|
164
|
-
readonly data: unknown;
|
|
165
|
-
} & {
|
|
166
|
-
readonly status: number;
|
|
167
|
-
} & {
|
|
168
|
-
readonly errors: unknown;
|
|
169
|
-
}, {}, {}>;
|
|
76
|
+
declare const InvocationResult_base: Schema.Class<InvocationResult, Schema.Struct<{
|
|
77
|
+
readonly status: Schema.Number;
|
|
78
|
+
readonly data: Schema.NullOr<Schema.Unknown>;
|
|
79
|
+
readonly errors: Schema.NullOr<Schema.Unknown>;
|
|
80
|
+
}>, {}>;
|
|
170
81
|
export declare class InvocationResult extends InvocationResult_base {
|
|
171
82
|
}
|
|
172
83
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@executor-js/plugin-graphql",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/graphql",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/RhysSullivan/executor/issues"
|
|
@@ -40,28 +40,23 @@
|
|
|
40
40
|
"typecheck:slow": "bunx tsc --noEmit -p tsconfig.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@effect/platform": "
|
|
44
|
-
"@
|
|
45
|
-
"@executor/
|
|
46
|
-
"
|
|
47
|
-
"effect": "^3.21.0"
|
|
43
|
+
"@effect/platform-node": "4.0.0-beta.59",
|
|
44
|
+
"@executor-js/config": "0.0.2",
|
|
45
|
+
"@executor-js/sdk": "0.0.2",
|
|
46
|
+
"effect": "4.0.0-beta.59"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
50
|
-
"@effect
|
|
51
|
-
"@effect/vitest": "
|
|
52
|
-
"@executor/api": "1.4.3",
|
|
53
|
-
"@executor/react": "1.4.3",
|
|
49
|
+
"@effect/atom-react": "4.0.0-beta.59",
|
|
50
|
+
"@effect/vitest": "4.0.0-beta.59",
|
|
54
51
|
"@types/node": "^24.3.1",
|
|
55
52
|
"@types/react": "^19.1.0",
|
|
56
53
|
"bun-types": "^1.2.22",
|
|
57
54
|
"react": "^19.1.0",
|
|
58
55
|
"tsup": "^8.5.0",
|
|
59
|
-
"vitest": "^4.1.
|
|
56
|
+
"vitest": "^4.1.5"
|
|
60
57
|
},
|
|
61
58
|
"peerDependencies": {
|
|
62
|
-
"@effect
|
|
63
|
-
"@executor/api": "1.4.3",
|
|
64
|
-
"@executor/react": "1.4.3",
|
|
59
|
+
"@effect/atom-react": "4.0.0-beta.59",
|
|
65
60
|
"@tanstack/react-router": "^1.168.10",
|
|
66
61
|
"react": "^19.1.0"
|
|
67
62
|
},
|
|
@@ -69,17 +64,11 @@
|
|
|
69
64
|
"react": {
|
|
70
65
|
"optional": true
|
|
71
66
|
},
|
|
72
|
-
"@effect
|
|
67
|
+
"@effect/atom-react": {
|
|
73
68
|
"optional": true
|
|
74
69
|
},
|
|
75
70
|
"@tanstack/react-router": {
|
|
76
71
|
"optional": true
|
|
77
|
-
},
|
|
78
|
-
"@executor/api": {
|
|
79
|
-
"optional": true
|
|
80
|
-
},
|
|
81
|
-
"@executor/react": {
|
|
82
|
-
"optional": true
|
|
83
72
|
}
|
|
84
73
|
}
|
|
85
74
|
}
|