@executor-js/plugin-openapi 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 (81) hide show
  1. package/dist/AddOpenApiSource-7M52SRUX.js +893 -0
  2. package/dist/AddOpenApiSource-7M52SRUX.js.map +1 -0
  3. package/dist/EditOpenApiSource-WTAMRJUK.js +68 -0
  4. package/dist/EditOpenApiSource-WTAMRJUK.js.map +1 -0
  5. package/dist/OpenApiAccountsPanel-3VJJXNQF.js +112 -0
  6. package/dist/OpenApiAccountsPanel-3VJJXNQF.js.map +1 -0
  7. package/dist/api/group.d.ts +104 -225
  8. package/dist/api/index.d.ts +127 -271
  9. package/dist/{chunk-BB5IAKRG.js → chunk-AQ7JDDRM.js} +12 -2
  10. package/dist/chunk-AQ7JDDRM.js.map +1 -0
  11. package/dist/chunk-BSLE6HCE.js +181 -0
  12. package/dist/chunk-BSLE6HCE.js.map +1 -0
  13. package/dist/chunk-MZWZQ24W.js +226 -0
  14. package/dist/chunk-MZWZQ24W.js.map +1 -0
  15. package/dist/chunk-OSIFYIQP.js +623 -0
  16. package/dist/chunk-OSIFYIQP.js.map +1 -0
  17. package/dist/chunk-QSSRVK6M.js +139 -0
  18. package/dist/chunk-QSSRVK6M.js.map +1 -0
  19. package/dist/chunk-V7VCHYOY.js +1544 -0
  20. package/dist/chunk-V7VCHYOY.js.map +1 -0
  21. package/dist/{chunk-AN4HJFNP.js → chunk-YVRI7KRC.js} +162 -186
  22. package/dist/chunk-YVRI7KRC.js.map +1 -0
  23. package/dist/client.js +9 -8
  24. package/dist/client.js.map +1 -1
  25. package/dist/core.js +28 -11
  26. package/dist/index.js +11 -4
  27. package/dist/react/AddOpenApiSource.d.ts +2 -13
  28. package/dist/react/GoogleProductPicker.d.ts +9 -0
  29. package/dist/react/OpenApiAccountsPanel.d.ts +6 -0
  30. package/dist/react/OpenApiSourceDetailsFields.d.ts +3 -2
  31. package/dist/react/atoms.d.ts +177 -192
  32. package/dist/react/auth-method-config.d.ts +15 -0
  33. package/dist/react/client.d.ts +103 -224
  34. package/dist/react/index.d.ts +2 -2
  35. package/dist/react/source-plugin.d.ts +2 -2
  36. package/dist/sdk/config.d.ts +75 -0
  37. package/dist/sdk/configure.test.d.ts +1 -0
  38. package/dist/sdk/describe-auth-methods.test.d.ts +1 -0
  39. package/dist/sdk/errors.d.ts +4 -6
  40. package/dist/sdk/extract.d.ts +7 -5
  41. package/dist/sdk/google-bundle.test.d.ts +1 -0
  42. package/dist/sdk/google-discovery.d.ts +43 -0
  43. package/dist/sdk/google-discovery.test.d.ts +1 -0
  44. package/dist/sdk/google-oauth-batches.d.ts +13 -0
  45. package/dist/sdk/google-oauth-batches.test.d.ts +1 -0
  46. package/dist/sdk/google-oauth-scopes.d.ts +3 -0
  47. package/dist/sdk/google-oauth-scopes.test.d.ts +1 -0
  48. package/dist/sdk/google-presets.d.ts +16 -0
  49. package/dist/sdk/google-presets.test.d.ts +1 -0
  50. package/dist/sdk/google-product-picker-scopes.test.d.ts +1 -0
  51. package/dist/sdk/index.d.ts +7 -5
  52. package/dist/sdk/invoke.d.ts +6 -9
  53. package/dist/sdk/openapi-utils.d.ts +1 -0
  54. package/dist/sdk/plugin.d.ts +74 -231
  55. package/dist/sdk/presets.d.ts +2 -1
  56. package/dist/sdk/preview.d.ts +20 -15
  57. package/dist/sdk/query-serialization.test.d.ts +1 -0
  58. package/dist/sdk/store.d.ts +14 -41
  59. package/dist/sdk/types.d.ts +23 -51
  60. package/dist/testing/index.d.ts +49 -38
  61. package/dist/testing.js +46 -18
  62. package/dist/testing.js.map +1 -1
  63. package/package.json +6 -4
  64. package/dist/AddOpenApiSource-NSCULGTM.js +0 -19
  65. package/dist/AddOpenApiSource-NSCULGTM.js.map +0 -1
  66. package/dist/EditOpenApiSource-MV7NYTRP.js +0 -774
  67. package/dist/EditOpenApiSource-MV7NYTRP.js.map +0 -1
  68. package/dist/OpenApiSourceSummary-7JBS7PUV.js +0 -122
  69. package/dist/OpenApiSourceSummary-7JBS7PUV.js.map +0 -1
  70. package/dist/chunk-2ZKKZYZH.js +0 -1181
  71. package/dist/chunk-2ZKKZYZH.js.map +0 -1
  72. package/dist/chunk-AN4HJFNP.js.map +0 -1
  73. package/dist/chunk-BB5IAKRG.js.map +0 -1
  74. package/dist/chunk-PRVJDE43.js +0 -2101
  75. package/dist/chunk-PRVJDE43.js.map +0 -1
  76. package/dist/chunk-X5JX3KTA.js +0 -201
  77. package/dist/chunk-X5JX3KTA.js.map +0 -1
  78. package/dist/react/OpenApiSourceSummary.d.ts +0 -5
  79. package/dist/sdk/credential-status.d.ts +0 -23
  80. package/dist/sdk/source-contracts.d.ts +0 -55
  81. /package/dist/{sdk/credential-status.test.d.ts → react/auth-method-config.test.d.ts} +0 -0
@@ -1,17 +1,5 @@
1
- export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpApi").AtomHttpApiClient<"Plugin_openapiClient", `Plugin_${string}Client`, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"openapi", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"previewSpec", "POST", "/scopes/:scopeId/openapi/preview", 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 OpenApiClient: import("effect/unstable/reactivity/AtomHttpApi").AtomHttpApiClient<"Plugin_openapiClient", `Plugin_${string}Client`, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"openapi", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"previewSpec", "POST", "/openapi/preview", 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 spec: import("effect/Schema").String;
5
- readonly specFetchCredentials: import("effect/Schema").optional<import("effect/Schema").Struct<{
6
- 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<{
7
- readonly secretId: import("effect/Schema").String;
8
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
9
- }>]>>>;
10
- 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<{
11
- readonly secretId: import("effect/Schema").String;
12
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
13
- }>]>>>;
14
- }>>;
15
3
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
16
4
  readonly title: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
17
5
  readonly version: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
@@ -73,233 +61,124 @@ export declare const OpenApiClient: import("effect/unstable/reactivity/AtomHttpA
73
61
  readonly tokenUrl: import("effect/Schema").String;
74
62
  readonly refreshUrl: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
75
63
  readonly scopes: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
64
+ readonly identityScopes: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"auto">, import("effect/Schema").Literal<false>, import("effect/Schema").$Array<import("effect/Schema").String>]>;
76
65
  }>>;
77
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"addSpec", "POST", "/scopes/:scopeId/openapi/specs", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
78
- scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
79
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
66
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").IntegrationAlreadyExistsError | typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"addSpec", "POST", "/openapi/specs", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
80
67
  readonly spec: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
81
68
  readonly kind: import("effect/Schema").Literal<"url">;
82
69
  readonly url: import("effect/Schema").String;
83
70
  }>, import("effect/Schema").Struct<{
84
71
  readonly kind: import("effect/Schema").Literal<"blob">;
85
72
  readonly value: import("effect/Schema").String;
73
+ }>, import("effect/Schema").Struct<{
74
+ readonly kind: import("effect/Schema").Literal<"googleDiscovery">;
75
+ readonly url: import("effect/Schema").String;
76
+ }>, import("effect/Schema").Struct<{
77
+ readonly kind: import("effect/Schema").Literal<"googleDiscoveryBundle">;
78
+ readonly urls: import("effect/Schema").$Array<import("effect/Schema").String>;
86
79
  }>]>;
87
- readonly specFetchCredentials: import("effect/Schema").optional<import("effect/Schema").Struct<{
88
- 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<{
89
- readonly kind: import("effect/Schema").Literal<"secret">;
90
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
91
- }>]>>>;
92
- 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<{
93
- readonly kind: import("effect/Schema").Literal<"secret">;
94
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
95
- }>]>>>;
96
- }>>;
97
- readonly name: import("effect/Schema").String;
98
- readonly baseUrl: import("effect/Schema").String;
99
- readonly namespace: import("effect/Schema").String;
100
- 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<{
101
- readonly kind: import("effect/Schema").Literal<"secret">;
102
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
103
- }>]>>>;
104
- 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<{
105
- readonly kind: import("effect/Schema").Literal<"secret">;
106
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
107
- }>]>>>;
108
- readonly oauth2: import("effect/Schema").optional<import("effect/Schema").Struct<{
109
- readonly kind: import("effect/Schema").Literal<"oauth2">;
110
- readonly securitySchemeName: import("effect/Schema").String;
111
- readonly flow: import("effect/Schema").Literals<readonly ["authorizationCode", "clientCredentials"]>;
80
+ readonly slug: import("effect/Schema").String;
81
+ readonly description: import("effect/Schema").optional<import("effect/Schema").String>;
82
+ readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").String>;
83
+ readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
84
+ readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
85
+ readonly authenticationTemplate: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
86
+ readonly slug: import("effect/Schema").String;
87
+ readonly type: import("effect/Schema").Literal<"apiKey">;
88
+ 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
89
+ readonly type: import("effect/Schema").Literal<"variable">;
90
+ readonly name: import("effect/Schema").String;
91
+ }>]>>]>>>;
92
+ 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
93
+ readonly type: import("effect/Schema").Literal<"variable">;
94
+ readonly name: import("effect/Schema").String;
95
+ }>]>>]>>>;
96
+ }>, import("effect/Schema").Struct<{
97
+ readonly slug: import("effect/Schema").String;
98
+ readonly type: import("effect/Schema").Literal<"oauth">;
99
+ readonly authorizationUrl: import("effect/Schema").String;
112
100
  readonly tokenUrl: import("effect/Schema").String;
113
- readonly authorizationUrl: import("effect/Schema").withDecodingDefault<import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>>;
114
- readonly issuerUrl: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
115
- readonly clientIdSlot: import("effect/Schema").String;
116
- readonly clientSecretSlot: import("effect/Schema").NullOr<import("effect/Schema").String>;
117
- readonly connectionSlot: import("effect/Schema").String;
118
101
  readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
119
- }>>;
102
+ }>]>>>;
120
103
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
104
+ readonly slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
121
105
  readonly toolCount: import("effect/Schema").Number;
122
- readonly namespace: import("effect/Schema").String;
123
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getSource", "GET", "/scopes/:scopeId/openapi/sources/:namespace", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
124
- scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
125
- namespace: import("effect/Schema").String;
106
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").IntegrationAlreadyExistsError | typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getIntegration", "GET", "/openapi/integrations/:slug", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
107
+ slug: import("effect/Schema").String;
126
108
  }>>, 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<{
127
- readonly namespace: import("effect/Schema").String;
128
- readonly scope: import("effect/Schema").String;
129
- readonly name: import("effect/Schema").String;
130
- readonly config: import("effect/Schema").Struct<{
131
- readonly spec: import("effect/Schema").optional<import("effect/Schema").String>;
132
- readonly sourceUrl: import("effect/Schema").optional<import("effect/Schema").String>;
133
- readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").String>;
134
- readonly namespace: import("effect/Schema").optional<import("effect/Schema").String>;
135
- 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<{
136
- readonly kind: import("effect/Schema").Literal<"binding">;
137
- readonly slot: import("effect/Schema").String;
138
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
139
- }>]>>>;
140
- 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<{
141
- readonly kind: import("effect/Schema").Literal<"binding">;
142
- readonly slot: import("effect/Schema").String;
143
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
144
- }>]>>>;
145
- readonly specFetchCredentials: import("effect/Schema").optional<import("effect/Schema").Struct<{
146
- 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<{
147
- readonly kind: import("effect/Schema").Literal<"binding">;
148
- readonly slot: import("effect/Schema").String;
149
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
150
- }>]>>>;
151
- 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<{
152
- readonly kind: import("effect/Schema").Literal<"binding">;
153
- readonly slot: import("effect/Schema").String;
154
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
155
- }>]>>>;
156
- }>>;
157
- readonly oauth2: import("effect/Schema").optional<import("effect/Schema").Struct<{
158
- readonly kind: import("effect/Schema").Literal<"oauth2">;
159
- readonly securitySchemeName: import("effect/Schema").String;
160
- readonly flow: import("effect/Schema").Literals<readonly ["authorizationCode", "clientCredentials"]>;
161
- readonly tokenUrl: import("effect/Schema").String;
162
- readonly authorizationUrl: import("effect/Schema").withDecodingDefault<import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>>;
163
- readonly issuerUrl: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
164
- readonly clientIdSlot: import("effect/Schema").String;
165
- readonly clientSecretSlot: import("effect/Schema").NullOr<import("effect/Schema").String>;
166
- readonly connectionSlot: import("effect/Schema").String;
167
- readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
168
- }>>;
169
- }>;
170
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"configure", "POST", "/scopes/:scopeId/openapi/configure", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
171
- scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
172
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
173
- readonly source: import("effect/Schema").Struct<{
174
- readonly id: import("effect/Schema").String;
175
- readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
176
- }>;
177
- readonly scope: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
178
- 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<{
179
- readonly kind: import("effect/Schema").Literal<"text">;
180
- readonly text: import("effect/Schema").String;
181
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
182
- }>, import("effect/Schema").Struct<{
183
- readonly kind: import("effect/Schema").Literal<"secret">;
184
- readonly secretId: import("effect/Schema").String;
185
- readonly secretScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
186
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
109
+ readonly slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
110
+ readonly description: import("effect/Schema").String;
111
+ readonly kind: import("effect/Schema").String;
112
+ readonly canRemove: import("effect/Schema").Boolean;
113
+ readonly canRefresh: import("effect/Schema").Boolean;
114
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").IntegrationAlreadyExistsError | typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getConfig", "GET", "/openapi/integrations/:slug/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
115
+ slug: import("effect/Schema").String;
116
+ }>>, 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<{
117
+ readonly spec: import("effect/Schema").String;
118
+ readonly sourceUrl: import("effect/Schema").optional<import("effect/Schema").String>;
119
+ readonly googleDiscoveryUrls: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
120
+ readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").String>;
121
+ readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
122
+ readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
123
+ readonly authenticationTemplate: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
124
+ readonly slug: import("effect/Schema").String;
125
+ readonly type: import("effect/Schema").Literal<"apiKey">;
126
+ 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
127
+ readonly type: import("effect/Schema").Literal<"variable">;
128
+ readonly name: import("effect/Schema").String;
129
+ }>]>>]>>>;
130
+ 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
131
+ readonly type: import("effect/Schema").Literal<"variable">;
132
+ readonly name: import("effect/Schema").String;
133
+ }>]>>]>>>;
187
134
  }>, import("effect/Schema").Struct<{
188
- readonly kind: import("effect/Schema").Literal<"connection">;
189
- readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
135
+ readonly slug: import("effect/Schema").String;
136
+ readonly type: import("effect/Schema").Literal<"oauth">;
137
+ readonly authorizationUrl: import("effect/Schema").String;
138
+ readonly tokenUrl: import("effect/Schema").String;
139
+ readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
190
140
  }>]>>>;
191
- 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<{
192
- readonly kind: import("effect/Schema").Literal<"text">;
193
- readonly text: import("effect/Schema").String;
194
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
195
- }>, import("effect/Schema").Struct<{
196
- readonly kind: import("effect/Schema").Literal<"secret">;
197
- readonly secretId: import("effect/Schema").String;
198
- readonly secretScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
199
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
141
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").IntegrationAlreadyExistsError | typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"configure", "POST", "/openapi/integrations/:slug/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
142
+ slug: import("effect/Schema").String;
143
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
144
+ readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
145
+ readonly slug: import("effect/Schema").String;
146
+ readonly type: import("effect/Schema").Literal<"apiKey">;
147
+ 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
148
+ readonly type: import("effect/Schema").Literal<"variable">;
149
+ readonly name: import("effect/Schema").String;
150
+ }>]>>]>>>;
151
+ 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
152
+ readonly type: import("effect/Schema").Literal<"variable">;
153
+ readonly name: import("effect/Schema").String;
154
+ }>]>>]>>>;
200
155
  }>, import("effect/Schema").Struct<{
201
- readonly kind: import("effect/Schema").Literal<"connection">;
202
- readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
203
- }>]>>>;
204
- readonly specFetchCredentials: import("effect/Schema").optional<import("effect/Schema").Struct<{
205
- 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<{
206
- readonly kind: import("effect/Schema").Literal<"text">;
207
- readonly text: import("effect/Schema").String;
208
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
209
- }>, import("effect/Schema").Struct<{
210
- readonly kind: import("effect/Schema").Literal<"secret">;
211
- readonly secretId: import("effect/Schema").String;
212
- readonly secretScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
213
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
214
- }>, import("effect/Schema").Struct<{
215
- readonly kind: import("effect/Schema").Literal<"connection">;
216
- readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
217
- }>]>>>;
218
- 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<{
219
- readonly kind: import("effect/Schema").Literal<"text">;
220
- readonly text: import("effect/Schema").String;
221
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
222
- }>, import("effect/Schema").Struct<{
223
- readonly kind: import("effect/Schema").Literal<"secret">;
224
- readonly secretId: import("effect/Schema").String;
225
- readonly secretScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
226
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
227
- }>, import("effect/Schema").Struct<{
228
- readonly kind: import("effect/Schema").Literal<"connection">;
229
- readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
230
- }>]>>>;
231
- }>>;
232
- readonly oauth2: import("effect/Schema").optional<import("effect/Schema").Struct<{
233
- readonly clientId: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
234
- readonly kind: import("effect/Schema").Literal<"text">;
235
- readonly text: import("effect/Schema").String;
236
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
237
- }>, import("effect/Schema").Struct<{
238
- readonly kind: import("effect/Schema").Literal<"secret">;
239
- readonly secretId: import("effect/Schema").String;
240
- readonly secretScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
241
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
242
- }>, import("effect/Schema").Struct<{
243
- readonly kind: import("effect/Schema").Literal<"connection">;
244
- readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
245
- }>]>>;
246
- readonly clientSecret: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
247
- readonly kind: import("effect/Schema").Literal<"text">;
248
- readonly text: import("effect/Schema").String;
249
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
250
- }>, import("effect/Schema").Struct<{
251
- readonly kind: import("effect/Schema").Literal<"secret">;
252
- readonly secretId: import("effect/Schema").String;
253
- readonly secretScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
254
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
255
- }>, import("effect/Schema").Struct<{
256
- readonly kind: import("effect/Schema").Literal<"connection">;
257
- readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
258
- }>]>>;
259
- readonly connection: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
260
- readonly kind: import("effect/Schema").Literal<"text">;
261
- readonly text: import("effect/Schema").String;
262
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
263
- }>, import("effect/Schema").Struct<{
264
- readonly kind: import("effect/Schema").Literal<"secret">;
265
- readonly secretId: import("effect/Schema").String;
266
- readonly secretScope: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
267
- readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
268
- }>, import("effect/Schema").Struct<{
269
- readonly kind: import("effect/Schema").Literal<"connection">;
270
- readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
271
- }>]>>;
272
- }>>;
273
- readonly oauth2Source: import("effect/Schema").optional<import("effect/Schema").Struct<{
274
- readonly kind: import("effect/Schema").Literal<"oauth2">;
275
- readonly securitySchemeName: import("effect/Schema").String;
276
- readonly flow: import("effect/Schema").Literals<readonly ["authorizationCode", "clientCredentials"]>;
156
+ readonly slug: import("effect/Schema").String;
157
+ readonly type: import("effect/Schema").Literal<"oauth">;
158
+ readonly authorizationUrl: import("effect/Schema").String;
277
159
  readonly tokenUrl: import("effect/Schema").String;
278
- readonly authorizationUrl: import("effect/Schema").withDecodingDefault<import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>>;
279
- readonly issuerUrl: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
280
- readonly clientIdSlot: import("effect/Schema").String;
281
- readonly clientSecretSlot: import("effect/Schema").NullOr<import("effect/Schema").String>;
282
- readonly connectionSlot: import("effect/Schema").String;
283
160
  readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
284
- }>>;
285
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
286
- readonly id: import("effect/Schema").brand<import("effect/Schema").String, "CredentialBindingId">;
287
- readonly scopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
288
- readonly pluginId: import("effect/Schema").String;
289
- readonly sourceId: import("effect/Schema").String;
290
- readonly sourceScopeId: import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">;
291
- readonly slotKey: import("effect/Schema").String;
292
- readonly value: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
293
- readonly kind: import("effect/Schema").Literal<"text">;
294
- readonly text: import("effect/Schema").String;
295
- }>, import("effect/Schema").Struct<{
296
- readonly kind: import("effect/Schema").Literal<"secret">;
297
- readonly secretId: import("effect/Schema").brand<import("effect/Schema").String, "SecretId">;
298
- readonly secretScopeId: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "ScopeId">>;
161
+ }>]>>;
162
+ readonly mode: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["merge", "replace"]>>;
163
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
164
+ readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
165
+ readonly slug: import("effect/Schema").String;
166
+ readonly type: import("effect/Schema").Literal<"apiKey">;
167
+ 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
168
+ readonly type: import("effect/Schema").Literal<"variable">;
169
+ readonly name: import("effect/Schema").String;
170
+ }>]>>]>>>;
171
+ 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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
172
+ readonly type: import("effect/Schema").Literal<"variable">;
173
+ readonly name: import("effect/Schema").String;
174
+ }>]>>]>>>;
299
175
  }>, import("effect/Schema").Struct<{
300
- readonly kind: import("effect/Schema").Literal<"connection">;
301
- readonly connectionId: import("effect/Schema").brand<import("effect/Schema").String, "ConnectionId">;
302
- }>]>;
303
- readonly createdAt: import("effect/Schema").Date;
304
- readonly updatedAt: import("effect/Schema").Date;
305
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never>, false>>;
176
+ readonly slug: import("effect/Schema").String;
177
+ readonly type: import("effect/Schema").Literal<"oauth">;
178
+ readonly authorizationUrl: import("effect/Schema").String;
179
+ readonly tokenUrl: import("effect/Schema").String;
180
+ readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
181
+ }>]>>;
182
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").IntegrationAlreadyExistsError | typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"removeSpec", "DELETE", "/openapi/integrations/:slug", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
183
+ slug: import("effect/Schema").String;
184
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Void>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/sdk").IntegrationAlreadyExistsError | typeof import("@executor-js/sdk").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never>, false>>;
@@ -1,3 +1,3 @@
1
- export { openApiSourcePlugin } from "./source-plugin";
1
+ export { openApiIntegrationPlugin } from "./source-plugin";
2
2
  export { OpenApiClient } from "./client";
3
- export { previewOpenApiSpec, addOpenApiSpec } from "./atoms";
3
+ export { previewOpenApiSpec, addOpenApiSpec, removeOpenApiSpec, openapiConfigure, openApiConfigAtom, openApiConfigFamily, openApiIntegrationAtom, openApiIntegrationFamily, } from "./atoms";
@@ -1,2 +1,2 @@
1
- import type { SourcePlugin } from "@executor-js/sdk/client";
2
- export declare const openApiSourcePlugin: SourcePlugin;
1
+ import type { IntegrationPlugin } from "@executor-js/sdk/client";
2
+ export declare const openApiIntegrationPlugin: IntegrationPlugin;
@@ -0,0 +1,75 @@
1
+ import { Schema } from "effect";
2
+ import type { Authentication } from "./types";
3
+ export declare const AuthenticationSchema: Schema.Union<readonly [Schema.Struct<{
4
+ readonly slug: Schema.String;
5
+ readonly type: Schema.Literal<"oauth">;
6
+ readonly authorizationUrl: Schema.String;
7
+ readonly tokenUrl: Schema.String;
8
+ readonly scopes: Schema.$Array<Schema.String>;
9
+ }>, Schema.Struct<{
10
+ readonly slug: Schema.String;
11
+ readonly type: Schema.Literal<"apiKey">;
12
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
13
+ readonly type: Schema.Literal<"variable">;
14
+ readonly name: Schema.String;
15
+ }>]>>]>>>;
16
+ readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
17
+ readonly type: Schema.Literal<"variable">;
18
+ readonly name: Schema.String;
19
+ }>]>>]>>>;
20
+ }>]>;
21
+ export declare const OpenApiIntegrationConfigSchema: Schema.Struct<{
22
+ /** Inlined OpenAPI document text (resolved + parsed source of truth). */
23
+ readonly spec: Schema.String;
24
+ /** Origin URL the spec was fetched from, when known. Enables refresh. */
25
+ readonly sourceUrl: Schema.optional<Schema.String>;
26
+ /** Google Discovery bundle URLs, when the spec came from a Google bundle. */
27
+ readonly googleDiscoveryUrls: Schema.optional<Schema.$Array<Schema.String>>;
28
+ /** Base URL override; falls back to the spec's first server. */
29
+ readonly baseUrl: Schema.optional<Schema.String>;
30
+ /** Static headers applied to every request (no secret material). */
31
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
32
+ /** Static query params applied to every request (no secret material). */
33
+ readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
34
+ /** The auth methods a connection's value can be applied through. */
35
+ readonly authenticationTemplate: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
36
+ readonly slug: Schema.String;
37
+ readonly type: Schema.Literal<"oauth">;
38
+ readonly authorizationUrl: Schema.String;
39
+ readonly tokenUrl: Schema.String;
40
+ readonly scopes: Schema.$Array<Schema.String>;
41
+ }>, Schema.Struct<{
42
+ readonly slug: Schema.String;
43
+ readonly type: Schema.Literal<"apiKey">;
44
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
45
+ readonly type: Schema.Literal<"variable">;
46
+ readonly name: Schema.String;
47
+ }>]>>]>>>;
48
+ readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
49
+ readonly type: Schema.Literal<"variable">;
50
+ readonly name: Schema.String;
51
+ }>]>>]>>>;
52
+ }>]>>>;
53
+ }>;
54
+ export type OpenApiIntegrationConfig = Omit<typeof OpenApiIntegrationConfigSchema.Type, "authenticationTemplate"> & {
55
+ /** Branded over the schema's structural form so the template renderer can
56
+ * treat `slug` as an `AuthTemplateSlug`. */
57
+ readonly authenticationTemplate?: readonly Authentication[];
58
+ };
59
+ /** Decode the opaque integration config blob into the openapi shape.
60
+ * Returns null when the blob is missing/incompatible. */
61
+ export declare const decodeOpenApiIntegrationConfig: (value: unknown) => OpenApiIntegrationConfig | null;
62
+ export interface RenderedAuth {
63
+ readonly headers: Record<string, string>;
64
+ readonly queryParams: Record<string, string>;
65
+ }
66
+ /** Render an auth template against a connection's resolved input `values`
67
+ * (`variable → value`). For an apiKey template, each `variable("<name>")` is
68
+ * substituted from its own entry, so a method with two distinct inputs (e.g.
69
+ * Datadog) fills each header from a different value. For an oauth template (no
70
+ * explicit placement), render a bearer Authorization header from `token`. */
71
+ export declare const renderAuthTemplate: (template: Authentication, values: Record<string, string | null>) => RenderedAuth;
72
+ /** The distinct input variables a template references — the inputs a connection
73
+ * must supply. An oauth template needs `token`; an apiKey template needs every
74
+ * `variable("<name>")` across its placements. */
75
+ export declare const requiredTemplateVariables: (template: Authentication) => readonly string[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -31,13 +31,11 @@ declare const OpenApiAuthRequiredError_base: new <A extends Record<string, any>
31
31
  export declare class OpenApiAuthRequiredError extends OpenApiAuthRequiredError_base<{
32
32
  readonly code: AuthToolFailureCode;
33
33
  readonly message: string;
34
- readonly sourceId: string;
35
- readonly sourceScope: string;
36
- readonly credentialKind: "secret" | "connection" | "oauth" | "upstream";
34
+ readonly owner: "org" | "user";
35
+ readonly integration: string;
36
+ readonly connection: string;
37
+ readonly credentialKind: "secret" | "oauth" | "upstream";
37
38
  readonly credentialLabel?: string;
38
- readonly slotKey?: string;
39
- readonly secretId?: string;
40
- readonly connectionId?: string;
41
39
  readonly status?: number;
42
40
  readonly details?: unknown;
43
41
  readonly cause?: unknown;
@@ -8,9 +8,10 @@ export declare const extract: (doc: ParsedDocument) => Effect.Effect<{
8
8
  readonly description: Option.Option<string>;
9
9
  readonly inputSchema: Option.Option<unknown>;
10
10
  readonly outputSchema: Option.Option<unknown>;
11
- readonly summary: Option.Option<string>;
12
- readonly method: "post" | "options" | "delete" | "get" | "put" | "head" | "patch" | "trace";
11
+ readonly method: "post" | "options" | "delete" | "get" | "put" | "patch" | "head" | "trace";
13
12
  readonly deprecated: boolean;
13
+ readonly toolPath: Option.Option<string>;
14
+ readonly summary: Option.Option<string>;
14
15
  readonly tags: readonly string[];
15
16
  readonly parameters: readonly {
16
17
  readonly name: string;
@@ -18,11 +19,10 @@ export declare const extract: (doc: ParsedDocument) => Effect.Effect<{
18
19
  readonly description: Option.Option<string>;
19
20
  readonly schema: Option.Option<unknown>;
20
21
  readonly style: Option.Option<string>;
21
- readonly location: "query" | "header" | "path" | "cookie";
22
+ readonly location: "header" | "query" | "path" | "cookie";
22
23
  readonly explode: Option.Option<boolean>;
23
24
  readonly allowReserved: Option.Option<boolean>;
24
25
  }[];
25
- readonly operationId: string & import("effect/Brand").Brand<"OperationId">;
26
26
  readonly requestBody: Option.Option<{
27
27
  readonly required: boolean;
28
28
  readonly schema: Option.Option<unknown>;
@@ -40,12 +40,14 @@ export declare const extract: (doc: ParsedDocument) => Effect.Effect<{
40
40
  }>;
41
41
  }[]>;
42
42
  }>;
43
+ readonly operationId: string & import("effect/Brand").Brand<"OperationId">;
43
44
  readonly pathTemplate: string;
45
+ readonly baseUrl?: string | undefined;
44
46
  }[];
45
47
  readonly title: Option.Option<string>;
46
48
  readonly servers: readonly {
47
- readonly url: string;
48
49
  readonly description: Option.Option<string>;
50
+ readonly url: string;
49
51
  readonly variables: Option.Option<{
50
52
  readonly [x: string]: {
51
53
  readonly default: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,43 @@
1
+ import { Effect } from "effect";
2
+ import { HttpClient } from "effect/unstable/http";
3
+ import { OpenApiParseError } from "./errors";
4
+ import type { SpecFetchCredentials } from "./parse";
5
+ import type { Authentication } from "./types";
6
+ export interface GoogleDiscoveryOpenApiConversion {
7
+ readonly specText: string;
8
+ readonly baseUrl: string;
9
+ readonly title: string;
10
+ readonly service: string;
11
+ readonly version: string;
12
+ readonly discoveryUrls?: readonly string[];
13
+ /** The v2 oauth auth template the converted integration declares, when the
14
+ * Discovery document advertises OAuth2 scopes. */
15
+ readonly authenticationTemplate?: readonly Authentication[];
16
+ }
17
+ export declare const isGoogleDiscoveryUrl: (url: string) => boolean;
18
+ export declare const fetchGoogleDiscoveryDocument: (discoveryUrl: string, credentials?: SpecFetchCredentials | undefined) => Effect.Effect<string, OpenApiParseError, HttpClient.HttpClient>;
19
+ export declare const convertGoogleDiscoveryToOpenApi: (input: {
20
+ readonly discoveryUrl: string;
21
+ readonly documentText: string;
22
+ }) => Effect.Effect<{
23
+ authenticationTemplate?: readonly Authentication[] | undefined;
24
+ specText: string;
25
+ baseUrl: string;
26
+ title: string;
27
+ service: string;
28
+ version: string;
29
+ }, OpenApiParseError, never>;
30
+ export declare const convertGoogleDiscoveryBundleToOpenApi: (input: {
31
+ readonly documents: readonly {
32
+ readonly discoveryUrl: string;
33
+ readonly documentText: string;
34
+ }[];
35
+ }) => Effect.Effect<{
36
+ authenticationTemplate?: readonly Authentication[] | undefined;
37
+ specText: string;
38
+ baseUrl: string;
39
+ title: string;
40
+ service: string;
41
+ version: string;
42
+ discoveryUrls: string[];
43
+ }, OpenApiParseError, never>;