@company-semantics/contracts 51.2.0 → 51.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": "51.2.0",
3
+ "version": "51.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 = 'b044ca016033' as const;
3
- export const SPEC_HASH_FULL = 'b044ca016033c3a7224160a73898e3f551218dbef0139a23601f1ca4eb171d15' as const;
2
+ export const SPEC_HASH = 'd0171aedf623' as const;
3
+ export const SPEC_HASH_FULL = 'd0171aedf623604dc721fb42b626ebc019afcc2fda9be59e1f06360cd6a4fcca' as const;
@@ -3616,6 +3616,23 @@ export interface paths {
3616
3616
  patch?: never;
3617
3617
  trace?: never;
3618
3618
  };
3619
+ "/api/comments/threads/{threadId}/accept-apply": {
3620
+ parameters: {
3621
+ query?: never;
3622
+ header?: never;
3623
+ path?: never;
3624
+ cookie?: never;
3625
+ };
3626
+ get?: never;
3627
+ put?: never;
3628
+ /** Apply a claimed suggestion and record the accept, on one commit */
3629
+ post: operations["acceptSuggestionApply"];
3630
+ delete?: never;
3631
+ options?: never;
3632
+ head?: never;
3633
+ patch?: never;
3634
+ trace?: never;
3635
+ };
3619
3636
  "/api/comments/threads/{threadId}/accept-release": {
3620
3637
  parameters: {
3621
3638
  query?: never;
@@ -6542,6 +6559,15 @@ export interface components {
6542
6559
  SuggestionClaimRequest: {
6543
6560
  claimToken: string;
6544
6561
  };
6562
+ /** @description The accepted thread and the document mutation that landed with it, on one commit. */
6563
+ SuggestionAcceptAppliedResponse: {
6564
+ thread: components["schemas"]["CommentThreadSummary"];
6565
+ applied: components["schemas"]["SuggestionApplied"];
6566
+ };
6567
+ SuggestionApplyRequest: {
6568
+ claimToken: string;
6569
+ expectedRevision: string;
6570
+ };
6545
6571
  /** @description Server-enforced collaboration size limits, published so clients can pre-check. */
6546
6572
  CollabSyncLimits: {
6547
6573
  maxUpdateBytes: number;
@@ -6712,6 +6738,17 @@ export interface components {
6712
6738
  createdAt: string;
6713
6739
  updatedAt: string;
6714
6740
  };
6741
+ /** @description What the accept-apply did to the document: whether there was a CRDT to write into at all, and the canonical edit that was spliced. */
6742
+ SuggestionApplied: {
6743
+ bridged: boolean;
6744
+ edit: components["schemas"]["SuggestionPlannedEdit"];
6745
+ };
6746
+ /** @description The canonical mutation derived from the stored payload: splice out deleteLength UTF-16 code units at `at` and insert `insert`. */
6747
+ SuggestionPlannedEdit: {
6748
+ at: number;
6749
+ deleteLength: number;
6750
+ insert: string;
6751
+ };
6715
6752
  };
6716
6753
  responses: never;
6717
6754
  parameters: never;
@@ -12979,6 +13016,53 @@ export interface operations {
12979
13016
  };
12980
13017
  };
12981
13018
  };
13019
+ acceptSuggestionApply: {
13020
+ parameters: {
13021
+ query?: never;
13022
+ header?: never;
13023
+ path: {
13024
+ threadId: string;
13025
+ };
13026
+ cookie?: never;
13027
+ };
13028
+ requestBody: {
13029
+ content: {
13030
+ "application/json": components["schemas"]["SuggestionApplyRequest"];
13031
+ };
13032
+ };
13033
+ responses: {
13034
+ /** @description Suggestion applied and accepted: the canonical edit landed in the document and the thread was resolved on the SAME transaction */
13035
+ 200: {
13036
+ headers: {
13037
+ [name: string]: unknown;
13038
+ };
13039
+ content: {
13040
+ "application/json": components["schemas"]["SuggestionAcceptAppliedResponse"];
13041
+ };
13042
+ };
13043
+ /** @description Malformed claim token or expectedRevision */
13044
+ 400: {
13045
+ headers: {
13046
+ [name: string]: unknown;
13047
+ };
13048
+ content?: never;
13049
+ };
13050
+ /** @description Thread not found, or the caller may not read its subject */
13051
+ 404: {
13052
+ headers: {
13053
+ [name: string]: unknown;
13054
+ };
13055
+ content?: never;
13056
+ };
13057
+ /** @description Terminal, never retry: not a suggestion thread, the token does not match a live claim, the document moved past expectedRevision, the anchor is orphaned or no longer reads, or the payload resolves to a no-op — re-read the document and decide again */
13058
+ 409: {
13059
+ headers: {
13060
+ [name: string]: unknown;
13061
+ };
13062
+ content?: never;
13063
+ };
13064
+ };
13065
+ };
12982
13066
  releaseSuggestionClaim: {
12983
13067
  parameters: {
12984
13068
  query?: never;
@@ -23,6 +23,7 @@ export const openApiRoutes = {
23
23
  '/api/chats/{id}/pin': ['DELETE', 'POST'],
24
24
  '/api/comments': ['GET'],
25
25
  '/api/comments/threads': ['POST'],
26
+ '/api/comments/threads/{threadId}/accept-apply': ['POST'],
26
27
  '/api/comments/threads/{threadId}/accept-complete': ['POST'],
27
28
  '/api/comments/threads/{threadId}/accept-intent': ['POST'],
28
29
  '/api/comments/threads/{threadId}/accept-release': ['POST'],