@valbuild/shared 0.95.0 → 0.96.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -527,6 +527,8 @@ export declare const Api: {
|
|
|
527
527
|
json: z.ZodObject<{
|
|
528
528
|
nonce: z.ZodNullable<z.ZodString>;
|
|
529
529
|
baseUrl: z.ZodString;
|
|
530
|
+
contentBaseUrl: z.ZodNullable<z.ZodString>;
|
|
531
|
+
contentAuthNonce: z.ZodNullable<z.ZodString>;
|
|
530
532
|
}, z.core.$strip>;
|
|
531
533
|
}, z.core.$strip>]>;
|
|
532
534
|
};
|
|
@@ -804,6 +806,7 @@ export declare const Api: {
|
|
|
804
806
|
modules: z.ZodRecord<z.ZodString & z.ZodType<ModuleFilePath, string, z.core.$ZodTypeInternals<ModuleFilePath, string>>, z.ZodObject<{
|
|
805
807
|
render: z.ZodOptional<z.ZodAny>;
|
|
806
808
|
source: z.ZodOptional<z.ZodAny>;
|
|
809
|
+
baseSource: z.ZodOptional<z.ZodAny>;
|
|
807
810
|
patches: z.ZodOptional<z.ZodObject<{
|
|
808
811
|
applied: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
|
|
809
812
|
skipped: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
|
|
@@ -1053,6 +1056,11 @@ export declare const Api: {
|
|
|
1053
1056
|
GET: {
|
|
1054
1057
|
req: {
|
|
1055
1058
|
path: z.ZodString;
|
|
1059
|
+
query: {
|
|
1060
|
+
limit: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string, string[]>>>;
|
|
1061
|
+
cursor_updatedAt: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string, string[]>>>;
|
|
1062
|
+
cursor_id: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string, string[]>>>;
|
|
1063
|
+
};
|
|
1056
1064
|
cookies: {
|
|
1057
1065
|
val_session: z.ZodOptional<z.ZodString>;
|
|
1058
1066
|
};
|
|
@@ -1067,7 +1075,13 @@ export declare const Api: {
|
|
|
1067
1075
|
json: z.ZodObject<{
|
|
1068
1076
|
messages: z.ZodArray<z.ZodObject<{
|
|
1069
1077
|
role: z.ZodString;
|
|
1070
|
-
content: z.ZodString
|
|
1078
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1079
|
+
type: z.ZodLiteral<"text">;
|
|
1080
|
+
text: z.ZodString;
|
|
1081
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1082
|
+
type: z.ZodLiteral<"image_url">;
|
|
1083
|
+
url: z.ZodString;
|
|
1084
|
+
}, z.core.$strip>]>>]>;
|
|
1071
1085
|
}, z.core.$strip>>;
|
|
1072
1086
|
nextCursor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1073
1087
|
updatedAt: z.ZodString;
|
|
@@ -1082,6 +1096,92 @@ export declare const Api: {
|
|
|
1082
1096
|
}, z.core.$strip>]>;
|
|
1083
1097
|
};
|
|
1084
1098
|
};
|
|
1099
|
+
"/ai/session-image-to-patch-file": {
|
|
1100
|
+
POST: {
|
|
1101
|
+
req: {
|
|
1102
|
+
body: z.ZodObject<{
|
|
1103
|
+
patchId: z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>;
|
|
1104
|
+
parentRef: z.ZodUnion<readonly [z.ZodObject<{
|
|
1105
|
+
type: z.ZodLiteral<"head">;
|
|
1106
|
+
headBaseSha: z.ZodString;
|
|
1107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1108
|
+
type: z.ZodLiteral<"patch">;
|
|
1109
|
+
patchId: z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>;
|
|
1110
|
+
}, z.core.$strip>]>;
|
|
1111
|
+
files: z.ZodArray<z.ZodObject<{
|
|
1112
|
+
filePath: z.ZodString;
|
|
1113
|
+
key: z.ZodString;
|
|
1114
|
+
isRemote: z.ZodOptional<z.ZodBoolean>;
|
|
1115
|
+
}, z.core.$strip>>;
|
|
1116
|
+
}, z.core.$strip>;
|
|
1117
|
+
cookies: {
|
|
1118
|
+
val_session: z.ZodOptional<z.ZodString>;
|
|
1119
|
+
};
|
|
1120
|
+
};
|
|
1121
|
+
res: z.ZodUnion<readonly [z.ZodObject<{
|
|
1122
|
+
status: z.ZodLiteral<401>;
|
|
1123
|
+
json: z.ZodObject<{
|
|
1124
|
+
message: z.ZodString;
|
|
1125
|
+
}, z.core.$strip>;
|
|
1126
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1127
|
+
status: z.ZodLiteral<200>;
|
|
1128
|
+
json: z.ZodObject<{
|
|
1129
|
+
patchId: z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>;
|
|
1130
|
+
files: z.ZodArray<z.ZodObject<{
|
|
1131
|
+
filePath: z.ZodString;
|
|
1132
|
+
metadata: z.ZodObject<{
|
|
1133
|
+
width: z.ZodNumber;
|
|
1134
|
+
height: z.ZodNumber;
|
|
1135
|
+
mimeType: z.ZodString;
|
|
1136
|
+
}, z.core.$strip>;
|
|
1137
|
+
}, z.core.$strip>>;
|
|
1138
|
+
}, z.core.$strip>;
|
|
1139
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1140
|
+
status: z.ZodLiteral<400>;
|
|
1141
|
+
json: z.ZodObject<{
|
|
1142
|
+
message: z.ZodString;
|
|
1143
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
1144
|
+
availableKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1145
|
+
}, z.core.$strip>>;
|
|
1146
|
+
}, z.core.$strip>;
|
|
1147
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1148
|
+
status: z.ZodLiteral<500>;
|
|
1149
|
+
json: z.ZodObject<{
|
|
1150
|
+
message: z.ZodString;
|
|
1151
|
+
}, z.core.$strip>;
|
|
1152
|
+
}, z.core.$strip>]>;
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
"/ai/images": {
|
|
1156
|
+
PATCH: {
|
|
1157
|
+
req: {
|
|
1158
|
+
body: z.ZodObject<{
|
|
1159
|
+
key: z.ZodString;
|
|
1160
|
+
metadata: z.ZodAny;
|
|
1161
|
+
contentType: z.ZodString;
|
|
1162
|
+
}, z.core.$strip>;
|
|
1163
|
+
cookies: {
|
|
1164
|
+
val_session: z.ZodOptional<z.ZodString>;
|
|
1165
|
+
};
|
|
1166
|
+
};
|
|
1167
|
+
res: z.ZodUnion<readonly [z.ZodObject<{
|
|
1168
|
+
status: z.ZodLiteral<401>;
|
|
1169
|
+
json: z.ZodObject<{
|
|
1170
|
+
message: z.ZodString;
|
|
1171
|
+
}, z.core.$strip>;
|
|
1172
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1173
|
+
status: z.ZodLiteral<200>;
|
|
1174
|
+
json: z.ZodObject<{
|
|
1175
|
+
key: z.ZodString;
|
|
1176
|
+
}, z.core.$strip>;
|
|
1177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1178
|
+
status: z.ZodLiteral<500>;
|
|
1179
|
+
json: z.ZodObject<{
|
|
1180
|
+
message: z.ZodString;
|
|
1181
|
+
}, z.core.$strip>;
|
|
1182
|
+
}, z.core.$strip>]>;
|
|
1183
|
+
};
|
|
1184
|
+
};
|
|
1085
1185
|
};
|
|
1086
1186
|
/**
|
|
1087
1187
|
* Extracts the keys of an object where the value is not undefined.
|
|
@@ -1651,7 +1651,9 @@ var Api = {
|
|
|
1651
1651
|
status: zod.z.literal(200),
|
|
1652
1652
|
json: zod.z.object({
|
|
1653
1653
|
nonce: zod.z.string().nullable(),
|
|
1654
|
-
baseUrl: zod.z.string()
|
|
1654
|
+
baseUrl: zod.z.string(),
|
|
1655
|
+
contentBaseUrl: zod.z.string().nullable(),
|
|
1656
|
+
contentAuthNonce: zod.z.string().nullable()
|
|
1655
1657
|
})
|
|
1656
1658
|
})])
|
|
1657
1659
|
}
|
|
@@ -1829,6 +1831,8 @@ var Api = {
|
|
|
1829
1831
|
// TODO: improve this type
|
|
1830
1832
|
source: zod.z.any().optional(),
|
|
1831
1833
|
//.optional(), // TODO: Json zod type
|
|
1834
|
+
baseSource: zod.z.any().optional(),
|
|
1835
|
+
// pre-patch source for compare view; set only when the module has pending patches
|
|
1832
1836
|
patches: zod.z.object({
|
|
1833
1837
|
applied: zod.z.array(PatchId),
|
|
1834
1838
|
skipped: zod.z.array(PatchId).optional(),
|
|
@@ -2009,6 +2013,11 @@ var Api = {
|
|
|
2009
2013
|
GET: {
|
|
2010
2014
|
req: {
|
|
2011
2015
|
path: zod.z.string(),
|
|
2016
|
+
query: {
|
|
2017
|
+
limit: onlyOneStringQueryParam.optional(),
|
|
2018
|
+
cursor_updatedAt: onlyOneStringQueryParam.optional(),
|
|
2019
|
+
cursor_id: onlyOneStringQueryParam.optional()
|
|
2020
|
+
},
|
|
2012
2021
|
cookies: _defineProperty({}, VAL_SESSION_COOKIE, zod.z.string().optional())
|
|
2013
2022
|
},
|
|
2014
2023
|
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
|
@@ -2016,7 +2025,13 @@ var Api = {
|
|
|
2016
2025
|
json: zod.z.object({
|
|
2017
2026
|
messages: zod.z.array(zod.z.object({
|
|
2018
2027
|
role: zod.z.string(),
|
|
2019
|
-
content: zod.z.string()
|
|
2028
|
+
content: zod.z.union([zod.z.string(), zod.z.array(zod.z.union([zod.z.object({
|
|
2029
|
+
type: zod.z.literal("text"),
|
|
2030
|
+
text: zod.z.string()
|
|
2031
|
+
}), zod.z.object({
|
|
2032
|
+
type: zod.z.literal("image_url"),
|
|
2033
|
+
url: zod.z.string()
|
|
2034
|
+
})]))])
|
|
2020
2035
|
})),
|
|
2021
2036
|
nextCursor: zod.z.object({
|
|
2022
2037
|
updatedAt: zod.z.string(),
|
|
@@ -2028,6 +2043,68 @@ var Api = {
|
|
|
2028
2043
|
json: GenericError
|
|
2029
2044
|
})])
|
|
2030
2045
|
}
|
|
2046
|
+
},
|
|
2047
|
+
"/ai/session-image-to-patch-file": {
|
|
2048
|
+
POST: {
|
|
2049
|
+
req: {
|
|
2050
|
+
body: zod.z.object({
|
|
2051
|
+
patchId: PatchId,
|
|
2052
|
+
parentRef: ParentRef,
|
|
2053
|
+
files: zod.z.array(zod.z.object({
|
|
2054
|
+
filePath: zod.z.string(),
|
|
2055
|
+
key: zod.z.string(),
|
|
2056
|
+
isRemote: zod.z["boolean"]().optional()
|
|
2057
|
+
})).min(1)
|
|
2058
|
+
}),
|
|
2059
|
+
cookies: _defineProperty({}, VAL_SESSION_COOKIE, zod.z.string().optional())
|
|
2060
|
+
},
|
|
2061
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
|
2062
|
+
status: zod.z.literal(200),
|
|
2063
|
+
json: zod.z.object({
|
|
2064
|
+
patchId: PatchId,
|
|
2065
|
+
files: zod.z.array(zod.z.object({
|
|
2066
|
+
filePath: zod.z.string(),
|
|
2067
|
+
metadata: zod.z.object({
|
|
2068
|
+
width: zod.z.number(),
|
|
2069
|
+
height: zod.z.number(),
|
|
2070
|
+
mimeType: zod.z.string()
|
|
2071
|
+
})
|
|
2072
|
+
}))
|
|
2073
|
+
})
|
|
2074
|
+
}), zod.z.object({
|
|
2075
|
+
status: zod.z.literal(400),
|
|
2076
|
+
json: zod.z.object({
|
|
2077
|
+
message: zod.z.string(),
|
|
2078
|
+
details: zod.z.object({
|
|
2079
|
+
availableKeys: zod.z.array(zod.z.string()).optional()
|
|
2080
|
+
}).optional()
|
|
2081
|
+
})
|
|
2082
|
+
}), zod.z.object({
|
|
2083
|
+
status: zod.z.literal(500),
|
|
2084
|
+
json: GenericError
|
|
2085
|
+
})])
|
|
2086
|
+
}
|
|
2087
|
+
},
|
|
2088
|
+
"/ai/images": {
|
|
2089
|
+
PATCH: {
|
|
2090
|
+
req: {
|
|
2091
|
+
body: zod.z.object({
|
|
2092
|
+
key: zod.z.string(),
|
|
2093
|
+
metadata: zod.z.any(),
|
|
2094
|
+
contentType: zod.z.string()
|
|
2095
|
+
}),
|
|
2096
|
+
cookies: _defineProperty({}, VAL_SESSION_COOKIE, zod.z.string().optional())
|
|
2097
|
+
},
|
|
2098
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
|
2099
|
+
status: zod.z.literal(200),
|
|
2100
|
+
json: zod.z.object({
|
|
2101
|
+
key: zod.z.string()
|
|
2102
|
+
})
|
|
2103
|
+
}), zod.z.object({
|
|
2104
|
+
status: zod.z.literal(500),
|
|
2105
|
+
json: GenericError
|
|
2106
|
+
})])
|
|
2107
|
+
}
|
|
2031
2108
|
}
|
|
2032
2109
|
};
|
|
2033
2110
|
|
|
@@ -1651,7 +1651,9 @@ var Api = {
|
|
|
1651
1651
|
status: zod.z.literal(200),
|
|
1652
1652
|
json: zod.z.object({
|
|
1653
1653
|
nonce: zod.z.string().nullable(),
|
|
1654
|
-
baseUrl: zod.z.string()
|
|
1654
|
+
baseUrl: zod.z.string(),
|
|
1655
|
+
contentBaseUrl: zod.z.string().nullable(),
|
|
1656
|
+
contentAuthNonce: zod.z.string().nullable()
|
|
1655
1657
|
})
|
|
1656
1658
|
})])
|
|
1657
1659
|
}
|
|
@@ -1829,6 +1831,8 @@ var Api = {
|
|
|
1829
1831
|
// TODO: improve this type
|
|
1830
1832
|
source: zod.z.any().optional(),
|
|
1831
1833
|
//.optional(), // TODO: Json zod type
|
|
1834
|
+
baseSource: zod.z.any().optional(),
|
|
1835
|
+
// pre-patch source for compare view; set only when the module has pending patches
|
|
1832
1836
|
patches: zod.z.object({
|
|
1833
1837
|
applied: zod.z.array(PatchId),
|
|
1834
1838
|
skipped: zod.z.array(PatchId).optional(),
|
|
@@ -2009,6 +2013,11 @@ var Api = {
|
|
|
2009
2013
|
GET: {
|
|
2010
2014
|
req: {
|
|
2011
2015
|
path: zod.z.string(),
|
|
2016
|
+
query: {
|
|
2017
|
+
limit: onlyOneStringQueryParam.optional(),
|
|
2018
|
+
cursor_updatedAt: onlyOneStringQueryParam.optional(),
|
|
2019
|
+
cursor_id: onlyOneStringQueryParam.optional()
|
|
2020
|
+
},
|
|
2012
2021
|
cookies: _defineProperty({}, VAL_SESSION_COOKIE, zod.z.string().optional())
|
|
2013
2022
|
},
|
|
2014
2023
|
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
|
@@ -2016,7 +2025,13 @@ var Api = {
|
|
|
2016
2025
|
json: zod.z.object({
|
|
2017
2026
|
messages: zod.z.array(zod.z.object({
|
|
2018
2027
|
role: zod.z.string(),
|
|
2019
|
-
content: zod.z.string()
|
|
2028
|
+
content: zod.z.union([zod.z.string(), zod.z.array(zod.z.union([zod.z.object({
|
|
2029
|
+
type: zod.z.literal("text"),
|
|
2030
|
+
text: zod.z.string()
|
|
2031
|
+
}), zod.z.object({
|
|
2032
|
+
type: zod.z.literal("image_url"),
|
|
2033
|
+
url: zod.z.string()
|
|
2034
|
+
})]))])
|
|
2020
2035
|
})),
|
|
2021
2036
|
nextCursor: zod.z.object({
|
|
2022
2037
|
updatedAt: zod.z.string(),
|
|
@@ -2028,6 +2043,68 @@ var Api = {
|
|
|
2028
2043
|
json: GenericError
|
|
2029
2044
|
})])
|
|
2030
2045
|
}
|
|
2046
|
+
},
|
|
2047
|
+
"/ai/session-image-to-patch-file": {
|
|
2048
|
+
POST: {
|
|
2049
|
+
req: {
|
|
2050
|
+
body: zod.z.object({
|
|
2051
|
+
patchId: PatchId,
|
|
2052
|
+
parentRef: ParentRef,
|
|
2053
|
+
files: zod.z.array(zod.z.object({
|
|
2054
|
+
filePath: zod.z.string(),
|
|
2055
|
+
key: zod.z.string(),
|
|
2056
|
+
isRemote: zod.z["boolean"]().optional()
|
|
2057
|
+
})).min(1)
|
|
2058
|
+
}),
|
|
2059
|
+
cookies: _defineProperty({}, VAL_SESSION_COOKIE, zod.z.string().optional())
|
|
2060
|
+
},
|
|
2061
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
|
2062
|
+
status: zod.z.literal(200),
|
|
2063
|
+
json: zod.z.object({
|
|
2064
|
+
patchId: PatchId,
|
|
2065
|
+
files: zod.z.array(zod.z.object({
|
|
2066
|
+
filePath: zod.z.string(),
|
|
2067
|
+
metadata: zod.z.object({
|
|
2068
|
+
width: zod.z.number(),
|
|
2069
|
+
height: zod.z.number(),
|
|
2070
|
+
mimeType: zod.z.string()
|
|
2071
|
+
})
|
|
2072
|
+
}))
|
|
2073
|
+
})
|
|
2074
|
+
}), zod.z.object({
|
|
2075
|
+
status: zod.z.literal(400),
|
|
2076
|
+
json: zod.z.object({
|
|
2077
|
+
message: zod.z.string(),
|
|
2078
|
+
details: zod.z.object({
|
|
2079
|
+
availableKeys: zod.z.array(zod.z.string()).optional()
|
|
2080
|
+
}).optional()
|
|
2081
|
+
})
|
|
2082
|
+
}), zod.z.object({
|
|
2083
|
+
status: zod.z.literal(500),
|
|
2084
|
+
json: GenericError
|
|
2085
|
+
})])
|
|
2086
|
+
}
|
|
2087
|
+
},
|
|
2088
|
+
"/ai/images": {
|
|
2089
|
+
PATCH: {
|
|
2090
|
+
req: {
|
|
2091
|
+
body: zod.z.object({
|
|
2092
|
+
key: zod.z.string(),
|
|
2093
|
+
metadata: zod.z.any(),
|
|
2094
|
+
contentType: zod.z.string()
|
|
2095
|
+
}),
|
|
2096
|
+
cookies: _defineProperty({}, VAL_SESSION_COOKIE, zod.z.string().optional())
|
|
2097
|
+
},
|
|
2098
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
|
2099
|
+
status: zod.z.literal(200),
|
|
2100
|
+
json: zod.z.object({
|
|
2101
|
+
key: zod.z.string()
|
|
2102
|
+
})
|
|
2103
|
+
}), zod.z.object({
|
|
2104
|
+
status: zod.z.literal(500),
|
|
2105
|
+
json: GenericError
|
|
2106
|
+
})])
|
|
2107
|
+
}
|
|
2031
2108
|
}
|
|
2032
2109
|
};
|
|
2033
2110
|
|
|
@@ -1647,7 +1647,9 @@ var Api = {
|
|
|
1647
1647
|
status: z.literal(200),
|
|
1648
1648
|
json: z.object({
|
|
1649
1649
|
nonce: z.string().nullable(),
|
|
1650
|
-
baseUrl: z.string()
|
|
1650
|
+
baseUrl: z.string(),
|
|
1651
|
+
contentBaseUrl: z.string().nullable(),
|
|
1652
|
+
contentAuthNonce: z.string().nullable()
|
|
1651
1653
|
})
|
|
1652
1654
|
})])
|
|
1653
1655
|
}
|
|
@@ -1825,6 +1827,8 @@ var Api = {
|
|
|
1825
1827
|
// TODO: improve this type
|
|
1826
1828
|
source: z.any().optional(),
|
|
1827
1829
|
//.optional(), // TODO: Json zod type
|
|
1830
|
+
baseSource: z.any().optional(),
|
|
1831
|
+
// pre-patch source for compare view; set only when the module has pending patches
|
|
1828
1832
|
patches: z.object({
|
|
1829
1833
|
applied: z.array(PatchId),
|
|
1830
1834
|
skipped: z.array(PatchId).optional(),
|
|
@@ -2005,6 +2009,11 @@ var Api = {
|
|
|
2005
2009
|
GET: {
|
|
2006
2010
|
req: {
|
|
2007
2011
|
path: z.string(),
|
|
2012
|
+
query: {
|
|
2013
|
+
limit: onlyOneStringQueryParam.optional(),
|
|
2014
|
+
cursor_updatedAt: onlyOneStringQueryParam.optional(),
|
|
2015
|
+
cursor_id: onlyOneStringQueryParam.optional()
|
|
2016
|
+
},
|
|
2008
2017
|
cookies: _defineProperty({}, VAL_SESSION_COOKIE, z.string().optional())
|
|
2009
2018
|
},
|
|
2010
2019
|
res: z.union([unauthorizedResponse, z.object({
|
|
@@ -2012,7 +2021,13 @@ var Api = {
|
|
|
2012
2021
|
json: z.object({
|
|
2013
2022
|
messages: z.array(z.object({
|
|
2014
2023
|
role: z.string(),
|
|
2015
|
-
content: z.string()
|
|
2024
|
+
content: z.union([z.string(), z.array(z.union([z.object({
|
|
2025
|
+
type: z.literal("text"),
|
|
2026
|
+
text: z.string()
|
|
2027
|
+
}), z.object({
|
|
2028
|
+
type: z.literal("image_url"),
|
|
2029
|
+
url: z.string()
|
|
2030
|
+
})]))])
|
|
2016
2031
|
})),
|
|
2017
2032
|
nextCursor: z.object({
|
|
2018
2033
|
updatedAt: z.string(),
|
|
@@ -2024,6 +2039,68 @@ var Api = {
|
|
|
2024
2039
|
json: GenericError
|
|
2025
2040
|
})])
|
|
2026
2041
|
}
|
|
2042
|
+
},
|
|
2043
|
+
"/ai/session-image-to-patch-file": {
|
|
2044
|
+
POST: {
|
|
2045
|
+
req: {
|
|
2046
|
+
body: z.object({
|
|
2047
|
+
patchId: PatchId,
|
|
2048
|
+
parentRef: ParentRef,
|
|
2049
|
+
files: z.array(z.object({
|
|
2050
|
+
filePath: z.string(),
|
|
2051
|
+
key: z.string(),
|
|
2052
|
+
isRemote: z["boolean"]().optional()
|
|
2053
|
+
})).min(1)
|
|
2054
|
+
}),
|
|
2055
|
+
cookies: _defineProperty({}, VAL_SESSION_COOKIE, z.string().optional())
|
|
2056
|
+
},
|
|
2057
|
+
res: z.union([unauthorizedResponse, z.object({
|
|
2058
|
+
status: z.literal(200),
|
|
2059
|
+
json: z.object({
|
|
2060
|
+
patchId: PatchId,
|
|
2061
|
+
files: z.array(z.object({
|
|
2062
|
+
filePath: z.string(),
|
|
2063
|
+
metadata: z.object({
|
|
2064
|
+
width: z.number(),
|
|
2065
|
+
height: z.number(),
|
|
2066
|
+
mimeType: z.string()
|
|
2067
|
+
})
|
|
2068
|
+
}))
|
|
2069
|
+
})
|
|
2070
|
+
}), z.object({
|
|
2071
|
+
status: z.literal(400),
|
|
2072
|
+
json: z.object({
|
|
2073
|
+
message: z.string(),
|
|
2074
|
+
details: z.object({
|
|
2075
|
+
availableKeys: z.array(z.string()).optional()
|
|
2076
|
+
}).optional()
|
|
2077
|
+
})
|
|
2078
|
+
}), z.object({
|
|
2079
|
+
status: z.literal(500),
|
|
2080
|
+
json: GenericError
|
|
2081
|
+
})])
|
|
2082
|
+
}
|
|
2083
|
+
},
|
|
2084
|
+
"/ai/images": {
|
|
2085
|
+
PATCH: {
|
|
2086
|
+
req: {
|
|
2087
|
+
body: z.object({
|
|
2088
|
+
key: z.string(),
|
|
2089
|
+
metadata: z.any(),
|
|
2090
|
+
contentType: z.string()
|
|
2091
|
+
}),
|
|
2092
|
+
cookies: _defineProperty({}, VAL_SESSION_COOKIE, z.string().optional())
|
|
2093
|
+
},
|
|
2094
|
+
res: z.union([unauthorizedResponse, z.object({
|
|
2095
|
+
status: z.literal(200),
|
|
2096
|
+
json: z.object({
|
|
2097
|
+
key: z.string()
|
|
2098
|
+
})
|
|
2099
|
+
}), z.object({
|
|
2100
|
+
status: z.literal(500),
|
|
2101
|
+
json: GenericError
|
|
2102
|
+
})])
|
|
2103
|
+
}
|
|
2027
2104
|
}
|
|
2028
2105
|
};
|
|
2029
2106
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valbuild/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.96.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Val shared types and utilities",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"zod": "^4.3.5",
|
|
33
33
|
"zod-validation-error": "^5.0.0",
|
|
34
|
-
"@valbuild/core": "0.
|
|
34
|
+
"@valbuild/core": "0.96.2"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"dist",
|