@company-semantics/contracts 90.0.0 → 91.1.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 (42) hide show
  1. package/package.json +2 -2
  2. package/src/affordances/README.md +65 -0
  3. package/src/affordances/__tests__/README.md +30 -0
  4. package/src/affordances/__tests__/affordances.test.ts +251 -0
  5. package/src/affordances/affordance.ts +124 -0
  6. package/src/affordances/args.ts +59 -0
  7. package/src/affordances/availability.ts +78 -0
  8. package/src/affordances/ids.ts +45 -0
  9. package/src/affordances/index.ts +39 -0
  10. package/src/api/generated-spec-hash.ts +2 -2
  11. package/src/api/generated.ts +458 -2
  12. package/src/generated/openapi-routes.ts +4 -0
  13. package/src/proactive/README.md +26 -4
  14. package/src/proactive/__tests__/README.md +10 -0
  15. package/src/proactive/__tests__/chat-templates.test.ts +8 -0
  16. package/src/proactive/__tests__/vocabulary.test.ts +11 -0
  17. package/src/proactive/__tests__/workflow-attention-fixtures.ts +49 -0
  18. package/src/proactive/__tests__/workflow-attention.test.ts +146 -0
  19. package/src/proactive/composer.ts +8 -0
  20. package/src/proactive/facts.ts +36 -0
  21. package/src/proactive/index.ts +2 -0
  22. package/src/proactive/kinds.ts +29 -0
  23. package/src/proactive/registry.ts +22 -0
  24. package/src/proactive/surfaces.ts +2 -0
  25. package/src/proactive/templates/README.md +9 -1
  26. package/src/proactive/templates/index.ts +2 -0
  27. package/src/proactive/templates/workflow-needs-attention.ts +35 -0
  28. package/src/root-exports/README.md +1 -0
  29. package/src/root-exports/delivery.ts +69 -1
  30. package/src/user-notifications/README.md +8 -0
  31. package/src/user-notifications/kinds.ts +13 -0
  32. package/src/user-notifications/lifecycle-registry.ts +10 -0
  33. package/src/workflows/README.md +44 -6
  34. package/src/workflows/__tests__/README.md +21 -2
  35. package/src/workflows/__tests__/affordances-of-outcome.test.ts +96 -0
  36. package/src/workflows/__tests__/deferred-route.test.ts +167 -0
  37. package/src/workflows/__tests__/outcome.test.ts +68 -3
  38. package/src/workflows/affordances-of-outcome.ts +64 -0
  39. package/src/workflows/deferred-route.ts +242 -0
  40. package/src/workflows/index.ts +51 -11
  41. package/src/workflows/outcome-reasons.ts +244 -0
  42. package/src/workflows/outcome.ts +50 -148
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Affordance vocabulary barrel (control ADR affordance-system).
3
+ * Import from '@company-semantics/contracts' (root).
4
+ */
5
+ export { AFFORDANCE_IDS, AffordanceIdSchema } from "./ids";
6
+ export type { AffordanceId } from "./ids";
7
+ export {
8
+ AFFORDANCE_ARGS,
9
+ NO_ARG_AFFORDANCE_IDS,
10
+ ReviewOpenArgsSchema,
11
+ } from "./args";
12
+ export type { AffordanceArgs } from "./args";
13
+ export {
14
+ AFFORDANCE_AVAILABILITY_IDS,
15
+ AFFORDANCE_BINDING_KINDS,
16
+ AFFORDANCE_UNAVAILABLE_REASONS,
17
+ AffordanceAvailabilityIdSchema,
18
+ AffordanceAvailabilitySchema,
19
+ } from "./availability";
20
+ export type {
21
+ AffordanceAvailability,
22
+ AffordanceAvailabilityId,
23
+ AffordanceBindingKind,
24
+ AffordanceUnavailableReason,
25
+ } from "./availability";
26
+ export {
27
+ AFFORDANCE_AVAILABILITY_OF,
28
+ AFFORDANCE_BINDING_KIND_OF,
29
+ AffordanceSchema,
30
+ MAX_OFFERED_AFFORDANCES,
31
+ OfferedAffordanceSchema,
32
+ PROJECTED_AFFORDANCE_IDS,
33
+ sameAffordances,
34
+ } from "./affordance";
35
+ export type {
36
+ Affordance,
37
+ OfferedAffordance,
38
+ ProjectedAffordanceId,
39
+ } from "./affordance";
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
2
- export const SPEC_HASH = 'ba43b4881a93' as const;
3
- export const SPEC_HASH_FULL = 'ba43b4881a9318819726dfe0c0465ecae3802951f7f558fec6786a7171195a91' as const;
2
+ export const SPEC_HASH = '2d074ecfa53c' as const;
3
+ export const SPEC_HASH_FULL = '2d074ecfa53c0f377dfda06d9a46167a9cfc77eb3878e2cd71b8a04149c700b7' as const;
@@ -1566,6 +1566,23 @@ export interface paths {
1566
1566
  patch?: never;
1567
1567
  trace?: never;
1568
1568
  };
1569
+ "/api/integrations/bamboohr/sync": {
1570
+ parameters: {
1571
+ query?: never;
1572
+ header?: never;
1573
+ path?: never;
1574
+ cookie?: never;
1575
+ };
1576
+ get?: never;
1577
+ put?: never;
1578
+ /** Run a BambooHR sync now (returns the run summary) */
1579
+ post: operations["syncBambooHrNow"];
1580
+ delete?: never;
1581
+ options?: never;
1582
+ head?: never;
1583
+ patch?: never;
1584
+ trace?: never;
1585
+ };
1569
1586
  "/api/org/reconciliation": {
1570
1587
  parameters: {
1571
1588
  query?: never;
@@ -1666,6 +1683,26 @@ export interface paths {
1666
1683
  patch?: never;
1667
1684
  trace?: never;
1668
1685
  };
1686
+ "/api/org/structure-inference/runs": {
1687
+ parameters: {
1688
+ query?: never;
1689
+ header?: never;
1690
+ path?: never;
1691
+ cookie?: never;
1692
+ };
1693
+ get?: never;
1694
+ put?: never;
1695
+ /**
1696
+ * Launch one org-structure reanalyze workflow and its inference run
1697
+ * @description Mints an org-structure/reanalyze analysis workflow, opens its pending run and schedules the job, all in one transaction (ADR-BE-606, ADR-BE-703): the snapshot, the model calls and the deterministic gate execute on the worker, and the outcome is read back by polling GET /api/org/structure-inference/proposal, whose run field carries this run’s id and status, or GET /api/analysis-workflows/{workflowId} for the workflow. At most one inference is in flight per org — a second POST joins the run already under way. Explicitly operator-triggered: there is no schedule and no sync hook.
1698
+ */
1699
+ post: operations["runOrgStructureInference"];
1700
+ delete?: never;
1701
+ options?: never;
1702
+ head?: never;
1703
+ patch?: never;
1704
+ trace?: never;
1705
+ };
1669
1706
  "/api/analysis-workflows/{id}": {
1670
1707
  parameters: {
1671
1708
  query?: never;
@@ -1726,6 +1763,26 @@ export interface paths {
1726
1763
  patch?: never;
1727
1764
  trace?: never;
1728
1765
  };
1766
+ "/api/affordances/state": {
1767
+ parameters: {
1768
+ query?: never;
1769
+ header?: never;
1770
+ path?: never;
1771
+ cookie?: never;
1772
+ };
1773
+ /**
1774
+ * Read the live policy and availability of offered affordances
1775
+ * @description For exactly the affordance ids named in `ids` (the ids a settled outcome offered — never the catalog), whether the viewer is shown each one (`policy`, from the same capability derivation as GET /api/capabilities) and whether the org’s current state permits it (`availability`). Entries come back in request order, deduped. NON-AUTHORITATIVE: this answer is advisory UX state; the route each affordance binds to stays the only enforcement and may still refuse. Org-scoped: requires active membership of the session org, because availability discloses org state.
1776
+ */
1777
+ get: operations["getAffordanceState"];
1778
+ put?: never;
1779
+ post?: never;
1780
+ delete?: never;
1781
+ options?: never;
1782
+ head?: never;
1783
+ patch?: never;
1784
+ trace?: never;
1785
+ };
1729
1786
  "/api/company-md/tree": {
1730
1787
  parameters: {
1731
1788
  query?: never;
@@ -4271,6 +4328,23 @@ export interface paths {
4271
4328
  patch?: never;
4272
4329
  trace?: never;
4273
4330
  };
4331
+ "/api/internal-admin/quality/decisions/{id}/diagnosis": {
4332
+ parameters: {
4333
+ query?: never;
4334
+ header?: never;
4335
+ path?: never;
4336
+ cookie?: never;
4337
+ };
4338
+ /** A decision's diagnosis: stable vs flaky failures, failure kinds by bucket, suspected component and findings */
4339
+ get: operations["getQualityDecisionDiagnosis"];
4340
+ put?: never;
4341
+ post?: never;
4342
+ delete?: never;
4343
+ options?: never;
4344
+ head?: never;
4345
+ patch?: never;
4346
+ trace?: never;
4347
+ };
4274
4348
  "/api/comments": {
4275
4349
  parameters: {
4276
4350
  query?: never;
@@ -6791,6 +6865,34 @@ export interface components {
6791
6865
  requiredScope?: string;
6792
6866
  };
6793
6867
  };
6868
+ integrations?: {
6869
+ manage: {
6870
+ /** @enum {string} */
6871
+ state: "allowed" | "blocked";
6872
+ requiredScope?: string;
6873
+ };
6874
+ };
6875
+ sourceSync?: {
6876
+ manage: {
6877
+ /** @enum {string} */
6878
+ state: "allowed" | "blocked";
6879
+ requiredScope?: string;
6880
+ };
6881
+ };
6882
+ billing?: {
6883
+ view: {
6884
+ /** @enum {string} */
6885
+ state: "allowed" | "blocked";
6886
+ requiredScope?: string;
6887
+ };
6888
+ };
6889
+ orgStructure?: {
6890
+ analyze: {
6891
+ /** @enum {string} */
6892
+ state: "allowed" | "blocked";
6893
+ requiredScope?: string;
6894
+ };
6895
+ };
6794
6896
  };
6795
6897
  chatMentions: boolean;
6796
6898
  chatMultiParty: boolean;
@@ -6799,6 +6901,17 @@ export interface components {
6799
6901
  reason: ("BILLING_INACTIVE" | "SEAT_SUBSCRIPTION_PAST_DUE" | "AI_BALANCE_EXHAUSTED" | "AI_BUDGET_EXHAUSTED" | "BYO_KEY_INVALID") | null;
6800
6902
  };
6801
6903
  };
6904
+ BambooHrSyncRunResponse: {
6905
+ /** Format: uuid */
6906
+ runId: string;
6907
+ processed: number;
6908
+ changed: number;
6909
+ skipped: number;
6910
+ conflicts: number;
6911
+ failures: number;
6912
+ sinceCursor: string | null;
6913
+ status: string;
6914
+ };
6802
6915
  ResolveOrgDivergenceRequest: {
6803
6916
  /** @constant */
6804
6917
  resolution: "acknowledged";
@@ -6976,6 +7089,23 @@ export interface components {
6976
7089
  fingerprint: string;
6977
7090
  note?: string;
6978
7091
  };
7092
+ RunStructureInferenceRefusal: {
7093
+ /** @constant */
7094
+ ran: false;
7095
+ /** @enum {string} */
7096
+ reason: "no_sync_run" | "no_persons" | "reporting_not_keyed";
7097
+ message: string;
7098
+ };
7099
+ RunStructureInferenceAccepted: {
7100
+ /** @constant */
7101
+ ran: true;
7102
+ /** Format: uuid */
7103
+ runId: string;
7104
+ workflowId: string | null;
7105
+ /** @enum {string} */
7106
+ status: "pending" | "running";
7107
+ alreadyRunning: boolean;
7108
+ };
6979
7109
  AnalysisWorkflowProjectionResponse: {
6980
7110
  /** Format: uuid */
6981
7111
  id: string;
@@ -6986,7 +7116,180 @@ export interface components {
6986
7116
  completedAt: string | null;
6987
7117
  progress: unknown | null;
6988
7118
  result: unknown | null;
6989
- outcome: unknown | null;
7119
+ outcome: ({
7120
+ /** @constant */
7121
+ workflowType: "source-sync/discover";
7122
+ executionEpoch: number;
7123
+ /** @enum {string} */
7124
+ kind: "produced" | "empty" | "partial" | "stopped" | "failed" | "abandoned" | "unknown";
7125
+ /** @enum {string} */
7126
+ reason: "candidates_found" | "nothing_found" | "nothing_relevant" | "budget_exhausted" | "file_ceiling" | "stopped_by_user" | "plan_coverage_refused" | "billing_refused" | "drive_auth" | "drive_unavailable" | "no_connection" | "source_sync_off" | "internal_error" | "abandoned" | "unrecognized_terminal_state";
7127
+ facts: {
7128
+ probesTotal: number;
7129
+ probesDone: number;
7130
+ filesSeen: number;
7131
+ filesShown: number;
7132
+ filesHidden: number;
7133
+ filesDropped: number;
7134
+ coveragePercent: number | null;
7135
+ } | null;
7136
+ disposition: {
7137
+ /** @constant */
7138
+ kind: "review";
7139
+ /** @enum {string} */
7140
+ requestType: "org-structure/review" | "source-sync/candidates" | "source-sync/synthesis";
7141
+ requestId: string;
7142
+ } | {
7143
+ /** @constant */
7144
+ kind: "narrate";
7145
+ };
7146
+ affordances: ({
7147
+ /** @constant */
7148
+ id: "sourceSync.findFiles";
7149
+ } | {
7150
+ /** @constant */
7151
+ id: "integrations.connectGoogleDrive";
7152
+ } | {
7153
+ /** @constant */
7154
+ id: "sourceSync.enable";
7155
+ } | {
7156
+ /** @constant */
7157
+ id: "billing.open";
7158
+ } | {
7159
+ /** @constant */
7160
+ id: "orgStructure.reanalyze";
7161
+ } | {
7162
+ /** @constant */
7163
+ id: "hris.resyncDirectory";
7164
+ })[];
7165
+ } | {
7166
+ /** @constant */
7167
+ workflowType: "source-sync/synthesize";
7168
+ executionEpoch: number;
7169
+ /** @enum {string} */
7170
+ kind: "produced" | "empty" | "partial" | "stopped" | "failed" | "abandoned" | "unknown";
7171
+ /** @enum {string} */
7172
+ reason: "updates_ready" | "updates_applied" | "stopped_by_user" | "paused_billing" | "synthesis_incomplete" | "approval_mismatch" | "landing_refused" | "standing_order_refused" | "no_connection" | "source_sync_off" | "internal_error" | "abandoned" | "unrecognized_terminal_state";
7173
+ facts: {
7174
+ scopeCount: number;
7175
+ violationCount: number;
7176
+ } | null;
7177
+ disposition: {
7178
+ /** @constant */
7179
+ kind: "review";
7180
+ /** @enum {string} */
7181
+ requestType: "org-structure/review" | "source-sync/candidates" | "source-sync/synthesis";
7182
+ requestId: string;
7183
+ } | {
7184
+ /** @constant */
7185
+ kind: "narrate";
7186
+ };
7187
+ affordances: ({
7188
+ /** @constant */
7189
+ id: "sourceSync.findFiles";
7190
+ } | {
7191
+ /** @constant */
7192
+ id: "integrations.connectGoogleDrive";
7193
+ } | {
7194
+ /** @constant */
7195
+ id: "sourceSync.enable";
7196
+ } | {
7197
+ /** @constant */
7198
+ id: "billing.open";
7199
+ } | {
7200
+ /** @constant */
7201
+ id: "orgStructure.reanalyze";
7202
+ } | {
7203
+ /** @constant */
7204
+ id: "hris.resyncDirectory";
7205
+ })[];
7206
+ } | {
7207
+ /** @constant */
7208
+ workflowType: "org-structure/hris-connect";
7209
+ executionEpoch: number;
7210
+ /** @enum {string} */
7211
+ kind: "produced" | "empty" | "partial" | "stopped" | "failed" | "abandoned" | "unknown";
7212
+ /** @enum {string} */
7213
+ reason: "proposal_ready" | "directory_synced" | "analysis_already_running" | "proposal_blocked" | "no_sync_run" | "no_persons" | "reporting_not_keyed" | "stopped_by_user" | "sync_failed" | "snapshot_too_large" | "model_failed" | "run_too_large" | "placement_failed" | "internal_error" | "abandoned" | "unrecognized_terminal_state";
7214
+ facts: {
7215
+ departmentCount: number;
7216
+ teamCount: number;
7217
+ placedCount: number;
7218
+ reviewItemCount: number;
7219
+ } | null;
7220
+ disposition: {
7221
+ /** @constant */
7222
+ kind: "review";
7223
+ /** @enum {string} */
7224
+ requestType: "org-structure/review" | "source-sync/candidates" | "source-sync/synthesis";
7225
+ requestId: string;
7226
+ } | {
7227
+ /** @constant */
7228
+ kind: "narrate";
7229
+ };
7230
+ affordances: ({
7231
+ /** @constant */
7232
+ id: "sourceSync.findFiles";
7233
+ } | {
7234
+ /** @constant */
7235
+ id: "integrations.connectGoogleDrive";
7236
+ } | {
7237
+ /** @constant */
7238
+ id: "sourceSync.enable";
7239
+ } | {
7240
+ /** @constant */
7241
+ id: "billing.open";
7242
+ } | {
7243
+ /** @constant */
7244
+ id: "orgStructure.reanalyze";
7245
+ } | {
7246
+ /** @constant */
7247
+ id: "hris.resyncDirectory";
7248
+ })[];
7249
+ } | {
7250
+ /** @constant */
7251
+ workflowType: "org-structure/reanalyze";
7252
+ executionEpoch: number;
7253
+ /** @enum {string} */
7254
+ kind: "produced" | "empty" | "partial" | "stopped" | "failed" | "abandoned" | "unknown";
7255
+ /** @enum {string} */
7256
+ reason: "proposal_ready" | "directory_synced" | "analysis_already_running" | "proposal_blocked" | "no_sync_run" | "no_persons" | "reporting_not_keyed" | "stopped_by_user" | "sync_failed" | "snapshot_too_large" | "model_failed" | "run_too_large" | "placement_failed" | "internal_error" | "abandoned" | "unrecognized_terminal_state";
7257
+ facts: {
7258
+ departmentCount: number;
7259
+ teamCount: number;
7260
+ placedCount: number;
7261
+ reviewItemCount: number;
7262
+ } | null;
7263
+ disposition: {
7264
+ /** @constant */
7265
+ kind: "review";
7266
+ /** @enum {string} */
7267
+ requestType: "org-structure/review" | "source-sync/candidates" | "source-sync/synthesis";
7268
+ requestId: string;
7269
+ } | {
7270
+ /** @constant */
7271
+ kind: "narrate";
7272
+ };
7273
+ affordances: ({
7274
+ /** @constant */
7275
+ id: "sourceSync.findFiles";
7276
+ } | {
7277
+ /** @constant */
7278
+ id: "integrations.connectGoogleDrive";
7279
+ } | {
7280
+ /** @constant */
7281
+ id: "sourceSync.enable";
7282
+ } | {
7283
+ /** @constant */
7284
+ id: "billing.open";
7285
+ } | {
7286
+ /** @constant */
7287
+ id: "orgStructure.reanalyze";
7288
+ } | {
7289
+ /** @constant */
7290
+ id: "hris.resyncDirectory";
7291
+ })[];
7292
+ }) | null;
6990
7293
  error?: string;
6991
7294
  capabilities: {
6992
7295
  canStop: boolean;
@@ -7010,6 +7313,26 @@ export interface components {
7010
7313
  /** @enum {string} */
7011
7314
  result: "delivered" | "deferred" | "busy" | "skipped" | "not_settled";
7012
7315
  };
7316
+ AffordanceStateResponse: {
7317
+ entries: {
7318
+ /** @enum {string} */
7319
+ id: "sourceSync.findFiles" | "integrations.connectGoogleDrive" | "sourceSync.enable" | "billing.open" | "orgStructure.reanalyze" | "hris.resyncDirectory" | "review.open";
7320
+ /** @enum {string} */
7321
+ policy: "allowed" | "blocked";
7322
+ availability: {
7323
+ /** @constant */
7324
+ state: "available";
7325
+ } | {
7326
+ /** @constant */
7327
+ state: "already_satisfied";
7328
+ } | {
7329
+ /** @constant */
7330
+ state: "unavailable";
7331
+ /** @enum {string} */
7332
+ reason: "conflicting_operation" | "missing_dependency" | "resource_gone" | "temporarily_disabled";
7333
+ };
7334
+ }[];
7335
+ };
7013
7336
  CompanyMdListResponse: {
7014
7337
  items: {
7015
7338
  id: string;
@@ -8122,7 +8445,7 @@ export interface components {
8122
8445
  notification: {
8123
8446
  id: string;
8124
8447
  /** @enum {string} */
8125
- kind: "companyMd.access_requested" | "companyMd.access_request_approved" | "companyMd.access_request_denied" | "comment.mention" | "comment.reply" | "chat.mention" | "proactive.org_became_shared" | "proactive.brief_morning" | "proactive.billing_balance_below_half" | "proactive.billing_balance_below_threshold" | "proactive.billing_auto_recharge_succeeded" | "proactive.billing_top_up_credited" | "proactive.billing_monthly_budget_80" | "proactive.billing_monthly_budget_100" | "proactive.billing_user_monthly_limit_reached" | "proactive.billing_byo_key_invalid" | "proactive.billing_provider_price_changed" | "proactive.billing_payment_recovered" | "proactive.billing_balance_exhausted" | "proactive.billing_auto_recharge_failed" | "proactive.billing_payment_past_due" | "proactive.billing_suspended" | "proactive.billing_subscription_canceled" | "proactive.source_sync_docs_updated" | "proactive.source_sync_review_ready" | "proactive.org_structure_review_ready";
8448
+ kind: "companyMd.access_requested" | "companyMd.access_request_approved" | "companyMd.access_request_denied" | "comment.mention" | "comment.reply" | "chat.mention" | "proactive.org_became_shared" | "proactive.brief_morning" | "proactive.billing_balance_below_half" | "proactive.billing_balance_below_threshold" | "proactive.billing_auto_recharge_succeeded" | "proactive.billing_top_up_credited" | "proactive.billing_monthly_budget_80" | "proactive.billing_monthly_budget_100" | "proactive.billing_user_monthly_limit_reached" | "proactive.billing_byo_key_invalid" | "proactive.billing_provider_price_changed" | "proactive.billing_payment_recovered" | "proactive.billing_balance_exhausted" | "proactive.billing_auto_recharge_failed" | "proactive.billing_payment_past_due" | "proactive.billing_suspended" | "proactive.billing_subscription_canceled" | "proactive.source_sync_docs_updated" | "proactive.source_sync_review_ready" | "proactive.org_structure_review_ready" | "proactive.workflow_needs_attention" | "proactive.workflow_finished";
8126
8449
  target: {
8127
8450
  /** @enum {string} */
8128
8451
  type: "company_md" | "org_unit" | "org" | "execution";
@@ -12932,6 +13255,33 @@ export interface operations {
12932
13255
  };
12933
13256
  };
12934
13257
  };
13258
+ syncBambooHrNow: {
13259
+ parameters: {
13260
+ query?: never;
13261
+ header?: never;
13262
+ path?: never;
13263
+ cookie?: never;
13264
+ };
13265
+ requestBody?: never;
13266
+ responses: {
13267
+ /** @description Sync run summary */
13268
+ 200: {
13269
+ headers: {
13270
+ [name: string]: unknown;
13271
+ };
13272
+ content: {
13273
+ "application/json": components["schemas"]["BambooHrSyncRunResponse"];
13274
+ };
13275
+ };
13276
+ /** @description No active BambooHR connection, or BambooHR no longer recognizes the organization */
13277
+ 400: {
13278
+ headers: {
13279
+ [name: string]: unknown;
13280
+ };
13281
+ content?: never;
13282
+ };
13283
+ };
13284
+ };
12935
13285
  getOrgReconciliation: {
12936
13286
  parameters: {
12937
13287
  query?: never;
@@ -13079,6 +13429,35 @@ export interface operations {
13079
13429
  };
13080
13430
  };
13081
13431
  };
13432
+ runOrgStructureInference: {
13433
+ parameters: {
13434
+ query?: never;
13435
+ header?: never;
13436
+ path?: never;
13437
+ cookie?: never;
13438
+ };
13439
+ requestBody?: never;
13440
+ responses: {
13441
+ /** @description A named refusal with its operator-facing next step: no directory imported yet, a sync that imported nobody, or a credential whose sync could not key reporting edges (reporting_not_keyed) */
13442
+ 200: {
13443
+ headers: {
13444
+ [name: string]: unknown;
13445
+ };
13446
+ content: {
13447
+ "application/json": components["schemas"]["RunStructureInferenceRefusal"];
13448
+ };
13449
+ };
13450
+ /** @description A run is under way — freshly launched, or already in flight (alreadyRunning: true). Carries the runId the poll surface matches against and the workflowId of the org-structure/reanalyze workflow it executes (null only when the joined run predates the workflow launch) */
13451
+ 202: {
13452
+ headers: {
13453
+ [name: string]: unknown;
13454
+ };
13455
+ content: {
13456
+ "application/json": components["schemas"]["RunStructureInferenceAccepted"];
13457
+ };
13458
+ };
13459
+ };
13460
+ };
13082
13461
  getAnalysisWorkflow: {
13083
13462
  parameters: {
13084
13463
  query?: never;
@@ -13196,6 +13575,42 @@ export interface operations {
13196
13575
  };
13197
13576
  };
13198
13577
  };
13578
+ getAffordanceState: {
13579
+ parameters: {
13580
+ query: {
13581
+ ids: string;
13582
+ };
13583
+ header?: never;
13584
+ path?: never;
13585
+ cookie?: never;
13586
+ };
13587
+ requestBody?: never;
13588
+ responses: {
13589
+ /** @description Policy and availability per requested affordance id, in request order */
13590
+ 200: {
13591
+ headers: {
13592
+ [name: string]: unknown;
13593
+ };
13594
+ content: {
13595
+ "application/json": components["schemas"]["AffordanceStateResponse"];
13596
+ };
13597
+ };
13598
+ /** @description An id is not a known affordance, the list is empty, or it is too long */
13599
+ 400: {
13600
+ headers: {
13601
+ [name: string]: unknown;
13602
+ };
13603
+ content?: never;
13604
+ };
13605
+ /** @description The viewer is not an active member of the session org */
13606
+ 403: {
13607
+ headers: {
13608
+ [name: string]: unknown;
13609
+ };
13610
+ content?: never;
13611
+ };
13612
+ };
13613
+ };
13199
13614
  getCompanyMdTree: {
13200
13615
  parameters: {
13201
13616
  query?: {
@@ -18064,6 +18479,47 @@ export interface operations {
18064
18479
  };
18065
18480
  };
18066
18481
  };
18482
+ getQualityDecisionDiagnosis: {
18483
+ parameters: {
18484
+ query?: never;
18485
+ header?: never;
18486
+ path: {
18487
+ id: string;
18488
+ };
18489
+ cookie?: never;
18490
+ };
18491
+ requestBody?: never;
18492
+ responses: {
18493
+ /** @description The decision, whether its diagnosis is stored, pending or not applicable, and the report once stored */
18494
+ 200: {
18495
+ headers: {
18496
+ [name: string]: unknown;
18497
+ };
18498
+ content?: never;
18499
+ };
18500
+ /** @description Validation error */
18501
+ 400: {
18502
+ headers: {
18503
+ [name: string]: unknown;
18504
+ };
18505
+ content?: never;
18506
+ };
18507
+ /** @description Not an internal admin, or missing internal.manage_quality */
18508
+ 403: {
18509
+ headers: {
18510
+ [name: string]: unknown;
18511
+ };
18512
+ content?: never;
18513
+ };
18514
+ /** @description No such decision */
18515
+ 404: {
18516
+ headers: {
18517
+ [name: string]: unknown;
18518
+ };
18519
+ content?: never;
18520
+ };
18521
+ };
18522
+ };
18067
18523
  listCommentThreads: {
18068
18524
  parameters: {
18069
18525
  query: {
@@ -9,6 +9,7 @@ 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/affordances/state': ['GET'],
12
13
  '/api/analysis-workflows/{id}': ['GET'],
13
14
  '/api/analysis-workflows/{id}/settlement': ['POST'],
14
15
  '/api/analysis-workflows/{id}/stop': ['POST'],
@@ -101,6 +102,7 @@ export const openApiRoutes = {
101
102
  '/api/factory/quality/plans/{planId}/decision': ['GET'],
102
103
  '/api/factory/snapshot': ['GET'],
103
104
  '/api/ingestion/operations/{id}': ['GET'],
105
+ '/api/integrations/bamboohr/sync': ['POST'],
104
106
  '/api/internal-admin/impersonate/end': ['POST'],
105
107
  '/api/internal-admin/impersonate/session': ['GET'],
106
108
  '/api/internal-admin/impersonate/start': ['POST'],
@@ -110,6 +112,7 @@ export const openApiRoutes = {
110
112
  '/api/internal-admin/quality/candidates/{id}/accept': ['POST'],
111
113
  '/api/internal-admin/quality/candidates/{id}/reject': ['POST'],
112
114
  '/api/internal-admin/quality/changes/manual': ['POST'],
115
+ '/api/internal-admin/quality/decisions/{id}/diagnosis': ['GET'],
113
116
  '/api/internal-admin/quality/escalations': ['GET'],
114
117
  '/api/internal-admin/quality/escalations/{id}/resolve': ['POST'],
115
118
  '/api/internal-admin/quality/graders': ['GET'],
@@ -180,6 +183,7 @@ export const openApiRoutes = {
180
183
  '/api/org/structure-findings': ['GET'],
181
184
  '/api/org/structure-findings/{findingId}/dismiss': ['POST'],
182
185
  '/api/org/structure-findings/{findingId}/reopen': ['POST'],
186
+ '/api/org/structure-inference/runs': ['POST'],
183
187
  '/api/org/system-events': ['GET'],
184
188
  '/api/org/system-events/{id}/acknowledge': ['POST'],
185
189
  '/api/org/transfer-eligibility': ['GET'],