@executor-js/plugin-graphql 1.4.33 → 1.5.0

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 (54) hide show
  1. package/dist/AddGraphqlSource-P3D3UXRJ.js +179 -0
  2. package/dist/AddGraphqlSource-P3D3UXRJ.js.map +1 -0
  3. package/dist/EditGraphqlSource-FVF67CTP.js +38 -0
  4. package/dist/EditGraphqlSource-FVF67CTP.js.map +1 -0
  5. package/dist/GraphqlAccountsPanel-GBNFHLFH.js +9 -0
  6. package/dist/GraphqlAccountsPanel-GBNFHLFH.js.map +1 -0
  7. package/dist/api/group.d.ts +108 -119
  8. package/dist/api/handlers.d.ts +9 -7
  9. package/dist/api/index.d.ts +117 -104
  10. package/dist/chunk-2Y3J3CVO.js +191 -0
  11. package/dist/chunk-2Y3J3CVO.js.map +1 -0
  12. package/dist/chunk-ADQTI2OK.js +1309 -0
  13. package/dist/chunk-ADQTI2OK.js.map +1 -0
  14. package/dist/{chunk-UIAHATHP.js → chunk-N5GJE7R6.js} +42 -58
  15. package/dist/chunk-N5GJE7R6.js.map +1 -0
  16. package/dist/chunk-VCYDSSIK.js +79 -0
  17. package/dist/chunk-VCYDSSIK.js.map +1 -0
  18. package/dist/client.js +7 -7
  19. package/dist/client.js.map +1 -1
  20. package/dist/core.js +20 -28
  21. package/dist/index.js +2 -2
  22. package/dist/react/AddGraphqlSource.d.ts +1 -1
  23. package/dist/react/EditGraphqlSource.d.ts +2 -2
  24. package/dist/react/GraphqlAccountsPanel.d.ts +6 -0
  25. package/dist/react/GraphqlSignInButton.d.ts +6 -2
  26. package/dist/react/GraphqlSourceFields.d.ts +2 -2
  27. package/dist/react/atoms.d.ts +95 -205
  28. package/dist/react/auth-method-config.d.ts +9 -0
  29. package/dist/react/client.d.ts +108 -97
  30. package/dist/react/defaults.d.ts +16 -2
  31. package/dist/react/index.d.ts +2 -2
  32. package/dist/react/source-plugin.d.ts +2 -2
  33. package/dist/sdk/errors.d.ts +8 -6
  34. package/dist/sdk/index.d.ts +5 -5
  35. package/dist/sdk/introspect.d.ts +1 -1
  36. package/dist/sdk/invoke.d.ts +1 -4
  37. package/dist/sdk/plugin.d.ts +94 -104
  38. package/dist/sdk/store.d.ts +11 -28
  39. package/dist/sdk/types.d.ts +110 -72
  40. package/package.json +5 -4
  41. package/dist/AddGraphqlSource-CJCUUYNM.js +0 -250
  42. package/dist/AddGraphqlSource-CJCUUYNM.js.map +0 -1
  43. package/dist/EditGraphqlSource-YLTPUYW4.js +0 -267
  44. package/dist/EditGraphqlSource-YLTPUYW4.js.map +0 -1
  45. package/dist/GraphqlSourceSummary-YWJX6ONU.js +0 -70
  46. package/dist/GraphqlSourceSummary-YWJX6ONU.js.map +0 -1
  47. package/dist/chunk-2252RTCE.js +0 -1730
  48. package/dist/chunk-2252RTCE.js.map +0 -1
  49. package/dist/chunk-D3FN3ZDA.js +0 -125
  50. package/dist/chunk-D3FN3ZDA.js.map +0 -1
  51. package/dist/chunk-M4SJY6CB.js +0 -45
  52. package/dist/chunk-M4SJY6CB.js.map +0 -1
  53. package/dist/chunk-UIAHATHP.js.map +0 -1
  54. package/dist/react/GraphqlSourceSummary.d.ts +0 -5
@@ -1,143 +1,154 @@
1
- export declare const GraphqlClient: import("effect/unstable/reactivity/AtomHttpApi").AtomHttpApiClient<"Plugin_graphqlClient", `Plugin_${string}Client`, 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<{
2
- scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
3
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
1
+ export declare const GraphqlClient: import("effect/unstable/reactivity/AtomHttpApi").AtomHttpApiClient<"Plugin_graphqlClient", `Plugin_${string}Client`, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"graphql", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"addIntegration", "POST", "/graphql/integrations", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
4
2
  readonly endpoint: import("effect/Schema").String;
5
- readonly name: import("effect/Schema").String;
3
+ readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
4
+ readonly name: import("effect/Schema").optional<import("effect/Schema").String>;
6
5
  readonly introspectionJson: import("effect/Schema").optional<import("effect/Schema").String>;
7
- readonly namespace: import("effect/Schema").String;
8
- readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
9
- readonly kind: import("effect/Schema").Literal<"secret">;
6
+ readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
7
+ readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
8
+ readonly authenticationTemplate: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
9
+ readonly kind: import("effect/Schema").Literal<"apiKey">;
10
+ readonly slug: import("effect/Schema").String;
11
+ readonly in: import("effect/Schema").Literals<readonly ["header", "query"]>;
12
+ readonly name: import("effect/Schema").String;
10
13
  readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
11
- }>]>>>;
12
- readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
13
- readonly kind: import("effect/Schema").Literal<"secret">;
14
+ }>, import("effect/Schema").Struct<{
15
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
16
+ readonly slug: import("effect/Schema").String;
17
+ readonly header: import("effect/Schema").optional<import("effect/Schema").String>;
14
18
  readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
15
19
  }>]>>>;
16
- readonly oauth2: import("effect/Schema").optional<import("effect/Schema").Struct<{
17
- readonly kind: import("effect/Schema").Literal<"oauth2">;
18
- readonly securitySchemeName: import("effect/Schema").String;
19
- readonly flow: import("effect/Schema").Literals<readonly ["authorizationCode", "clientCredentials"]>;
20
- readonly tokenUrl: import("effect/Schema").String;
21
- readonly authorizationUrl: import("effect/Schema").withDecodingDefault<import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>>;
22
- readonly issuerUrl: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
23
- readonly clientIdSlot: import("effect/Schema").String;
24
- readonly clientSecretSlot: import("effect/Schema").NullOr<import("effect/Schema").String>;
25
- readonly connectionSlot: import("effect/Schema").String;
26
- readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
27
- }>>;
28
- readonly credentials: import("effect/Schema").optional<import("effect/Schema").Struct<{
29
- readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
30
- readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
31
- readonly kind: import("effect/Schema").Literal<"text">;
32
- readonly text: import("effect/Schema").String;
33
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
34
- }>, import("effect/Schema").Struct<{
35
- readonly kind: import("effect/Schema").Literal<"secret">;
36
- readonly secretId: import("effect/Schema").String;
37
- readonly secretScope: import("effect/Schema").optional<import("effect/Schema").String>;
38
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
39
- }>, import("effect/Schema").Struct<{
40
- readonly kind: import("effect/Schema").Literal<"connection">;
41
- readonly connectionId: import("effect/Schema").String;
42
- }>]>>>;
43
- readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
44
- readonly kind: import("effect/Schema").Literal<"text">;
45
- readonly text: import("effect/Schema").String;
46
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
47
- }>, import("effect/Schema").Struct<{
48
- readonly kind: import("effect/Schema").Literal<"secret">;
49
- readonly secretId: import("effect/Schema").String;
50
- readonly secretScope: import("effect/Schema").optional<import("effect/Schema").String>;
51
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
52
- }>, import("effect/Schema").Struct<{
53
- readonly kind: import("effect/Schema").Literal<"connection">;
54
- readonly connectionId: import("effect/Schema").String;
55
- }>]>>>;
56
- readonly auth: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
57
- readonly kind: import("effect/Schema").Literal<"none">;
58
- }>, import("effect/Schema").Struct<{
59
- readonly oauth2: import("effect/Schema").optional<import("effect/Schema").Struct<{
60
- readonly connection: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
61
- readonly kind: import("effect/Schema").Literal<"text">;
62
- readonly text: import("effect/Schema").String;
63
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
64
- }>, import("effect/Schema").Struct<{
65
- readonly kind: import("effect/Schema").Literal<"secret">;
66
- readonly secretId: import("effect/Schema").String;
67
- readonly secretScope: import("effect/Schema").optional<import("effect/Schema").String>;
68
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
69
- }>, import("effect/Schema").Struct<{
70
- readonly kind: import("effect/Schema").Literal<"connection">;
71
- readonly connectionId: import("effect/Schema").String;
72
- }>]>>;
73
- }>>;
74
- }>]>>;
75
- }>>;
76
20
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
77
- readonly toolCount: import("effect/Schema").Number;
78
- readonly namespace: import("effect/Schema").String;
79
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
80
- readonly _tag: "GraphqlIntrospectionError";
21
+ readonly slug: import("effect/Schema").String;
22
+ readonly name: import("effect/Schema").String;
23
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").IntegrationAlreadyExistsError | typeof import("@executor-js/sdk").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
81
24
  readonly message: string;
25
+ readonly _tag: "GraphqlIntrospectionError";
82
26
  }, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
83
27
  readonly message: import("effect/Schema").String;
84
28
  }>], {
85
- readonly _tag: "GraphqlIntrospectionError";
86
29
  readonly message: string;
30
+ readonly _tag: "GraphqlIntrospectionError";
87
31
  }>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
88
32
  readonly message: import("effect/Schema").String;
89
33
  }>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
90
- readonly _tag: "GraphqlExtractionError";
91
34
  readonly message: string;
35
+ readonly _tag: "GraphqlExtractionError";
92
36
  }, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
93
37
  readonly message: import("effect/Schema").String;
94
38
  }>], {
39
+ readonly message: string;
95
40
  readonly _tag: "GraphqlExtractionError";
41
+ }>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
42
+ readonly message: import("effect/Schema").String;
43
+ }>, never, never>>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getIntegration", "GET", "/graphql/integrations/:slug", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
44
+ slug: import("effect/Schema").String;
45
+ }>>, 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").Unknown>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").IntegrationAlreadyExistsError | typeof import("@executor-js/sdk").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
96
46
  readonly message: string;
47
+ readonly _tag: "GraphqlIntrospectionError";
48
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
49
+ readonly message: import("effect/Schema").String;
50
+ }>], {
51
+ readonly message: string;
52
+ readonly _tag: "GraphqlIntrospectionError";
53
+ }>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
54
+ readonly message: import("effect/Schema").String;
55
+ }>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
56
+ readonly message: string;
57
+ readonly _tag: "GraphqlExtractionError";
58
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
59
+ readonly message: import("effect/Schema").String;
60
+ }>], {
61
+ readonly message: string;
62
+ readonly _tag: "GraphqlExtractionError";
97
63
  }>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
98
64
  readonly message: import("effect/Schema").String;
99
- }>, 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<{
100
- scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
101
- namespace: import("effect/Schema").String;
65
+ }>, never, never>>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getConfig", "GET", "/graphql/integrations/:slug/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
66
+ slug: import("effect/Schema").String;
102
67
  }>>, 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<{
103
- readonly namespace: import("effect/Schema").String;
104
- readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
105
- readonly name: import("effect/Schema").String;
106
68
  readonly endpoint: import("effect/Schema").String;
107
- readonly headers: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
108
- readonly kind: import("effect/Schema").Literal<"binding">;
109
- readonly slot: import("effect/Schema").String;
69
+ readonly name: import("effect/Schema").String;
70
+ readonly introspectionJson: import("effect/Schema").optional<import("effect/Schema").String>;
71
+ readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
72
+ readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
73
+ readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
74
+ readonly kind: import("effect/Schema").Literal<"apiKey">;
75
+ readonly slug: import("effect/Schema").String;
76
+ readonly in: import("effect/Schema").Literals<readonly ["header", "query"]>;
77
+ readonly name: import("effect/Schema").String;
78
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
79
+ }>, import("effect/Schema").Struct<{
80
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
81
+ readonly slug: import("effect/Schema").String;
82
+ readonly header: import("effect/Schema").optional<import("effect/Schema").String>;
110
83
  readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
111
84
  }>]>>;
112
- readonly queryParams: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
113
- readonly kind: import("effect/Schema").Literal<"binding">;
114
- readonly slot: import("effect/Schema").String;
85
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").IntegrationAlreadyExistsError | typeof import("@executor-js/sdk").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
86
+ readonly message: string;
87
+ readonly _tag: "GraphqlIntrospectionError";
88
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
89
+ readonly message: import("effect/Schema").String;
90
+ }>], {
91
+ readonly message: string;
92
+ readonly _tag: "GraphqlIntrospectionError";
93
+ }>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
94
+ readonly message: import("effect/Schema").String;
95
+ }>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
96
+ readonly message: string;
97
+ readonly _tag: "GraphqlExtractionError";
98
+ }, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
99
+ readonly message: import("effect/Schema").String;
100
+ }>], {
101
+ readonly message: string;
102
+ readonly _tag: "GraphqlExtractionError";
103
+ }>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
104
+ readonly message: import("effect/Schema").String;
105
+ }>, never, never>>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"configure", "POST", "/graphql/integrations/:slug/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
106
+ slug: import("effect/Schema").String;
107
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
108
+ readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
109
+ readonly kind: import("effect/Schema").Literal<"apiKey">;
110
+ readonly slug: import("effect/Schema").String;
111
+ readonly in: import("effect/Schema").Literals<readonly ["header", "query"]>;
112
+ readonly name: import("effect/Schema").String;
113
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
114
+ }>, import("effect/Schema").Struct<{
115
+ readonly kind: import("effect/Schema").Literal<"oauth2">;
116
+ readonly slug: import("effect/Schema").String;
117
+ readonly header: import("effect/Schema").optional<import("effect/Schema").String>;
115
118
  readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
116
119
  }>]>>;
117
- readonly auth: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
118
- readonly kind: import("effect/Schema").Literal<"none">;
120
+ readonly mode: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["merge", "replace"]>>;
121
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
122
+ readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
123
+ readonly kind: import("effect/Schema").Literal<"apiKey">;
124
+ readonly slug: import("effect/Schema").String;
125
+ readonly in: import("effect/Schema").Literals<readonly ["header", "query"]>;
126
+ readonly name: import("effect/Schema").String;
127
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
119
128
  }>, import("effect/Schema").Struct<{
120
129
  readonly kind: import("effect/Schema").Literal<"oauth2">;
121
- readonly connectionSlot: import("effect/Schema").String;
122
- }>]>;
123
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
124
- readonly _tag: "GraphqlIntrospectionError";
130
+ readonly slug: import("effect/Schema").String;
131
+ readonly header: import("effect/Schema").optional<import("effect/Schema").String>;
132
+ readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
133
+ }>]>>;
134
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").IntegrationAlreadyExistsError | typeof import("@executor-js/sdk").InternalError | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlIntrospectionError, {
125
135
  readonly message: string;
136
+ readonly _tag: "GraphqlIntrospectionError";
126
137
  }, readonly [import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
127
138
  readonly message: import("effect/Schema").String;
128
139
  }>], {
129
- readonly _tag: "GraphqlIntrospectionError";
130
140
  readonly message: string;
141
+ readonly _tag: "GraphqlIntrospectionError";
131
142
  }>, import("effect/Schema").TaggedStruct<"GraphqlIntrospectionError", {
132
143
  readonly message: import("effect/Schema").String;
133
144
  }>, never, never> | import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("../sdk").GraphqlExtractionError, {
134
- readonly _tag: "GraphqlExtractionError";
135
145
  readonly message: string;
146
+ readonly _tag: "GraphqlExtractionError";
136
147
  }, readonly [import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
137
148
  readonly message: import("effect/Schema").String;
138
149
  }>], {
139
- readonly _tag: "GraphqlExtractionError";
140
150
  readonly message: string;
151
+ readonly _tag: "GraphqlExtractionError";
141
152
  }>, import("effect/Schema").TaggedStruct<"GraphqlExtractionError", {
142
153
  readonly message: import("effect/Schema").String;
143
154
  }>, never, never>>, never, never>, false>>;
@@ -1,2 +1,16 @@
1
- import { type HttpCredentialsState } from "@executor-js/react/plugins/http-credentials";
2
- export declare const initialGraphqlCredentials: () => HttpCredentialsState;
1
+ import type { ConnectionName, Owner } from "@executor-js/sdk/shared";
2
+ /** The slug of the apiKey auth template the add flow declares + targets. */
3
+ export declare const GRAPHQL_APIKEY_TEMPLATE = "apiKey";
4
+ /** Build the apiKey auth template the integration stores. The connection's
5
+ * value is written to `headerName` at invoke time (no prefix — the user pastes
6
+ * the full header value, e.g. `Bearer ghp_…`). */
7
+ export declare const graphqlApiKeyAuthTemplate: (headerName: string) => {
8
+ readonly kind: "apiKey";
9
+ readonly slug: string;
10
+ readonly in: "header";
11
+ readonly name: string;
12
+ };
13
+ /** Deterministic connection name for a GraphQL integration + owner. Keeps a
14
+ * single owner-scoped credential per integration so re-adding overwrites
15
+ * rather than accumulating duplicates. */
16
+ export declare const graphqlConnectionName: (slug: string, owner: Owner) => ConnectionName;
@@ -1,3 +1,3 @@
1
- export { graphqlSourcePlugin } from "./source-plugin";
1
+ export { graphqlIntegrationPlugin } from "./source-plugin";
2
2
  export { GraphqlClient } from "./client";
3
- export { addGraphqlSource } from "./atoms";
3
+ export { addGraphqlIntegration, graphqlIntegrationConfigAtom } from "./atoms";
@@ -1,2 +1,2 @@
1
- import type { SourcePlugin } from "@executor-js/sdk/client";
2
- export declare const graphqlSourcePlugin: SourcePlugin;
1
+ import type { IntegrationPlugin } from "@executor-js/sdk/client";
2
+ export declare const graphqlIntegrationPlugin: IntegrationPlugin;
@@ -23,16 +23,18 @@ export declare class GraphqlInvocationError extends GraphqlInvocationError_base<
23
23
  declare const GraphqlAuthRequiredError_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 & {
24
24
  readonly _tag: "GraphqlAuthRequiredError";
25
25
  } & Readonly<A>;
26
+ /** A tool invocation could not produce a usable credential. Re-keyed for v2:
27
+ * references the connection by (owner, integration, name) instead of a v1
28
+ * source id + scope. */
26
29
  export declare class GraphqlAuthRequiredError extends GraphqlAuthRequiredError_base<{
27
30
  readonly code: AuthToolFailureCode;
28
31
  readonly message: string;
29
- readonly sourceId: string;
30
- readonly sourceScope: string;
31
- readonly credentialKind: "secret" | "connection" | "oauth" | "upstream";
32
+ readonly owner: string;
33
+ readonly integration: string;
34
+ readonly connection: string;
35
+ readonly credentialKind: "secret" | "oauth" | "upstream";
32
36
  readonly credentialLabel?: string;
33
- readonly slotKey?: string;
34
- readonly secretId?: string;
35
- readonly connectionId?: string;
37
+ readonly template?: string;
36
38
  readonly status?: number;
37
39
  readonly details?: unknown;
38
40
  readonly cause?: unknown;
@@ -1,7 +1,7 @@
1
1
  export { introspect, parseIntrospectionJson } from "./introspect";
2
2
  export { extract, type ExtractionOutput } from "./extract";
3
- export { invoke, invokeWithLayer, resolveHeaders } from "./invoke";
4
- export { graphqlPlugin, type GraphqlSourceConfig, type GraphqlPluginExtension, type GraphqlPluginOptions, type GraphqlConfigureSourceInput, type GraphqlSourceRef, } from "./plugin";
5
- export { graphqlSchema, makeDefaultGraphqlStore, type GraphqlSchema, type GraphqlStore, type StoredGraphqlSource, type StoredOperation, } from "./store";
6
- export { GraphqlIntrospectionError, GraphqlExtractionError, GraphqlInvocationError, } from "./errors";
7
- export { ExtractedField, ExtractionResult, GraphqlArgument, GraphqlCredentialInput, GraphqlOperationKind, GraphqlSourceAuth, GraphqlSourceAuthInput, InvocationConfig, InvocationResult, OperationBinding, HeaderValue, QueryParamValue, ConfiguredGraphqlCredentialValue, GRAPHQL_OAUTH_CONNECTION_SLOT, graphqlHeaderSlot, graphqlQueryParamSlot, } from "./types";
3
+ export { invoke, invokeWithLayer } from "./invoke";
4
+ export { describeGraphqlAuthMethods, graphqlPlugin, type GraphqlPluginExtension, type GraphqlPluginOptions, type GraphqlAddIntegrationInput, type GraphqlConfigureInput, type GraphqlConfigureAuthInput, } from "./plugin";
5
+ export { makeDefaultGraphqlStore, type GraphqlStore, type StoredOperation } from "./store";
6
+ export { GraphqlIntrospectionError, GraphqlExtractionError, GraphqlInvocationError, GraphqlAuthRequiredError, } from "./errors";
7
+ export { ApiKeyAuthTemplate, AuthTemplate, decodeGraphqlIntegrationConfig, decodeGraphqlIntegrationConfigOption, ExtractedField, ExtractionResult, GraphqlArgument, GraphqlIntegrationConfig, GraphqlOperationKind, InvocationResult, OAuthAuthTemplate, OperationBinding, type ApiKeyAuthTemplate as ApiKeyAuthTemplateType, } from "./types";
@@ -332,8 +332,8 @@ export declare const introspect: (endpoint: string, headers?: Record<string, str
332
332
  readonly __schema: {
333
333
  readonly types: readonly {
334
334
  readonly name: string;
335
- readonly kind: string;
336
335
  readonly description: string | null;
336
+ readonly kind: string;
337
337
  readonly fields: readonly {
338
338
  readonly name: string;
339
339
  readonly type: {
@@ -1,10 +1,7 @@
1
1
  import { Effect, Layer } from "effect";
2
2
  import { HttpClient } from "effect/unstable/http";
3
3
  import { GraphqlInvocationError } from "./errors";
4
- import { type HeaderValue, type OperationBinding } from "./types";
5
- export declare const resolveHeaders: (headers: Record<string, HeaderValue>, secrets: {
6
- readonly get: (id: string) => Effect.Effect<string | null, unknown>;
7
- }) => Effect.Effect<Record<string, string>>;
4
+ import { type OperationBinding } from "./types";
8
5
  export declare const endpointForTelemetry: (endpoint: string) => string;
9
6
  export declare const invoke: (operation: {
10
7
  readonly kind: "query" | "mutation";
@@ -1,125 +1,115 @@
1
1
  import { Effect, Schema } from "effect";
2
2
  import type { Layer } from "effect";
3
3
  import { HttpClient } from "effect/unstable/http";
4
- import { type PluginCtx, type StorageFailure } from "@executor-js/sdk/core";
5
- import { OAuth2SourceConfig } from "@executor-js/sdk/http-source";
6
- import { type ConfigFileSink } from "@executor-js/config";
4
+ import { IntegrationAlreadyExistsError, type AuthMethodDescriptor, type IntegrationRecord, type PluginCtx, type StorageFailure } from "@executor-js/sdk/core";
7
5
  import { GraphqlIntrospectionError } from "./errors";
8
- import { type GraphqlStore, type StoredGraphqlSource } from "./store";
9
- import { type ConfiguredGraphqlCredentialValue, type GraphqlConfiguredValueInput, type GraphqlCredentialInput, type HeaderValue as HeaderValueValue, type GraphqlSourceAuthInput } from "./types";
10
- export type HeaderValue = HeaderValueValue;
11
- export type GraphqlCredentialValue = ConfiguredGraphqlCredentialValue;
12
- export interface GraphqlSourceConfig {
13
- /** The GraphQL endpoint URL */
14
- readonly endpoint: string;
15
- /**
16
- * Executor scope id that owns this source row. Must be one of the
17
- * executor's configured scopes. Typical shape: an admin adds the
18
- * source at the outermost (organization) scope so it's visible to
19
- * every inner (per-user) scope via fall-through reads.
20
- */
21
- readonly scope: string;
22
- /** Display name for the source. */
23
- readonly name: string;
24
- /** Optional: introspection JSON text (if endpoint doesn't support introspection) */
25
- readonly introspectionJson?: string;
26
- /** Namespace for the tools. */
27
- readonly namespace: string;
28
- /** Headers applied to every request. Secret entries declare source-owned slots. */
29
- readonly headers?: Record<string, GraphqlConfiguredValueInput>;
30
- /** Query parameters applied to every request. Secret entries declare source-owned slots. */
31
- readonly queryParams?: Record<string, GraphqlConfiguredValueInput>;
32
- /** Optional OAuth2 credential used as a Bearer token for every request. */
33
- readonly oauth2?: OAuth2SourceConfig;
34
- /** Initial credential bindings used while adding and introspecting this source. */
35
- readonly credentials?: GraphqlInitialCredentialsInput;
36
- }
37
- declare const GraphqlInitialCredentialsInputSchema: Schema.Struct<{
38
- readonly scope: Schema.String;
39
- readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
40
- readonly kind: Schema.Literal<"text">;
41
- readonly text: Schema.String;
6
+ import { type GraphqlStore } from "./store";
7
+ import { AuthTemplate, GraphqlIntegrationConfig } from "./types";
8
+ /** Register a GraphQL integration in the catalog. `endpoint` is the GraphQL URL;
9
+ * `slug` (defaulted from the endpoint) is the catalog id; `introspectionJson`
10
+ * supplies the schema when the endpoint disables live introspection; `headers`
11
+ * / `queryParams` are static and also applied to add-time introspection;
12
+ * `authenticationTemplate` declares the auth methods a connection can apply
13
+ * through. */
14
+ declare const GraphqlAddIntegrationInputSchema: Schema.Struct<{
15
+ readonly endpoint: Schema.String;
16
+ readonly slug: Schema.optional<Schema.String>;
17
+ readonly name: Schema.optional<Schema.String>;
18
+ readonly introspectionJson: Schema.optional<Schema.String>;
19
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
20
+ readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
21
+ readonly authenticationTemplate: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
22
+ readonly kind: Schema.Literal<"apiKey">;
23
+ readonly slug: Schema.String;
24
+ readonly in: Schema.Literals<readonly ["header", "query"]>;
25
+ readonly name: Schema.String;
42
26
  readonly prefix: Schema.optional<Schema.String>;
43
27
  }>, Schema.Struct<{
44
- readonly kind: Schema.Literal<"secret">;
45
- readonly secretId: Schema.String;
46
- readonly secretScope: Schema.optional<Schema.String>;
28
+ readonly kind: Schema.Literal<"oauth2">;
29
+ readonly slug: Schema.String;
30
+ readonly header: Schema.optional<Schema.String>;
47
31
  readonly prefix: Schema.optional<Schema.String>;
48
- }>, Schema.Struct<{
49
- readonly kind: Schema.Literal<"connection">;
50
- readonly connectionId: Schema.String;
51
32
  }>]>>>;
52
- readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
53
- readonly kind: Schema.Literal<"text">;
54
- readonly text: Schema.String;
33
+ }>;
34
+ export type GraphqlAddIntegrationInput = typeof GraphqlAddIntegrationInputSchema.Type;
35
+ declare const GraphqlConfigureInputSchema: Schema.Struct<{
36
+ readonly name: Schema.optional<Schema.String>;
37
+ readonly endpoint: Schema.optional<Schema.String>;
38
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
39
+ readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
40
+ readonly authenticationTemplate: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
41
+ readonly kind: Schema.Literal<"apiKey">;
42
+ readonly slug: Schema.String;
43
+ readonly in: Schema.Literals<readonly ["header", "query"]>;
44
+ readonly name: Schema.String;
55
45
  readonly prefix: Schema.optional<Schema.String>;
56
46
  }>, Schema.Struct<{
57
- readonly kind: Schema.Literal<"secret">;
58
- readonly secretId: Schema.String;
59
- readonly secretScope: Schema.optional<Schema.String>;
47
+ readonly kind: Schema.Literal<"oauth2">;
48
+ readonly slug: Schema.String;
49
+ readonly header: Schema.optional<Schema.String>;
60
50
  readonly prefix: Schema.optional<Schema.String>;
61
- }>, Schema.Struct<{
62
- readonly kind: Schema.Literal<"connection">;
63
- readonly connectionId: Schema.String;
64
51
  }>]>>>;
65
- readonly auth: Schema.optional<Schema.Union<readonly [Schema.Struct<{
66
- readonly kind: Schema.Literal<"none">;
52
+ }>;
53
+ export type GraphqlConfigureInput = typeof GraphqlConfigureInputSchema.Type;
54
+ /** Input for the custom-method-create flow (HTTP `POST /graphql/integrations/
55
+ * :slug/config`). Unlike `configure` (which REPLACES the whole config for the
56
+ * generic repair path), `configureAuth` MERGE-APPENDS these templates onto the
57
+ * integration's existing `authenticationTemplate`, mirroring OpenAPI's
58
+ * `configure`. */
59
+ declare const GraphqlConfigureAuthInputSchema: Schema.Struct<{
60
+ readonly authenticationTemplate: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
61
+ readonly kind: Schema.Literal<"apiKey">;
62
+ readonly slug: Schema.String;
63
+ readonly in: Schema.Literals<readonly ["header", "query"]>;
64
+ readonly name: Schema.String;
65
+ readonly prefix: Schema.optional<Schema.String>;
67
66
  }>, Schema.Struct<{
68
- readonly oauth2: Schema.optional<Schema.Struct<{
69
- readonly connection: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
70
- readonly kind: Schema.Literal<"text">;
71
- readonly text: Schema.String;
72
- readonly prefix: Schema.optional<Schema.String>;
73
- }>, Schema.Struct<{
74
- readonly kind: Schema.Literal<"secret">;
75
- readonly secretId: Schema.String;
76
- readonly secretScope: Schema.optional<Schema.String>;
77
- readonly prefix: Schema.optional<Schema.String>;
78
- }>, Schema.Struct<{
79
- readonly kind: Schema.Literal<"connection">;
80
- readonly connectionId: Schema.String;
81
- }>]>>;
82
- }>>;
67
+ readonly kind: Schema.Literal<"oauth2">;
68
+ readonly slug: Schema.String;
69
+ readonly header: Schema.optional<Schema.String>;
70
+ readonly prefix: Schema.optional<Schema.String>;
83
71
  }>]>>;
72
+ readonly mode: Schema.optional<Schema.Literals<readonly ["merge", "replace"]>>;
84
73
  }>;
85
- type GraphqlInitialCredentialsInput = typeof GraphqlInitialCredentialsInputSchema.Type;
86
- export interface GraphqlSourceRef {
87
- readonly id: string;
88
- readonly scope: string;
89
- }
90
- export interface GraphqlConfigureSourceInput {
91
- readonly scope: string;
92
- readonly name?: string;
93
- readonly endpoint?: string;
94
- readonly headers?: Record<string, GraphqlCredentialInput>;
95
- readonly queryParams?: Record<string, GraphqlCredentialInput>;
96
- readonly auth?: GraphqlSourceAuthInput;
97
- }
98
- export interface GraphqlPluginOptions {
99
- readonly httpClientLayer?: Layer.Layer<HttpClient.HttpClient>;
100
- /** If provided, source add/remove is mirrored to executor.jsonc
101
- * (best-effort — file errors are logged, not raised). */
102
- readonly configFile?: ConfigFileSink;
103
- }
104
- declare const makeGraphqlExtension: (ctx: PluginCtx<GraphqlStore>, httpClientLayer: Layer.Layer<HttpClient.HttpClient>, configFile: ConfigFileSink | undefined) => {
105
- addSource: (config: GraphqlSourceConfig) => Effect.Effect<{
74
+ export type GraphqlConfigureAuthInput = typeof GraphqlConfigureAuthInputSchema.Type;
75
+ export declare const describeGraphqlAuthMethods: (record: IntegrationRecord) => readonly AuthMethodDescriptor[];
76
+ export declare const describeGraphqlIntegrationDisplay: (record: IntegrationRecord) => {
77
+ readonly url?: string;
78
+ };
79
+ declare const makeGraphqlExtension: (ctx: PluginCtx<GraphqlStore>) => {
80
+ /** Register a GraphQL integration (introspects + persists operations). */
81
+ addIntegration: (input: GraphqlAddIntegrationInput) => Effect.Effect<{
82
+ slug: string;
83
+ name: string;
106
84
  toolCount: number;
107
- namespace: string;
108
- }, StorageFailure | GraphqlIntrospectionError | import("./errors").GraphqlExtractionError, never>;
109
- removeSource: (namespace: string, scope: string) => Effect.Effect<void, StorageFailure, never>;
110
- getSource: (namespace: string, scope: string) => Effect.Effect<StoredGraphqlSource | null, StorageFailure, never>;
111
- configureSource: (namespace: string, scope: string, targetScope: string, input: Omit<GraphqlConfigureSourceInput, "scope">) => Effect.Effect<void, StorageFailure, never>;
112
- configure: (source: GraphqlSourceRef, input: GraphqlConfigureSourceInput) => Effect.Effect<void, StorageFailure, never>;
85
+ }, StorageFailure | IntegrationAlreadyExistsError | GraphqlIntrospectionError | import("./errors").GraphqlExtractionError, never>;
86
+ /** Read the integration's stored config. */
87
+ getIntegration: (slug: string) => Effect.Effect<unknown, StorageFailure, never>;
88
+ /** Read the integration's decoded config (auth templates surfaced). */
89
+ getConfig: (slug: string) => Effect.Effect<GraphqlIntegrationConfig | null, StorageFailure>;
90
+ /** Merge-append custom auth methods (custom-method-create flow). */
91
+ configureAuth: (slug: string, input: GraphqlConfigureAuthInput) => Effect.Effect<readonly AuthTemplate[], StorageFailure>;
92
+ removeIntegration: (slug: string) => Effect.Effect<void, StorageFailure, never>;
93
+ configure: (slug: string, input: GraphqlConfigureInput) => Effect.Effect<void, StorageFailure, never>;
113
94
  };
114
95
  export type GraphqlPluginExtension = ReturnType<typeof makeGraphqlExtension>;
96
+ export interface GraphqlPluginOptions {
97
+ readonly httpClientLayer?: Layer.Layer<HttpClient.HttpClient>;
98
+ }
115
99
  export declare const graphqlPlugin: import("@executor-js/sdk/core").ConfiguredPlugin<"graphql", {
116
- addSource: (config: GraphqlSourceConfig) => Effect.Effect<{
100
+ /** Register a GraphQL integration (introspects + persists operations). */
101
+ addIntegration: (input: GraphqlAddIntegrationInput) => Effect.Effect<{
102
+ slug: string;
103
+ name: string;
117
104
  toolCount: number;
118
- namespace: string;
119
- }, StorageFailure | GraphqlIntrospectionError | import("./errors").GraphqlExtractionError, never>;
120
- removeSource: (namespace: string, scope: string) => Effect.Effect<void, StorageFailure, never>;
121
- getSource: (namespace: string, scope: string) => Effect.Effect<StoredGraphqlSource | null, StorageFailure, never>;
122
- configureSource: (namespace: string, scope: string, targetScope: string, input: Omit<GraphqlConfigureSourceInput, "scope">) => Effect.Effect<void, StorageFailure, never>;
123
- configure: (source: GraphqlSourceRef, input: GraphqlConfigureSourceInput) => Effect.Effect<void, StorageFailure, never>;
124
- }, GraphqlStore, GraphqlPluginOptions, {}, undefined, Layer.Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
105
+ }, StorageFailure | IntegrationAlreadyExistsError | GraphqlIntrospectionError | import("./errors").GraphqlExtractionError, never>;
106
+ /** Read the integration's stored config. */
107
+ getIntegration: (slug: string) => Effect.Effect<unknown, StorageFailure, never>;
108
+ /** Read the integration's decoded config (auth templates surfaced). */
109
+ getConfig: (slug: string) => Effect.Effect<GraphqlIntegrationConfig | null, StorageFailure>;
110
+ /** Merge-append custom auth methods (custom-method-create flow). */
111
+ configureAuth: (slug: string, input: GraphqlConfigureAuthInput) => Effect.Effect<readonly AuthTemplate[], StorageFailure>;
112
+ removeIntegration: (slug: string) => Effect.Effect<void, StorageFailure, never>;
113
+ configure: (slug: string, input: GraphqlConfigureInput) => Effect.Effect<void, StorageFailure, never>;
114
+ }, GraphqlStore, GraphqlPluginOptions, undefined, Layer.Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
125
115
  export {};