apps 0.0.1-beta.3 → 0.0.1-beta.31
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 +68 -44
- package/framework-reference.json +1 -1
- package/js/{chunk-RN2MXB4R.js → chunk-3FJYVAE4.js} +128 -24
- package/js/chunk-4OKYLVU4.js +118 -0
- package/js/{chunk-LGIYBDWA.js → chunk-5DLG2FVN.js} +65 -1
- package/js/{chunk-PLCMJREA.js → chunk-5JVNM3CQ.js} +60 -20
- package/js/chunk-5XJR4XGW.js +254 -0
- package/js/{chunk-FZJOYIZO.js → chunk-6KG4DZD7.js} +1 -1
- package/js/{chunk-EVJUVWN2.js → chunk-6ZJ2H6P4.js} +2 -2
- package/js/{chunk-NQ3OMCA5.js → chunk-AUFVX4KM.js} +2 -2
- package/js/{chunk-D47C7KG5.js → chunk-AYM2FUI5.js} +2 -2
- package/js/{chunk-5MQZEB6Y.js → chunk-BGALSHLT.js} +37 -12
- package/js/{chunk-QKHR7BMF.js → chunk-CJY5X26R.js} +3 -3
- package/js/{chunk-M6ZRRIBI.js → chunk-DASNNAP4.js} +1 -1
- package/js/{chunk-ZCAMUXSG.js → chunk-ETLILMHY.js} +3 -4
- package/js/{chunk-FW5HBOIK.js → chunk-EXGKN554.js} +2005 -1710
- package/js/{chunk-SATWJKN6.js → chunk-FBBXFFFJ.js} +1 -1
- package/js/{chunk-JN55AYQH.js → chunk-FULRJSWU.js} +61 -32
- package/js/{chunk-HDTGZWP2.js → chunk-GG566OOE.js} +139 -32
- package/js/chunk-GZ4UHXRT.js +92 -0
- package/js/{chunk-YEJOQEII.js → chunk-HW3DPBZR.js} +45 -7
- package/js/{chunk-HDJH3RPR.js → chunk-MFHUR5SB.js} +2 -2
- package/js/{chunk-MYYEW3RA.js → chunk-N72RKJ5E.js} +984 -61
- package/js/{chunk-WFSQXYUT.js → chunk-NPGRURDG.js} +390 -18
- package/js/chunk-OD3KFKZD.js +1617 -0
- package/js/{chunk-FDNTX5QJ.js → chunk-OX233L7N.js} +2 -2
- package/js/{chunk-G7ZIRKMK.js → chunk-QYM4STZW.js} +118 -197
- package/js/chunk-RULZPNGP.js +801 -0
- package/js/{chunk-BMOIAIVR.js → chunk-UMCMZFXW.js} +49 -1
- package/js/{chunk-J7O55ZV7.js → chunk-W7F23NQ2.js} +419 -191
- package/js/chunk-WG5DFZFT.js +42 -0
- package/js/{chunk-T2LAZCAD.js → chunk-ZOY7PDMI.js} +1 -1
- package/js/client.js +120 -84
- package/js/contracts.js +110 -16
- package/js/effect.js +20 -20
- package/js/{es-APDZKREY.js → es-DIULA3ZF.js} +62 -1659
- package/js/graphql.js +58 -54
- package/js/host.js +20 -20
- package/js/index.js +247 -204
- package/js/mcp/effect.js +24 -22
- package/js/mcp/stdio.js +35 -30
- package/js/mcp.js +105 -68
- package/js/openapi.js +4087 -1503
- package/js/react.js +3 -3
- package/js/skills/effect.js +5 -3
- package/js/skills.js +15 -15
- package/js/storage/facet.js +4 -4
- package/js/ui/auth/contracts.js +2 -2
- package/js/ui/auth.js +5 -5
- package/js/ui/contracts.js +5 -4
- package/js/ui/serving.js +8516 -214
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/app-data/src/contracts/database.d.ts +33 -6
- package/types/app-data/src/implementation/schema.d.ts +2 -17
- package/types/apps/src/contracts/api-response-error.d.ts +4 -0
- package/types/apps/src/contracts/app.d.ts +7 -6
- package/types/apps/src/contracts/failure.d.ts +54 -0
- package/types/apps/src/contracts/graphql.d.ts +2 -1
- package/types/apps/src/contracts/host.d.ts +34 -11
- package/types/apps/src/contracts/mcp.d.ts +91 -10
- package/types/apps/src/contracts/network.d.ts +84 -0
- package/types/apps/src/contracts/openapi-compile.d.ts +31 -3
- package/types/apps/src/contracts/openapi.d.ts +45 -9
- package/types/apps/src/contracts/operations.d.ts +5 -6
- package/types/apps/src/contracts/protocol-version.d.ts +2 -2
- package/types/apps/src/contracts/protocols/1.d.ts +251 -69
- package/types/apps/src/contracts/protocols/2.d.ts +710 -0
- package/types/apps/src/contracts/protocols/3.d.ts +716 -0
- package/types/apps/src/contracts/protocols/4.d.ts +1298 -0
- package/types/apps/src/contracts/protocols/5.d.ts +1174 -0
- package/types/apps/src/contracts/protocols/6.d.ts +1620 -0
- package/types/apps/src/contracts/protocols/7.d.ts +1784 -0
- package/types/apps/src/contracts/protocols/8.d.ts +1119 -0
- package/types/apps/src/contracts/protocols/oauth.d.ts +89 -0
- package/types/apps/src/contracts/provider-error.d.ts +9 -0
- package/types/apps/src/contracts/provider.d.ts +115 -10
- package/types/apps/src/contracts/router.d.ts +59 -0
- package/types/apps/src/contracts/skills.d.ts +18 -5
- package/types/apps/src/contracts/storage.d.ts +3 -3
- package/types/apps/src/contracts/ui.d.ts +18 -0
- package/types/apps/src/contracts/workflows.d.ts +34 -3
- package/types/apps/src/graphql.d.ts +1 -3
- package/types/apps/src/implementation/account-router.d.ts +12 -0
- package/types/apps/src/implementation/app.d.ts +5 -4
- package/types/apps/src/implementation/browser-scripts.gen.d.ts +6 -0
- package/types/apps/src/implementation/catalog-cache.d.ts +34 -4
- package/types/apps/src/implementation/elicitation.d.ts +9 -9
- package/types/apps/src/implementation/failure-detail.d.ts +46 -0
- package/types/apps/src/implementation/graphql-catalog.d.ts +4 -7
- package/types/apps/src/implementation/graphql.d.ts +4 -3
- package/types/apps/src/implementation/input-problems.d.ts +4 -1
- package/types/apps/src/implementation/mcp-call.d.ts +6 -5
- package/types/apps/src/implementation/mcp-catalog.d.ts +7 -8
- package/types/apps/src/implementation/mcp-client.d.ts +49 -25
- package/types/apps/src/implementation/mcp-stdio.d.ts +1 -1
- package/types/apps/src/implementation/mcp-tools.d.ts +2 -1
- package/types/apps/src/implementation/mcp.d.ts +52 -25
- package/types/apps/src/implementation/network.d.ts +16 -0
- package/types/apps/src/implementation/openapi-compile.d.ts +27 -6
- package/types/apps/src/implementation/openapi-document.d.ts +46 -19
- package/types/apps/src/implementation/openapi-names.d.ts +9 -4
- package/types/apps/src/implementation/openapi-request.d.ts +10 -2
- package/types/apps/src/implementation/openapi-source.d.ts +8 -6
- package/types/apps/src/implementation/openapi-upgrade.d.ts +4 -0
- package/types/apps/src/implementation/operations.d.ts +36 -3
- package/types/apps/src/implementation/protocol-operations.d.ts +6 -4
- package/types/apps/src/implementation/provider-error.d.ts +28 -1
- package/types/apps/src/implementation/provider.d.ts +19 -5
- package/types/apps/src/implementation/router-catalog.d.ts +224 -0
- package/types/apps/src/implementation/router.d.ts +68 -0
- package/types/apps/src/implementation/runtime-yield.d.ts +7 -0
- package/types/apps/src/implementation/schema.d.ts +80 -1
- package/types/apps/src/implementation/skills.d.ts +2 -2
- package/types/apps/src/implementation/storage.d.ts +5 -3
- package/types/apps/src/implementation/ui-account-notice.d.ts +9 -0
- package/types/apps/src/implementation/ui-client.d.ts +2 -2
- package/types/apps/src/implementation/ui-document.d.ts +5 -0
- package/types/apps/src/implementation/ui-errors.d.ts +1 -1
- package/types/apps/src/implementation/ui-serving.d.ts +10 -4
- package/types/apps/src/implementation/ui-watch.d.ts +1 -1
- package/types/apps/src/implementation/upstream-error.d.ts +7 -0
- package/types/apps/src/implementation/webhooks.d.ts +1 -1
- package/types/apps/src/implementation/workflow-context.d.ts +11 -3
- package/types/apps/src/index.d.ts +29 -11
- package/types/apps/src/mcp-stdio.d.ts +2 -5
- package/types/apps/src/mcp.d.ts +25 -5
- package/types/apps/src/openapi.d.ts +6 -6
- package/types/apps/src/skills.d.ts +4 -4
- package/types/telemetry/src/browser-operations.d.ts +5 -2
- package/types/telemetry/src/config.d.ts +2 -2
- package/types/utils/src/api-error.d.ts +48 -0
- package/js/chunk-PYUYJRSK.js +0 -93
- package/js/chunk-SWPD52J7.js +0 -35
- package/js/chunk-W7D7WVSY.js +0 -18
- package/js/chunk-Z5NMEGJN.js +0 -29
- package/js/chunk-ZJWDMTE3.js +0 -63
- package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
- package/types/apps/src/implementation/account-operations.d.ts +0 -151
- package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
SkillDefinitionInvalid,
|
|
6
6
|
SkillFile,
|
|
7
7
|
SkillFilePath
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HW3DPBZR.js";
|
|
9
9
|
import {
|
|
10
10
|
Effect_exports,
|
|
11
11
|
Schema_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EXGKN554.js";
|
|
13
13
|
|
|
14
14
|
// src/implementation/skill-files.ts
|
|
15
15
|
var skillFromFiles = (input, source = {}) => Effect_exports.gen(function* () {
|
|
@@ -19,10 +19,7 @@ import {
|
|
|
19
19
|
text,
|
|
20
20
|
uint8Array,
|
|
21
21
|
urlParams
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
JsonValue
|
|
25
|
-
} from "./chunk-SATWJKN6.js";
|
|
22
|
+
} from "./chunk-CJY5X26R.js";
|
|
26
23
|
import {
|
|
27
24
|
Cause,
|
|
28
25
|
Defect,
|
|
@@ -31,7 +28,6 @@ import {
|
|
|
31
28
|
Literal,
|
|
32
29
|
Never,
|
|
33
30
|
RecordFromUrlParams,
|
|
34
|
-
Schema_exports,
|
|
35
31
|
Service,
|
|
36
32
|
String as String2,
|
|
37
33
|
Struct,
|
|
@@ -118,39 +114,11 @@ import {
|
|
|
118
114
|
transformEffect,
|
|
119
115
|
transformPull,
|
|
120
116
|
void_2 as void_
|
|
121
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-EXGKN554.js";
|
|
122
118
|
import {
|
|
123
119
|
__export
|
|
124
120
|
} from "./chunk-CZ7CSFO4.js";
|
|
125
121
|
|
|
126
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApi.js
|
|
127
|
-
var HttpApi_exports = {};
|
|
128
|
-
__export(HttpApi_exports, {
|
|
129
|
-
AdditionalSchemas: () => AdditionalSchemas,
|
|
130
|
-
ParseOptions: () => ParseOptions,
|
|
131
|
-
isHttpApi: () => isHttpApi,
|
|
132
|
-
make: () => make4,
|
|
133
|
-
reflect: () => reflect
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiEndpoint.js
|
|
137
|
-
var HttpApiEndpoint_exports = {};
|
|
138
|
-
__export(HttpApiEndpoint_exports, {
|
|
139
|
-
delete: () => del,
|
|
140
|
-
get: () => get2,
|
|
141
|
-
getErrorSchemas: () => getErrorSchemas,
|
|
142
|
-
getPayloadSchemas: () => getPayloadSchemas,
|
|
143
|
-
getSuccessSchemas: () => getSuccessSchemas,
|
|
144
|
-
head: () => head,
|
|
145
|
-
isHttpApiEndpoint: () => isHttpApiEndpoint,
|
|
146
|
-
make: () => make3,
|
|
147
|
-
options: () => options,
|
|
148
|
-
patch: () => patch,
|
|
149
|
-
post: () => post,
|
|
150
|
-
put: () => put,
|
|
151
|
-
query: () => query
|
|
152
|
-
});
|
|
153
|
-
|
|
154
122
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiSchema.js
|
|
155
123
|
var HttpApiSchema_exports = {};
|
|
156
124
|
__export(HttpApiSchema_exports, {
|
|
@@ -655,6 +623,24 @@ function getStatusErrorSchema(schema) {
|
|
|
655
623
|
return getStatusError(schema.ast);
|
|
656
624
|
}
|
|
657
625
|
|
|
626
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiEndpoint.js
|
|
627
|
+
var HttpApiEndpoint_exports = {};
|
|
628
|
+
__export(HttpApiEndpoint_exports, {
|
|
629
|
+
delete: () => del,
|
|
630
|
+
get: () => get2,
|
|
631
|
+
getErrorSchemas: () => getErrorSchemas,
|
|
632
|
+
getPayloadSchemas: () => getPayloadSchemas,
|
|
633
|
+
getSuccessSchemas: () => getSuccessSchemas,
|
|
634
|
+
head: () => head,
|
|
635
|
+
isHttpApiEndpoint: () => isHttpApiEndpoint,
|
|
636
|
+
make: () => make3,
|
|
637
|
+
options: () => options,
|
|
638
|
+
patch: () => patch,
|
|
639
|
+
post: () => post,
|
|
640
|
+
put: () => put,
|
|
641
|
+
query: () => query
|
|
642
|
+
});
|
|
643
|
+
|
|
658
644
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/internal/mediaType.js
|
|
659
645
|
function normalize(contentType) {
|
|
660
646
|
const normalized = contentType.toLowerCase().trim();
|
|
@@ -990,6 +976,14 @@ var head = /* @__PURE__ */ make3("HEAD");
|
|
|
990
976
|
var options = /* @__PURE__ */ make3("OPTIONS");
|
|
991
977
|
|
|
992
978
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApi.js
|
|
979
|
+
var HttpApi_exports = {};
|
|
980
|
+
__export(HttpApi_exports, {
|
|
981
|
+
AdditionalSchemas: () => AdditionalSchemas,
|
|
982
|
+
ParseOptions: () => ParseOptions,
|
|
983
|
+
isHttpApi: () => isHttpApi,
|
|
984
|
+
make: () => make4,
|
|
985
|
+
reflect: () => reflect
|
|
986
|
+
});
|
|
993
987
|
var TypeId2 = "~effect/httpapi/HttpApi";
|
|
994
988
|
var isHttpApi = (u) => hasProperty(u, TypeId2);
|
|
995
989
|
var Proto2 = {
|
|
@@ -1109,6 +1103,88 @@ var AdditionalSchemas = class extends (/* @__PURE__ */ Service()("effect/httpapi
|
|
|
1109
1103
|
var ParseOptions = class extends (/* @__PURE__ */ Service()("effect/httpapi/HttpApi/ParseOptions")) {
|
|
1110
1104
|
};
|
|
1111
1105
|
|
|
1106
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiGroup.js
|
|
1107
|
+
var HttpApiGroup_exports = {};
|
|
1108
|
+
__export(HttpApiGroup_exports, {
|
|
1109
|
+
isHttpApiGroup: () => isHttpApiGroup,
|
|
1110
|
+
make: () => make5
|
|
1111
|
+
});
|
|
1112
|
+
var TypeId3 = "~effect/httpapi/HttpApiGroup";
|
|
1113
|
+
var isHttpApiGroup = (u) => hasProperty(u, TypeId3);
|
|
1114
|
+
var Proto3 = {
|
|
1115
|
+
[TypeId3]: TypeId3,
|
|
1116
|
+
add(...toAdd) {
|
|
1117
|
+
const endpoints = {
|
|
1118
|
+
...this.endpoints
|
|
1119
|
+
};
|
|
1120
|
+
for (const endpoint2 of toAdd) {
|
|
1121
|
+
assignProperty(endpoints, endpoint2.identifier, endpoint2);
|
|
1122
|
+
}
|
|
1123
|
+
return makeProto3({
|
|
1124
|
+
...optionsFromGroup(this),
|
|
1125
|
+
endpoints
|
|
1126
|
+
});
|
|
1127
|
+
},
|
|
1128
|
+
prefix(prefix) {
|
|
1129
|
+
return makeProto3({
|
|
1130
|
+
...optionsFromGroup(this),
|
|
1131
|
+
endpoints: map(this.endpoints, (endpoint2) => endpoint2.prefix(prefix))
|
|
1132
|
+
});
|
|
1133
|
+
},
|
|
1134
|
+
middleware(middleware) {
|
|
1135
|
+
return makeProto3({
|
|
1136
|
+
...optionsFromGroup(this),
|
|
1137
|
+
endpoints: map(this.endpoints, (endpoint2) => endpoint2.middleware(middleware))
|
|
1138
|
+
});
|
|
1139
|
+
},
|
|
1140
|
+
annotateMerge(annotations) {
|
|
1141
|
+
return makeProto3({
|
|
1142
|
+
...optionsFromGroup(this),
|
|
1143
|
+
annotations: merge(this.annotations, annotations)
|
|
1144
|
+
});
|
|
1145
|
+
},
|
|
1146
|
+
annotate(annotation, value) {
|
|
1147
|
+
return makeProto3({
|
|
1148
|
+
...optionsFromGroup(this),
|
|
1149
|
+
annotations: add(this.annotations, annotation, value)
|
|
1150
|
+
});
|
|
1151
|
+
},
|
|
1152
|
+
annotateEndpointsMerge(annotations) {
|
|
1153
|
+
return makeProto3({
|
|
1154
|
+
...optionsFromGroup(this),
|
|
1155
|
+
endpoints: map(this.endpoints, (endpoint2) => endpoint2.annotateMerge(annotations))
|
|
1156
|
+
});
|
|
1157
|
+
},
|
|
1158
|
+
annotateEndpoints(annotation, value) {
|
|
1159
|
+
return makeProto3({
|
|
1160
|
+
...optionsFromGroup(this),
|
|
1161
|
+
endpoints: map(this.endpoints, (endpoint2) => endpoint2.annotate(annotation, value))
|
|
1162
|
+
});
|
|
1163
|
+
},
|
|
1164
|
+
pipe() {
|
|
1165
|
+
return pipeArguments(this, arguments);
|
|
1166
|
+
}
|
|
1167
|
+
};
|
|
1168
|
+
var optionsFromGroup = (group2) => ({
|
|
1169
|
+
identifier: group2.identifier,
|
|
1170
|
+
topLevel: group2.topLevel,
|
|
1171
|
+
endpoints: group2.endpoints,
|
|
1172
|
+
annotations: group2.annotations
|
|
1173
|
+
});
|
|
1174
|
+
var makeProto3 = (options2) => {
|
|
1175
|
+
function HttpApiGroup() {
|
|
1176
|
+
}
|
|
1177
|
+
Object.setPrototypeOf(HttpApiGroup, Proto3);
|
|
1178
|
+
HttpApiGroup.key = `effect/httpapi/HttpApiGroup/${options2.identifier}`;
|
|
1179
|
+
return Object.assign(HttpApiGroup, options2);
|
|
1180
|
+
};
|
|
1181
|
+
var make5 = (identifier, options2) => makeProto3({
|
|
1182
|
+
identifier,
|
|
1183
|
+
topLevel: options2?.topLevel ?? false,
|
|
1184
|
+
endpoints: {},
|
|
1185
|
+
annotations: empty()
|
|
1186
|
+
});
|
|
1187
|
+
|
|
1112
1188
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/internal/path.js
|
|
1113
1189
|
var emptyParamNames = /* @__PURE__ */ new Set();
|
|
1114
1190
|
function getParamNames(schema) {
|
|
@@ -1122,7 +1198,7 @@ var HttpApiClient_exports = {};
|
|
|
1122
1198
|
__export(HttpApiClient_exports, {
|
|
1123
1199
|
endpoint: () => endpoint,
|
|
1124
1200
|
group: () => group,
|
|
1125
|
-
make: () =>
|
|
1201
|
+
make: () => make6,
|
|
1126
1202
|
makeClient: () => makeClient,
|
|
1127
1203
|
makeWith: () => makeWith,
|
|
1128
1204
|
urlBuilder: () => urlBuilder
|
|
@@ -1156,7 +1232,7 @@ var makeClient = (api, options2) => gen(function* () {
|
|
|
1156
1232
|
const {
|
|
1157
1233
|
group: group2,
|
|
1158
1234
|
endpoint: endpoint2,
|
|
1159
|
-
errors
|
|
1235
|
+
errors,
|
|
1160
1236
|
successes,
|
|
1161
1237
|
mergedAnnotations
|
|
1162
1238
|
} = onEndpointOptions;
|
|
@@ -1166,7 +1242,7 @@ var makeClient = (api, options2) => gen(function* () {
|
|
|
1166
1242
|
orElse: statusOrElse
|
|
1167
1243
|
};
|
|
1168
1244
|
const errorAlternatives = /* @__PURE__ */ new Map();
|
|
1169
|
-
for (const [status2, schemas] of
|
|
1245
|
+
for (const [status2, schemas] of errors.entries()) {
|
|
1170
1246
|
const grouped = groupSchemasByContentType(schemas);
|
|
1171
1247
|
for (const [contentType, schemas2] of grouped.entries()) {
|
|
1172
1248
|
addResponseAlternative(errorAlternatives, status2, contentType, schemasToResponse(schemas2, parseOptions));
|
|
@@ -1246,7 +1322,7 @@ var makeClient = (api, options2) => gen(function* () {
|
|
|
1246
1322
|
}
|
|
1247
1323
|
});
|
|
1248
1324
|
});
|
|
1249
|
-
var
|
|
1325
|
+
var make6 = (api, options2) => flatMap(HttpClient, (httpClient) => makeWith(api, {
|
|
1250
1326
|
...options2,
|
|
1251
1327
|
httpClient: options2?.transformClient ? options2.transformClient(httpClient) : httpClient
|
|
1252
1328
|
}));
|
|
@@ -1632,165 +1708,10 @@ function getEncodePayloadSchemaFromBody(schema, method) {
|
|
|
1632
1708
|
return out;
|
|
1633
1709
|
}
|
|
1634
1710
|
|
|
1635
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiGroup.js
|
|
1636
|
-
var HttpApiGroup_exports = {};
|
|
1637
|
-
__export(HttpApiGroup_exports, {
|
|
1638
|
-
isHttpApiGroup: () => isHttpApiGroup,
|
|
1639
|
-
make: () => make6
|
|
1640
|
-
});
|
|
1641
|
-
var TypeId3 = "~effect/httpapi/HttpApiGroup";
|
|
1642
|
-
var isHttpApiGroup = (u) => hasProperty(u, TypeId3);
|
|
1643
|
-
var Proto3 = {
|
|
1644
|
-
[TypeId3]: TypeId3,
|
|
1645
|
-
add(...toAdd) {
|
|
1646
|
-
const endpoints = {
|
|
1647
|
-
...this.endpoints
|
|
1648
|
-
};
|
|
1649
|
-
for (const endpoint2 of toAdd) {
|
|
1650
|
-
assignProperty(endpoints, endpoint2.identifier, endpoint2);
|
|
1651
|
-
}
|
|
1652
|
-
return makeProto3({
|
|
1653
|
-
...optionsFromGroup(this),
|
|
1654
|
-
endpoints
|
|
1655
|
-
});
|
|
1656
|
-
},
|
|
1657
|
-
prefix(prefix) {
|
|
1658
|
-
return makeProto3({
|
|
1659
|
-
...optionsFromGroup(this),
|
|
1660
|
-
endpoints: map(this.endpoints, (endpoint2) => endpoint2.prefix(prefix))
|
|
1661
|
-
});
|
|
1662
|
-
},
|
|
1663
|
-
middleware(middleware) {
|
|
1664
|
-
return makeProto3({
|
|
1665
|
-
...optionsFromGroup(this),
|
|
1666
|
-
endpoints: map(this.endpoints, (endpoint2) => endpoint2.middleware(middleware))
|
|
1667
|
-
});
|
|
1668
|
-
},
|
|
1669
|
-
annotateMerge(annotations) {
|
|
1670
|
-
return makeProto3({
|
|
1671
|
-
...optionsFromGroup(this),
|
|
1672
|
-
annotations: merge(this.annotations, annotations)
|
|
1673
|
-
});
|
|
1674
|
-
},
|
|
1675
|
-
annotate(annotation, value) {
|
|
1676
|
-
return makeProto3({
|
|
1677
|
-
...optionsFromGroup(this),
|
|
1678
|
-
annotations: add(this.annotations, annotation, value)
|
|
1679
|
-
});
|
|
1680
|
-
},
|
|
1681
|
-
annotateEndpointsMerge(annotations) {
|
|
1682
|
-
return makeProto3({
|
|
1683
|
-
...optionsFromGroup(this),
|
|
1684
|
-
endpoints: map(this.endpoints, (endpoint2) => endpoint2.annotateMerge(annotations))
|
|
1685
|
-
});
|
|
1686
|
-
},
|
|
1687
|
-
annotateEndpoints(annotation, value) {
|
|
1688
|
-
return makeProto3({
|
|
1689
|
-
...optionsFromGroup(this),
|
|
1690
|
-
endpoints: map(this.endpoints, (endpoint2) => endpoint2.annotate(annotation, value))
|
|
1691
|
-
});
|
|
1692
|
-
},
|
|
1693
|
-
pipe() {
|
|
1694
|
-
return pipeArguments(this, arguments);
|
|
1695
|
-
}
|
|
1696
|
-
};
|
|
1697
|
-
var optionsFromGroup = (group2) => ({
|
|
1698
|
-
identifier: group2.identifier,
|
|
1699
|
-
topLevel: group2.topLevel,
|
|
1700
|
-
endpoints: group2.endpoints,
|
|
1701
|
-
annotations: group2.annotations
|
|
1702
|
-
});
|
|
1703
|
-
var makeProto3 = (options2) => {
|
|
1704
|
-
function HttpApiGroup() {
|
|
1705
|
-
}
|
|
1706
|
-
Object.setPrototypeOf(HttpApiGroup, Proto3);
|
|
1707
|
-
HttpApiGroup.key = `effect/httpapi/HttpApiGroup/${options2.identifier}`;
|
|
1708
|
-
return Object.assign(HttpApiGroup, options2);
|
|
1709
|
-
};
|
|
1710
|
-
var make6 = (identifier, options2) => makeProto3({
|
|
1711
|
-
identifier,
|
|
1712
|
-
topLevel: options2?.topLevel ?? false,
|
|
1713
|
-
endpoints: {},
|
|
1714
|
-
annotations: empty()
|
|
1715
|
-
});
|
|
1716
|
-
|
|
1717
|
-
// src/contracts/ui.ts
|
|
1718
|
-
var UiContext = Schema_exports.Struct({
|
|
1719
|
-
deployment: Schema_exports.NonEmptyString,
|
|
1720
|
-
profile: Schema_exports.optional(Schema_exports.NonEmptyString),
|
|
1721
|
-
expectedProfileRevision: Schema_exports.optional(Schema_exports.Int)
|
|
1722
|
-
});
|
|
1723
|
-
var UiOperation = Schema_exports.Struct({
|
|
1724
|
-
...UiContext.fields,
|
|
1725
|
-
name: Schema_exports.NonEmptyString,
|
|
1726
|
-
input: JsonValue
|
|
1727
|
-
});
|
|
1728
|
-
var UiUnauthorized = class extends Schema_exports.TaggedError()(
|
|
1729
|
-
"UiUnauthorized",
|
|
1730
|
-
{},
|
|
1731
|
-
{ httpApiStatus: 401 }
|
|
1732
|
-
) {
|
|
1733
|
-
};
|
|
1734
|
-
var UiForbidden = class extends Schema_exports.TaggedError()(
|
|
1735
|
-
"UiForbidden",
|
|
1736
|
-
{},
|
|
1737
|
-
{ httpApiStatus: 403 }
|
|
1738
|
-
) {
|
|
1739
|
-
};
|
|
1740
|
-
var UiDeploymentChanged = class extends Schema_exports.TaggedError()(
|
|
1741
|
-
"UiDeploymentChanged",
|
|
1742
|
-
{},
|
|
1743
|
-
{ httpApiStatus: 409 }
|
|
1744
|
-
) {
|
|
1745
|
-
};
|
|
1746
|
-
var UiFailed = class extends Schema_exports.TaggedError()(
|
|
1747
|
-
"UiFailed",
|
|
1748
|
-
{
|
|
1749
|
-
reason: Schema_exports.Literals(["unavailable", "operation_failed", "account_required"])
|
|
1750
|
-
},
|
|
1751
|
-
{ httpApiStatus: 422 }
|
|
1752
|
-
) {
|
|
1753
|
-
};
|
|
1754
|
-
var UiSnapshot = Schema_exports.Union([
|
|
1755
|
-
Schema_exports.Struct({
|
|
1756
|
-
type: Schema_exports.Literal("snapshot"),
|
|
1757
|
-
value: JsonValue,
|
|
1758
|
-
trace: Schema_exports.optional(Schema_exports.Unknown)
|
|
1759
|
-
}),
|
|
1760
|
-
Schema_exports.Struct({ type: Schema_exports.Literal("failure"), error: UiFailed }),
|
|
1761
|
-
Schema_exports.Struct({ type: Schema_exports.Literal("heartbeat") })
|
|
1762
|
-
]);
|
|
1763
|
-
var errors = [UiUnauthorized, UiForbidden, UiDeploymentChanged, UiFailed];
|
|
1764
|
-
var AppUiApi = HttpApi_exports.make("app-ui").add(
|
|
1765
|
-
HttpApiGroup_exports.make("ui").add(
|
|
1766
|
-
HttpApiEndpoint_exports.post("query", "/_executor/api/query", {
|
|
1767
|
-
payload: UiOperation,
|
|
1768
|
-
success: JsonValue,
|
|
1769
|
-
error: errors
|
|
1770
|
-
})
|
|
1771
|
-
).add(
|
|
1772
|
-
HttpApiEndpoint_exports.post("mutate", "/_executor/api/mutate", {
|
|
1773
|
-
payload: UiOperation,
|
|
1774
|
-
success: JsonValue,
|
|
1775
|
-
error: errors
|
|
1776
|
-
})
|
|
1777
|
-
).add(
|
|
1778
|
-
HttpApiEndpoint_exports.post("subscribe", "/_executor/api/subscribe", {
|
|
1779
|
-
payload: UiOperation,
|
|
1780
|
-
success: HttpApiSchema_exports.StreamSse({ data: UiSnapshot, error: Schema_exports.Union(errors) }),
|
|
1781
|
-
error: errors
|
|
1782
|
-
})
|
|
1783
|
-
)
|
|
1784
|
-
);
|
|
1785
|
-
|
|
1786
1711
|
export {
|
|
1712
|
+
HttpApiSchema_exports,
|
|
1713
|
+
HttpApiEndpoint_exports,
|
|
1714
|
+
HttpApi_exports,
|
|
1787
1715
|
HttpApiClient_exports,
|
|
1788
|
-
|
|
1789
|
-
UiOperation,
|
|
1790
|
-
UiUnauthorized,
|
|
1791
|
-
UiForbidden,
|
|
1792
|
-
UiDeploymentChanged,
|
|
1793
|
-
UiFailed,
|
|
1794
|
-
UiSnapshot,
|
|
1795
|
-
AppUiApi
|
|
1716
|
+
HttpApiGroup_exports
|
|
1796
1717
|
};
|