@executor-js/plugin-graphql 1.5.1 → 1.5.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/package.json +17 -17
- package/dist/api/group.d.ts +0 -158
- package/dist/api/handlers.d.ts +0 -17
- package/dist/api/index.d.ts +0 -169
- package/dist/react/AddGraphqlSource.d.ts +0 -5
- package/dist/react/EditGraphqlSource.d.ts +0 -4
- package/dist/react/GraphqlAccountsPanel.d.ts +0 -6
- package/dist/react/GraphqlSignInButton.d.ts +0 -7
- package/dist/react/GraphqlSourceFields.d.ts +0 -8
- package/dist/react/atoms.d.ts +0 -124
- package/dist/react/auth-method-config.d.ts +0 -9
- package/dist/react/client.d.ts +0 -154
- package/dist/react/defaults.d.ts +0 -16
- package/dist/react/index.d.ts +0 -3
- package/dist/react/plugin-client.d.ts +0 -2
- package/dist/react/source-plugin.d.ts +0 -2
- package/dist/sdk/errors.d.ts +0 -43
- package/dist/sdk/extract.d.ts +0 -11
- package/dist/sdk/index.d.ts +0 -7
- package/dist/sdk/introspect.d.ts +0 -440
- package/dist/sdk/invoke.d.ts +0 -20
- package/dist/sdk/plugin.d.ts +0 -115
- package/dist/sdk/presets.d.ts +0 -10
- package/dist/sdk/store.d.ts +0 -18
- package/dist/sdk/types.d.ts +0 -185
- package/dist/testing/index.d.ts +0 -70
package/dist/sdk/types.d.ts
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { Schema } from "effect";
|
|
2
|
-
export declare const GraphqlOperationKind: Schema.Literals<readonly ["query", "mutation"]>;
|
|
3
|
-
export type GraphqlOperationKind = typeof GraphqlOperationKind.Type;
|
|
4
|
-
export declare const 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
|
-
}>;
|
|
10
|
-
export type GraphqlArgument = typeof GraphqlArgument.Type;
|
|
11
|
-
export declare const ExtractedField: Schema.Struct<{
|
|
12
|
-
/** e.g. "user", "createUser" */
|
|
13
|
-
readonly fieldName: Schema.String;
|
|
14
|
-
/** "query" or "mutation" */
|
|
15
|
-
readonly kind: Schema.Literals<readonly ["query", "mutation"]>;
|
|
16
|
-
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
17
|
-
readonly arguments: Schema.$Array<Schema.Struct<{
|
|
18
|
-
readonly name: Schema.String;
|
|
19
|
-
readonly typeName: Schema.String;
|
|
20
|
-
readonly required: Schema.Boolean;
|
|
21
|
-
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
22
|
-
}>>;
|
|
23
|
-
/** JSON Schema for the input (built from arguments) */
|
|
24
|
-
readonly inputSchema: Schema.OptionFromOptional<Schema.Unknown>;
|
|
25
|
-
/** The return type name for documentation */
|
|
26
|
-
readonly returnTypeName: Schema.String;
|
|
27
|
-
}>;
|
|
28
|
-
export type ExtractedField = typeof ExtractedField.Type;
|
|
29
|
-
export declare const ExtractionResult: Schema.Struct<{
|
|
30
|
-
/** Schema name from introspection */
|
|
31
|
-
readonly schemaName: Schema.OptionFromOptional<Schema.String>;
|
|
32
|
-
readonly fields: Schema.$Array<Schema.Struct<{
|
|
33
|
-
/** e.g. "user", "createUser" */
|
|
34
|
-
readonly fieldName: Schema.String;
|
|
35
|
-
/** "query" or "mutation" */
|
|
36
|
-
readonly kind: Schema.Literals<readonly ["query", "mutation"]>;
|
|
37
|
-
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
38
|
-
readonly arguments: Schema.$Array<Schema.Struct<{
|
|
39
|
-
readonly name: Schema.String;
|
|
40
|
-
readonly typeName: Schema.String;
|
|
41
|
-
readonly required: Schema.Boolean;
|
|
42
|
-
readonly description: Schema.OptionFromOptional<Schema.String>;
|
|
43
|
-
}>>;
|
|
44
|
-
/** JSON Schema for the input (built from arguments) */
|
|
45
|
-
readonly inputSchema: Schema.OptionFromOptional<Schema.Unknown>;
|
|
46
|
-
/** The return type name for documentation */
|
|
47
|
-
readonly returnTypeName: Schema.String;
|
|
48
|
-
}>>;
|
|
49
|
-
}>;
|
|
50
|
-
export type ExtractionResult = typeof ExtractionResult.Type;
|
|
51
|
-
export declare const OperationBinding: Schema.Struct<{
|
|
52
|
-
readonly kind: Schema.Literals<readonly ["query", "mutation"]>;
|
|
53
|
-
readonly fieldName: Schema.String;
|
|
54
|
-
/** The full GraphQL query/mutation string */
|
|
55
|
-
readonly operationString: Schema.String;
|
|
56
|
-
/** Ordered variable names for mapping */
|
|
57
|
-
readonly variableNames: Schema.$Array<Schema.String>;
|
|
58
|
-
}>;
|
|
59
|
-
export type OperationBinding = typeof OperationBinding.Type;
|
|
60
|
-
/** An apiKey-style template: place the value in a header or query parameter,
|
|
61
|
-
* optionally prefixed (e.g. `Bearer `). */
|
|
62
|
-
export declare const ApiKeyAuthTemplate: Schema.Struct<{
|
|
63
|
-
readonly kind: Schema.Literal<"apiKey">;
|
|
64
|
-
/** The template slug a connection references via `connection.template`. */
|
|
65
|
-
readonly slug: Schema.String;
|
|
66
|
-
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
67
|
-
/** The header / query-parameter name the value is written to. */
|
|
68
|
-
readonly name: Schema.String;
|
|
69
|
-
/** Optional prefix prepended to the value (e.g. `Bearer `). */
|
|
70
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
71
|
-
}>;
|
|
72
|
-
export type ApiKeyAuthTemplate = typeof ApiKeyAuthTemplate.Type;
|
|
73
|
-
/** An OAuth bearer template: write `Authorization: Bearer <access-token>`. The
|
|
74
|
-
* resolved (and refreshed) access token is `credential.value`. */
|
|
75
|
-
export declare const OAuthAuthTemplate: Schema.Struct<{
|
|
76
|
-
readonly kind: Schema.Literal<"oauth2">;
|
|
77
|
-
readonly slug: Schema.String;
|
|
78
|
-
/** The header to write the bearer token to. Defaults to `Authorization`. */
|
|
79
|
-
readonly header: Schema.optional<Schema.String>;
|
|
80
|
-
/** The token prefix. Defaults to `Bearer `. */
|
|
81
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
82
|
-
}>;
|
|
83
|
-
export type OAuthAuthTemplate = typeof OAuthAuthTemplate.Type;
|
|
84
|
-
export declare const AuthTemplate: Schema.Union<readonly [Schema.Struct<{
|
|
85
|
-
readonly kind: Schema.Literal<"apiKey">;
|
|
86
|
-
/** The template slug a connection references via `connection.template`. */
|
|
87
|
-
readonly slug: Schema.String;
|
|
88
|
-
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
89
|
-
/** The header / query-parameter name the value is written to. */
|
|
90
|
-
readonly name: Schema.String;
|
|
91
|
-
/** Optional prefix prepended to the value (e.g. `Bearer `). */
|
|
92
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
93
|
-
}>, Schema.Struct<{
|
|
94
|
-
readonly kind: Schema.Literal<"oauth2">;
|
|
95
|
-
readonly slug: Schema.String;
|
|
96
|
-
/** The header to write the bearer token to. Defaults to `Authorization`. */
|
|
97
|
-
readonly header: Schema.optional<Schema.String>;
|
|
98
|
-
/** The token prefix. Defaults to `Bearer `. */
|
|
99
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
100
|
-
}>]>;
|
|
101
|
-
export type AuthTemplate = typeof AuthTemplate.Type;
|
|
102
|
-
export declare const GraphqlIntegrationConfig: Schema.Struct<{
|
|
103
|
-
/** The GraphQL endpoint URL. */
|
|
104
|
-
readonly endpoint: Schema.String;
|
|
105
|
-
/** Display name for the integration. */
|
|
106
|
-
readonly name: Schema.String;
|
|
107
|
-
/** Optional introspection JSON text (when the endpoint doesn't support
|
|
108
|
-
* live introspection). */
|
|
109
|
-
readonly introspectionJson: Schema.optional<Schema.String>;
|
|
110
|
-
/** Static headers applied to every request (and to add-time introspection). */
|
|
111
|
-
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
112
|
-
/** Static query parameters applied to every request. */
|
|
113
|
-
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
114
|
-
/** Auth methods a connection can be applied through. */
|
|
115
|
-
readonly authenticationTemplate: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
116
|
-
readonly kind: Schema.Literal<"apiKey">;
|
|
117
|
-
/** The template slug a connection references via `connection.template`. */
|
|
118
|
-
readonly slug: Schema.String;
|
|
119
|
-
readonly in: Schema.Literals<readonly ["header", "query"]>;
|
|
120
|
-
/** The header / query-parameter name the value is written to. */
|
|
121
|
-
readonly name: Schema.String;
|
|
122
|
-
/** Optional prefix prepended to the value (e.g. `Bearer `). */
|
|
123
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
124
|
-
}>, Schema.Struct<{
|
|
125
|
-
readonly kind: Schema.Literal<"oauth2">;
|
|
126
|
-
readonly slug: Schema.String;
|
|
127
|
-
/** The header to write the bearer token to. Defaults to `Authorization`. */
|
|
128
|
-
readonly header: Schema.optional<Schema.String>;
|
|
129
|
-
/** The token prefix. Defaults to `Bearer `. */
|
|
130
|
-
readonly prefix: Schema.optional<Schema.String>;
|
|
131
|
-
}>]>>;
|
|
132
|
-
}>;
|
|
133
|
-
export type GraphqlIntegrationConfig = typeof GraphqlIntegrationConfig.Type;
|
|
134
|
-
export declare const decodeGraphqlIntegrationConfig: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
|
|
135
|
-
readonly name: string;
|
|
136
|
-
readonly endpoint: string;
|
|
137
|
-
readonly authenticationTemplate: readonly ({
|
|
138
|
-
readonly name: string;
|
|
139
|
-
readonly in: "header" | "query";
|
|
140
|
-
readonly slug: string;
|
|
141
|
-
readonly kind: "apiKey";
|
|
142
|
-
readonly prefix?: string | undefined;
|
|
143
|
-
} | {
|
|
144
|
-
readonly slug: string;
|
|
145
|
-
readonly kind: "oauth2";
|
|
146
|
-
readonly header?: string | undefined;
|
|
147
|
-
readonly prefix?: string | undefined;
|
|
148
|
-
})[];
|
|
149
|
-
readonly headers?: {
|
|
150
|
-
readonly [x: string]: string;
|
|
151
|
-
} | undefined;
|
|
152
|
-
readonly introspectionJson?: string | undefined;
|
|
153
|
-
readonly queryParams?: {
|
|
154
|
-
readonly [x: string]: string;
|
|
155
|
-
} | undefined;
|
|
156
|
-
}, Schema.SchemaError, never>;
|
|
157
|
-
export declare const decodeGraphqlIntegrationConfigOption: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Option").Option<{
|
|
158
|
-
readonly name: string;
|
|
159
|
-
readonly endpoint: string;
|
|
160
|
-
readonly authenticationTemplate: readonly ({
|
|
161
|
-
readonly name: string;
|
|
162
|
-
readonly in: "header" | "query";
|
|
163
|
-
readonly slug: string;
|
|
164
|
-
readonly kind: "apiKey";
|
|
165
|
-
readonly prefix?: string | undefined;
|
|
166
|
-
} | {
|
|
167
|
-
readonly slug: string;
|
|
168
|
-
readonly kind: "oauth2";
|
|
169
|
-
readonly header?: string | undefined;
|
|
170
|
-
readonly prefix?: string | undefined;
|
|
171
|
-
})[];
|
|
172
|
-
readonly headers?: {
|
|
173
|
-
readonly [x: string]: string;
|
|
174
|
-
} | undefined;
|
|
175
|
-
readonly introspectionJson?: string | undefined;
|
|
176
|
-
readonly queryParams?: {
|
|
177
|
-
readonly [x: string]: string;
|
|
178
|
-
} | undefined;
|
|
179
|
-
}>;
|
|
180
|
-
export declare const InvocationResult: Schema.Struct<{
|
|
181
|
-
readonly status: Schema.Number;
|
|
182
|
-
readonly data: Schema.NullOr<Schema.Unknown>;
|
|
183
|
-
readonly errors: Schema.NullOr<Schema.Unknown>;
|
|
184
|
-
}>;
|
|
185
|
-
export type InvocationResult = typeof InvocationResult.Type;
|
package/dist/testing/index.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Context, Effect, Layer, Schema as EffectSchema, Scope } from "effect";
|
|
2
|
-
import type { GraphQLSchema } from "graphql";
|
|
3
|
-
import { OAuthTestServer } from "@executor-js/sdk/testing";
|
|
4
|
-
declare const GraphqlRequestPayload: EffectSchema.Struct<{
|
|
5
|
-
readonly query: EffectSchema.optional<EffectSchema.String>;
|
|
6
|
-
readonly variables: EffectSchema.optional<EffectSchema.$Record<EffectSchema.String, EffectSchema.Unknown>>;
|
|
7
|
-
readonly operationName: EffectSchema.optional<EffectSchema.NullOr<EffectSchema.String>>;
|
|
8
|
-
}>;
|
|
9
|
-
type GraphqlRequestPayload = typeof GraphqlRequestPayload.Type;
|
|
10
|
-
export interface GraphqlTestRequest {
|
|
11
|
-
readonly url: string;
|
|
12
|
-
readonly method: string;
|
|
13
|
-
readonly path: string;
|
|
14
|
-
readonly headers: Readonly<Record<string, string>>;
|
|
15
|
-
readonly payload: GraphqlRequestPayload;
|
|
16
|
-
}
|
|
17
|
-
export interface GraphqlTestContext {
|
|
18
|
-
readonly request: GraphqlTestRequest;
|
|
19
|
-
}
|
|
20
|
-
export interface GraphqlTestServerOptions {
|
|
21
|
-
readonly schema: GraphQLSchema;
|
|
22
|
-
readonly path?: string;
|
|
23
|
-
readonly auth?: {
|
|
24
|
-
readonly validateAuthorization: (authorization: string | null) => Effect.Effect<boolean>;
|
|
25
|
-
readonly wwwAuthenticate?: string;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export interface GraphqlTestServerShape {
|
|
29
|
-
readonly endpoint: string;
|
|
30
|
-
readonly schema: GraphQLSchema;
|
|
31
|
-
readonly requests: Effect.Effect<readonly GraphqlTestRequest[]>;
|
|
32
|
-
readonly clearRequests: Effect.Effect<void>;
|
|
33
|
-
}
|
|
34
|
-
declare const GraphqlTestServerAddressError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
35
|
-
readonly _tag: "GraphqlTestServerAddressError";
|
|
36
|
-
} & Readonly<A>;
|
|
37
|
-
declare class GraphqlTestServerAddressError extends GraphqlTestServerAddressError_base<{
|
|
38
|
-
readonly address: unknown;
|
|
39
|
-
}> {
|
|
40
|
-
}
|
|
41
|
-
declare const GraphqlTestServerHandlerError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
42
|
-
readonly _tag: "GraphqlTestServerHandlerError";
|
|
43
|
-
} & Readonly<A>;
|
|
44
|
-
declare class GraphqlTestServerHandlerError extends GraphqlTestServerHandlerError_base<{
|
|
45
|
-
readonly cause: unknown;
|
|
46
|
-
}> {
|
|
47
|
-
}
|
|
48
|
-
export declare const serveGraphqlTestServer: (options: GraphqlTestServerOptions) => Effect.Effect<GraphqlTestServerShape, GraphqlTestServerAddressError | GraphqlTestServerHandlerError, Scope.Scope>;
|
|
49
|
-
export declare const serveGraphqlFailureTestServer: (options: {
|
|
50
|
-
readonly status: number;
|
|
51
|
-
readonly body: string;
|
|
52
|
-
readonly contentType?: string;
|
|
53
|
-
readonly path?: string;
|
|
54
|
-
}) => Effect.Effect<{
|
|
55
|
-
endpoint: string;
|
|
56
|
-
httpClientLayer: Layer.Layer<import("effect/unstable/http/HttpClient").HttpClient, never, never>;
|
|
57
|
-
}, import("@executor-js/sdk/testing").TestHttpServerAddressError | import("@executor-js/sdk/testing").TestHttpServerServeError, Scope.Scope>;
|
|
58
|
-
declare const GraphqlTestServer_base: Context.ServiceClass<GraphqlTestServer, "@executor-js/plugin-graphql/testing/GraphqlTestServer", GraphqlTestServerShape>;
|
|
59
|
-
export declare class GraphqlTestServer extends GraphqlTestServer_base {
|
|
60
|
-
static readonly layer: (options: GraphqlTestServerOptions) => Layer.Layer<GraphqlTestServer, GraphqlTestServerAddressError | GraphqlTestServerHandlerError, never>;
|
|
61
|
-
static readonly layerWithOAuth: (options: Omit<GraphqlTestServerOptions, "auth">) => Layer.Layer<GraphqlTestServer, GraphqlTestServerAddressError | GraphqlTestServerHandlerError, OAuthTestServer>;
|
|
62
|
-
}
|
|
63
|
-
export declare const makeGreetingGraphqlSchema: (options?: {
|
|
64
|
-
readonly includeMutation?: boolean;
|
|
65
|
-
}) => GraphQLSchema;
|
|
66
|
-
export declare const TestLayers: {
|
|
67
|
-
greeting: () => Layer.Layer<GraphqlTestServer, GraphqlTestServerAddressError | GraphqlTestServerHandlerError, never>;
|
|
68
|
-
greetingWithOAuth: () => Layer.Layer<GraphqlTestServer, GraphqlTestServerAddressError | GraphqlTestServerHandlerError, OAuthTestServer>;
|
|
69
|
-
};
|
|
70
|
-
export {};
|