@valbuild/shared 0.68.1 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1158,6 +1158,25 @@ export declare const Api: {
|
|
1158
1158
|
json: {
|
1159
1159
|
message: string;
|
1160
1160
|
};
|
1161
|
+
}>, z.ZodObject<{
|
1162
|
+
status: z.ZodLiteral<503>;
|
1163
|
+
json: z.ZodObject<{
|
1164
|
+
message: z.ZodString;
|
1165
|
+
}, "strip", z.ZodTypeAny, {
|
1166
|
+
message: string;
|
1167
|
+
}, {
|
1168
|
+
message: string;
|
1169
|
+
}>;
|
1170
|
+
}, "strip", z.ZodTypeAny, {
|
1171
|
+
status: 503;
|
1172
|
+
json: {
|
1173
|
+
message: string;
|
1174
|
+
};
|
1175
|
+
}, {
|
1176
|
+
status: 503;
|
1177
|
+
json: {
|
1178
|
+
message: string;
|
1179
|
+
};
|
1161
1180
|
}>, z.ZodObject<{
|
1162
1181
|
status: z.ZodLiteral<200>;
|
1163
1182
|
json: z.ZodUnion<[z.ZodObject<{
|
@@ -1194,8 +1213,10 @@ export declare const Api: {
|
|
1194
1213
|
gitCommit?: string | undefined;
|
1195
1214
|
gitBranch?: string | undefined;
|
1196
1215
|
}>;
|
1216
|
+
mode: z.ZodUnion<[z.ZodLiteral<"http">, z.ZodLiteral<"fs">, z.ZodLiteral<"unknown">]>;
|
1197
1217
|
}, "strip", z.ZodTypeAny, {
|
1198
1218
|
type: "request-again" | "no-change" | "did-change";
|
1219
|
+
mode: "unknown" | "http" | "fs";
|
1199
1220
|
schemaSha: string;
|
1200
1221
|
baseSha: string;
|
1201
1222
|
patches: import("@valbuild/core").PatchId[];
|
@@ -1210,6 +1231,7 @@ export declare const Api: {
|
|
1210
1231
|
};
|
1211
1232
|
}, {
|
1212
1233
|
type: "request-again" | "no-change" | "did-change";
|
1234
|
+
mode: "unknown" | "http" | "fs";
|
1213
1235
|
schemaSha: string;
|
1214
1236
|
baseSha: string;
|
1215
1237
|
patches: string[];
|
@@ -1259,8 +1281,10 @@ export declare const Api: {
|
|
1259
1281
|
gitCommit?: string | undefined;
|
1260
1282
|
gitBranch?: string | undefined;
|
1261
1283
|
}>;
|
1284
|
+
mode: z.ZodUnion<[z.ZodLiteral<"http">, z.ZodLiteral<"fs">, z.ZodLiteral<"unknown">]>;
|
1262
1285
|
}, "strip", z.ZodTypeAny, {
|
1263
1286
|
type: "use-websocket";
|
1287
|
+
mode: "unknown" | "http" | "fs";
|
1264
1288
|
schemaSha: string;
|
1265
1289
|
baseSha: string;
|
1266
1290
|
patches: import("@valbuild/core").PatchId[];
|
@@ -1278,6 +1302,7 @@ export declare const Api: {
|
|
1278
1302
|
commitSha: string;
|
1279
1303
|
}, {
|
1280
1304
|
type: "use-websocket";
|
1305
|
+
mode: "unknown" | "http" | "fs";
|
1281
1306
|
schemaSha: string;
|
1282
1307
|
baseSha: string;
|
1283
1308
|
patches: string[];
|
@@ -1298,6 +1323,7 @@ export declare const Api: {
|
|
1298
1323
|
status: 200;
|
1299
1324
|
json: {
|
1300
1325
|
type: "request-again" | "no-change" | "did-change";
|
1326
|
+
mode: "unknown" | "http" | "fs";
|
1301
1327
|
schemaSha: string;
|
1302
1328
|
baseSha: string;
|
1303
1329
|
patches: import("@valbuild/core").PatchId[];
|
@@ -1312,6 +1338,7 @@ export declare const Api: {
|
|
1312
1338
|
};
|
1313
1339
|
} | {
|
1314
1340
|
type: "use-websocket";
|
1341
|
+
mode: "unknown" | "http" | "fs";
|
1315
1342
|
schemaSha: string;
|
1316
1343
|
baseSha: string;
|
1317
1344
|
patches: import("@valbuild/core").PatchId[];
|
@@ -1332,6 +1359,7 @@ export declare const Api: {
|
|
1332
1359
|
status: 200;
|
1333
1360
|
json: {
|
1334
1361
|
type: "request-again" | "no-change" | "did-change";
|
1362
|
+
mode: "unknown" | "http" | "fs";
|
1335
1363
|
schemaSha: string;
|
1336
1364
|
baseSha: string;
|
1337
1365
|
patches: string[];
|
@@ -1346,6 +1374,7 @@ export declare const Api: {
|
|
1346
1374
|
};
|
1347
1375
|
} | {
|
1348
1376
|
type: "use-websocket";
|
1377
|
+
mode: "unknown" | "http" | "fs";
|
1349
1378
|
schemaSha: string;
|
1350
1379
|
baseSha: string;
|
1351
1380
|
patches: string[];
|
@@ -1727,10 +1756,8 @@ export declare const Api: {
|
|
1727
1756
|
GET: {
|
1728
1757
|
req: {
|
1729
1758
|
query: {
|
1730
|
-
author: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
1731
1759
|
patch_id: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, import("@valbuild/core").PatchId, string>, "many">>;
|
1732
|
-
|
1733
|
-
omit_patch: z.ZodOptional<z.ZodBoolean>;
|
1760
|
+
exclude_patch_ops: z.ZodOptional<z.ZodBoolean>;
|
1734
1761
|
};
|
1735
1762
|
cookies: {
|
1736
1763
|
val_session: z.ZodOptional<z.ZodString>;
|
@@ -1875,27 +1902,11 @@ export declare const Api: {
|
|
1875
1902
|
createdAt: z.ZodString;
|
1876
1903
|
authorId: z.ZodNullable<z.ZodString>;
|
1877
1904
|
appliedAt: z.ZodNullable<z.ZodObject<{
|
1878
|
-
|
1879
|
-
git: z.ZodOptional<z.ZodObject<{
|
1880
|
-
commitSha: z.ZodString;
|
1881
|
-
}, "strip", z.ZodTypeAny, {
|
1882
|
-
commitSha: string;
|
1883
|
-
}, {
|
1884
|
-
commitSha: string;
|
1885
|
-
}>>;
|
1886
|
-
timestamp: z.ZodString;
|
1905
|
+
commitSha: z.ZodString;
|
1887
1906
|
}, "strip", z.ZodTypeAny, {
|
1888
|
-
|
1889
|
-
timestamp: string;
|
1890
|
-
git?: {
|
1891
|
-
commitSha: string;
|
1892
|
-
} | undefined;
|
1907
|
+
commitSha: string;
|
1893
1908
|
}, {
|
1894
|
-
|
1895
|
-
timestamp: string;
|
1896
|
-
git?: {
|
1897
|
-
commitSha: string;
|
1898
|
-
} | undefined;
|
1909
|
+
commitSha: string;
|
1899
1910
|
}>>;
|
1900
1911
|
}, "strip", z.ZodTypeAny, {
|
1901
1912
|
path: string & {
|
@@ -1907,11 +1918,7 @@ export declare const Api: {
|
|
1907
1918
|
createdAt: string;
|
1908
1919
|
authorId: string | null;
|
1909
1920
|
appliedAt: {
|
1910
|
-
|
1911
|
-
timestamp: string;
|
1912
|
-
git?: {
|
1913
|
-
commitSha: string;
|
1914
|
-
} | undefined;
|
1921
|
+
commitSha: string;
|
1915
1922
|
} | null;
|
1916
1923
|
patch?: import("@valbuild/core/patch").Patch | undefined;
|
1917
1924
|
}, {
|
@@ -1920,11 +1927,7 @@ export declare const Api: {
|
|
1920
1927
|
createdAt: string;
|
1921
1928
|
authorId: string | null;
|
1922
1929
|
appliedAt: {
|
1923
|
-
|
1924
|
-
timestamp: string;
|
1925
|
-
git?: {
|
1926
|
-
commitSha: string;
|
1927
|
-
} | undefined;
|
1930
|
+
commitSha: string;
|
1928
1931
|
} | null;
|
1929
1932
|
patch?: import("@valbuild/core/patch").Patch | undefined;
|
1930
1933
|
}>, "many">;
|
@@ -1955,11 +1958,7 @@ export declare const Api: {
|
|
1955
1958
|
createdAt: string;
|
1956
1959
|
authorId: string | null;
|
1957
1960
|
appliedAt: {
|
1958
|
-
|
1959
|
-
timestamp: string;
|
1960
|
-
git?: {
|
1961
|
-
commitSha: string;
|
1962
|
-
} | undefined;
|
1961
|
+
commitSha: string;
|
1963
1962
|
} | null;
|
1964
1963
|
patch?: import("@valbuild/core/patch").Patch | undefined;
|
1965
1964
|
}[];
|
@@ -1977,11 +1976,7 @@ export declare const Api: {
|
|
1977
1976
|
createdAt: string;
|
1978
1977
|
authorId: string | null;
|
1979
1978
|
appliedAt: {
|
1980
|
-
|
1981
|
-
timestamp: string;
|
1982
|
-
git?: {
|
1983
|
-
commitSha: string;
|
1984
|
-
} | undefined;
|
1979
|
+
commitSha: string;
|
1985
1980
|
} | null;
|
1986
1981
|
patch?: import("@valbuild/core/patch").Patch | undefined;
|
1987
1982
|
}[];
|
@@ -2006,11 +2001,7 @@ export declare const Api: {
|
|
2006
2001
|
createdAt: string;
|
2007
2002
|
authorId: string | null;
|
2008
2003
|
appliedAt: {
|
2009
|
-
|
2010
|
-
timestamp: string;
|
2011
|
-
git?: {
|
2012
|
-
commitSha: string;
|
2013
|
-
} | undefined;
|
2004
|
+
commitSha: string;
|
2014
2005
|
} | null;
|
2015
2006
|
patch?: import("@valbuild/core/patch").Patch | undefined;
|
2016
2007
|
}[];
|
@@ -2031,11 +2022,7 @@ export declare const Api: {
|
|
2031
2022
|
createdAt: string;
|
2032
2023
|
authorId: string | null;
|
2033
2024
|
appliedAt: {
|
2034
|
-
|
2035
|
-
timestamp: string;
|
2036
|
-
git?: {
|
2037
|
-
commitSha: string;
|
2038
|
-
} | undefined;
|
2025
|
+
commitSha: string;
|
2039
2026
|
} | null;
|
2040
2027
|
patch?: import("@valbuild/core/patch").Patch | undefined;
|
2041
2028
|
}[];
|
@@ -2189,13 +2176,6 @@ export declare const Api: {
|
|
2189
2176
|
PUT: {
|
2190
2177
|
req: {
|
2191
2178
|
path: z.ZodOptional<z.ZodString>;
|
2192
|
-
body: z.ZodOptional<z.ZodObject<{
|
2193
|
-
patchIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, import("@valbuild/core").PatchId, string>, "many">>;
|
2194
|
-
}, "strip", z.ZodTypeAny, {
|
2195
|
-
patchIds?: import("@valbuild/core").PatchId[] | undefined;
|
2196
|
-
}, {
|
2197
|
-
patchIds?: string[] | undefined;
|
2198
|
-
}>>;
|
2199
2179
|
query: {
|
2200
2180
|
validate_all: z.ZodOptional<z.ZodBoolean>;
|
2201
2181
|
validate_sources: z.ZodOptional<z.ZodBoolean>;
|
@@ -2531,7 +2511,26 @@ export declare const Api: {
|
|
2531
2511
|
val_session: z.ZodOptional<z.ZodString>;
|
2532
2512
|
};
|
2533
2513
|
};
|
2534
|
-
res: z.ZodObject<{
|
2514
|
+
res: z.ZodUnion<[z.ZodObject<{
|
2515
|
+
status: z.ZodLiteral<401>;
|
2516
|
+
json: z.ZodObject<{
|
2517
|
+
message: z.ZodString;
|
2518
|
+
}, "strip", z.ZodTypeAny, {
|
2519
|
+
message: string;
|
2520
|
+
}, {
|
2521
|
+
message: string;
|
2522
|
+
}>;
|
2523
|
+
}, "strip", z.ZodTypeAny, {
|
2524
|
+
status: 401;
|
2525
|
+
json: {
|
2526
|
+
message: string;
|
2527
|
+
};
|
2528
|
+
}, {
|
2529
|
+
status: 401;
|
2530
|
+
json: {
|
2531
|
+
message: string;
|
2532
|
+
};
|
2533
|
+
}>, z.ZodObject<{
|
2535
2534
|
status: z.ZodLiteral<200>;
|
2536
2535
|
json: z.ZodObject<{
|
2537
2536
|
profiles: z.ZodArray<z.ZodObject<{
|
@@ -2596,18 +2595,101 @@ export declare const Api: {
|
|
2596
2595
|
} | null;
|
2597
2596
|
}[];
|
2598
2597
|
};
|
2599
|
-
}>;
|
2598
|
+
}>]>;
|
2599
|
+
};
|
2600
|
+
};
|
2601
|
+
"/commit-summary": {
|
2602
|
+
GET: {
|
2603
|
+
req: {
|
2604
|
+
query: {
|
2605
|
+
patch_id: z.ZodArray<z.ZodEffects<z.ZodString, import("@valbuild/core").PatchId, string>, "many">;
|
2606
|
+
};
|
2607
|
+
cookies: {
|
2608
|
+
val_session: z.ZodOptional<z.ZodString>;
|
2609
|
+
};
|
2610
|
+
};
|
2611
|
+
res: z.ZodUnion<[z.ZodObject<{
|
2612
|
+
status: z.ZodLiteral<401>;
|
2613
|
+
json: z.ZodObject<{
|
2614
|
+
message: z.ZodString;
|
2615
|
+
}, "strip", z.ZodTypeAny, {
|
2616
|
+
message: string;
|
2617
|
+
}, {
|
2618
|
+
message: string;
|
2619
|
+
}>;
|
2620
|
+
}, "strip", z.ZodTypeAny, {
|
2621
|
+
status: 401;
|
2622
|
+
json: {
|
2623
|
+
message: string;
|
2624
|
+
};
|
2625
|
+
}, {
|
2626
|
+
status: 401;
|
2627
|
+
json: {
|
2628
|
+
message: string;
|
2629
|
+
};
|
2630
|
+
}>, z.ZodObject<{
|
2631
|
+
status: z.ZodLiteral<400>;
|
2632
|
+
json: z.ZodObject<{
|
2633
|
+
message: z.ZodString;
|
2634
|
+
}, "strip", z.ZodTypeAny, {
|
2635
|
+
message: string;
|
2636
|
+
}, {
|
2637
|
+
message: string;
|
2638
|
+
}>;
|
2639
|
+
}, "strip", z.ZodTypeAny, {
|
2640
|
+
status: 400;
|
2641
|
+
json: {
|
2642
|
+
message: string;
|
2643
|
+
};
|
2644
|
+
}, {
|
2645
|
+
status: 400;
|
2646
|
+
json: {
|
2647
|
+
message: string;
|
2648
|
+
};
|
2649
|
+
}>, z.ZodObject<{
|
2650
|
+
status: z.ZodLiteral<200>;
|
2651
|
+
json: z.ZodObject<{
|
2652
|
+
patchIds: z.ZodArray<z.ZodEffects<z.ZodString, import("@valbuild/core").PatchId, string>, "many">;
|
2653
|
+
baseSha: z.ZodString;
|
2654
|
+
commitSummary: z.ZodNullable<z.ZodString>;
|
2655
|
+
}, "strip", z.ZodTypeAny, {
|
2656
|
+
baseSha: string;
|
2657
|
+
patchIds: import("@valbuild/core").PatchId[];
|
2658
|
+
commitSummary: string | null;
|
2659
|
+
}, {
|
2660
|
+
baseSha: string;
|
2661
|
+
patchIds: string[];
|
2662
|
+
commitSummary: string | null;
|
2663
|
+
}>;
|
2664
|
+
}, "strip", z.ZodTypeAny, {
|
2665
|
+
status: 200;
|
2666
|
+
json: {
|
2667
|
+
baseSha: string;
|
2668
|
+
patchIds: import("@valbuild/core").PatchId[];
|
2669
|
+
commitSummary: string | null;
|
2670
|
+
};
|
2671
|
+
}, {
|
2672
|
+
status: 200;
|
2673
|
+
json: {
|
2674
|
+
baseSha: string;
|
2675
|
+
patchIds: string[];
|
2676
|
+
commitSummary: string | null;
|
2677
|
+
};
|
2678
|
+
}>]>;
|
2600
2679
|
};
|
2601
2680
|
};
|
2602
2681
|
"/save": {
|
2603
2682
|
POST: {
|
2604
2683
|
req: {
|
2605
2684
|
body: z.ZodObject<{
|
2685
|
+
message: z.ZodOptional<z.ZodString>;
|
2606
2686
|
patchIds: z.ZodArray<z.ZodEffects<z.ZodString, import("@valbuild/core").PatchId, string>, "many">;
|
2607
2687
|
}, "strip", z.ZodTypeAny, {
|
2608
2688
|
patchIds: import("@valbuild/core").PatchId[];
|
2689
|
+
message?: string | undefined;
|
2609
2690
|
}, {
|
2610
2691
|
patchIds: string[];
|
2692
|
+
message?: string | undefined;
|
2611
2693
|
}>;
|
2612
2694
|
cookies: {
|
2613
2695
|
val_session: z.ZodOptional<z.ZodString>;
|
@@ -1577,6 +1577,9 @@ var Api = {
|
|
1577
1577
|
}), zod.z.object({
|
1578
1578
|
status: zod.z.literal(500),
|
1579
1579
|
json: GenericError
|
1580
|
+
}), zod.z.object({
|
1581
|
+
status: zod.z.literal(503),
|
1582
|
+
json: GenericError
|
1580
1583
|
}), zod.z.object({
|
1581
1584
|
status: zod.z.literal(200),
|
1582
1585
|
json: zod.z.union([zod.z.object({
|
@@ -1584,7 +1587,8 @@ var Api = {
|
|
1584
1587
|
baseSha: zod.z.string(),
|
1585
1588
|
schemaSha: zod.z.string(),
|
1586
1589
|
patches: zod.z.array(PatchId),
|
1587
|
-
config: ValConfig
|
1590
|
+
config: ValConfig,
|
1591
|
+
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs"), zod.z.literal("unknown")])
|
1588
1592
|
}), zod.z.object({
|
1589
1593
|
type: zod.z.literal("use-websocket"),
|
1590
1594
|
url: zod.z.string(),
|
@@ -1593,7 +1597,8 @@ var Api = {
|
|
1593
1597
|
schemaSha: zod.z.string(),
|
1594
1598
|
commitSha: zod.z.string(),
|
1595
1599
|
patches: zod.z.array(PatchId),
|
1596
|
-
config: ValConfig
|
1600
|
+
config: ValConfig,
|
1601
|
+
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs"), zod.z.literal("unknown")])
|
1597
1602
|
})])
|
1598
1603
|
})])
|
1599
1604
|
}
|
@@ -1659,10 +1664,8 @@ var Api = {
|
|
1659
1664
|
GET: {
|
1660
1665
|
req: {
|
1661
1666
|
query: {
|
1662
|
-
author: zod.z.array(zod.z.string()).optional(),
|
1663
1667
|
patch_id: zod.z.array(PatchId).optional(),
|
1664
|
-
|
1665
|
-
omit_patch: zod.z["boolean"]().optional() // TODO: rename! we mean that we are not including the actual patch / operations in the response
|
1668
|
+
exclude_patch_ops: zod.z["boolean"]().optional()
|
1666
1669
|
},
|
1667
1670
|
cookies: {
|
1668
1671
|
val_session: zod.z.string().optional()
|
@@ -1690,11 +1693,7 @@ var Api = {
|
|
1690
1693
|
createdAt: zod.z.string(),
|
1691
1694
|
authorId: zod.z.string().nullable(),
|
1692
1695
|
appliedAt: zod.z.object({
|
1693
|
-
|
1694
|
-
git: zod.z.object({
|
1695
|
-
commitSha: zod.z.string()
|
1696
|
-
}).optional(),
|
1697
|
-
timestamp: zod.z.string()
|
1696
|
+
commitSha: zod.z.string()
|
1698
1697
|
}).nullable()
|
1699
1698
|
})),
|
1700
1699
|
baseSha: zod.z.string(),
|
@@ -1736,9 +1735,6 @@ var Api = {
|
|
1736
1735
|
PUT: {
|
1737
1736
|
req: {
|
1738
1737
|
path: zod.z.string().optional(),
|
1739
|
-
body: zod.z.object({
|
1740
|
-
patchIds: zod.z.array(PatchId).optional()
|
1741
|
-
}).optional(),
|
1742
1738
|
query: {
|
1743
1739
|
validate_all: zod.z["boolean"]().optional(),
|
1744
1740
|
validate_sources: zod.z["boolean"]().optional(),
|
@@ -1793,7 +1789,7 @@ var Api = {
|
|
1793
1789
|
val_session: zod.z.string().optional()
|
1794
1790
|
}
|
1795
1791
|
},
|
1796
|
-
res: zod.z.object({
|
1792
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1797
1793
|
status: zod.z.literal(200),
|
1798
1794
|
json: zod.z.object({
|
1799
1795
|
profiles: zod.z.array(zod.z.object({
|
@@ -1804,13 +1800,39 @@ var Api = {
|
|
1804
1800
|
}).nullable()
|
1805
1801
|
}))
|
1806
1802
|
})
|
1807
|
-
})
|
1803
|
+
})])
|
1804
|
+
}
|
1805
|
+
},
|
1806
|
+
"/commit-summary": {
|
1807
|
+
GET: {
|
1808
|
+
req: {
|
1809
|
+
query: {
|
1810
|
+
patch_id: zod.z.array(PatchId)
|
1811
|
+
},
|
1812
|
+
cookies: {
|
1813
|
+
val_session: zod.z.string().optional()
|
1814
|
+
}
|
1815
|
+
},
|
1816
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1817
|
+
status: zod.z.literal(400),
|
1818
|
+
json: zod.z.object({
|
1819
|
+
message: zod.z.string()
|
1820
|
+
})
|
1821
|
+
}), zod.z.object({
|
1822
|
+
status: zod.z.literal(200),
|
1823
|
+
json: zod.z.object({
|
1824
|
+
patchIds: zod.z.array(PatchId),
|
1825
|
+
baseSha: zod.z.string(),
|
1826
|
+
commitSummary: zod.z.string().nullable()
|
1827
|
+
})
|
1828
|
+
})])
|
1808
1829
|
}
|
1809
1830
|
},
|
1810
1831
|
"/save": {
|
1811
1832
|
POST: {
|
1812
1833
|
req: {
|
1813
1834
|
body: zod.z.object({
|
1835
|
+
message: zod.z.string().optional(),
|
1814
1836
|
patchIds: zod.z.array(PatchId)
|
1815
1837
|
}),
|
1816
1838
|
cookies: {
|
@@ -1987,7 +2009,7 @@ var createValClient = function createValClient(host) {
|
|
1987
2009
|
status: null,
|
1988
2010
|
json: {
|
1989
2011
|
type: "client_side_validation_error",
|
1990
|
-
message: "Invalid response (expected JSON, but got something else). This could be a result of mismatched Val versions or a transient error.",
|
2012
|
+
message: "Invalid response (expected JSON, but got something else). This could be a result of mismatched Val versions or a transient error. ".concat(res.status),
|
1991
2013
|
details: {
|
1992
2014
|
validationError: "Invalid content type",
|
1993
2015
|
data: {
|
@@ -1577,6 +1577,9 @@ var Api = {
|
|
1577
1577
|
}), zod.z.object({
|
1578
1578
|
status: zod.z.literal(500),
|
1579
1579
|
json: GenericError
|
1580
|
+
}), zod.z.object({
|
1581
|
+
status: zod.z.literal(503),
|
1582
|
+
json: GenericError
|
1580
1583
|
}), zod.z.object({
|
1581
1584
|
status: zod.z.literal(200),
|
1582
1585
|
json: zod.z.union([zod.z.object({
|
@@ -1584,7 +1587,8 @@ var Api = {
|
|
1584
1587
|
baseSha: zod.z.string(),
|
1585
1588
|
schemaSha: zod.z.string(),
|
1586
1589
|
patches: zod.z.array(PatchId),
|
1587
|
-
config: ValConfig
|
1590
|
+
config: ValConfig,
|
1591
|
+
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs"), zod.z.literal("unknown")])
|
1588
1592
|
}), zod.z.object({
|
1589
1593
|
type: zod.z.literal("use-websocket"),
|
1590
1594
|
url: zod.z.string(),
|
@@ -1593,7 +1597,8 @@ var Api = {
|
|
1593
1597
|
schemaSha: zod.z.string(),
|
1594
1598
|
commitSha: zod.z.string(),
|
1595
1599
|
patches: zod.z.array(PatchId),
|
1596
|
-
config: ValConfig
|
1600
|
+
config: ValConfig,
|
1601
|
+
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs"), zod.z.literal("unknown")])
|
1597
1602
|
})])
|
1598
1603
|
})])
|
1599
1604
|
}
|
@@ -1659,10 +1664,8 @@ var Api = {
|
|
1659
1664
|
GET: {
|
1660
1665
|
req: {
|
1661
1666
|
query: {
|
1662
|
-
author: zod.z.array(zod.z.string()).optional(),
|
1663
1667
|
patch_id: zod.z.array(PatchId).optional(),
|
1664
|
-
|
1665
|
-
omit_patch: zod.z["boolean"]().optional() // TODO: rename! we mean that we are not including the actual patch / operations in the response
|
1668
|
+
exclude_patch_ops: zod.z["boolean"]().optional()
|
1666
1669
|
},
|
1667
1670
|
cookies: {
|
1668
1671
|
val_session: zod.z.string().optional()
|
@@ -1690,11 +1693,7 @@ var Api = {
|
|
1690
1693
|
createdAt: zod.z.string(),
|
1691
1694
|
authorId: zod.z.string().nullable(),
|
1692
1695
|
appliedAt: zod.z.object({
|
1693
|
-
|
1694
|
-
git: zod.z.object({
|
1695
|
-
commitSha: zod.z.string()
|
1696
|
-
}).optional(),
|
1697
|
-
timestamp: zod.z.string()
|
1696
|
+
commitSha: zod.z.string()
|
1698
1697
|
}).nullable()
|
1699
1698
|
})),
|
1700
1699
|
baseSha: zod.z.string(),
|
@@ -1736,9 +1735,6 @@ var Api = {
|
|
1736
1735
|
PUT: {
|
1737
1736
|
req: {
|
1738
1737
|
path: zod.z.string().optional(),
|
1739
|
-
body: zod.z.object({
|
1740
|
-
patchIds: zod.z.array(PatchId).optional()
|
1741
|
-
}).optional(),
|
1742
1738
|
query: {
|
1743
1739
|
validate_all: zod.z["boolean"]().optional(),
|
1744
1740
|
validate_sources: zod.z["boolean"]().optional(),
|
@@ -1793,7 +1789,7 @@ var Api = {
|
|
1793
1789
|
val_session: zod.z.string().optional()
|
1794
1790
|
}
|
1795
1791
|
},
|
1796
|
-
res: zod.z.object({
|
1792
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1797
1793
|
status: zod.z.literal(200),
|
1798
1794
|
json: zod.z.object({
|
1799
1795
|
profiles: zod.z.array(zod.z.object({
|
@@ -1804,13 +1800,39 @@ var Api = {
|
|
1804
1800
|
}).nullable()
|
1805
1801
|
}))
|
1806
1802
|
})
|
1807
|
-
})
|
1803
|
+
})])
|
1804
|
+
}
|
1805
|
+
},
|
1806
|
+
"/commit-summary": {
|
1807
|
+
GET: {
|
1808
|
+
req: {
|
1809
|
+
query: {
|
1810
|
+
patch_id: zod.z.array(PatchId)
|
1811
|
+
},
|
1812
|
+
cookies: {
|
1813
|
+
val_session: zod.z.string().optional()
|
1814
|
+
}
|
1815
|
+
},
|
1816
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1817
|
+
status: zod.z.literal(400),
|
1818
|
+
json: zod.z.object({
|
1819
|
+
message: zod.z.string()
|
1820
|
+
})
|
1821
|
+
}), zod.z.object({
|
1822
|
+
status: zod.z.literal(200),
|
1823
|
+
json: zod.z.object({
|
1824
|
+
patchIds: zod.z.array(PatchId),
|
1825
|
+
baseSha: zod.z.string(),
|
1826
|
+
commitSummary: zod.z.string().nullable()
|
1827
|
+
})
|
1828
|
+
})])
|
1808
1829
|
}
|
1809
1830
|
},
|
1810
1831
|
"/save": {
|
1811
1832
|
POST: {
|
1812
1833
|
req: {
|
1813
1834
|
body: zod.z.object({
|
1835
|
+
message: zod.z.string().optional(),
|
1814
1836
|
patchIds: zod.z.array(PatchId)
|
1815
1837
|
}),
|
1816
1838
|
cookies: {
|
@@ -1987,7 +2009,7 @@ var createValClient = function createValClient(host) {
|
|
1987
2009
|
status: null,
|
1988
2010
|
json: {
|
1989
2011
|
type: "client_side_validation_error",
|
1990
|
-
message: "Invalid response (expected JSON, but got something else). This could be a result of mismatched Val versions or a transient error.",
|
2012
|
+
message: "Invalid response (expected JSON, but got something else). This could be a result of mismatched Val versions or a transient error. ".concat(res.status),
|
1991
2013
|
details: {
|
1992
2014
|
validationError: "Invalid content type",
|
1993
2015
|
data: {
|
@@ -1573,6 +1573,9 @@ var Api = {
|
|
1573
1573
|
}), z.object({
|
1574
1574
|
status: z.literal(500),
|
1575
1575
|
json: GenericError
|
1576
|
+
}), z.object({
|
1577
|
+
status: z.literal(503),
|
1578
|
+
json: GenericError
|
1576
1579
|
}), z.object({
|
1577
1580
|
status: z.literal(200),
|
1578
1581
|
json: z.union([z.object({
|
@@ -1580,7 +1583,8 @@ var Api = {
|
|
1580
1583
|
baseSha: z.string(),
|
1581
1584
|
schemaSha: z.string(),
|
1582
1585
|
patches: z.array(PatchId),
|
1583
|
-
config: ValConfig
|
1586
|
+
config: ValConfig,
|
1587
|
+
mode: z.union([z.literal("http"), z.literal("fs"), z.literal("unknown")])
|
1584
1588
|
}), z.object({
|
1585
1589
|
type: z.literal("use-websocket"),
|
1586
1590
|
url: z.string(),
|
@@ -1589,7 +1593,8 @@ var Api = {
|
|
1589
1593
|
schemaSha: z.string(),
|
1590
1594
|
commitSha: z.string(),
|
1591
1595
|
patches: z.array(PatchId),
|
1592
|
-
config: ValConfig
|
1596
|
+
config: ValConfig,
|
1597
|
+
mode: z.union([z.literal("http"), z.literal("fs"), z.literal("unknown")])
|
1593
1598
|
})])
|
1594
1599
|
})])
|
1595
1600
|
}
|
@@ -1655,10 +1660,8 @@ var Api = {
|
|
1655
1660
|
GET: {
|
1656
1661
|
req: {
|
1657
1662
|
query: {
|
1658
|
-
author: z.array(z.string()).optional(),
|
1659
1663
|
patch_id: z.array(PatchId).optional(),
|
1660
|
-
|
1661
|
-
omit_patch: z["boolean"]().optional() // TODO: rename! we mean that we are not including the actual patch / operations in the response
|
1664
|
+
exclude_patch_ops: z["boolean"]().optional()
|
1662
1665
|
},
|
1663
1666
|
cookies: {
|
1664
1667
|
val_session: z.string().optional()
|
@@ -1686,11 +1689,7 @@ var Api = {
|
|
1686
1689
|
createdAt: z.string(),
|
1687
1690
|
authorId: z.string().nullable(),
|
1688
1691
|
appliedAt: z.object({
|
1689
|
-
|
1690
|
-
git: z.object({
|
1691
|
-
commitSha: z.string()
|
1692
|
-
}).optional(),
|
1693
|
-
timestamp: z.string()
|
1692
|
+
commitSha: z.string()
|
1694
1693
|
}).nullable()
|
1695
1694
|
})),
|
1696
1695
|
baseSha: z.string(),
|
@@ -1732,9 +1731,6 @@ var Api = {
|
|
1732
1731
|
PUT: {
|
1733
1732
|
req: {
|
1734
1733
|
path: z.string().optional(),
|
1735
|
-
body: z.object({
|
1736
|
-
patchIds: z.array(PatchId).optional()
|
1737
|
-
}).optional(),
|
1738
1734
|
query: {
|
1739
1735
|
validate_all: z["boolean"]().optional(),
|
1740
1736
|
validate_sources: z["boolean"]().optional(),
|
@@ -1789,7 +1785,7 @@ var Api = {
|
|
1789
1785
|
val_session: z.string().optional()
|
1790
1786
|
}
|
1791
1787
|
},
|
1792
|
-
res: z.object({
|
1788
|
+
res: z.union([unauthorizedResponse, z.object({
|
1793
1789
|
status: z.literal(200),
|
1794
1790
|
json: z.object({
|
1795
1791
|
profiles: z.array(z.object({
|
@@ -1800,13 +1796,39 @@ var Api = {
|
|
1800
1796
|
}).nullable()
|
1801
1797
|
}))
|
1802
1798
|
})
|
1803
|
-
})
|
1799
|
+
})])
|
1800
|
+
}
|
1801
|
+
},
|
1802
|
+
"/commit-summary": {
|
1803
|
+
GET: {
|
1804
|
+
req: {
|
1805
|
+
query: {
|
1806
|
+
patch_id: z.array(PatchId)
|
1807
|
+
},
|
1808
|
+
cookies: {
|
1809
|
+
val_session: z.string().optional()
|
1810
|
+
}
|
1811
|
+
},
|
1812
|
+
res: z.union([unauthorizedResponse, z.object({
|
1813
|
+
status: z.literal(400),
|
1814
|
+
json: z.object({
|
1815
|
+
message: z.string()
|
1816
|
+
})
|
1817
|
+
}), z.object({
|
1818
|
+
status: z.literal(200),
|
1819
|
+
json: z.object({
|
1820
|
+
patchIds: z.array(PatchId),
|
1821
|
+
baseSha: z.string(),
|
1822
|
+
commitSummary: z.string().nullable()
|
1823
|
+
})
|
1824
|
+
})])
|
1804
1825
|
}
|
1805
1826
|
},
|
1806
1827
|
"/save": {
|
1807
1828
|
POST: {
|
1808
1829
|
req: {
|
1809
1830
|
body: z.object({
|
1831
|
+
message: z.string().optional(),
|
1810
1832
|
patchIds: z.array(PatchId)
|
1811
1833
|
}),
|
1812
1834
|
cookies: {
|
@@ -1983,7 +2005,7 @@ var createValClient = function createValClient(host) {
|
|
1983
2005
|
status: null,
|
1984
2006
|
json: {
|
1985
2007
|
type: "client_side_validation_error",
|
1986
|
-
message: "Invalid response (expected JSON, but got something else). This could be a result of mismatched Val versions or a transient error.",
|
2008
|
+
message: "Invalid response (expected JSON, but got something else). This could be a result of mismatched Val versions or a transient error. ".concat(res.status),
|
1987
2009
|
details: {
|
1988
2010
|
validationError: "Invalid content type",
|
1989
2011
|
data: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@valbuild/shared",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.69.0",
|
4
4
|
"private": false,
|
5
5
|
"description": "Val shared types and utilities",
|
6
6
|
"scripts": {
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"exports": true
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@valbuild/core": "~0.
|
32
|
+
"@valbuild/core": "~0.69.0",
|
33
33
|
"zod": "^3.22.4",
|
34
34
|
"zod-validation-error": "^3.3.0"
|
35
35
|
},
|