@sealkeeper/schema 0.4.1 → 0.4.3

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/api.d.ts CHANGED
@@ -111,6 +111,7 @@ export declare const DeleteAgentBody: z.ZodUnion<readonly [z.ZodObject<{
111
111
  envelope: z.ZodString;
112
112
  }, z.core.$strict>, z.ZodObject<{}, z.core.$strict>]>;
113
113
  export type DeleteAgentBody = z.infer<typeof DeleteAgentBody>;
114
+ export declare const GithubLogin: z.ZodString;
114
115
  export declare const AgentHandleParams: z.ZodObject<{
115
116
  login: z.ZodString;
116
117
  name: z.ZodString;
@@ -125,7 +126,6 @@ export declare const AgentRenamedResponse: z.ZodObject<{
125
126
  handle: z.ZodString;
126
127
  }, z.core.$strict>;
127
128
  export type AgentRenamedResponse = z.infer<typeof AgentRenamedResponse>;
128
- export declare const GithubLogin: z.ZodString;
129
129
  export type AgentsCursor = {
130
130
  createdAtMicros: string;
131
131
  id: string;
@@ -266,6 +266,8 @@ export declare const EventsBatchResponse: z.ZodObject<{
266
266
  duplicates: z.ZodInt;
267
267
  }, z.core.$strict>;
268
268
  export type EventsBatchResponse = z.infer<typeof EventsBatchResponse>;
269
+ export declare const AgentRef: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
270
+ export type AgentRef = z.infer<typeof AgentRef>;
269
271
  export declare const PostTaskRequest: z.ZodObject<{
270
272
  taskId: z.ZodUUID;
271
273
  taskType: z.ZodString;
@@ -280,12 +282,22 @@ export declare const PostTaskRequest: z.ZodObject<{
280
282
  kind: z.ZodLiteral<"counterparty">;
281
283
  }, z.core.$strict>], "kind">;
282
284
  expiresAt: z.ZodOptional<z.ZodISODateTime>;
285
+ assignee: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
283
286
  }, z.core.$strict>;
284
287
  export type PostTaskRequest = z.infer<typeof PostTaskRequest>;
288
+ export declare const TaskAssignee: z.ZodObject<{
289
+ id: z.ZodString;
290
+ handle: z.ZodString;
291
+ }, z.core.$strict>;
292
+ export type TaskAssignee = z.infer<typeof TaskAssignee>;
285
293
  export declare const TaskResponse: z.ZodObject<{
286
294
  id: z.ZodUUID;
287
295
  posterAgentId: z.ZodString;
288
296
  claimantAgentId: z.ZodNullable<z.ZodString>;
297
+ assignee: z.ZodOptional<z.ZodNullable<z.ZodObject<{
298
+ id: z.ZodString;
299
+ handle: z.ZodString;
300
+ }, z.core.$strict>>>;
289
301
  taskType: z.ZodString;
290
302
  spec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
291
303
  verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -330,6 +342,69 @@ export declare const TaskOutcomeRequest: z.ZodObject<{
330
342
  evidenceHash: z.ZodOptional<z.ZodString>;
331
343
  }, z.core.$strict>;
332
344
  export type TaskOutcomeRequest = z.infer<typeof TaskOutcomeRequest>;
345
+ export declare const TASK_READ_MAX_AGE_SEC = 300;
346
+ export declare const TaskSubmissionRequest: z.ZodObject<{
347
+ taskId: z.ZodUUID;
348
+ issuedAt: z.ZodISODateTime;
349
+ }, z.core.$strict>;
350
+ export type TaskSubmissionRequest = z.infer<typeof TaskSubmissionRequest>;
351
+ export declare const TaskReports: z.ZodObject<{
352
+ poster: z.ZodNullable<z.ZodEnum<{
353
+ failure: "failure";
354
+ success: "success";
355
+ }>>;
356
+ claimant: z.ZodNullable<z.ZodEnum<{
357
+ failure: "failure";
358
+ success: "success";
359
+ }>>;
360
+ }, z.core.$strict>;
361
+ export type TaskReports = z.infer<typeof TaskReports>;
362
+ export declare const TaskSubmissionResponse: z.ZodObject<{
363
+ task: z.ZodObject<{
364
+ id: z.ZodUUID;
365
+ posterAgentId: z.ZodString;
366
+ claimantAgentId: z.ZodNullable<z.ZodString>;
367
+ assignee: z.ZodOptional<z.ZodNullable<z.ZodObject<{
368
+ id: z.ZodString;
369
+ handle: z.ZodString;
370
+ }, z.core.$strict>>>;
371
+ taskType: z.ZodString;
372
+ spec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
373
+ verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
374
+ kind: z.ZodLiteral<"hash">;
375
+ sha256: z.ZodString;
376
+ }, z.core.$strict>, z.ZodObject<{
377
+ kind: z.ZodLiteral<"schema">;
378
+ jsonSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
379
+ }, z.core.$strict>, z.ZodObject<{
380
+ kind: z.ZodLiteral<"counterparty">;
381
+ }, z.core.$strict>], "kind">;
382
+ state: z.ZodEnum<{
383
+ claimed: "claimed";
384
+ expired: "expired";
385
+ open: "open";
386
+ submitted: "submitted";
387
+ verified: "verified";
388
+ }>;
389
+ postedAt: z.ZodISODateTime;
390
+ claimedAt: z.ZodNullable<z.ZodISODateTime>;
391
+ submittedAt: z.ZodNullable<z.ZodISODateTime>;
392
+ verifiedAt: z.ZodNullable<z.ZodISODateTime>;
393
+ expiresAt: z.ZodISODateTime;
394
+ submission: z.ZodOptional<z.ZodString>;
395
+ }, z.core.$strict>;
396
+ reports: z.ZodObject<{
397
+ poster: z.ZodNullable<z.ZodEnum<{
398
+ failure: "failure";
399
+ success: "success";
400
+ }>>;
401
+ claimant: z.ZodNullable<z.ZodEnum<{
402
+ failure: "failure";
403
+ success: "success";
404
+ }>>;
405
+ }, z.core.$strict>;
406
+ }, z.core.$strict>;
407
+ export type TaskSubmissionResponse = z.infer<typeof TaskSubmissionResponse>;
333
408
  export declare const ListTasksQuery: z.ZodObject<{
334
409
  state: z.ZodDefault<z.ZodEnum<{
335
410
  claimed: "claimed";
@@ -339,6 +414,7 @@ export declare const ListTasksQuery: z.ZodObject<{
339
414
  verified: "verified";
340
415
  }>>;
341
416
  taskType: z.ZodOptional<z.ZodString>;
417
+ assignee: z.ZodOptional<z.ZodString>;
342
418
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
343
419
  }, z.core.$strict>;
344
420
  export type ListTasksQuery = z.infer<typeof ListTasksQuery>;
@@ -347,6 +423,10 @@ export declare const ListTasksResponse: z.ZodObject<{
347
423
  id: z.ZodUUID;
348
424
  posterAgentId: z.ZodString;
349
425
  claimantAgentId: z.ZodNullable<z.ZodString>;
426
+ assignee: z.ZodOptional<z.ZodNullable<z.ZodObject<{
427
+ id: z.ZodString;
428
+ handle: z.ZodString;
429
+ }, z.core.$strict>>>;
350
430
  taskType: z.ZodString;
351
431
  spec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
352
432
  verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -374,6 +454,129 @@ export declare const ListTasksResponse: z.ZodObject<{
374
454
  }, z.core.$strict>>;
375
455
  }, z.core.$strict>;
376
456
  export type ListTasksResponse = z.infer<typeof ListTasksResponse>;
457
+ export type TasksCursor = {
458
+ atMicros: string;
459
+ id: string;
460
+ };
461
+ export declare function encodeTasksCursor(cursor: TasksCursor): string;
462
+ export declare function decodeTasksCursor(raw: string): TasksCursor | null;
463
+ export declare const TaskBoardQuery: z.ZodObject<{
464
+ taskType: z.ZodOptional<z.ZodString>;
465
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
466
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<TasksCursor, string>>>;
467
+ }, z.core.$strict>;
468
+ export type TaskBoardQuery = z.infer<typeof TaskBoardQuery>;
469
+ export declare const AgentTaskRole: z.ZodEnum<{
470
+ claimant: "claimant";
471
+ poster: "poster";
472
+ }>;
473
+ export type AgentTaskRole = z.infer<typeof AgentTaskRole>;
474
+ export declare const AgentTasksQuery: z.ZodObject<{
475
+ role: z.ZodEnum<{
476
+ claimant: "claimant";
477
+ poster: "poster";
478
+ }>;
479
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
480
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<TasksCursor, string>>>;
481
+ }, z.core.$strict>;
482
+ export type AgentTasksQuery = z.infer<typeof AgentTasksQuery>;
483
+ export declare const TaskParty: z.ZodObject<{
484
+ id: z.ZodString;
485
+ handle: z.ZodString;
486
+ operatedBySealKeeper: z.ZodBoolean;
487
+ }, z.core.$strict>;
488
+ export type TaskParty = z.infer<typeof TaskParty>;
489
+ export declare const TaskView: z.ZodObject<{
490
+ id: z.ZodUUID;
491
+ taskType: z.ZodString;
492
+ spec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
493
+ verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
494
+ kind: z.ZodLiteral<"hash">;
495
+ sha256: z.ZodString;
496
+ }, z.core.$strict>, z.ZodObject<{
497
+ kind: z.ZodLiteral<"schema">;
498
+ jsonSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
499
+ }, z.core.$strict>, z.ZodObject<{
500
+ kind: z.ZodLiteral<"counterparty">;
501
+ }, z.core.$strict>], "kind">;
502
+ state: z.ZodEnum<{
503
+ claimed: "claimed";
504
+ expired: "expired";
505
+ open: "open";
506
+ submitted: "submitted";
507
+ verified: "verified";
508
+ }>;
509
+ poster: z.ZodObject<{
510
+ id: z.ZodString;
511
+ handle: z.ZodString;
512
+ operatedBySealKeeper: z.ZodBoolean;
513
+ }, z.core.$strict>;
514
+ claimant: z.ZodNullable<z.ZodObject<{
515
+ id: z.ZodString;
516
+ handle: z.ZodString;
517
+ operatedBySealKeeper: z.ZodBoolean;
518
+ }, z.core.$strict>>;
519
+ assignee: z.ZodNullable<z.ZodObject<{
520
+ id: z.ZodString;
521
+ handle: z.ZodString;
522
+ operatedBySealKeeper: z.ZodBoolean;
523
+ }, z.core.$strict>>;
524
+ countsForTrust: z.ZodNullable<z.ZodBoolean>;
525
+ evidenceWeight: z.ZodNullable<z.ZodNumber>;
526
+ postedAt: z.ZodISODateTime;
527
+ claimedAt: z.ZodNullable<z.ZodISODateTime>;
528
+ submittedAt: z.ZodNullable<z.ZodISODateTime>;
529
+ verifiedAt: z.ZodNullable<z.ZodISODateTime>;
530
+ expiresAt: z.ZodISODateTime;
531
+ }, z.core.$strict>;
532
+ export type TaskView = z.infer<typeof TaskView>;
533
+ export declare const TaskViewsResponse: z.ZodObject<{
534
+ tasks: z.ZodArray<z.ZodObject<{
535
+ id: z.ZodUUID;
536
+ taskType: z.ZodString;
537
+ spec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
538
+ verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
539
+ kind: z.ZodLiteral<"hash">;
540
+ sha256: z.ZodString;
541
+ }, z.core.$strict>, z.ZodObject<{
542
+ kind: z.ZodLiteral<"schema">;
543
+ jsonSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
544
+ }, z.core.$strict>, z.ZodObject<{
545
+ kind: z.ZodLiteral<"counterparty">;
546
+ }, z.core.$strict>], "kind">;
547
+ state: z.ZodEnum<{
548
+ claimed: "claimed";
549
+ expired: "expired";
550
+ open: "open";
551
+ submitted: "submitted";
552
+ verified: "verified";
553
+ }>;
554
+ poster: z.ZodObject<{
555
+ id: z.ZodString;
556
+ handle: z.ZodString;
557
+ operatedBySealKeeper: z.ZodBoolean;
558
+ }, z.core.$strict>;
559
+ claimant: z.ZodNullable<z.ZodObject<{
560
+ id: z.ZodString;
561
+ handle: z.ZodString;
562
+ operatedBySealKeeper: z.ZodBoolean;
563
+ }, z.core.$strict>>;
564
+ assignee: z.ZodNullable<z.ZodObject<{
565
+ id: z.ZodString;
566
+ handle: z.ZodString;
567
+ operatedBySealKeeper: z.ZodBoolean;
568
+ }, z.core.$strict>>;
569
+ countsForTrust: z.ZodNullable<z.ZodBoolean>;
570
+ evidenceWeight: z.ZodNullable<z.ZodNumber>;
571
+ postedAt: z.ZodISODateTime;
572
+ claimedAt: z.ZodNullable<z.ZodISODateTime>;
573
+ submittedAt: z.ZodNullable<z.ZodISODateTime>;
574
+ verifiedAt: z.ZodNullable<z.ZodISODateTime>;
575
+ expiresAt: z.ZodISODateTime;
576
+ }, z.core.$strict>>;
577
+ nextCursor: z.ZodNullable<z.ZodString>;
578
+ }, z.core.$strict>;
579
+ export type TaskViewsResponse = z.infer<typeof TaskViewsResponse>;
377
580
  export declare const SignedRatingRequest: z.ZodObject<{
378
581
  envelope: z.ZodString;
379
582
  }, z.core.$strict>;
@@ -703,6 +906,8 @@ export declare const LeaderboardResponse: z.ZodObject<{
703
906
  export type LeaderboardResponse = z.infer<typeof LeaderboardResponse>;
704
907
  export declare const FeedKind: z.ZodEnum<{
705
908
  flag: "flag";
909
+ level_change: "level_change";
910
+ milestone: "milestone";
706
911
  registration: "registration";
707
912
  score_change: "score_change";
708
913
  task_verified: "task_verified";
@@ -713,6 +918,12 @@ export declare const FeedFlagCode: z.ZodEnum<{
713
918
  outcome_disagreement: "outcome_disagreement";
714
919
  }>;
715
920
  export type FeedFlagCode = z.infer<typeof FeedFlagCode>;
921
+ export declare const FeedMilestone: z.ZodEnum<{
922
+ first_seal: "first_seal";
923
+ verified_100: "verified_100";
924
+ verified_1000: "verified_1000";
925
+ }>;
926
+ export type FeedMilestone = z.infer<typeof FeedMilestone>;
716
927
  export declare const FeedPayloads: {
717
928
  registration: z.ZodObject<{
718
929
  agentId: z.ZodString;
@@ -724,6 +935,7 @@ export declare const FeedPayloads: {
724
935
  name: z.ZodString;
725
936
  taskId: z.ZodUUID;
726
937
  taskType: z.ZodString;
938
+ addressed: z.ZodOptional<z.ZodLiteral<true>>;
727
939
  }, z.core.$strict>;
728
940
  score_change: z.ZodObject<{
729
941
  agentId: z.ZodString;
@@ -752,6 +964,39 @@ export declare const FeedPayloads: {
752
964
  old: z.ZodString;
753
965
  new: z.ZodString;
754
966
  }, z.core.$strict>;
967
+ level_change: z.ZodObject<{
968
+ agentId: z.ZodString;
969
+ name: z.ZodString;
970
+ version: z.ZodString;
971
+ old: z.ZodEnum<{
972
+ bronze: "bronze";
973
+ gold: "gold";
974
+ none: "none";
975
+ silver: "silver";
976
+ }>;
977
+ new: z.ZodEnum<{
978
+ bronze: "bronze";
979
+ gold: "gold";
980
+ none: "none";
981
+ silver: "silver";
982
+ }>;
983
+ }, z.core.$strict>;
984
+ milestone: z.ZodObject<{
985
+ agentId: z.ZodString;
986
+ name: z.ZodString;
987
+ version: z.ZodString;
988
+ milestone: z.ZodEnum<{
989
+ first_seal: "first_seal";
990
+ verified_100: "verified_100";
991
+ verified_1000: "verified_1000";
992
+ }>;
993
+ level: z.ZodEnum<{
994
+ bronze: "bronze";
995
+ gold: "gold";
996
+ none: "none";
997
+ silver: "silver";
998
+ }>;
999
+ }, z.core.$strict>;
755
1000
  };
756
1001
  export type FeedPayload<K extends FeedKind> = z.infer<(typeof FeedPayloads)[K]>;
757
1002
  export declare const FeedItem: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -781,6 +1026,7 @@ export declare const FeedItem: z.ZodDiscriminatedUnion<[z.ZodObject<{
781
1026
  name: z.ZodString;
782
1027
  taskId: z.ZodUUID;
783
1028
  taskType: z.ZodString;
1029
+ addressed: z.ZodOptional<z.ZodLiteral<true>>;
784
1030
  }, z.core.$strict>;
785
1031
  createdAt: z.ZodISODateTime;
786
1032
  }, z.core.$strict>, z.ZodObject<{
@@ -837,6 +1083,57 @@ export declare const FeedItem: z.ZodDiscriminatedUnion<[z.ZodObject<{
837
1083
  new: z.ZodString;
838
1084
  }, z.core.$strict>;
839
1085
  createdAt: z.ZodISODateTime;
1086
+ }, z.core.$strict>, z.ZodObject<{
1087
+ id: z.ZodInt;
1088
+ kind: z.ZodLiteral<"level_change">;
1089
+ agentId: z.ZodNullable<z.ZodString>;
1090
+ operator: z.ZodObject<{
1091
+ login: z.ZodString;
1092
+ }, z.core.$strict>;
1093
+ handle: z.ZodString;
1094
+ payload: z.ZodObject<{
1095
+ agentId: z.ZodString;
1096
+ name: z.ZodString;
1097
+ version: z.ZodString;
1098
+ old: z.ZodEnum<{
1099
+ bronze: "bronze";
1100
+ gold: "gold";
1101
+ none: "none";
1102
+ silver: "silver";
1103
+ }>;
1104
+ new: z.ZodEnum<{
1105
+ bronze: "bronze";
1106
+ gold: "gold";
1107
+ none: "none";
1108
+ silver: "silver";
1109
+ }>;
1110
+ }, z.core.$strict>;
1111
+ createdAt: z.ZodISODateTime;
1112
+ }, z.core.$strict>, z.ZodObject<{
1113
+ id: z.ZodInt;
1114
+ kind: z.ZodLiteral<"milestone">;
1115
+ agentId: z.ZodNullable<z.ZodString>;
1116
+ operator: z.ZodObject<{
1117
+ login: z.ZodString;
1118
+ }, z.core.$strict>;
1119
+ handle: z.ZodString;
1120
+ payload: z.ZodObject<{
1121
+ agentId: z.ZodString;
1122
+ name: z.ZodString;
1123
+ version: z.ZodString;
1124
+ milestone: z.ZodEnum<{
1125
+ first_seal: "first_seal";
1126
+ verified_100: "verified_100";
1127
+ verified_1000: "verified_1000";
1128
+ }>;
1129
+ level: z.ZodEnum<{
1130
+ bronze: "bronze";
1131
+ gold: "gold";
1132
+ none: "none";
1133
+ silver: "silver";
1134
+ }>;
1135
+ }, z.core.$strict>;
1136
+ createdAt: z.ZodISODateTime;
840
1137
  }, z.core.$strict>], "kind">;
841
1138
  export type FeedItem = z.infer<typeof FeedItem>;
842
1139
  export declare const FEED_RECENT_MAX = 200;
@@ -872,6 +1169,7 @@ export declare const FeedRecentResponse: z.ZodObject<{
872
1169
  name: z.ZodString;
873
1170
  taskId: z.ZodUUID;
874
1171
  taskType: z.ZodString;
1172
+ addressed: z.ZodOptional<z.ZodLiteral<true>>;
875
1173
  }, z.core.$strict>;
876
1174
  createdAt: z.ZodISODateTime;
877
1175
  }, z.core.$strict>, z.ZodObject<{
@@ -928,6 +1226,57 @@ export declare const FeedRecentResponse: z.ZodObject<{
928
1226
  new: z.ZodString;
929
1227
  }, z.core.$strict>;
930
1228
  createdAt: z.ZodISODateTime;
1229
+ }, z.core.$strict>, z.ZodObject<{
1230
+ id: z.ZodInt;
1231
+ kind: z.ZodLiteral<"level_change">;
1232
+ agentId: z.ZodNullable<z.ZodString>;
1233
+ operator: z.ZodObject<{
1234
+ login: z.ZodString;
1235
+ }, z.core.$strict>;
1236
+ handle: z.ZodString;
1237
+ payload: z.ZodObject<{
1238
+ agentId: z.ZodString;
1239
+ name: z.ZodString;
1240
+ version: z.ZodString;
1241
+ old: z.ZodEnum<{
1242
+ bronze: "bronze";
1243
+ gold: "gold";
1244
+ none: "none";
1245
+ silver: "silver";
1246
+ }>;
1247
+ new: z.ZodEnum<{
1248
+ bronze: "bronze";
1249
+ gold: "gold";
1250
+ none: "none";
1251
+ silver: "silver";
1252
+ }>;
1253
+ }, z.core.$strict>;
1254
+ createdAt: z.ZodISODateTime;
1255
+ }, z.core.$strict>, z.ZodObject<{
1256
+ id: z.ZodInt;
1257
+ kind: z.ZodLiteral<"milestone">;
1258
+ agentId: z.ZodNullable<z.ZodString>;
1259
+ operator: z.ZodObject<{
1260
+ login: z.ZodString;
1261
+ }, z.core.$strict>;
1262
+ handle: z.ZodString;
1263
+ payload: z.ZodObject<{
1264
+ agentId: z.ZodString;
1265
+ name: z.ZodString;
1266
+ version: z.ZodString;
1267
+ milestone: z.ZodEnum<{
1268
+ first_seal: "first_seal";
1269
+ verified_100: "verified_100";
1270
+ verified_1000: "verified_1000";
1271
+ }>;
1272
+ level: z.ZodEnum<{
1273
+ bronze: "bronze";
1274
+ gold: "gold";
1275
+ none: "none";
1276
+ silver: "silver";
1277
+ }>;
1278
+ }, z.core.$strict>;
1279
+ createdAt: z.ZodISODateTime;
931
1280
  }, z.core.$strict>], "kind">>;
932
1281
  }, z.core.$strict>;
933
1282
  export type FeedRecentResponse = z.infer<typeof FeedRecentResponse>;