@peasant-labs/schema 0.48.0 → 0.50.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.
- package/dist/fixtures/session-graph.d.ts +45 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/internal/generated/contract/zod.gen.d.ts +1030 -23
- package/dist/internal/generated/contract/zod.gen.js +344 -2
- package/dist/internal/generated/enums.gen.d.ts +201 -29
- package/dist/internal/generated/enums.gen.js +189 -2
- package/dist/internal/generated/kickstart-limits.gen.d.ts +1 -0
- package/dist/internal/generated/kickstart-limits.gen.js +2 -0
- package/dist/internal/generated/local-api.d.ts +954 -96
- package/dist/internal/generated/public-contract.gen.d.ts +2 -2
- package/dist/internal/generated/public-contract.gen.js +1 -1
- package/dist/internal/generated/session-graph-fixtures.gen.d.ts +45 -1
- package/dist/internal/generated/session-graph-fixtures.gen.js +50 -0
- package/dist/internal/generated/versions.gen.d.ts +2 -2
- package/dist/internal/generated/versions.gen.js +2 -2
- package/dist/local-api.d.ts +1 -1
- package/dist/local-api.js +1 -1
- package/package.json +1 -1
|
@@ -369,7 +369,8 @@ export const zChannelTopic = z.enum([
|
|
|
369
369
|
'trends',
|
|
370
370
|
'quality',
|
|
371
371
|
'annotations',
|
|
372
|
-
'project_familiarity'
|
|
372
|
+
'project_familiarity',
|
|
373
|
+
'kickstart'
|
|
373
374
|
]);
|
|
374
375
|
export const zChannelSubscription = z.object({
|
|
375
376
|
axis: zAnnotationAxis.optional(),
|
|
@@ -874,6 +875,275 @@ export const zLocalContributionEvidenceKind = z.enum([
|
|
|
874
875
|
'receipts',
|
|
875
876
|
'operation-diagnostics'
|
|
876
877
|
]);
|
|
878
|
+
/**
|
|
879
|
+
* Kickstart Close Reason
|
|
880
|
+
*
|
|
881
|
+
* Why a kickstart session ended: committed or expired
|
|
882
|
+
*/
|
|
883
|
+
export const zLocalKickstartCloseReason = z.enum(['committed', 'expired']);
|
|
884
|
+
export const zLocalKickstartConnect = z.object({
|
|
885
|
+
afterStop: z.string().optional(),
|
|
886
|
+
offered: z.boolean(),
|
|
887
|
+
prompt: z.string().optional(),
|
|
888
|
+
skip: z.string().optional()
|
|
889
|
+
}).strict();
|
|
890
|
+
/**
|
|
891
|
+
* Kickstart Connect Answer
|
|
892
|
+
*
|
|
893
|
+
* Boundary offer answer: accept or skip. accept requires village to be connected
|
|
894
|
+
*/
|
|
895
|
+
export const zLocalKickstartConnectAnswer = z.enum(['accept', 'skip']);
|
|
896
|
+
/**
|
|
897
|
+
* Kickstart Diff Line Type
|
|
898
|
+
*
|
|
899
|
+
* Structured config-diff line: add, del, or ctx
|
|
900
|
+
*/
|
|
901
|
+
export const zLocalKickstartDiffLineType = z.enum([
|
|
902
|
+
'add',
|
|
903
|
+
'del',
|
|
904
|
+
'ctx'
|
|
905
|
+
]);
|
|
906
|
+
export const zLocalKickstartDiffLine = z.object({
|
|
907
|
+
newNo: z.int().gte(0).optional(),
|
|
908
|
+
oldNo: z.int().gte(0).optional(),
|
|
909
|
+
text: z.string(),
|
|
910
|
+
type: zLocalKickstartDiffLineType
|
|
911
|
+
}).strict();
|
|
912
|
+
/**
|
|
913
|
+
* Kickstart Error Code
|
|
914
|
+
*
|
|
915
|
+
* Machine-readable reason a kickstart route refused a request or could not finish it. Each token answers with one HTTP status
|
|
916
|
+
*/
|
|
917
|
+
export const zLocalKickstartErrorCode = z.enum([
|
|
918
|
+
'kickstart_body_missing',
|
|
919
|
+
'kickstart_body_invalid',
|
|
920
|
+
'kickstart_scope_invalid',
|
|
921
|
+
'kickstart_answers_invalid',
|
|
922
|
+
'kickstart_session_committing',
|
|
923
|
+
'kickstart_revision_ahead',
|
|
924
|
+
'kickstart_answer_refused',
|
|
925
|
+
'kickstart_scan_not_done',
|
|
926
|
+
'kickstart_field_unknown',
|
|
927
|
+
'kickstart_field_out_of_scope',
|
|
928
|
+
'kickstart_field_hidden',
|
|
929
|
+
'kickstart_tree_answer_shape',
|
|
930
|
+
'kickstart_connect_out_of_scope',
|
|
931
|
+
'kickstart_connect_not_connected',
|
|
932
|
+
'kickstart_connect_unknown',
|
|
933
|
+
'kickstart_commit_refused',
|
|
934
|
+
'kickstart_session_not_found',
|
|
935
|
+
'kickstart_preview_row_not_found',
|
|
936
|
+
'kickstart_failed',
|
|
937
|
+
'kickstart_status_unreadable',
|
|
938
|
+
'kickstart_config_unreadable',
|
|
939
|
+
'kickstart_config_unwritable',
|
|
940
|
+
'kickstart_session_unbuildable',
|
|
941
|
+
'kickstart_answer_unencodable',
|
|
942
|
+
'kickstart_preview_unreadable',
|
|
943
|
+
'publishing_contract_breach',
|
|
944
|
+
'kickstart_unavailable',
|
|
945
|
+
'kickstart_config_busy',
|
|
946
|
+
'kickstart_config_changing'
|
|
947
|
+
]);
|
|
948
|
+
export const zLocalKickstartErrorResponse = z.object({
|
|
949
|
+
code: zLocalKickstartErrorCode,
|
|
950
|
+
error: z.string().min(1)
|
|
951
|
+
}).strict();
|
|
952
|
+
/**
|
|
953
|
+
* Kickstart Event Kind
|
|
954
|
+
*
|
|
955
|
+
* Live kickstart topic discriminator. One event carries one session id
|
|
956
|
+
*/
|
|
957
|
+
export const zLocalKickstartEventKind = z.enum([
|
|
958
|
+
'session',
|
|
959
|
+
'answers',
|
|
960
|
+
'conflicts',
|
|
961
|
+
'scan',
|
|
962
|
+
'ingest',
|
|
963
|
+
'closed'
|
|
964
|
+
]);
|
|
965
|
+
/**
|
|
966
|
+
* Kickstart Field Kind
|
|
967
|
+
*
|
|
968
|
+
* Control shape of one kickstart field
|
|
969
|
+
*/
|
|
970
|
+
export const zLocalKickstartFieldKind = z.enum([
|
|
971
|
+
'toggle',
|
|
972
|
+
'choice',
|
|
973
|
+
'action',
|
|
974
|
+
'tree',
|
|
975
|
+
'notice'
|
|
976
|
+
]);
|
|
977
|
+
export const zLocalKickstartGuide = z.object({
|
|
978
|
+
hints: z.array(z.string()).optional(),
|
|
979
|
+
intro: z.string().optional()
|
|
980
|
+
}).strict();
|
|
981
|
+
export const zLocalKickstartHunk = z.object({
|
|
982
|
+
header: z.string().min(1),
|
|
983
|
+
lines: z.array(zLocalKickstartDiffLine)
|
|
984
|
+
}).strict();
|
|
985
|
+
export const zLocalKickstartDiff = z.object({
|
|
986
|
+
file: z.string().min(1),
|
|
987
|
+
hunks: z.array(zLocalKickstartHunk),
|
|
988
|
+
truncated: z.boolean().optional()
|
|
989
|
+
}).strict();
|
|
990
|
+
/**
|
|
991
|
+
* Kickstart Ingest State
|
|
992
|
+
*
|
|
993
|
+
* Import state pushed on the kickstart topic
|
|
994
|
+
*/
|
|
995
|
+
export const zLocalKickstartIngestState = z.enum([
|
|
996
|
+
'idle',
|
|
997
|
+
'running',
|
|
998
|
+
'busy',
|
|
999
|
+
'failed'
|
|
1000
|
+
]);
|
|
1001
|
+
export const zLocalKickstartIngest = z.object({
|
|
1002
|
+
error: z.string().optional(),
|
|
1003
|
+
new: z.int().gte(0),
|
|
1004
|
+
note: z.string().optional(),
|
|
1005
|
+
state: zLocalKickstartIngestState,
|
|
1006
|
+
updated: z.int().gte(0)
|
|
1007
|
+
}).strict();
|
|
1008
|
+
/**
|
|
1009
|
+
* Kickstart Line Kind
|
|
1010
|
+
*
|
|
1011
|
+
* Typed preview or example line
|
|
1012
|
+
*/
|
|
1013
|
+
export const zLocalKickstartLineKind = z.enum([
|
|
1014
|
+
'text',
|
|
1015
|
+
'label',
|
|
1016
|
+
'before',
|
|
1017
|
+
'after',
|
|
1018
|
+
'spacer'
|
|
1019
|
+
]);
|
|
1020
|
+
export const zLocalKickstartLine = z.object({
|
|
1021
|
+
kind: zLocalKickstartLineKind,
|
|
1022
|
+
text: z.string()
|
|
1023
|
+
}).strict();
|
|
1024
|
+
/**
|
|
1025
|
+
* Kickstart Next Step
|
|
1026
|
+
*
|
|
1027
|
+
* One finish action. auto-publish-settings links to the settings section; it does not install a hook
|
|
1028
|
+
*/
|
|
1029
|
+
export const zLocalKickstartNextStep = z.enum([
|
|
1030
|
+
'config',
|
|
1031
|
+
'web-start',
|
|
1032
|
+
'village-login',
|
|
1033
|
+
'village-push',
|
|
1034
|
+
'auto-publish-settings'
|
|
1035
|
+
]);
|
|
1036
|
+
export const zLocalKickstartCommitted = z.object({
|
|
1037
|
+
configPath: z.string().min(1),
|
|
1038
|
+
diagnostics: z.array(z.string()).optional(),
|
|
1039
|
+
ingest: zLocalKickstartIngest,
|
|
1040
|
+
nextSteps: z.array(zLocalKickstartNextStep),
|
|
1041
|
+
saved: z.boolean()
|
|
1042
|
+
}).strict();
|
|
1043
|
+
/**
|
|
1044
|
+
* Kickstart Node Kind
|
|
1045
|
+
*
|
|
1046
|
+
* Row kind in the selection forest
|
|
1047
|
+
*/
|
|
1048
|
+
export const zLocalKickstartNodeKind = z.enum([
|
|
1049
|
+
'project',
|
|
1050
|
+
'group',
|
|
1051
|
+
'branch',
|
|
1052
|
+
'session'
|
|
1053
|
+
]);
|
|
1054
|
+
/**
|
|
1055
|
+
* Kickstart Node State
|
|
1056
|
+
*
|
|
1057
|
+
* Server-computed selection of one forest row: none, some, or all. locked is a boolean, not a state
|
|
1058
|
+
*/
|
|
1059
|
+
export const zLocalKickstartNodeState = z.enum([
|
|
1060
|
+
'none',
|
|
1061
|
+
'some',
|
|
1062
|
+
'all'
|
|
1063
|
+
]);
|
|
1064
|
+
export const zLocalKickstartNode = z.object({
|
|
1065
|
+
childCount: z.int().gte(0).optional(),
|
|
1066
|
+
harness: z.string().optional(),
|
|
1067
|
+
id: z.string().min(1),
|
|
1068
|
+
kind: zLocalKickstartNodeKind,
|
|
1069
|
+
label: z.string().min(1),
|
|
1070
|
+
locked: z.boolean().optional(),
|
|
1071
|
+
parentId: z.string().optional(),
|
|
1072
|
+
sessionId: z.string().optional(),
|
|
1073
|
+
state: zLocalKickstartNodeState
|
|
1074
|
+
}).strict();
|
|
1075
|
+
export const zLocalKickstartOption = z.object({
|
|
1076
|
+
description: z.string().optional(),
|
|
1077
|
+
label: z.string(),
|
|
1078
|
+
value: z.string()
|
|
1079
|
+
}).strict();
|
|
1080
|
+
export const zLocalKickstartPreview = z.object({
|
|
1081
|
+
lines: z.array(zLocalKickstartLine)
|
|
1082
|
+
}).strict();
|
|
1083
|
+
/**
|
|
1084
|
+
* Kickstart Resolution
|
|
1085
|
+
*
|
|
1086
|
+
* Which side of one conflict row to keep: mine is the draft, theirs is the file
|
|
1087
|
+
*/
|
|
1088
|
+
export const zLocalKickstartResolution = z.enum(['mine', 'theirs']);
|
|
1089
|
+
/**
|
|
1090
|
+
* Kickstart Scan State
|
|
1091
|
+
*
|
|
1092
|
+
* Discovery job state pushed on the kickstart topic
|
|
1093
|
+
*/
|
|
1094
|
+
export const zLocalKickstartScanState = z.enum([
|
|
1095
|
+
'idle',
|
|
1096
|
+
'running',
|
|
1097
|
+
'done',
|
|
1098
|
+
'error'
|
|
1099
|
+
]);
|
|
1100
|
+
export const zLocalKickstartScan = z.object({
|
|
1101
|
+
done: z.int().gte(0),
|
|
1102
|
+
droppedLabels: z.array(z.string()).max(3).optional(),
|
|
1103
|
+
droppedSelections: z.int().gte(0).optional(),
|
|
1104
|
+
error: z.string().optional(),
|
|
1105
|
+
lockedNodes: z.int().gte(0).optional(),
|
|
1106
|
+
notice: z.string().regex(/\S/).optional(),
|
|
1107
|
+
phase: z.string().optional(),
|
|
1108
|
+
state: zLocalKickstartScanState,
|
|
1109
|
+
total: z.int().gte(0)
|
|
1110
|
+
}).strict();
|
|
1111
|
+
/**
|
|
1112
|
+
* Kickstart Scope
|
|
1113
|
+
*
|
|
1114
|
+
* Answer set a kickstart session collects: the whole wizard, or the selection page
|
|
1115
|
+
*/
|
|
1116
|
+
export const zLocalKickstartScope = z.enum(['full', 'selection']);
|
|
1117
|
+
export const zLocalKickstartOpenRequest = z.object({
|
|
1118
|
+
scope: zLocalKickstartScope
|
|
1119
|
+
}).strict();
|
|
1120
|
+
export const zLocalKickstartStatus = z.object({
|
|
1121
|
+
activeSessionId: z.string().optional(),
|
|
1122
|
+
configured: z.boolean()
|
|
1123
|
+
}).strict();
|
|
1124
|
+
/**
|
|
1125
|
+
* Kickstart Stop Kind
|
|
1126
|
+
*
|
|
1127
|
+
* Layout of one kickstart stop
|
|
1128
|
+
*/
|
|
1129
|
+
export const zLocalKickstartStopKind = z.enum([
|
|
1130
|
+
'connection',
|
|
1131
|
+
'config',
|
|
1132
|
+
'review',
|
|
1133
|
+
'ingest'
|
|
1134
|
+
]);
|
|
1135
|
+
export const zLocalKickstartSummary = z.object({
|
|
1136
|
+
effects: z.array(z.string()),
|
|
1137
|
+
values: z.array(z.string())
|
|
1138
|
+
}).strict();
|
|
1139
|
+
export const zLocalKickstartTree = z.object({
|
|
1140
|
+
nodes: z.array(zLocalKickstartNode)
|
|
1141
|
+
}).strict();
|
|
1142
|
+
export const zLocalKickstartVillage = z.object({
|
|
1143
|
+
connected: z.boolean(),
|
|
1144
|
+
url: z.string().optional(),
|
|
1145
|
+
userId: z.string().optional()
|
|
1146
|
+
}).strict();
|
|
877
1147
|
/**
|
|
878
1148
|
* Local Operation Diagnostic Outcome
|
|
879
1149
|
*
|
|
@@ -919,6 +1189,77 @@ export const zLocalSettingValue = z.union([
|
|
|
919
1189
|
z.array(z.unknown()),
|
|
920
1190
|
z.record(z.string(), z.unknown())
|
|
921
1191
|
]).nullable();
|
|
1192
|
+
export const zLocalKickstartAnswers = z.object({
|
|
1193
|
+
connectAnswer: zLocalKickstartConnectAnswer.optional(),
|
|
1194
|
+
resolutions: z.record(z.string(), zLocalKickstartResolution).optional(),
|
|
1195
|
+
revision: z.int().gte(0),
|
|
1196
|
+
selectedIds: z.array(z.string()).optional(),
|
|
1197
|
+
values: z.record(z.string(), zLocalSettingValue).optional()
|
|
1198
|
+
}).strict();
|
|
1199
|
+
export const zLocalKickstartConflict = z.object({
|
|
1200
|
+
field: z.string().min(1),
|
|
1201
|
+
label: z.string().min(1),
|
|
1202
|
+
mine: zLocalSettingValue,
|
|
1203
|
+
stop: z.string().min(1),
|
|
1204
|
+
theirs: zLocalSettingValue
|
|
1205
|
+
}).strict();
|
|
1206
|
+
export const zLocalKickstartCommitRefusal = z.object({
|
|
1207
|
+
conflicts: z.array(zLocalKickstartConflict),
|
|
1208
|
+
error: z.string().min(1)
|
|
1209
|
+
}).strict();
|
|
1210
|
+
export const zLocalKickstartField = z.object({
|
|
1211
|
+
description: z.string().optional(),
|
|
1212
|
+
example: z.array(zLocalKickstartLine).optional(),
|
|
1213
|
+
key: z.string().min(1),
|
|
1214
|
+
kind: zLocalKickstartFieldKind,
|
|
1215
|
+
label: z.string().min(1),
|
|
1216
|
+
options: z.array(zLocalKickstartOption).optional(),
|
|
1217
|
+
refusal: zLocalSettingRefusal.optional(),
|
|
1218
|
+
value: zLocalSettingValue
|
|
1219
|
+
}).strict();
|
|
1220
|
+
export const zLocalKickstartOverwrite = z.object({
|
|
1221
|
+
key: z.string().min(1),
|
|
1222
|
+
previous: zLocalSettingValue,
|
|
1223
|
+
revision: z.int().gte(0)
|
|
1224
|
+
}).strict();
|
|
1225
|
+
export const zLocalKickstartStop = z.object({
|
|
1226
|
+
diff: zLocalKickstartDiff.optional(),
|
|
1227
|
+
fields: z.array(zLocalKickstartField),
|
|
1228
|
+
guide: zLocalKickstartGuide,
|
|
1229
|
+
hiddenBecause: z.string().optional(),
|
|
1230
|
+
key: z.string().min(1),
|
|
1231
|
+
kind: zLocalKickstartStopKind,
|
|
1232
|
+
summary: zLocalKickstartSummary.optional(),
|
|
1233
|
+
title: z.string().min(1),
|
|
1234
|
+
visible: z.boolean()
|
|
1235
|
+
}).strict();
|
|
1236
|
+
export const zLocalKickstartSession = z.object({
|
|
1237
|
+
conflicts: z.array(zLocalKickstartConflict),
|
|
1238
|
+
connect: zLocalKickstartConnect,
|
|
1239
|
+
id: z.string().min(1),
|
|
1240
|
+
openedAt: z.string().min(1),
|
|
1241
|
+
revision: z.int().gte(0),
|
|
1242
|
+
scan: zLocalKickstartScan,
|
|
1243
|
+
scope: zLocalKickstartScope,
|
|
1244
|
+
stops: z.array(zLocalKickstartStop),
|
|
1245
|
+
village: zLocalKickstartVillage
|
|
1246
|
+
}).strict();
|
|
1247
|
+
export const zLocalKickstartEvent = z.object({
|
|
1248
|
+
committed: zLocalKickstartCommitted.optional(),
|
|
1249
|
+
ingest: zLocalKickstartIngest.optional(),
|
|
1250
|
+
kind: zLocalKickstartEventKind,
|
|
1251
|
+
reason: zLocalKickstartCloseReason.optional(),
|
|
1252
|
+
revision: z.int().gte(0),
|
|
1253
|
+
scan: zLocalKickstartScan.optional(),
|
|
1254
|
+
sessionId: z.string().min(1),
|
|
1255
|
+
view: zLocalKickstartSession.optional()
|
|
1256
|
+
}).strict();
|
|
1257
|
+
export const zLocalKickstartPatchResult = z.object({
|
|
1258
|
+
overwritten: z.array(zLocalKickstartOverwrite).optional(),
|
|
1259
|
+
revision: z.int().gte(0),
|
|
1260
|
+
stale: z.boolean(),
|
|
1261
|
+
view: zLocalKickstartSession.optional()
|
|
1262
|
+
}).strict();
|
|
922
1263
|
export const zLocalSetting = z.object({
|
|
923
1264
|
description: z.string().optional(),
|
|
924
1265
|
editable: z.boolean(),
|
|
@@ -994,7 +1335,8 @@ export const zMessageType = z.enum([
|
|
|
994
1335
|
'annotations',
|
|
995
1336
|
'project_familiarity',
|
|
996
1337
|
'connected',
|
|
997
|
-
'error'
|
|
1338
|
+
'error',
|
|
1339
|
+
'kickstart'
|
|
998
1340
|
]);
|
|
999
1341
|
export const zClientMessage = z.object({
|
|
1000
1342
|
channels: z.array(zChannelSubscription).optional(),
|