@company-semantics/contracts 79.1.0 → 79.2.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": "79.1.0",
3
+ "version": "79.2.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 = 'c6eea14298b3' as const;
3
- export const SPEC_HASH_FULL = 'c6eea14298b3f6282e821b61fac860d7c18fbb8af4b5ecf660bc09665a215d9b' as const;
2
+ export const SPEC_HASH = 'c8b7d9ff0c4f' as const;
3
+ export const SPEC_HASH_FULL = 'c8b7d9ff0c4fda27f5db2cc4afa34e2b80015a930d36e2a6d5106987285b503a' as const;
@@ -1666,6 +1666,46 @@ export interface paths {
1666
1666
  patch?: never;
1667
1667
  trace?: never;
1668
1668
  };
1669
+ "/api/analysis-workflows/{id}": {
1670
+ parameters: {
1671
+ query?: never;
1672
+ header?: never;
1673
+ path?: never;
1674
+ cookie?: never;
1675
+ };
1676
+ /**
1677
+ * Read one analysis workflow’s generic lifecycle envelope
1678
+ * @description The domain-agnostic projection a client polls: identity, registered type, activity-free lifecycle state, start and completion times, the opaque domain progress and result payloads (null until the domain adapter supplies them), a closed failure class on a failed workflow, and the capabilities the surface may offer — canStop from the generic layer, canContinue as the domain declares it. Org-scoped: a workflow in another workspace answers 404.
1679
+ */
1680
+ get: operations["getAnalysisWorkflow"];
1681
+ put?: never;
1682
+ post?: never;
1683
+ delete?: never;
1684
+ options?: never;
1685
+ head?: never;
1686
+ patch?: never;
1687
+ trace?: never;
1688
+ };
1689
+ "/api/analysis-workflows/{id}/stop": {
1690
+ parameters: {
1691
+ query?: never;
1692
+ header?: never;
1693
+ path?: never;
1694
+ cookie?: never;
1695
+ };
1696
+ get?: never;
1697
+ put?: never;
1698
+ /**
1699
+ * Request that an analysis workflow stop at its next safe boundary
1700
+ * @description The one generic COMMAND. Records a cooperative stop request and moves a pending or running workflow to draining; nothing is aborted — the worker halts at a boundary the domain chooses. Answers 202 (acknowledged, not landed) when the request was accepted, and 200 with { stopped: false, reason: "not_running" } when the workflow is already draining or already settled, because a retry against a stopped workflow is a success. Runtime posture: intent write, impersonation allow (a stop only reduces spend). Org-scoped: a workflow in another workspace answers 404.
1701
+ */
1702
+ post: operations["stopAnalysisWorkflow"];
1703
+ delete?: never;
1704
+ options?: never;
1705
+ head?: never;
1706
+ patch?: never;
1707
+ trace?: never;
1708
+ };
1669
1709
  "/api/company-md/tree": {
1670
1710
  parameters: {
1671
1711
  query?: never;
@@ -6446,6 +6486,35 @@ export interface components {
6446
6486
  fingerprint: string;
6447
6487
  note?: string;
6448
6488
  };
6489
+ AnalysisWorkflowProjectionResponse: {
6490
+ /** Format: uuid */
6491
+ id: string;
6492
+ type: string;
6493
+ /** @enum {string} */
6494
+ state: "pending" | "running" | "draining" | "stopped" | "complete" | "failed";
6495
+ startedAt: string | null;
6496
+ completedAt: string | null;
6497
+ progress: unknown | null;
6498
+ result: unknown | null;
6499
+ error?: string;
6500
+ capabilities: {
6501
+ canStop: boolean;
6502
+ canContinue: boolean;
6503
+ };
6504
+ };
6505
+ StopAnalysisWorkflowResponse: {
6506
+ /** @constant */
6507
+ stopped: true;
6508
+ /** Format: uuid */
6509
+ workflowId: string;
6510
+ /** @constant */
6511
+ state: "draining";
6512
+ } | {
6513
+ /** @constant */
6514
+ stopped: false;
6515
+ /** @constant */
6516
+ reason: "not_running";
6517
+ };
6449
6518
  CompanyMdListResponse: {
6450
6519
  items: {
6451
6520
  id: string;
@@ -12121,6 +12190,87 @@ export interface operations {
12121
12190
  };
12122
12191
  };
12123
12192
  };
12193
+ getAnalysisWorkflow: {
12194
+ parameters: {
12195
+ query?: never;
12196
+ header?: never;
12197
+ path: {
12198
+ id: string;
12199
+ };
12200
+ cookie?: never;
12201
+ };
12202
+ requestBody?: never;
12203
+ responses: {
12204
+ /** @description The workflow’s lifecycle envelope with its capabilities */
12205
+ 200: {
12206
+ headers: {
12207
+ [name: string]: unknown;
12208
+ };
12209
+ content: {
12210
+ "application/json": components["schemas"]["AnalysisWorkflowProjectionResponse"];
12211
+ };
12212
+ };
12213
+ /** @description The workflow id is not a uuid */
12214
+ 400: {
12215
+ headers: {
12216
+ [name: string]: unknown;
12217
+ };
12218
+ content?: never;
12219
+ };
12220
+ /** @description No such workflow in this workspace */
12221
+ 404: {
12222
+ headers: {
12223
+ [name: string]: unknown;
12224
+ };
12225
+ content?: never;
12226
+ };
12227
+ };
12228
+ };
12229
+ stopAnalysisWorkflow: {
12230
+ parameters: {
12231
+ query?: never;
12232
+ header?: never;
12233
+ path: {
12234
+ id: string;
12235
+ };
12236
+ cookie?: never;
12237
+ };
12238
+ requestBody?: never;
12239
+ responses: {
12240
+ /** @description Nothing to stop: the workflow is not running */
12241
+ 200: {
12242
+ headers: {
12243
+ [name: string]: unknown;
12244
+ };
12245
+ content: {
12246
+ "application/json": components["schemas"]["StopAnalysisWorkflowResponse"];
12247
+ };
12248
+ };
12249
+ /** @description Stop requested; the workflow is draining */
12250
+ 202: {
12251
+ headers: {
12252
+ [name: string]: unknown;
12253
+ };
12254
+ content: {
12255
+ "application/json": components["schemas"]["StopAnalysisWorkflowResponse"];
12256
+ };
12257
+ };
12258
+ /** @description The workflow id is not a uuid */
12259
+ 400: {
12260
+ headers: {
12261
+ [name: string]: unknown;
12262
+ };
12263
+ content?: never;
12264
+ };
12265
+ /** @description No such workflow in this workspace */
12266
+ 404: {
12267
+ headers: {
12268
+ [name: string]: unknown;
12269
+ };
12270
+ content?: never;
12271
+ };
12272
+ };
12273
+ };
12124
12274
  getCompanyMdTree: {
12125
12275
  parameters: {
12126
12276
  query?: {
@@ -9,6 +9,8 @@ export const openApiRoutes = {
9
9
  '/api/account/deletion-eligibility': ['GET'],
10
10
  '/api/account/sessions': ['GET'],
11
11
  '/api/account/sessions/{sessionId}': ['DELETE'],
12
+ '/api/analysis-workflows/{id}': ['GET'],
13
+ '/api/analysis-workflows/{id}/stop': ['POST'],
12
14
  '/api/auth/consent/grant': ['POST'],
13
15
  '/api/billing/price-list': ['GET'],
14
16
  '/api/capabilities': ['GET'],