@company-semantics/contracts 63.2.0 → 63.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "63.2.0",
3
+ "version": "63.3.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
2
- export const SPEC_HASH = '387045558d18' as const;
3
- export const SPEC_HASH_FULL = '387045558d1867722a744ddb05cf5ebb7260c54df0ff272b868bd4dd2ad2a973' as const;
2
+ export const SPEC_HASH = '191634e28786' as const;
3
+ export const SPEC_HASH_FULL = '191634e28786b02448431968a7b8f6f3fbbcd5f5cadc9f48e3067511a790c38b' as const;
@@ -3778,6 +3778,23 @@ export interface paths {
3778
3778
  patch?: never;
3779
3779
  trace?: never;
3780
3780
  };
3781
+ "/api/comments/threads/{threadId}": {
3782
+ parameters: {
3783
+ query?: never;
3784
+ header?: never;
3785
+ path?: never;
3786
+ cookie?: never;
3787
+ };
3788
+ get?: never;
3789
+ put?: never;
3790
+ post?: never;
3791
+ /** Soft-delete a thread of either kind (creator or subject owner) */
3792
+ delete: operations["deleteCommentThread"];
3793
+ options?: never;
3794
+ head?: never;
3795
+ patch?: never;
3796
+ trace?: never;
3797
+ };
3781
3798
  "/api/comments/threads/{threadId}/accept-intent": {
3782
3799
  parameters: {
3783
3800
  query?: never;
@@ -3863,6 +3880,23 @@ export interface paths {
3863
3880
  patch?: never;
3864
3881
  trace?: never;
3865
3882
  };
3883
+ "/api/comments/threads/{threadId}/revert": {
3884
+ parameters: {
3885
+ query?: never;
3886
+ header?: never;
3887
+ path?: never;
3888
+ cookie?: never;
3889
+ };
3890
+ get?: never;
3891
+ put?: never;
3892
+ /** Revert a decided suggestion, restoring the passage an acceptance replaced */
3893
+ post: operations["revertSuggestion"];
3894
+ delete?: never;
3895
+ options?: never;
3896
+ head?: never;
3897
+ patch?: never;
3898
+ trace?: never;
3899
+ };
3866
3900
  }
3867
3901
  export type webhooks = Record<string, never>;
3868
3902
  export interface components {
@@ -7028,6 +7062,11 @@ export interface components {
7028
7062
  AnchorTraceRequest: {
7029
7063
  lastAnchoredOffset: number;
7030
7064
  };
7065
+ /** @description Acknowledges a soft-deleted thread: its id and the deletion stamp. */
7066
+ CommentThreadDeletedResponse: {
7067
+ threadId: string;
7068
+ deletedAt: string;
7069
+ };
7031
7070
  /** @description The acceptance lease: the opaque claim token that alone can complete the accept, and how long the lease lives. */
7032
7071
  SuggestionClaimResponse: {
7033
7072
  claimToken: string;
@@ -7045,6 +7084,14 @@ export interface components {
7045
7084
  claimToken: string;
7046
7085
  expectedRevision: string;
7047
7086
  };
7087
+ /** @description The reverted thread and the inverse document mutation that landed with it, or null when the suggestion had never been applied. */
7088
+ SuggestionRevertedResponse: {
7089
+ thread: components["schemas"]["CommentThreadSummary"];
7090
+ reverted: components["schemas"]["SuggestionApplied"] | null;
7091
+ };
7092
+ SuggestionRevertRequest: {
7093
+ expectedRevision?: string;
7094
+ };
7048
7095
  /** @description Server-enforced collaboration size limits, published so clients can pre-check. */
7049
7096
  CollabSyncLimits: {
7050
7097
  maxUpdateBytes: number;
@@ -7205,7 +7252,7 @@ export interface components {
7205
7252
  op: "insert" | "delete" | "replace";
7206
7253
  insertedText?: string;
7207
7254
  /** @enum {string} */
7208
- status: "open" | "accepted" | "rejected";
7255
+ status: "open" | "accepted" | "rejected" | "reverted";
7209
7256
  };
7210
7257
  /** @description One comment; body is null iff soft-deleted (redacted projection with empty mentions). */
7211
7258
  Comment: {
@@ -7246,6 +7293,8 @@ export interface components {
7246
7293
  canReopen: boolean;
7247
7294
  canDecideSuggestion: boolean;
7248
7295
  canWithdraw: boolean;
7296
+ canRevertSuggestion: boolean;
7297
+ canDeleteThread: boolean;
7249
7298
  };
7250
7299
  /** @description A comment thread without its comments. */
7251
7300
  CommentThreadSummary: {
@@ -13750,6 +13799,42 @@ export interface operations {
13750
13799
  };
13751
13800
  };
13752
13801
  };
13802
+ deleteCommentThread: {
13803
+ parameters: {
13804
+ query?: never;
13805
+ header?: never;
13806
+ path: {
13807
+ threadId: string;
13808
+ };
13809
+ cookie?: never;
13810
+ };
13811
+ requestBody?: never;
13812
+ responses: {
13813
+ /** @description Thread soft-deleted; the response acknowledges the id and the deletion stamp. Accepted suggestion text stays in the document */
13814
+ 200: {
13815
+ headers: {
13816
+ [name: string]: unknown;
13817
+ };
13818
+ content: {
13819
+ "application/json": components["schemas"]["CommentThreadDeletedResponse"];
13820
+ };
13821
+ };
13822
+ /** @description Thread not found, already deleted, or the caller is neither its creator nor a subject owner */
13823
+ 404: {
13824
+ headers: {
13825
+ [name: string]: unknown;
13826
+ };
13827
+ content?: never;
13828
+ };
13829
+ /** @description A live acceptance lease is held on the suggestion */
13830
+ 409: {
13831
+ headers: {
13832
+ [name: string]: unknown;
13833
+ };
13834
+ content?: never;
13835
+ };
13836
+ };
13837
+ };
13753
13838
  acceptSuggestionIntent: {
13754
13839
  parameters: {
13755
13840
  query?: never;
@@ -13963,4 +14048,51 @@ export interface operations {
13963
14048
  };
13964
14049
  };
13965
14050
  };
14051
+ revertSuggestion: {
14052
+ parameters: {
14053
+ query?: never;
14054
+ header?: never;
14055
+ path: {
14056
+ threadId: string;
14057
+ };
14058
+ cookie?: never;
14059
+ };
14060
+ requestBody: {
14061
+ content: {
14062
+ "application/json": components["schemas"]["SuggestionRevertRequest"];
14063
+ };
14064
+ };
14065
+ responses: {
14066
+ /** @description Suggestion reverted (terminal; thread stays resolved). On an accepted suggestion the inverse edit landed in the document on the SAME transaction and is reported; on a rejected one `reverted` is null */
14067
+ 200: {
14068
+ headers: {
14069
+ [name: string]: unknown;
14070
+ };
14071
+ content: {
14072
+ "application/json": components["schemas"]["SuggestionRevertedResponse"];
14073
+ };
14074
+ };
14075
+ /** @description Malformed expectedRevision, or an accepted suggestion reverted without one */
14076
+ 400: {
14077
+ headers: {
14078
+ [name: string]: unknown;
14079
+ };
14080
+ content?: never;
14081
+ };
14082
+ /** @description Thread not found, or the caller may not decide suggestions on it */
14083
+ 404: {
14084
+ headers: {
14085
+ [name: string]: unknown;
14086
+ };
14087
+ content?: never;
14088
+ };
14089
+ /** @description Terminal, never retry: not a suggestion thread, still open, already reverted, a claim is on the row, the document moved past expectedRevision, or the inserted text cannot be found or no longer reads as inserted — re-read the document and decide again */
14090
+ 409: {
14091
+ headers: {
14092
+ [name: string]: unknown;
14093
+ };
14094
+ content?: never;
14095
+ };
14096
+ };
14097
+ };
13966
14098
  }
@@ -24,6 +24,7 @@ export const openApiRoutes = {
24
24
  '/api/chats/{id}/pin': ['DELETE', 'POST'],
25
25
  '/api/comments': ['GET'],
26
26
  '/api/comments/threads': ['POST'],
27
+ '/api/comments/threads/{threadId}': ['DELETE'],
27
28
  '/api/comments/threads/{threadId}/accept-apply': ['POST'],
28
29
  '/api/comments/threads/{threadId}/accept-complete': ['POST'],
29
30
  '/api/comments/threads/{threadId}/accept-intent': ['POST'],
@@ -33,6 +34,7 @@ export const openApiRoutes = {
33
34
  '/api/comments/threads/{threadId}/reject': ['POST'],
34
35
  '/api/comments/threads/{threadId}/reopen': ['POST'],
35
36
  '/api/comments/threads/{threadId}/resolve': ['POST'],
37
+ '/api/comments/threads/{threadId}/revert': ['POST'],
36
38
  '/api/comments/{commentId}': ['DELETE', 'PATCH'],
37
39
  '/api/company-md/access-requests/{id}/approve': ['POST'],
38
40
  '/api/company-md/access-requests/{id}/deny': ['POST'],