@valbuild/shared 0.68.0 → 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>;
|
@@ -2524,15 +2504,192 @@ export declare const Api: {
|
|
2524
2504
|
}>]>;
|
2525
2505
|
};
|
2526
2506
|
};
|
2507
|
+
"/profiles": {
|
2508
|
+
GET: {
|
2509
|
+
req: {
|
2510
|
+
cookies: {
|
2511
|
+
val_session: z.ZodOptional<z.ZodString>;
|
2512
|
+
};
|
2513
|
+
};
|
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<{
|
2534
|
+
status: z.ZodLiteral<200>;
|
2535
|
+
json: z.ZodObject<{
|
2536
|
+
profiles: z.ZodArray<z.ZodObject<{
|
2537
|
+
profileId: z.ZodString;
|
2538
|
+
fullName: z.ZodString;
|
2539
|
+
avatar: z.ZodNullable<z.ZodObject<{
|
2540
|
+
url: z.ZodString;
|
2541
|
+
}, "strip", z.ZodTypeAny, {
|
2542
|
+
url: string;
|
2543
|
+
}, {
|
2544
|
+
url: string;
|
2545
|
+
}>>;
|
2546
|
+
}, "strip", z.ZodTypeAny, {
|
2547
|
+
profileId: string;
|
2548
|
+
fullName: string;
|
2549
|
+
avatar: {
|
2550
|
+
url: string;
|
2551
|
+
} | null;
|
2552
|
+
}, {
|
2553
|
+
profileId: string;
|
2554
|
+
fullName: string;
|
2555
|
+
avatar: {
|
2556
|
+
url: string;
|
2557
|
+
} | null;
|
2558
|
+
}>, "many">;
|
2559
|
+
}, "strip", z.ZodTypeAny, {
|
2560
|
+
profiles: {
|
2561
|
+
profileId: string;
|
2562
|
+
fullName: string;
|
2563
|
+
avatar: {
|
2564
|
+
url: string;
|
2565
|
+
} | null;
|
2566
|
+
}[];
|
2567
|
+
}, {
|
2568
|
+
profiles: {
|
2569
|
+
profileId: string;
|
2570
|
+
fullName: string;
|
2571
|
+
avatar: {
|
2572
|
+
url: string;
|
2573
|
+
} | null;
|
2574
|
+
}[];
|
2575
|
+
}>;
|
2576
|
+
}, "strip", z.ZodTypeAny, {
|
2577
|
+
status: 200;
|
2578
|
+
json: {
|
2579
|
+
profiles: {
|
2580
|
+
profileId: string;
|
2581
|
+
fullName: string;
|
2582
|
+
avatar: {
|
2583
|
+
url: string;
|
2584
|
+
} | null;
|
2585
|
+
}[];
|
2586
|
+
};
|
2587
|
+
}, {
|
2588
|
+
status: 200;
|
2589
|
+
json: {
|
2590
|
+
profiles: {
|
2591
|
+
profileId: string;
|
2592
|
+
fullName: string;
|
2593
|
+
avatar: {
|
2594
|
+
url: string;
|
2595
|
+
} | null;
|
2596
|
+
}[];
|
2597
|
+
};
|
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
|
+
}>]>;
|
2679
|
+
};
|
2680
|
+
};
|
2527
2681
|
"/save": {
|
2528
2682
|
POST: {
|
2529
2683
|
req: {
|
2530
2684
|
body: z.ZodObject<{
|
2685
|
+
message: z.ZodOptional<z.ZodString>;
|
2531
2686
|
patchIds: z.ZodArray<z.ZodEffects<z.ZodString, import("@valbuild/core").PatchId, string>, "many">;
|
2532
2687
|
}, "strip", z.ZodTypeAny, {
|
2533
2688
|
patchIds: import("@valbuild/core").PatchId[];
|
2689
|
+
message?: string | undefined;
|
2534
2690
|
}, {
|
2535
2691
|
patchIds: string[];
|
2692
|
+
message?: string | undefined;
|
2536
2693
|
}>;
|
2537
2694
|
cookies: {
|
2538
2695
|
val_session: z.ZodOptional<z.ZodString>;
|
@@ -2697,14 +2854,24 @@ export declare const Api: {
|
|
2697
2854
|
};
|
2698
2855
|
};
|
2699
2856
|
res: z.ZodUnion<[z.ZodObject<{
|
2700
|
-
status: z.ZodLiteral<
|
2701
|
-
|
2857
|
+
status: z.ZodLiteral<401>;
|
2858
|
+
json: z.ZodObject<{
|
2859
|
+
message: z.ZodString;
|
2860
|
+
}, "strip", z.ZodTypeAny, {
|
2861
|
+
message: string;
|
2862
|
+
}, {
|
2863
|
+
message: string;
|
2864
|
+
}>;
|
2702
2865
|
}, "strip", z.ZodTypeAny, {
|
2703
|
-
status:
|
2704
|
-
|
2866
|
+
status: 401;
|
2867
|
+
json: {
|
2868
|
+
message: string;
|
2869
|
+
};
|
2705
2870
|
}, {
|
2706
|
-
status:
|
2707
|
-
|
2871
|
+
status: 401;
|
2872
|
+
json: {
|
2873
|
+
message: string;
|
2874
|
+
};
|
2708
2875
|
}>, z.ZodObject<{
|
2709
2876
|
status: z.ZodLiteral<404>;
|
2710
2877
|
json: z.ZodObject<{
|
@@ -2724,6 +2891,15 @@ export declare const Api: {
|
|
2724
2891
|
json: {
|
2725
2892
|
message: string;
|
2726
2893
|
};
|
2894
|
+
}>, z.ZodObject<{
|
2895
|
+
status: z.ZodLiteral<200>;
|
2896
|
+
body: z.ZodType<ReadableStream<unknown>, z.ZodTypeDef, ReadableStream<unknown>>;
|
2897
|
+
}, "strip", z.ZodTypeAny, {
|
2898
|
+
status: 200;
|
2899
|
+
body: ReadableStream<unknown>;
|
2900
|
+
}, {
|
2901
|
+
status: 200;
|
2902
|
+
body: ReadableStream<unknown>;
|
2727
2903
|
}>]>;
|
2728
2904
|
};
|
2729
2905
|
};
|
@@ -1296,12 +1296,18 @@ var ValidationError = zod.z.object({
|
|
1296
1296
|
fatal: zod.z["boolean"]().optional(),
|
1297
1297
|
fixes: zod.z.array(ValidationFixZ).optional()
|
1298
1298
|
});
|
1299
|
-
var
|
1299
|
+
var unauthorizedResponse = zod.z.object({
|
1300
1300
|
status: zod.z.literal(401),
|
1301
1301
|
json: zod.z.object({
|
1302
1302
|
message: zod.z.string()
|
1303
1303
|
})
|
1304
1304
|
});
|
1305
|
+
var notFoundResponse = zod.z.object({
|
1306
|
+
status: zod.z.literal(404),
|
1307
|
+
json: zod.z.object({
|
1308
|
+
message: zod.z.string()
|
1309
|
+
})
|
1310
|
+
});
|
1305
1311
|
var GenericError = zod.z.object({
|
1306
1312
|
message: zod.z.string()
|
1307
1313
|
});
|
@@ -1571,6 +1577,9 @@ var Api = {
|
|
1571
1577
|
}), zod.z.object({
|
1572
1578
|
status: zod.z.literal(500),
|
1573
1579
|
json: GenericError
|
1580
|
+
}), zod.z.object({
|
1581
|
+
status: zod.z.literal(503),
|
1582
|
+
json: GenericError
|
1574
1583
|
}), zod.z.object({
|
1575
1584
|
status: zod.z.literal(200),
|
1576
1585
|
json: zod.z.union([zod.z.object({
|
@@ -1578,7 +1587,8 @@ var Api = {
|
|
1578
1587
|
baseSha: zod.z.string(),
|
1579
1588
|
schemaSha: zod.z.string(),
|
1580
1589
|
patches: zod.z.array(PatchId),
|
1581
|
-
config: ValConfig
|
1590
|
+
config: ValConfig,
|
1591
|
+
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs"), zod.z.literal("unknown")])
|
1582
1592
|
}), zod.z.object({
|
1583
1593
|
type: zod.z.literal("use-websocket"),
|
1584
1594
|
url: zod.z.string(),
|
@@ -1587,7 +1597,8 @@ var Api = {
|
|
1587
1597
|
schemaSha: zod.z.string(),
|
1588
1598
|
commitSha: zod.z.string(),
|
1589
1599
|
patches: zod.z.array(PatchId),
|
1590
|
-
config: ValConfig
|
1600
|
+
config: ValConfig,
|
1601
|
+
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs"), zod.z.literal("unknown")])
|
1591
1602
|
})])
|
1592
1603
|
})])
|
1593
1604
|
}
|
@@ -1602,7 +1613,7 @@ var Api = {
|
|
1602
1613
|
val_session: zod.z.string().optional()
|
1603
1614
|
}
|
1604
1615
|
},
|
1605
|
-
res: zod.z.union([
|
1616
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1606
1617
|
status: zod.z.literal(500),
|
1607
1618
|
json: zod.z.object({
|
1608
1619
|
message: zod.z.string(),
|
@@ -1626,7 +1637,7 @@ var Api = {
|
|
1626
1637
|
val_session: zod.z.string().optional()
|
1627
1638
|
}
|
1628
1639
|
},
|
1629
|
-
res: zod.z.union([
|
1640
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1630
1641
|
status: zod.z.literal(409),
|
1631
1642
|
// conflict: i.e. not a head of patches
|
1632
1643
|
json: zod.z.object({
|
@@ -1653,16 +1664,14 @@ var Api = {
|
|
1653
1664
|
GET: {
|
1654
1665
|
req: {
|
1655
1666
|
query: {
|
1656
|
-
author: zod.z.array(zod.z.string()).optional(),
|
1657
1667
|
patch_id: zod.z.array(PatchId).optional(),
|
1658
|
-
|
1659
|
-
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()
|
1660
1669
|
},
|
1661
1670
|
cookies: {
|
1662
1671
|
val_session: zod.z.string().optional()
|
1663
1672
|
}
|
1664
1673
|
},
|
1665
|
-
res: zod.z.union([
|
1674
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1666
1675
|
status: zod.z.literal(500),
|
1667
1676
|
json: zod.z.object({
|
1668
1677
|
message: zod.z.string(),
|
@@ -1684,11 +1693,7 @@ var Api = {
|
|
1684
1693
|
createdAt: zod.z.string(),
|
1685
1694
|
authorId: zod.z.string().nullable(),
|
1686
1695
|
appliedAt: zod.z.object({
|
1687
|
-
|
1688
|
-
git: zod.z.object({
|
1689
|
-
commitSha: zod.z.string()
|
1690
|
-
}).optional(),
|
1691
|
-
timestamp: zod.z.string()
|
1696
|
+
commitSha: zod.z.string()
|
1692
1697
|
}).nullable()
|
1693
1698
|
})),
|
1694
1699
|
baseSha: zod.z.string(),
|
@@ -1705,7 +1710,7 @@ var Api = {
|
|
1705
1710
|
val_session: zod.z.string().optional()
|
1706
1711
|
}
|
1707
1712
|
},
|
1708
|
-
res: zod.z.union([
|
1713
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1709
1714
|
status: zod.z.literal(500),
|
1710
1715
|
json: zod.z.object({
|
1711
1716
|
message: zod.z.string(),
|
@@ -1730,9 +1735,6 @@ var Api = {
|
|
1730
1735
|
PUT: {
|
1731
1736
|
req: {
|
1732
1737
|
path: zod.z.string().optional(),
|
1733
|
-
body: zod.z.object({
|
1734
|
-
patchIds: zod.z.array(PatchId).optional()
|
1735
|
-
}).optional(),
|
1736
1738
|
query: {
|
1737
1739
|
validate_all: zod.z["boolean"]().optional(),
|
1738
1740
|
validate_sources: zod.z["boolean"]().optional(),
|
@@ -1742,7 +1744,7 @@ var Api = {
|
|
1742
1744
|
val_session: zod.z.string().optional()
|
1743
1745
|
}
|
1744
1746
|
},
|
1745
|
-
res: zod.z.union([
|
1747
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1746
1748
|
status: zod.z.literal(401),
|
1747
1749
|
json: GenericError
|
1748
1750
|
}), zod.z.object({
|
@@ -1780,17 +1782,64 @@ var Api = {
|
|
1780
1782
|
})])
|
1781
1783
|
}
|
1782
1784
|
},
|
1785
|
+
"/profiles": {
|
1786
|
+
GET: {
|
1787
|
+
req: {
|
1788
|
+
cookies: {
|
1789
|
+
val_session: zod.z.string().optional()
|
1790
|
+
}
|
1791
|
+
},
|
1792
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1793
|
+
status: zod.z.literal(200),
|
1794
|
+
json: zod.z.object({
|
1795
|
+
profiles: zod.z.array(zod.z.object({
|
1796
|
+
profileId: zod.z.string(),
|
1797
|
+
fullName: zod.z.string(),
|
1798
|
+
avatar: zod.z.object({
|
1799
|
+
url: zod.z.string()
|
1800
|
+
}).nullable()
|
1801
|
+
}))
|
1802
|
+
})
|
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
|
+
})])
|
1829
|
+
}
|
1830
|
+
},
|
1783
1831
|
"/save": {
|
1784
1832
|
POST: {
|
1785
1833
|
req: {
|
1786
1834
|
body: zod.z.object({
|
1835
|
+
message: zod.z.string().optional(),
|
1787
1836
|
patchIds: zod.z.array(PatchId)
|
1788
1837
|
}),
|
1789
1838
|
cookies: {
|
1790
1839
|
val_session: zod.z.string().optional()
|
1791
1840
|
}
|
1792
1841
|
},
|
1793
|
-
res: zod.z.union([
|
1842
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1794
1843
|
status: zod.z.literal(200),
|
1795
1844
|
json: zod.z.object({}) // TODO:
|
1796
1845
|
}), zod.z.object({
|
@@ -1819,14 +1868,9 @@ var Api = {
|
|
1819
1868
|
patch_id: PatchId.optional()
|
1820
1869
|
}
|
1821
1870
|
},
|
1822
|
-
res: zod.z.union([zod.z.object({
|
1871
|
+
res: zod.z.union([unauthorizedResponse, notFoundResponse, zod.z.object({
|
1823
1872
|
status: zod.z.literal(200),
|
1824
1873
|
body: zod.z["instanceof"](ReadableStream)
|
1825
|
-
}), zod.z.object({
|
1826
|
-
status: zod.z.literal(404),
|
1827
|
-
json: zod.z.object({
|
1828
|
-
message: zod.z.string()
|
1829
|
-
})
|
1830
1874
|
})])
|
1831
1875
|
}
|
1832
1876
|
}
|
@@ -1965,7 +2009,7 @@ var createValClient = function createValClient(host) {
|
|
1965
2009
|
status: null,
|
1966
2010
|
json: {
|
1967
2011
|
type: "client_side_validation_error",
|
1968
|
-
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),
|
1969
2013
|
details: {
|
1970
2014
|
validationError: "Invalid content type",
|
1971
2015
|
data: {
|
@@ -1296,12 +1296,18 @@ var ValidationError = zod.z.object({
|
|
1296
1296
|
fatal: zod.z["boolean"]().optional(),
|
1297
1297
|
fixes: zod.z.array(ValidationFixZ).optional()
|
1298
1298
|
});
|
1299
|
-
var
|
1299
|
+
var unauthorizedResponse = zod.z.object({
|
1300
1300
|
status: zod.z.literal(401),
|
1301
1301
|
json: zod.z.object({
|
1302
1302
|
message: zod.z.string()
|
1303
1303
|
})
|
1304
1304
|
});
|
1305
|
+
var notFoundResponse = zod.z.object({
|
1306
|
+
status: zod.z.literal(404),
|
1307
|
+
json: zod.z.object({
|
1308
|
+
message: zod.z.string()
|
1309
|
+
})
|
1310
|
+
});
|
1305
1311
|
var GenericError = zod.z.object({
|
1306
1312
|
message: zod.z.string()
|
1307
1313
|
});
|
@@ -1571,6 +1577,9 @@ var Api = {
|
|
1571
1577
|
}), zod.z.object({
|
1572
1578
|
status: zod.z.literal(500),
|
1573
1579
|
json: GenericError
|
1580
|
+
}), zod.z.object({
|
1581
|
+
status: zod.z.literal(503),
|
1582
|
+
json: GenericError
|
1574
1583
|
}), zod.z.object({
|
1575
1584
|
status: zod.z.literal(200),
|
1576
1585
|
json: zod.z.union([zod.z.object({
|
@@ -1578,7 +1587,8 @@ var Api = {
|
|
1578
1587
|
baseSha: zod.z.string(),
|
1579
1588
|
schemaSha: zod.z.string(),
|
1580
1589
|
patches: zod.z.array(PatchId),
|
1581
|
-
config: ValConfig
|
1590
|
+
config: ValConfig,
|
1591
|
+
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs"), zod.z.literal("unknown")])
|
1582
1592
|
}), zod.z.object({
|
1583
1593
|
type: zod.z.literal("use-websocket"),
|
1584
1594
|
url: zod.z.string(),
|
@@ -1587,7 +1597,8 @@ var Api = {
|
|
1587
1597
|
schemaSha: zod.z.string(),
|
1588
1598
|
commitSha: zod.z.string(),
|
1589
1599
|
patches: zod.z.array(PatchId),
|
1590
|
-
config: ValConfig
|
1600
|
+
config: ValConfig,
|
1601
|
+
mode: zod.z.union([zod.z.literal("http"), zod.z.literal("fs"), zod.z.literal("unknown")])
|
1591
1602
|
})])
|
1592
1603
|
})])
|
1593
1604
|
}
|
@@ -1602,7 +1613,7 @@ var Api = {
|
|
1602
1613
|
val_session: zod.z.string().optional()
|
1603
1614
|
}
|
1604
1615
|
},
|
1605
|
-
res: zod.z.union([
|
1616
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1606
1617
|
status: zod.z.literal(500),
|
1607
1618
|
json: zod.z.object({
|
1608
1619
|
message: zod.z.string(),
|
@@ -1626,7 +1637,7 @@ var Api = {
|
|
1626
1637
|
val_session: zod.z.string().optional()
|
1627
1638
|
}
|
1628
1639
|
},
|
1629
|
-
res: zod.z.union([
|
1640
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1630
1641
|
status: zod.z.literal(409),
|
1631
1642
|
// conflict: i.e. not a head of patches
|
1632
1643
|
json: zod.z.object({
|
@@ -1653,16 +1664,14 @@ var Api = {
|
|
1653
1664
|
GET: {
|
1654
1665
|
req: {
|
1655
1666
|
query: {
|
1656
|
-
author: zod.z.array(zod.z.string()).optional(),
|
1657
1667
|
patch_id: zod.z.array(PatchId).optional(),
|
1658
|
-
|
1659
|
-
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()
|
1660
1669
|
},
|
1661
1670
|
cookies: {
|
1662
1671
|
val_session: zod.z.string().optional()
|
1663
1672
|
}
|
1664
1673
|
},
|
1665
|
-
res: zod.z.union([
|
1674
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1666
1675
|
status: zod.z.literal(500),
|
1667
1676
|
json: zod.z.object({
|
1668
1677
|
message: zod.z.string(),
|
@@ -1684,11 +1693,7 @@ var Api = {
|
|
1684
1693
|
createdAt: zod.z.string(),
|
1685
1694
|
authorId: zod.z.string().nullable(),
|
1686
1695
|
appliedAt: zod.z.object({
|
1687
|
-
|
1688
|
-
git: zod.z.object({
|
1689
|
-
commitSha: zod.z.string()
|
1690
|
-
}).optional(),
|
1691
|
-
timestamp: zod.z.string()
|
1696
|
+
commitSha: zod.z.string()
|
1692
1697
|
}).nullable()
|
1693
1698
|
})),
|
1694
1699
|
baseSha: zod.z.string(),
|
@@ -1705,7 +1710,7 @@ var Api = {
|
|
1705
1710
|
val_session: zod.z.string().optional()
|
1706
1711
|
}
|
1707
1712
|
},
|
1708
|
-
res: zod.z.union([
|
1713
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1709
1714
|
status: zod.z.literal(500),
|
1710
1715
|
json: zod.z.object({
|
1711
1716
|
message: zod.z.string(),
|
@@ -1730,9 +1735,6 @@ var Api = {
|
|
1730
1735
|
PUT: {
|
1731
1736
|
req: {
|
1732
1737
|
path: zod.z.string().optional(),
|
1733
|
-
body: zod.z.object({
|
1734
|
-
patchIds: zod.z.array(PatchId).optional()
|
1735
|
-
}).optional(),
|
1736
1738
|
query: {
|
1737
1739
|
validate_all: zod.z["boolean"]().optional(),
|
1738
1740
|
validate_sources: zod.z["boolean"]().optional(),
|
@@ -1742,7 +1744,7 @@ var Api = {
|
|
1742
1744
|
val_session: zod.z.string().optional()
|
1743
1745
|
}
|
1744
1746
|
},
|
1745
|
-
res: zod.z.union([
|
1747
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1746
1748
|
status: zod.z.literal(401),
|
1747
1749
|
json: GenericError
|
1748
1750
|
}), zod.z.object({
|
@@ -1780,17 +1782,64 @@ var Api = {
|
|
1780
1782
|
})])
|
1781
1783
|
}
|
1782
1784
|
},
|
1785
|
+
"/profiles": {
|
1786
|
+
GET: {
|
1787
|
+
req: {
|
1788
|
+
cookies: {
|
1789
|
+
val_session: zod.z.string().optional()
|
1790
|
+
}
|
1791
|
+
},
|
1792
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1793
|
+
status: zod.z.literal(200),
|
1794
|
+
json: zod.z.object({
|
1795
|
+
profiles: zod.z.array(zod.z.object({
|
1796
|
+
profileId: zod.z.string(),
|
1797
|
+
fullName: zod.z.string(),
|
1798
|
+
avatar: zod.z.object({
|
1799
|
+
url: zod.z.string()
|
1800
|
+
}).nullable()
|
1801
|
+
}))
|
1802
|
+
})
|
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
|
+
})])
|
1829
|
+
}
|
1830
|
+
},
|
1783
1831
|
"/save": {
|
1784
1832
|
POST: {
|
1785
1833
|
req: {
|
1786
1834
|
body: zod.z.object({
|
1835
|
+
message: zod.z.string().optional(),
|
1787
1836
|
patchIds: zod.z.array(PatchId)
|
1788
1837
|
}),
|
1789
1838
|
cookies: {
|
1790
1839
|
val_session: zod.z.string().optional()
|
1791
1840
|
}
|
1792
1841
|
},
|
1793
|
-
res: zod.z.union([
|
1842
|
+
res: zod.z.union([unauthorizedResponse, zod.z.object({
|
1794
1843
|
status: zod.z.literal(200),
|
1795
1844
|
json: zod.z.object({}) // TODO:
|
1796
1845
|
}), zod.z.object({
|
@@ -1819,14 +1868,9 @@ var Api = {
|
|
1819
1868
|
patch_id: PatchId.optional()
|
1820
1869
|
}
|
1821
1870
|
},
|
1822
|
-
res: zod.z.union([zod.z.object({
|
1871
|
+
res: zod.z.union([unauthorizedResponse, notFoundResponse, zod.z.object({
|
1823
1872
|
status: zod.z.literal(200),
|
1824
1873
|
body: zod.z["instanceof"](ReadableStream)
|
1825
|
-
}), zod.z.object({
|
1826
|
-
status: zod.z.literal(404),
|
1827
|
-
json: zod.z.object({
|
1828
|
-
message: zod.z.string()
|
1829
|
-
})
|
1830
1874
|
})])
|
1831
1875
|
}
|
1832
1876
|
}
|
@@ -1965,7 +2009,7 @@ var createValClient = function createValClient(host) {
|
|
1965
2009
|
status: null,
|
1966
2010
|
json: {
|
1967
2011
|
type: "client_side_validation_error",
|
1968
|
-
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),
|
1969
2013
|
details: {
|
1970
2014
|
validationError: "Invalid content type",
|
1971
2015
|
data: {
|
@@ -1292,12 +1292,18 @@ var ValidationError = z.object({
|
|
1292
1292
|
fatal: z["boolean"]().optional(),
|
1293
1293
|
fixes: z.array(ValidationFixZ).optional()
|
1294
1294
|
});
|
1295
|
-
var
|
1295
|
+
var unauthorizedResponse = z.object({
|
1296
1296
|
status: z.literal(401),
|
1297
1297
|
json: z.object({
|
1298
1298
|
message: z.string()
|
1299
1299
|
})
|
1300
1300
|
});
|
1301
|
+
var notFoundResponse = z.object({
|
1302
|
+
status: z.literal(404),
|
1303
|
+
json: z.object({
|
1304
|
+
message: z.string()
|
1305
|
+
})
|
1306
|
+
});
|
1301
1307
|
var GenericError = z.object({
|
1302
1308
|
message: z.string()
|
1303
1309
|
});
|
@@ -1567,6 +1573,9 @@ var Api = {
|
|
1567
1573
|
}), z.object({
|
1568
1574
|
status: z.literal(500),
|
1569
1575
|
json: GenericError
|
1576
|
+
}), z.object({
|
1577
|
+
status: z.literal(503),
|
1578
|
+
json: GenericError
|
1570
1579
|
}), z.object({
|
1571
1580
|
status: z.literal(200),
|
1572
1581
|
json: z.union([z.object({
|
@@ -1574,7 +1583,8 @@ var Api = {
|
|
1574
1583
|
baseSha: z.string(),
|
1575
1584
|
schemaSha: z.string(),
|
1576
1585
|
patches: z.array(PatchId),
|
1577
|
-
config: ValConfig
|
1586
|
+
config: ValConfig,
|
1587
|
+
mode: z.union([z.literal("http"), z.literal("fs"), z.literal("unknown")])
|
1578
1588
|
}), z.object({
|
1579
1589
|
type: z.literal("use-websocket"),
|
1580
1590
|
url: z.string(),
|
@@ -1583,7 +1593,8 @@ var Api = {
|
|
1583
1593
|
schemaSha: z.string(),
|
1584
1594
|
commitSha: z.string(),
|
1585
1595
|
patches: z.array(PatchId),
|
1586
|
-
config: ValConfig
|
1596
|
+
config: ValConfig,
|
1597
|
+
mode: z.union([z.literal("http"), z.literal("fs"), z.literal("unknown")])
|
1587
1598
|
})])
|
1588
1599
|
})])
|
1589
1600
|
}
|
@@ -1598,7 +1609,7 @@ var Api = {
|
|
1598
1609
|
val_session: z.string().optional()
|
1599
1610
|
}
|
1600
1611
|
},
|
1601
|
-
res: z.union([
|
1612
|
+
res: z.union([unauthorizedResponse, z.object({
|
1602
1613
|
status: z.literal(500),
|
1603
1614
|
json: z.object({
|
1604
1615
|
message: z.string(),
|
@@ -1622,7 +1633,7 @@ var Api = {
|
|
1622
1633
|
val_session: z.string().optional()
|
1623
1634
|
}
|
1624
1635
|
},
|
1625
|
-
res: z.union([
|
1636
|
+
res: z.union([unauthorizedResponse, z.object({
|
1626
1637
|
status: z.literal(409),
|
1627
1638
|
// conflict: i.e. not a head of patches
|
1628
1639
|
json: z.object({
|
@@ -1649,16 +1660,14 @@ var Api = {
|
|
1649
1660
|
GET: {
|
1650
1661
|
req: {
|
1651
1662
|
query: {
|
1652
|
-
author: z.array(z.string()).optional(),
|
1653
1663
|
patch_id: z.array(PatchId).optional(),
|
1654
|
-
|
1655
|
-
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()
|
1656
1665
|
},
|
1657
1666
|
cookies: {
|
1658
1667
|
val_session: z.string().optional()
|
1659
1668
|
}
|
1660
1669
|
},
|
1661
|
-
res: z.union([
|
1670
|
+
res: z.union([unauthorizedResponse, z.object({
|
1662
1671
|
status: z.literal(500),
|
1663
1672
|
json: z.object({
|
1664
1673
|
message: z.string(),
|
@@ -1680,11 +1689,7 @@ var Api = {
|
|
1680
1689
|
createdAt: z.string(),
|
1681
1690
|
authorId: z.string().nullable(),
|
1682
1691
|
appliedAt: z.object({
|
1683
|
-
|
1684
|
-
git: z.object({
|
1685
|
-
commitSha: z.string()
|
1686
|
-
}).optional(),
|
1687
|
-
timestamp: z.string()
|
1692
|
+
commitSha: z.string()
|
1688
1693
|
}).nullable()
|
1689
1694
|
})),
|
1690
1695
|
baseSha: z.string(),
|
@@ -1701,7 +1706,7 @@ var Api = {
|
|
1701
1706
|
val_session: z.string().optional()
|
1702
1707
|
}
|
1703
1708
|
},
|
1704
|
-
res: z.union([
|
1709
|
+
res: z.union([unauthorizedResponse, z.object({
|
1705
1710
|
status: z.literal(500),
|
1706
1711
|
json: z.object({
|
1707
1712
|
message: z.string(),
|
@@ -1726,9 +1731,6 @@ var Api = {
|
|
1726
1731
|
PUT: {
|
1727
1732
|
req: {
|
1728
1733
|
path: z.string().optional(),
|
1729
|
-
body: z.object({
|
1730
|
-
patchIds: z.array(PatchId).optional()
|
1731
|
-
}).optional(),
|
1732
1734
|
query: {
|
1733
1735
|
validate_all: z["boolean"]().optional(),
|
1734
1736
|
validate_sources: z["boolean"]().optional(),
|
@@ -1738,7 +1740,7 @@ var Api = {
|
|
1738
1740
|
val_session: z.string().optional()
|
1739
1741
|
}
|
1740
1742
|
},
|
1741
|
-
res: z.union([
|
1743
|
+
res: z.union([unauthorizedResponse, z.object({
|
1742
1744
|
status: z.literal(401),
|
1743
1745
|
json: GenericError
|
1744
1746
|
}), z.object({
|
@@ -1776,17 +1778,64 @@ var Api = {
|
|
1776
1778
|
})])
|
1777
1779
|
}
|
1778
1780
|
},
|
1781
|
+
"/profiles": {
|
1782
|
+
GET: {
|
1783
|
+
req: {
|
1784
|
+
cookies: {
|
1785
|
+
val_session: z.string().optional()
|
1786
|
+
}
|
1787
|
+
},
|
1788
|
+
res: z.union([unauthorizedResponse, z.object({
|
1789
|
+
status: z.literal(200),
|
1790
|
+
json: z.object({
|
1791
|
+
profiles: z.array(z.object({
|
1792
|
+
profileId: z.string(),
|
1793
|
+
fullName: z.string(),
|
1794
|
+
avatar: z.object({
|
1795
|
+
url: z.string()
|
1796
|
+
}).nullable()
|
1797
|
+
}))
|
1798
|
+
})
|
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
|
+
})])
|
1825
|
+
}
|
1826
|
+
},
|
1779
1827
|
"/save": {
|
1780
1828
|
POST: {
|
1781
1829
|
req: {
|
1782
1830
|
body: z.object({
|
1831
|
+
message: z.string().optional(),
|
1783
1832
|
patchIds: z.array(PatchId)
|
1784
1833
|
}),
|
1785
1834
|
cookies: {
|
1786
1835
|
val_session: z.string().optional()
|
1787
1836
|
}
|
1788
1837
|
},
|
1789
|
-
res: z.union([
|
1838
|
+
res: z.union([unauthorizedResponse, z.object({
|
1790
1839
|
status: z.literal(200),
|
1791
1840
|
json: z.object({}) // TODO:
|
1792
1841
|
}), z.object({
|
@@ -1815,14 +1864,9 @@ var Api = {
|
|
1815
1864
|
patch_id: PatchId.optional()
|
1816
1865
|
}
|
1817
1866
|
},
|
1818
|
-
res: z.union([z.object({
|
1867
|
+
res: z.union([unauthorizedResponse, notFoundResponse, z.object({
|
1819
1868
|
status: z.literal(200),
|
1820
1869
|
body: z["instanceof"](ReadableStream)
|
1821
|
-
}), z.object({
|
1822
|
-
status: z.literal(404),
|
1823
|
-
json: z.object({
|
1824
|
-
message: z.string()
|
1825
|
-
})
|
1826
1870
|
})])
|
1827
1871
|
}
|
1828
1872
|
}
|
@@ -1961,7 +2005,7 @@ var createValClient = function createValClient(host) {
|
|
1961
2005
|
status: null,
|
1962
2006
|
json: {
|
1963
2007
|
type: "client_side_validation_error",
|
1964
|
-
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),
|
1965
2009
|
details: {
|
1966
2010
|
validationError: "Invalid content type",
|
1967
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
|
},
|