@company-semantics/contracts 45.1.0 → 45.3.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.
Files changed (32) hide show
  1. package/package.json +10 -3
  2. package/src/__tests__/resource-keys.test.ts +59 -0
  3. package/src/api/generated-spec-hash.ts +2 -2
  4. package/src/api/generated.ts +540 -1
  5. package/src/comments/README.md +115 -0
  6. package/src/comments/__tests__/README.md +49 -0
  7. package/src/comments/__tests__/anchor-corpus.test.ts +202 -0
  8. package/src/comments/__tests__/fixtures/README.md +58 -0
  9. package/src/comments/__tests__/fixtures/comment-anchors.json +94 -0
  10. package/src/comments/__tests__/fixtures/comment-anchors.provenance.json +9 -0
  11. package/src/comments/__tests__/schemas.test.ts +274 -0
  12. package/src/comments/anchor.ts +120 -0
  13. package/src/comments/index.ts +43 -0
  14. package/src/comments/schemas.ts +227 -0
  15. package/src/generated/openapi-routes.ts +7 -0
  16. package/src/index.ts +42 -0
  17. package/src/notifications/__tests__/__snapshots__/registry.test.ts.snap +4 -0
  18. package/src/notifications/__tests__/__snapshots__/render-snapshot.test.ts.snap +741 -0
  19. package/src/notifications/__tests__/definition.test.ts +4 -3
  20. package/src/notifications/__tests__/fixtures.ts +34 -0
  21. package/src/notifications/__tests__/kinds.test.ts +11 -4
  22. package/src/notifications/__tests__/registry.test.ts +7 -5
  23. package/src/notifications/__tests__/render-snapshot.test.ts +36 -0
  24. package/src/notifications/kinds/comment-mention.ts +82 -0
  25. package/src/notifications/kinds/comment-reply.ts +79 -0
  26. package/src/notifications/kinds/index.ts +2 -0
  27. package/src/notifications/kinds.ts +12 -3
  28. package/src/notifications/payloads.ts +49 -0
  29. package/src/notifications/registry.ts +6 -2
  30. package/src/org/schemas.ts +23 -0
  31. package/src/resource-keys.ts +68 -0
  32. package/src/user-notifications/kinds.ts +13 -1
package/src/index.ts CHANGED
@@ -322,6 +322,48 @@ export type {
322
322
  UserNotificationKind,
323
323
  } from "./user-notifications/index";
324
324
 
325
+ // Comment wire contract — where a thread hangs (the anchor union), what a
326
+ // thread and its comments look like on the wire, and who a comment may name.
327
+ // The anchor is the single most load-bearing shape in this package: the backend
328
+ // validates it and then stores opaque jsonb it never interprets, so app/
329
+ // contracts drift on it has NO server-side tripwire and mis-places comments
330
+ // silently. Response vocabulary only — request bodies stay backend-side.
331
+ // See src/comments/README.md.
332
+ // @see ADR-CONTRACTS-116, ADR-CONT-029
333
+ export {
334
+ COMMENT_ANCHOR_TYPES,
335
+ COMMENT_SUBJECT_TYPES,
336
+ COMMENT_THREAD_STATUSES,
337
+ } from "./comments/index";
338
+
339
+ export {
340
+ CommentAnchorSchema,
341
+ CommentAnchorTypeSchema,
342
+ CommentMentionSchema,
343
+ CommentSchema,
344
+ CommentSubjectTypeSchema,
345
+ CommentThreadListResponseSchema,
346
+ CommentThreadSchema,
347
+ CommentThreadStatusSchema,
348
+ CommentThreadSummarySchema,
349
+ MentionableCandidateSchema,
350
+ MentionableResponseSchema,
351
+ } from "./comments/index";
352
+
353
+ export type {
354
+ CommentAnchor,
355
+ CommentAnchorType,
356
+ CommentMention,
357
+ CommentProjection,
358
+ CommentSubjectType,
359
+ CommentThread,
360
+ CommentThreadListResponse,
361
+ CommentThreadStatus,
362
+ CommentThreadSummary,
363
+ MentionableCandidate,
364
+ MentionableResponse,
365
+ } from "./comments/index";
366
+
325
367
  // Chat domain types
326
368
  // @see PRD-00142 for share chat design rationale
327
369
  export type {
@@ -10,6 +10,10 @@ exports[`NOTIFICATION_DEFINITIONS > titles every kind 1`] = `
10
10
  "chat.shared · Long title": "A chat has been shared with you",
11
11
  "chat.shared · No preview": "A chat has been shared with you",
12
12
  "chat.shared · Short": "A chat has been shared with you",
13
+ "comment.mention · Document-level": "Jordan Lee mentioned you in a comment",
14
+ "comment.mention · Text-anchored": "Jordan Lee mentioned you in a comment",
15
+ "comment.reply · Document-level": "Alex Rivera replied in a thread you are part of",
16
+ "comment.reply · Text-anchored": "Alex Rivera replied in a thread you are part of",
13
17
  "companyMd.access_request_approved · Editor": "Your access request was approved",
14
18
  "companyMd.access_request_approved · Editor with message": "Your access request was approved",
15
19
  "companyMd.access_request_approved · Viewer": "Your access request was approved",