@rafads/plugin-openapi 1.5.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -0
- package/dist/AddOpenApiIntegration-JPAEXE56.js +512 -0
- package/dist/AddOpenApiIntegration-JPAEXE56.js.map +1 -0
- package/dist/OpenApiAccountsPanel-GZFDSTAU.js +106 -0
- package/dist/OpenApiAccountsPanel-GZFDSTAU.js.map +1 -0
- package/dist/UpdateSpecSection-KUSNI44Q.js +106 -0
- package/dist/UpdateSpecSection-KUSNI44Q.js.map +1 -0
- package/dist/api/group.d.ts +239 -0
- package/dist/api/handlers.d.ts +7 -0
- package/dist/api/index.d.ts +237 -0
- package/dist/chunk-6V45G2XQ.js +199 -0
- package/dist/chunk-6V45G2XQ.js.map +1 -0
- package/dist/chunk-CURJJXB3.js +132 -0
- package/dist/chunk-CURJJXB3.js.map +1 -0
- package/dist/chunk-CXFO6TLJ.js +39 -0
- package/dist/chunk-CXFO6TLJ.js.map +1 -0
- package/dist/chunk-HTHEUUJA.js +2873 -0
- package/dist/chunk-HTHEUUJA.js.map +1 -0
- package/dist/chunk-IG6QTTZB.js +79 -0
- package/dist/chunk-IG6QTTZB.js.map +1 -0
- package/dist/chunk-O2LMSZ2Z.js +120 -0
- package/dist/chunk-O2LMSZ2Z.js.map +1 -0
- package/dist/chunk-OR27BCXQ.js +956 -0
- package/dist/chunk-OR27BCXQ.js.map +1 -0
- package/dist/chunk-R7TVM3XD.js +275 -0
- package/dist/chunk-R7TVM3XD.js.map +1 -0
- package/dist/client.js +38 -0
- package/dist/client.js.map +1 -0
- package/dist/core.js +331 -0
- package/dist/core.js.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/google/config.d.ts +34 -0
- package/dist/providers/google/discovery.d.ts +49 -0
- package/dist/providers/google/discovery.test.d.ts +1 -0
- package/dist/providers/google/index.d.ts +5 -0
- package/dist/providers/google/oauth-scopes.d.ts +3 -0
- package/dist/providers/google/oauth-scopes.test.d.ts +1 -0
- package/dist/providers/google/openapi-ownership-migration.d.ts +7 -0
- package/dist/providers/google/openapi-ownership-migration.test.d.ts +1 -0
- package/dist/providers/google/presets.d.ts +31 -0
- package/dist/providers/google/presets.test.d.ts +1 -0
- package/dist/providers/google/spec-format-adapter.d.ts +3 -0
- package/dist/providers/google/spec-format-adapter.test.d.ts +1 -0
- package/dist/providers/google.js +1446 -0
- package/dist/providers/google.js.map +1 -0
- package/dist/providers/microsoft/graph.d.ts +76 -0
- package/dist/providers/microsoft/graph.test.d.ts +1 -0
- package/dist/providers/microsoft/index.d.ts +3 -0
- package/dist/providers/microsoft/presets.d.ts +46 -0
- package/dist/providers/microsoft/presets.test.d.ts +1 -0
- package/dist/providers/microsoft/spec-format-adapter.d.ts +2 -0
- package/dist/providers/microsoft/spec-format-adapter.test.d.ts +1 -0
- package/dist/providers/microsoft.js +1056 -0
- package/dist/providers/microsoft.js.map +1 -0
- package/dist/react/AddOpenApiIntegration.d.ts +22 -0
- package/dist/react/AddOpenApiIntegration.test.d.ts +1 -0
- package/dist/react/OpenApiAccountsPanel.d.ts +6 -0
- package/dist/react/OpenApiIntegrationDetailsFields.d.ts +25 -0
- package/dist/react/UpdateSpecSection.d.ts +2 -0
- package/dist/react/atoms.d.ts +317 -0
- package/dist/react/auth-method-config.d.ts +18 -0
- package/dist/react/auth-method-config.test.d.ts +1 -0
- package/dist/react/client.d.ts +233 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/integration-plugin.d.ts +6 -0
- package/dist/react/plugin-client.d.ts +2 -0
- package/dist/sdk/backing.d.ts +188 -0
- package/dist/sdk/client-credentials-oauth.test.d.ts +1 -0
- package/dist/sdk/compiled-spec-cache.test.d.ts +1 -0
- package/dist/sdk/config.d.ts +81 -0
- package/dist/sdk/configure.test.d.ts +1 -0
- package/dist/sdk/definitions.d.ts +57 -0
- package/dist/sdk/derive-auth.d.ts +11 -0
- package/dist/sdk/describe-auth-methods.test.d.ts +1 -0
- package/dist/sdk/errors.d.ts +45 -0
- package/dist/sdk/extract.d.ts +157 -0
- package/dist/sdk/extract.test.d.ts +1 -0
- package/dist/sdk/form-urlencoded-body.test.d.ts +1 -0
- package/dist/sdk/index.d.ts +19 -0
- package/dist/sdk/index.test.d.ts +1 -0
- package/dist/sdk/invoke.d.ts +150 -0
- package/dist/sdk/migrate-config.d.ts +4 -0
- package/dist/sdk/migrate-config.test.d.ts +1 -0
- package/dist/sdk/multi-scope-bearer.test.d.ts +1 -0
- package/dist/sdk/multi-scope-oauth.test.d.ts +1 -0
- package/dist/sdk/ndjson-output-migration.d.ts +13 -0
- package/dist/sdk/ndjson-output-migration.test.d.ts +1 -0
- package/dist/sdk/non-json-body.test.d.ts +1 -0
- package/dist/sdk/oauth-refresh.test.d.ts +1 -0
- package/dist/sdk/openapi-utils.d.ts +65 -0
- package/dist/sdk/output-schema-migration.d.ts +21 -0
- package/dist/sdk/output-schema-migration.test.d.ts +1 -0
- package/dist/sdk/parse.d.ts +33 -0
- package/dist/sdk/parse.test.d.ts +1 -0
- package/dist/sdk/plugin.d.ts +109 -0
- package/dist/sdk/plugin.test.d.ts +1 -0
- package/dist/sdk/presets.d.ts +15 -0
- package/dist/sdk/preview-oauth2.test.d.ts +1 -0
- package/dist/sdk/preview.d.ts +514 -0
- package/dist/sdk/query-serialization.test.d.ts +1 -0
- package/dist/sdk/real-specs.test.d.ts +1 -0
- package/dist/sdk/request-user-agent.test.d.ts +1 -0
- package/dist/sdk/response-headers-timeout.test.d.ts +1 -0
- package/dist/sdk/server-url-resolution.test.d.ts +1 -0
- package/dist/sdk/spec-blob-migration.d.ts +7 -0
- package/dist/sdk/spec-blob.test.d.ts +1 -0
- package/dist/sdk/spec-format.d.ts +36 -0
- package/dist/sdk/spec-format.test.d.ts +1 -0
- package/dist/sdk/split.d.ts +84 -0
- package/dist/sdk/store.d.ts +49 -0
- package/dist/sdk/store.test.d.ts +1 -0
- package/dist/sdk/streaming-response.test.d.ts +1 -0
- package/dist/sdk/tool-row-projection.test.d.ts +1 -0
- package/dist/sdk/types.d.ts +352 -0
- package/dist/sdk/upstream-failures.test.d.ts +1 -0
- package/dist/sdk/usage-scope-isolation.test.d.ts +1 -0
- package/dist/testing/index.d.ts +177 -0
- package/dist/testing.js +454 -0
- package/dist/testing.js.map +1 -0
- package/dist/testing.test.d.ts +1 -0
- package/package.json +103 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { type OpenApiPluginOptions } from "../sdk/plugin";
|
|
2
|
+
import { OpenApiExtensionService } from "./handlers";
|
|
3
|
+
export { OpenApiGroup } from "./group";
|
|
4
|
+
export { OpenApiHandlers, OpenApiExtensionService } from "./handlers";
|
|
5
|
+
export declare const openApiHttpPlugin: import("@rafads/sdk/core").ConfiguredPlugin<"openapi", import("../sdk").OpenApiPluginExtension, import("../sdk").OpenapiStore, OpenApiPluginOptions, typeof OpenApiExtensionService, import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").ApiGroup<"executor", "openapi">, never, import("effect/unstable/http/HttpRouter").Request<"Requires", OpenApiExtensionService>>, 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<{
|
|
6
|
+
readonly spec: import("effect/Schema").String;
|
|
7
|
+
readonly specFormat: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
8
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
9
|
+
readonly title: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
10
|
+
readonly description: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
11
|
+
readonly version: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
12
|
+
readonly servers: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
13
|
+
readonly url: import("effect/Schema").String;
|
|
14
|
+
readonly description: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
15
|
+
readonly variables: import("effect/Schema").OptionFromOptional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
16
|
+
readonly default: import("effect/Schema").String;
|
|
17
|
+
readonly enum: import("effect/Schema").OptionFromOptional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
18
|
+
readonly description: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
19
|
+
}>>>;
|
|
20
|
+
}>>;
|
|
21
|
+
readonly operationCount: import("effect/Schema").Number;
|
|
22
|
+
readonly tags: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
23
|
+
readonly securitySchemes: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
24
|
+
readonly name: import("effect/Schema").String;
|
|
25
|
+
readonly type: import("effect/Schema").Literals<readonly ["http", "apiKey", "oauth2", "openIdConnect"]>;
|
|
26
|
+
readonly scheme: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
27
|
+
readonly bearerFormat: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
28
|
+
readonly in: import("effect/Schema").OptionFromOptional<import("effect/Schema").Literals<readonly ["header", "query", "cookie"]>>;
|
|
29
|
+
readonly headerName: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
30
|
+
readonly description: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
31
|
+
readonly flows: import("effect/Schema").OptionFromOptional<import("effect/Schema").Struct<{
|
|
32
|
+
readonly authorizationCode: import("effect/Schema").OptionFromOptional<import("effect/Schema").Struct<{
|
|
33
|
+
readonly authorizationUrl: import("effect/Schema").String;
|
|
34
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
35
|
+
readonly refreshUrl: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
36
|
+
readonly scopes: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
|
|
37
|
+
}>>;
|
|
38
|
+
readonly clientCredentials: import("effect/Schema").OptionFromOptional<import("effect/Schema").Struct<{
|
|
39
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
40
|
+
readonly refreshUrl: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
41
|
+
readonly scopes: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
|
|
42
|
+
}>>;
|
|
43
|
+
}>>;
|
|
44
|
+
readonly openIdConnectUrl: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
45
|
+
}>>;
|
|
46
|
+
readonly authStrategies: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
47
|
+
readonly schemes: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
48
|
+
}>>;
|
|
49
|
+
readonly headerPresets: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
50
|
+
readonly label: import("effect/Schema").String;
|
|
51
|
+
readonly headers: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
52
|
+
readonly secretHeaders: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
53
|
+
}>>;
|
|
54
|
+
readonly oauth2Presets: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
55
|
+
readonly label: import("effect/Schema").String;
|
|
56
|
+
readonly securitySchemeName: import("effect/Schema").String;
|
|
57
|
+
readonly flow: import("effect/Schema").Literals<readonly ["authorizationCode", "clientCredentials"]>;
|
|
58
|
+
readonly authorizationUrl: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
59
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
60
|
+
readonly resource: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
61
|
+
readonly refreshUrl: import("effect/Schema").OptionFromOptional<import("effect/Schema").String>;
|
|
62
|
+
readonly scopes: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
|
|
63
|
+
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>]>;
|
|
64
|
+
readonly supportsClientIdMetadataDocument: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
65
|
+
}>>;
|
|
66
|
+
readonly healthCheckCandidates: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
67
|
+
readonly operation: import("effect/Schema").String;
|
|
68
|
+
readonly method: import("effect/Schema").String;
|
|
69
|
+
readonly requiredArgCount: import("effect/Schema").Number;
|
|
70
|
+
readonly destructive: import("effect/Schema").Boolean;
|
|
71
|
+
readonly summary: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
72
|
+
readonly parameters: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
73
|
+
readonly name: import("effect/Schema").String;
|
|
74
|
+
readonly location: import("effect/Schema").String;
|
|
75
|
+
readonly required: import("effect/Schema").Boolean;
|
|
76
|
+
readonly description: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
77
|
+
}>>>;
|
|
78
|
+
readonly responseFields: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
79
|
+
readonly path: import("effect/Schema").String;
|
|
80
|
+
readonly type: import("effect/Schema").String;
|
|
81
|
+
}>>>;
|
|
82
|
+
}>>;
|
|
83
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@rafads/sdk/core").IntegrationAlreadyExistsError | typeof import("@rafads/api").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<{
|
|
84
|
+
readonly spec: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
85
|
+
readonly kind: import("effect/Schema").Literal<"url">;
|
|
86
|
+
readonly url: import("effect/Schema").String;
|
|
87
|
+
}>, import("effect/Schema").Struct<{
|
|
88
|
+
readonly kind: import("effect/Schema").Literal<"blob">;
|
|
89
|
+
readonly value: import("effect/Schema").String;
|
|
90
|
+
}>]>;
|
|
91
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
92
|
+
readonly name: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
93
|
+
readonly description: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
94
|
+
readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
95
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
96
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
97
|
+
readonly specFormat: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
98
|
+
readonly family: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
99
|
+
readonly healthCheck: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
100
|
+
readonly operation: import("effect/Schema").String;
|
|
101
|
+
readonly args: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>;
|
|
102
|
+
readonly identityField: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
103
|
+
}>>;
|
|
104
|
+
readonly authenticationTemplate: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
105
|
+
readonly slug: import("effect/Schema").String;
|
|
106
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
107
|
+
readonly authorizationUrl: import("effect/Schema").String;
|
|
108
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
109
|
+
readonly resource: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
110
|
+
readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
111
|
+
readonly supportsClientIdMetadataDocument: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
112
|
+
}>, import("effect/Schema").Struct<{
|
|
113
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
114
|
+
readonly type: import("effect/Schema").Literal<"apiKey">;
|
|
115
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
116
|
+
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<{
|
|
117
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
118
|
+
readonly name: import("effect/Schema").String;
|
|
119
|
+
}>]>>]>>>;
|
|
120
|
+
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<{
|
|
121
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
122
|
+
readonly name: import("effect/Schema").String;
|
|
123
|
+
}>]>>]>>>;
|
|
124
|
+
}>]>>>;
|
|
125
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
126
|
+
readonly slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
|
|
127
|
+
readonly toolCount: import("effect/Schema").Number;
|
|
128
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@rafads/sdk/core").IntegrationAlreadyExistsError | typeof import("@rafads/api").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<{
|
|
129
|
+
slug: import("effect/Schema").String;
|
|
130
|
+
}>>, 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<{
|
|
131
|
+
readonly slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
|
|
132
|
+
readonly description: import("effect/Schema").String;
|
|
133
|
+
readonly kind: import("effect/Schema").String;
|
|
134
|
+
readonly canRemove: import("effect/Schema").Boolean;
|
|
135
|
+
readonly canRefresh: import("effect/Schema").Boolean;
|
|
136
|
+
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@rafads/sdk/core").IntegrationAlreadyExistsError | typeof import("@rafads/api").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<{
|
|
137
|
+
slug: import("effect/Schema").String;
|
|
138
|
+
}>>, 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<{
|
|
139
|
+
readonly specUrl: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
140
|
+
readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
141
|
+
readonly headers: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
142
|
+
readonly queryParams: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>>;
|
|
143
|
+
readonly authenticationTemplate: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
144
|
+
readonly slug: import("effect/Schema").String;
|
|
145
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
146
|
+
readonly authorizationUrl: import("effect/Schema").String;
|
|
147
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
148
|
+
readonly resource: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
149
|
+
readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
150
|
+
readonly supportsClientIdMetadataDocument: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
151
|
+
}>, import("effect/Schema").Struct<{
|
|
152
|
+
readonly slug: import("effect/Schema").String;
|
|
153
|
+
readonly kind: import("effect/Schema").Literal<"apikey">;
|
|
154
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
155
|
+
readonly placements: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
156
|
+
readonly carrier: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
157
|
+
readonly name: import("effect/Schema").String;
|
|
158
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
159
|
+
readonly variable: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
160
|
+
readonly literal: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
161
|
+
}>>;
|
|
162
|
+
}>]>>>;
|
|
163
|
+
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@rafads/sdk/core").IntegrationAlreadyExistsError | typeof import("@rafads/api").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<{
|
|
164
|
+
slug: import("effect/Schema").String;
|
|
165
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
166
|
+
readonly authenticationTemplate: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
167
|
+
readonly slug: import("effect/Schema").String;
|
|
168
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
169
|
+
readonly authorizationUrl: import("effect/Schema").String;
|
|
170
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
171
|
+
readonly resource: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
172
|
+
readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
173
|
+
readonly supportsClientIdMetadataDocument: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
174
|
+
}>, import("effect/Schema").Struct<{
|
|
175
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
176
|
+
readonly type: import("effect/Schema").Literal<"apiKey">;
|
|
177
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
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").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Struct<{
|
|
179
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
180
|
+
readonly name: import("effect/Schema").String;
|
|
181
|
+
}>]>>]>>>;
|
|
182
|
+
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<{
|
|
183
|
+
readonly type: import("effect/Schema").Literal<"variable">;
|
|
184
|
+
readonly name: import("effect/Schema").String;
|
|
185
|
+
}>]>>]>>>;
|
|
186
|
+
}>]>>>;
|
|
187
|
+
readonly mode: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["merge", "replace"]>>;
|
|
188
|
+
readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
189
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
190
|
+
readonly authenticationTemplate: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
191
|
+
readonly slug: import("effect/Schema").String;
|
|
192
|
+
readonly kind: import("effect/Schema").Literal<"oauth2">;
|
|
193
|
+
readonly authorizationUrl: import("effect/Schema").String;
|
|
194
|
+
readonly tokenUrl: import("effect/Schema").String;
|
|
195
|
+
readonly resource: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
196
|
+
readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
197
|
+
readonly supportsClientIdMetadataDocument: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
198
|
+
}>, import("effect/Schema").Struct<{
|
|
199
|
+
readonly slug: import("effect/Schema").String;
|
|
200
|
+
readonly kind: import("effect/Schema").Literal<"apikey">;
|
|
201
|
+
readonly label: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
202
|
+
readonly placements: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
203
|
+
readonly carrier: import("effect/Schema").Literals<readonly ["header", "query"]>;
|
|
204
|
+
readonly name: import("effect/Schema").String;
|
|
205
|
+
readonly prefix: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
206
|
+
readonly variable: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
207
|
+
readonly literal: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
208
|
+
}>>;
|
|
209
|
+
}>]>>;
|
|
210
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@rafads/sdk/core").IntegrationAlreadyExistsError | typeof import("@rafads/api").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"updateSpec", "POST", "/openapi/integrations/:slug/spec", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
211
|
+
slug: import("effect/Schema").String;
|
|
212
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
213
|
+
readonly spec: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
214
|
+
readonly kind: import("effect/Schema").Literal<"url">;
|
|
215
|
+
readonly url: import("effect/Schema").String;
|
|
216
|
+
}>, import("effect/Schema").Struct<{
|
|
217
|
+
readonly kind: import("effect/Schema").Literal<"blob">;
|
|
218
|
+
readonly value: import("effect/Schema").String;
|
|
219
|
+
}>]>>;
|
|
220
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
221
|
+
readonly slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
|
|
222
|
+
readonly toolCount: import("effect/Schema").Number;
|
|
223
|
+
readonly addedTools: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
224
|
+
readonly removedTools: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
225
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").decodeTo<import("effect/Schema").declareConstructor<import("@rafads/sdk/core").IntegrationNotFoundError, {
|
|
226
|
+
readonly _tag: "IntegrationNotFoundError";
|
|
227
|
+
readonly slug: string;
|
|
228
|
+
}, readonly [import("effect/Schema").TaggedStruct<"IntegrationNotFoundError", {
|
|
229
|
+
readonly slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
|
|
230
|
+
}>], {
|
|
231
|
+
readonly _tag: "IntegrationNotFoundError";
|
|
232
|
+
readonly slug: string & import("effect/Brand").Brand<"IntegrationSlug">;
|
|
233
|
+
}>, import("effect/Schema").TaggedStruct<"IntegrationNotFoundError", {
|
|
234
|
+
readonly slug: import("effect/Schema").brand<import("effect/Schema").String, "IntegrationSlug">;
|
|
235
|
+
}>, never, never> | typeof import("@rafads/api").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<{
|
|
236
|
+
slug: import("effect/Schema").String;
|
|
237
|
+
}>>, 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("@rafads/sdk/core").IntegrationAlreadyExistsError | typeof import("@rafads/api").InternalError | typeof import("../sdk").OpenApiParseError | typeof import("../sdk").OpenApiExtractionError | typeof import("../sdk").OpenApiOAuthError>, never, never>, false>>;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpecPreviewSummary
|
|
3
|
+
} from "./chunk-HTHEUUJA.js";
|
|
4
|
+
import {
|
|
5
|
+
OpenApiExtractionError,
|
|
6
|
+
OpenApiOAuthError,
|
|
7
|
+
OpenApiParseError
|
|
8
|
+
} from "./chunk-CXFO6TLJ.js";
|
|
9
|
+
|
|
10
|
+
// src/react/atoms.ts
|
|
11
|
+
import * as Atom from "effect/unstable/reactivity/Atom";
|
|
12
|
+
import { ReactivityKey } from "@rafads/react/api/reactivity-keys";
|
|
13
|
+
|
|
14
|
+
// src/react/client.ts
|
|
15
|
+
import { createPluginAtomClient } from "@rafads/sdk/client";
|
|
16
|
+
import {
|
|
17
|
+
getExecutorOrganizationHeaders,
|
|
18
|
+
getExecutorApiBaseUrl,
|
|
19
|
+
getExecutorServerAuthorizationHeader
|
|
20
|
+
} from "@rafads/react/api/server-connection";
|
|
21
|
+
|
|
22
|
+
// src/api/group.ts
|
|
23
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
24
|
+
import { Schema } from "effect";
|
|
25
|
+
import { ApiKeyAuthMethod, ApiKeyAuthTemplate } from "@rafads/sdk/http-auth";
|
|
26
|
+
import {
|
|
27
|
+
HealthCheckSpec,
|
|
28
|
+
InternalError,
|
|
29
|
+
IntegrationAlreadyExistsError,
|
|
30
|
+
IntegrationNotFoundError,
|
|
31
|
+
IntegrationSlug
|
|
32
|
+
} from "@rafads/sdk/shared";
|
|
33
|
+
var DomainErrors = [
|
|
34
|
+
InternalError,
|
|
35
|
+
OpenApiParseError,
|
|
36
|
+
OpenApiExtractionError,
|
|
37
|
+
OpenApiOAuthError,
|
|
38
|
+
IntegrationAlreadyExistsError
|
|
39
|
+
];
|
|
40
|
+
var IntegrationNotFound = IntegrationNotFoundError.annotate({ httpApiStatus: 404 });
|
|
41
|
+
var UpdateSpecErrors = [
|
|
42
|
+
InternalError,
|
|
43
|
+
OpenApiParseError,
|
|
44
|
+
OpenApiExtractionError,
|
|
45
|
+
OpenApiOAuthError,
|
|
46
|
+
IntegrationNotFound
|
|
47
|
+
];
|
|
48
|
+
var SlugParams = {
|
|
49
|
+
slug: Schema.String
|
|
50
|
+
};
|
|
51
|
+
var OpenApiSpecInputPayload = Schema.Union([
|
|
52
|
+
Schema.Struct({ kind: Schema.Literal("url"), url: Schema.String }),
|
|
53
|
+
Schema.Struct({ kind: Schema.Literal("blob"), value: Schema.String })
|
|
54
|
+
]);
|
|
55
|
+
var OAuthTemplatePayload = Schema.Struct({
|
|
56
|
+
slug: Schema.String,
|
|
57
|
+
kind: Schema.Literal("oauth2"),
|
|
58
|
+
authorizationUrl: Schema.String,
|
|
59
|
+
tokenUrl: Schema.String,
|
|
60
|
+
resource: Schema.optional(Schema.NullOr(Schema.String)),
|
|
61
|
+
scopes: Schema.Array(Schema.String),
|
|
62
|
+
supportsClientIdMetadataDocument: Schema.optional(Schema.Boolean)
|
|
63
|
+
});
|
|
64
|
+
var AuthenticationPayload = Schema.Union([OAuthTemplatePayload, ApiKeyAuthTemplate]);
|
|
65
|
+
var AuthenticationResponse = Schema.Union([OAuthTemplatePayload, ApiKeyAuthMethod]);
|
|
66
|
+
var AddSpecPayload = Schema.Struct({
|
|
67
|
+
spec: OpenApiSpecInputPayload,
|
|
68
|
+
slug: Schema.optional(Schema.String),
|
|
69
|
+
name: Schema.optional(Schema.String),
|
|
70
|
+
description: Schema.optional(Schema.String),
|
|
71
|
+
baseUrl: Schema.optional(Schema.String),
|
|
72
|
+
headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
73
|
+
queryParams: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
74
|
+
specFormat: Schema.optional(Schema.String),
|
|
75
|
+
family: Schema.optional(Schema.String),
|
|
76
|
+
healthCheck: Schema.optional(HealthCheckSpec),
|
|
77
|
+
authenticationTemplate: Schema.optional(Schema.Array(AuthenticationPayload))
|
|
78
|
+
});
|
|
79
|
+
var PreviewSpecPayload = Schema.Struct({
|
|
80
|
+
spec: Schema.String,
|
|
81
|
+
specFormat: Schema.optional(Schema.String)
|
|
82
|
+
});
|
|
83
|
+
var ConfigurePayload = Schema.Struct({
|
|
84
|
+
authenticationTemplate: Schema.optional(Schema.Array(AuthenticationPayload)),
|
|
85
|
+
mode: Schema.optional(Schema.Literals(["merge", "replace"])),
|
|
86
|
+
baseUrl: Schema.optional(Schema.String)
|
|
87
|
+
});
|
|
88
|
+
var AddSpecResponse = Schema.Struct({
|
|
89
|
+
slug: IntegrationSlug,
|
|
90
|
+
toolCount: Schema.Number
|
|
91
|
+
});
|
|
92
|
+
var UpdateSpecPayload = Schema.Struct({
|
|
93
|
+
spec: Schema.optional(OpenApiSpecInputPayload)
|
|
94
|
+
});
|
|
95
|
+
var UpdateSpecResponse = Schema.Struct({
|
|
96
|
+
slug: IntegrationSlug,
|
|
97
|
+
toolCount: Schema.Number,
|
|
98
|
+
/** Tool names new in this spec version (same diff for every connection). */
|
|
99
|
+
addedTools: Schema.Array(Schema.String),
|
|
100
|
+
/** Tool names the new spec no longer defines. */
|
|
101
|
+
removedTools: Schema.Array(Schema.String)
|
|
102
|
+
});
|
|
103
|
+
var IntegrationView = Schema.Struct({
|
|
104
|
+
slug: IntegrationSlug,
|
|
105
|
+
description: Schema.String,
|
|
106
|
+
kind: Schema.String,
|
|
107
|
+
canRemove: Schema.Boolean,
|
|
108
|
+
canRefresh: Schema.Boolean
|
|
109
|
+
});
|
|
110
|
+
var OpenApiConfigView = Schema.Struct({
|
|
111
|
+
specUrl: Schema.optional(Schema.String),
|
|
112
|
+
baseUrl: Schema.optional(Schema.String),
|
|
113
|
+
headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
114
|
+
queryParams: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
115
|
+
authenticationTemplate: Schema.optional(Schema.Array(AuthenticationResponse))
|
|
116
|
+
});
|
|
117
|
+
var ConfigureResponse = Schema.Struct({
|
|
118
|
+
authenticationTemplate: Schema.Array(AuthenticationResponse)
|
|
119
|
+
});
|
|
120
|
+
var OpenApiGroup = HttpApiGroup.make("openapi").add(
|
|
121
|
+
HttpApiEndpoint.post("previewSpec", "/openapi/preview", {
|
|
122
|
+
payload: PreviewSpecPayload,
|
|
123
|
+
success: SpecPreviewSummary,
|
|
124
|
+
error: DomainErrors
|
|
125
|
+
})
|
|
126
|
+
).add(
|
|
127
|
+
HttpApiEndpoint.post("addSpec", "/openapi/specs", {
|
|
128
|
+
payload: AddSpecPayload,
|
|
129
|
+
success: AddSpecResponse,
|
|
130
|
+
error: DomainErrors
|
|
131
|
+
})
|
|
132
|
+
).add(
|
|
133
|
+
HttpApiEndpoint.get("getIntegration", "/openapi/integrations/:slug", {
|
|
134
|
+
params: SlugParams,
|
|
135
|
+
success: Schema.NullOr(IntegrationView),
|
|
136
|
+
error: DomainErrors
|
|
137
|
+
})
|
|
138
|
+
).add(
|
|
139
|
+
HttpApiEndpoint.get("getConfig", "/openapi/integrations/:slug/config", {
|
|
140
|
+
params: SlugParams,
|
|
141
|
+
success: Schema.NullOr(OpenApiConfigView),
|
|
142
|
+
error: DomainErrors
|
|
143
|
+
})
|
|
144
|
+
).add(
|
|
145
|
+
HttpApiEndpoint.post("configure", "/openapi/integrations/:slug/config", {
|
|
146
|
+
params: SlugParams,
|
|
147
|
+
payload: ConfigurePayload,
|
|
148
|
+
success: ConfigureResponse,
|
|
149
|
+
error: DomainErrors
|
|
150
|
+
})
|
|
151
|
+
).add(
|
|
152
|
+
HttpApiEndpoint.post("updateSpec", "/openapi/integrations/:slug/spec", {
|
|
153
|
+
params: SlugParams,
|
|
154
|
+
payload: UpdateSpecPayload,
|
|
155
|
+
success: UpdateSpecResponse,
|
|
156
|
+
error: UpdateSpecErrors
|
|
157
|
+
})
|
|
158
|
+
).add(
|
|
159
|
+
HttpApiEndpoint.delete("removeSpec", "/openapi/integrations/:slug", {
|
|
160
|
+
params: SlugParams,
|
|
161
|
+
success: Schema.Void,
|
|
162
|
+
error: DomainErrors
|
|
163
|
+
})
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
// src/react/client.ts
|
|
167
|
+
var OpenApiClient = createPluginAtomClient(OpenApiGroup, {
|
|
168
|
+
baseUrl: getExecutorApiBaseUrl,
|
|
169
|
+
authorizationHeader: getExecutorServerAuthorizationHeader,
|
|
170
|
+
headers: getExecutorOrganizationHeaders
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// src/react/atoms.ts
|
|
174
|
+
var openApiIntegrationAtom = (slug) => OpenApiClient.query("openapi", "getIntegration", {
|
|
175
|
+
params: { slug },
|
|
176
|
+
timeToLive: "15 seconds",
|
|
177
|
+
reactivityKeys: [ReactivityKey.integrations, ReactivityKey.tools]
|
|
178
|
+
});
|
|
179
|
+
var openApiConfigAtom = (slug) => OpenApiClient.query("openapi", "getConfig", {
|
|
180
|
+
params: { slug },
|
|
181
|
+
timeToLive: "15 seconds",
|
|
182
|
+
reactivityKeys: [ReactivityKey.integrations, ReactivityKey.tools]
|
|
183
|
+
});
|
|
184
|
+
var previewOpenApiSpec = OpenApiClient.mutation("openapi", "previewSpec");
|
|
185
|
+
var addOpenApiSpec = OpenApiClient.mutation("openapi", "addSpec");
|
|
186
|
+
var removeOpenApiSpec = OpenApiClient.mutation("openapi", "removeSpec");
|
|
187
|
+
var updateOpenApiSpec = OpenApiClient.mutation("openapi", "updateSpec");
|
|
188
|
+
var openapiConfigure = OpenApiClient.mutation("openapi", "configure");
|
|
189
|
+
var openApiIntegrationFamily = Atom.family(openApiIntegrationAtom);
|
|
190
|
+
var openApiConfigFamily = Atom.family(openApiConfigAtom);
|
|
191
|
+
|
|
192
|
+
export {
|
|
193
|
+
openApiConfigAtom,
|
|
194
|
+
previewOpenApiSpec,
|
|
195
|
+
addOpenApiSpec,
|
|
196
|
+
updateOpenApiSpec,
|
|
197
|
+
openapiConfigure
|
|
198
|
+
};
|
|
199
|
+
//# sourceMappingURL=chunk-6V45G2XQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react/atoms.ts","../src/react/client.ts","../src/api/group.ts"],"sourcesContent":["import type { IntegrationSlug } from \"@rafads/sdk/shared\";\nimport * as Atom from \"effect/unstable/reactivity/Atom\";\nimport { ReactivityKey } from \"@rafads/react/api/reactivity-keys\";\nimport { OpenApiClient } from \"./client\";\n\n// ---------------------------------------------------------------------------\n// Query atoms — v2: the integration catalog is the unit of identity (the v1\n// per-scope `source` row is gone). `getIntegration` returns the catalog entry\n// (slug/description/kind/canRemove/canRefresh); credentials are owner-scoped\n// connections read from the shared `connections` API, not bound per source.\n// ---------------------------------------------------------------------------\n\nexport const openApiIntegrationAtom = (slug: IntegrationSlug) =>\n OpenApiClient.query(\"openapi\", \"getIntegration\", {\n params: { slug },\n timeToLive: \"15 seconds\",\n reactivityKeys: [ReactivityKey.integrations, ReactivityKey.tools],\n });\n\n// The full opaque config (including `authenticationTemplate`), used by the\n// configure UX to render existing auth methods and add custom ones.\nexport const openApiConfigAtom = (slug: IntegrationSlug) =>\n OpenApiClient.query(\"openapi\", \"getConfig\", {\n params: { slug },\n timeToLive: \"15 seconds\",\n reactivityKeys: [ReactivityKey.integrations, ReactivityKey.tools],\n });\n\n// ---------------------------------------------------------------------------\n// Mutation atoms\n// ---------------------------------------------------------------------------\n\nexport const previewOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"previewSpec\");\n\nexport const addOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"addSpec\");\n\nexport const removeOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"removeSpec\");\n\n/** Re-fetch (or replace) the integration's spec and rebuild its tools in\n * place — connections, policies, and the description survive. Pass\n * `reactivityKeys: integrationWriteKeys` at the call site. */\nexport const updateOpenApiSpec = OpenApiClient.mutation(\"openapi\", \"updateSpec\");\n\n// Add / merge custom auth methods onto an integration's `authenticationTemplate`.\nexport const openapiConfigure = OpenApiClient.mutation(\"openapi\", \"configure\");\n\n// `getIntegration` is read-only; the atom family lets a caller pass a slug.\nexport const openApiIntegrationFamily = Atom.family(openApiIntegrationAtom);\n\n// `getConfig` is read-only; the atom family lets a caller pass a slug.\nexport const openApiConfigFamily = Atom.family(openApiConfigAtom);\n","import { createPluginAtomClient } from \"@rafads/sdk/client\";\nimport {\n getExecutorOrganizationHeaders,\n getExecutorApiBaseUrl,\n getExecutorServerAuthorizationHeader,\n} from \"@rafads/react/api/server-connection\";\nimport { OpenApiGroup } from \"../api/group\";\n\nexport const OpenApiClient = createPluginAtomClient(OpenApiGroup, {\n baseUrl: getExecutorApiBaseUrl,\n authorizationHeader: getExecutorServerAuthorizationHeader,\n headers: getExecutorOrganizationHeaders,\n});\n","import { HttpApiEndpoint, HttpApiGroup } from \"effect/unstable/httpapi\";\nimport { Schema } from \"effect\";\nimport { ApiKeyAuthMethod, ApiKeyAuthTemplate } from \"@rafads/sdk/http-auth\";\nimport {\n HealthCheckSpec,\n InternalError,\n IntegrationAlreadyExistsError,\n IntegrationNotFoundError,\n IntegrationSlug,\n} from \"@rafads/sdk/shared\";\n\nimport { OpenApiParseError, OpenApiExtractionError, OpenApiOAuthError } from \"../sdk/errors\";\nimport { SpecPreviewSummary } from \"../sdk/preview\";\n\n// ---------------------------------------------------------------------------\n// Errors — the plugin-domain tagged errors flow directly to clients\n// (4xx, each carrying its own `httpApiStatus`). `InternalError` is the shared\n// opaque 500 surface; `StorageError` → `InternalError` translation happens at\n// service wiring time. `IntegrationAlreadyExistsError` (409) blocks re-adding\n// an existing slug — see addSpec.\n// ---------------------------------------------------------------------------\n\nconst DomainErrors = [\n InternalError,\n OpenApiParseError,\n OpenApiExtractionError,\n OpenApiOAuthError,\n IntegrationAlreadyExistsError,\n] as const;\n\nconst IntegrationNotFound = IntegrationNotFoundError.annotate({ httpApiStatus: 404 });\n\nconst UpdateSpecErrors = [\n InternalError,\n OpenApiParseError,\n OpenApiExtractionError,\n OpenApiOAuthError,\n IntegrationNotFound,\n] as const;\n\nconst SlugParams = {\n slug: Schema.String,\n};\n\n// ---------------------------------------------------------------------------\n// Payloads\n// ---------------------------------------------------------------------------\n\nconst OpenApiSpecInputPayload = Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"url\"), url: Schema.String }),\n Schema.Struct({ kind: Schema.Literal(\"blob\"), value: Schema.String }),\n]);\n\nconst OAuthTemplatePayload = Schema.Struct({\n slug: Schema.String,\n kind: Schema.Literal(\"oauth2\"),\n authorizationUrl: Schema.String,\n tokenUrl: Schema.String,\n resource: Schema.optional(Schema.NullOr(Schema.String)),\n scopes: Schema.Array(Schema.String),\n supportsClientIdMetadataDocument: Schema.optional(Schema.Boolean),\n});\n\n/** Auth INPUTS: oauth templates + the request-shaped apikey dialect. */\nconst AuthenticationPayload = Schema.Union([OAuthTemplatePayload, ApiKeyAuthTemplate]);\n\n/** Auth in RESPONSES: the canonical stored shapes (placements). */\nconst AuthenticationResponse = Schema.Union([OAuthTemplatePayload, ApiKeyAuthMethod]);\n\nconst AddSpecPayload = Schema.Struct({\n spec: OpenApiSpecInputPayload,\n slug: Schema.optional(Schema.String),\n name: Schema.optional(Schema.String),\n description: Schema.optional(Schema.String),\n baseUrl: Schema.optional(Schema.String),\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n queryParams: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n specFormat: Schema.optional(Schema.String),\n family: Schema.optional(Schema.String),\n healthCheck: Schema.optional(HealthCheckSpec),\n authenticationTemplate: Schema.optional(Schema.Array(AuthenticationPayload)),\n});\n\nconst PreviewSpecPayload = Schema.Struct({\n spec: Schema.String,\n specFormat: Schema.optional(Schema.String),\n});\n\n// The `configure` payload — the new/updated auth methods to merge onto the\n// integration's `authenticationTemplate`, plus request routing metadata.\n// Reuses the same `AuthenticationPayload` schema as `addSpec` so a custom apiKey\n// method round-trips identically.\nconst ConfigurePayload = Schema.Struct({\n authenticationTemplate: Schema.optional(Schema.Array(AuthenticationPayload)),\n mode: Schema.optional(Schema.Literals([\"merge\", \"replace\"])),\n baseUrl: Schema.optional(Schema.String),\n});\n\n// ---------------------------------------------------------------------------\n// Responses\n// ---------------------------------------------------------------------------\n\nconst AddSpecResponse = Schema.Struct({\n slug: IntegrationSlug,\n toolCount: Schema.Number,\n});\n\n// Update the spec in place. Body optional fields only: an empty payload means\n// \"re-fetch from the stored source URL\".\nconst UpdateSpecPayload = Schema.Struct({\n spec: Schema.optional(OpenApiSpecInputPayload),\n});\n\nconst UpdateSpecResponse = Schema.Struct({\n slug: IntegrationSlug,\n toolCount: Schema.Number,\n /** Tool names new in this spec version (same diff for every connection). */\n addedTools: Schema.Array(Schema.String),\n /** Tool names the new spec no longer defines. */\n removedTools: Schema.Array(Schema.String),\n});\n\nconst IntegrationView = Schema.Struct({\n slug: IntegrationSlug,\n description: Schema.String,\n kind: Schema.String,\n canRemove: Schema.Boolean,\n canRefresh: Schema.Boolean,\n});\n\n// The integration config surfaced for the configure UX. Unlike\n// `IntegrationView` (catalog identity only), this carries the\n// `authenticationTemplate` the configure flow reads/writes. The spec text is\n// deliberately NOT served: it's a multi-MB build artifact in the plugin blob\n// store, and no client reads it (the configure UI only touches the template).\nconst OpenApiConfigView = Schema.Struct({\n specUrl: Schema.optional(Schema.String),\n baseUrl: Schema.optional(Schema.String),\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n queryParams: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n authenticationTemplate: Schema.optional(Schema.Array(AuthenticationResponse)),\n});\n\n// The configure result — the merged `authenticationTemplate` after the new\n// custom methods were appended/replaced.\nconst ConfigureResponse = Schema.Struct({\n authenticationTemplate: Schema.Array(AuthenticationResponse),\n});\n\n// ---------------------------------------------------------------------------\n// Group — addSpec/preview/get/remove over the integration catalog.\n// ---------------------------------------------------------------------------\n\nexport const OpenApiGroup = HttpApiGroup.make(\"openapi\")\n .add(\n HttpApiEndpoint.post(\"previewSpec\", \"/openapi/preview\", {\n payload: PreviewSpecPayload,\n success: SpecPreviewSummary,\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.post(\"addSpec\", \"/openapi/specs\", {\n payload: AddSpecPayload,\n success: AddSpecResponse,\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.get(\"getIntegration\", \"/openapi/integrations/:slug\", {\n params: SlugParams,\n success: Schema.NullOr(IntegrationView),\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.get(\"getConfig\", \"/openapi/integrations/:slug/config\", {\n params: SlugParams,\n success: Schema.NullOr(OpenApiConfigView),\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.post(\"configure\", \"/openapi/integrations/:slug/config\", {\n params: SlugParams,\n payload: ConfigurePayload,\n success: ConfigureResponse,\n error: DomainErrors,\n }),\n )\n .add(\n HttpApiEndpoint.post(\"updateSpec\", \"/openapi/integrations/:slug/spec\", {\n params: SlugParams,\n payload: UpdateSpecPayload,\n success: UpdateSpecResponse,\n error: UpdateSpecErrors,\n }),\n )\n .add(\n HttpApiEndpoint.delete(\"removeSpec\", \"/openapi/integrations/:slug\", {\n params: SlugParams,\n success: Schema.Void,\n error: DomainErrors,\n }),\n );\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// src/sdk/presets.ts
|
|
2
|
+
var openApiOnlyPresets = [
|
|
3
|
+
{
|
|
4
|
+
id: "stripe",
|
|
5
|
+
name: "Stripe",
|
|
6
|
+
summary: "Payments, subscriptions, customers, and invoices.",
|
|
7
|
+
url: "https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json",
|
|
8
|
+
featured: true
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: "github-rest",
|
|
12
|
+
name: "GitHub REST",
|
|
13
|
+
summary: "Repos, issues, pull requests, actions, and users.",
|
|
14
|
+
url: "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json",
|
|
15
|
+
icon: "https://svgl.app/library/github_dark.svg",
|
|
16
|
+
featured: true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "vercel",
|
|
20
|
+
name: "Vercel",
|
|
21
|
+
summary: "Deployments, domains, projects, and edge config.",
|
|
22
|
+
url: "https://openapi.vercel.sh",
|
|
23
|
+
featured: true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "cloudflare",
|
|
27
|
+
name: "Cloudflare",
|
|
28
|
+
summary: "DNS, workers, pages, R2, and security rules.",
|
|
29
|
+
url: "https://raw.githubusercontent.com/cloudflare/api-schemas/main/openapi.json",
|
|
30
|
+
featured: true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "neon",
|
|
34
|
+
name: "Neon",
|
|
35
|
+
summary: "Serverless Postgres: projects, branches, and endpoints.",
|
|
36
|
+
url: "https://neon.tech/api_spec/release/v2.json",
|
|
37
|
+
featured: true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "openai",
|
|
41
|
+
name: "OpenAI",
|
|
42
|
+
summary: "Models, files, responses, and fine-tuning.",
|
|
43
|
+
url: "https://app.stainless.com/api/spec/documented/openai/openapi.documented.yml",
|
|
44
|
+
icon: "https://svgl.app/library/openai_dark.svg",
|
|
45
|
+
featured: true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "sentry",
|
|
49
|
+
name: "Sentry",
|
|
50
|
+
summary: "Error tracking, performance monitoring, and releases.",
|
|
51
|
+
url: "https://raw.githubusercontent.com/getsentry/sentry-api-schema/main/openapi-derefed.json",
|
|
52
|
+
icon: "https://svgl.app/library/sentry.svg",
|
|
53
|
+
featured: true
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: "posthog",
|
|
57
|
+
name: "PostHog",
|
|
58
|
+
summary: "Product analytics, events, feature flags, and insights.",
|
|
59
|
+
url: "https://us.posthog.com/api/schema/",
|
|
60
|
+
icon: "https://svgl.app/library/posthog.svg",
|
|
61
|
+
featured: true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "exa",
|
|
65
|
+
name: "Exa",
|
|
66
|
+
summary: "Web search, similar links, content retrieval, and answers.",
|
|
67
|
+
url: "https://raw.githubusercontent.com/exa-labs/openapi-spec/refs/heads/master/exa-openapi-spec.yaml",
|
|
68
|
+
featured: true
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "exa-websets",
|
|
72
|
+
name: "Exa Websets",
|
|
73
|
+
summary: "Websets, enrichments, webhooks, and monitors.",
|
|
74
|
+
url: "https://raw.githubusercontent.com/exa-labs/openapi-spec/refs/heads/master/exa-websets-spec.yaml",
|
|
75
|
+
featured: true
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "axiom",
|
|
79
|
+
name: "Axiom",
|
|
80
|
+
summary: "Log ingestion, querying, datasets, and monitors.",
|
|
81
|
+
url: "https://axiom.co/docs/restapi/versions/v2.json"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: "asana",
|
|
85
|
+
name: "Asana",
|
|
86
|
+
summary: "Tasks, projects, teams, and workspace management.",
|
|
87
|
+
url: "https://raw.githubusercontent.com/APIs-guru/openapi-directory/main/APIs/asana.com/1.0/openapi.yaml"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: "twilio",
|
|
91
|
+
name: "Twilio",
|
|
92
|
+
summary: "SMS, voice, video, and messaging APIs.",
|
|
93
|
+
url: "https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/json/twilio_api_v2010.json"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "digitalocean",
|
|
97
|
+
name: "DigitalOcean",
|
|
98
|
+
summary: "Droplets, Kubernetes, databases, and networking.",
|
|
99
|
+
url: "https://raw.githubusercontent.com/digitalocean/openapi/main/specification/DigitalOcean-public.v2.yaml"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: "petstore",
|
|
103
|
+
name: "Petstore",
|
|
104
|
+
summary: "Classic OpenAPI demo, no auth required.",
|
|
105
|
+
url: "https://petstore3.swagger.io/api/v3/openapi.json"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "val-town",
|
|
109
|
+
name: "Val Town",
|
|
110
|
+
summary: "Vals, runs, blobs, and email/web endpoints.",
|
|
111
|
+
url: "https://api.val.town/openapi.json"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "resend",
|
|
115
|
+
name: "Resend",
|
|
116
|
+
summary: "Transactional email sending and domain management.",
|
|
117
|
+
url: "https://raw.githubusercontent.com/resend/resend-openapi/main/resend.yaml"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: "spotify",
|
|
121
|
+
name: "Spotify",
|
|
122
|
+
summary: "Tracks, albums, playlists, library, and playback.",
|
|
123
|
+
url: "https://raw.githubusercontent.com/sonallux/spotify-web-api/refs/heads/main/official-spotify-open-api.yml",
|
|
124
|
+
icon: "https://svgl.app/library/spotify.svg"
|
|
125
|
+
}
|
|
126
|
+
];
|
|
127
|
+
var openApiPresets = openApiOnlyPresets;
|
|
128
|
+
|
|
129
|
+
export {
|
|
130
|
+
openApiPresets
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=chunk-CURJJXB3.js.map
|