@thinkai/tai-api-contract 2.32.1-pr.731.2 → 2.33.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.
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ThinkAI API
4
- version: 2.32.1
4
+ version: 2.33.0
5
5
  description: >
6
6
  Contract surface for the AI Driven SDLC backend used by ThinkAI.
7
7
  Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
@@ -46,6 +46,8 @@ tags:
46
46
  description: Authenticated user profile (§11)
47
47
  - name: Preferences
48
48
  description: Per-user per-workspace preferences (§12)
49
+ - name: Consent
50
+ description: Per-user cookie and browser-storage consent records (GDPR Art. 7 / UAE PDPL)
49
51
  - name: OrgChartImport
50
52
  description: Org chart import via storage path (§14)
51
53
  - name: AgenticFoundation
@@ -3213,25 +3215,6 @@ paths:
3213
3215
  - $ref: "#/components/parameters/PaginationLimit"
3214
3216
  - $ref: "#/components/parameters/PaginationOffset"
3215
3217
  - $ref: "#/components/parameters/PaginationOrder"
3216
- - name: sort
3217
- in: query
3218
- required: false
3219
- description: >
3220
- Server-side sort column (the activity "5 W's"). Combined with `order` (asc/desc).
3221
- Defaults to `when` (occurredAt). `occurredAt`/`id` is always the tiebreaker.
3222
- schema:
3223
- type: string
3224
- enum: [when, who, what, why, where]
3225
- - name: productArea
3226
- in: query
3227
- required: false
3228
- description: >
3229
- Coarse product-area grouping filter (#156). `integration` = GitHub + AI-tool key events;
3230
- `agentic_foundation` = repos, readiness scans, fixes; `workspace_team` = members + HRIS.
3231
- Omit (or pass `all`) for every area.
3232
- schema:
3233
- type: string
3234
- enum: [integration, agentic_foundation, workspace_team, all]
3235
3218
  - name: eventType
3236
3219
  in: query
3237
3220
  description: Filter to a specific event type.
@@ -4062,79 +4045,6 @@ paths:
4062
4045
  "403":
4063
4046
  $ref: "#/components/responses/Forbidden"
4064
4047
 
4065
- /workspaces/{workspaceId}/repo-eligibility:
4066
- get:
4067
- tags: [RepositoryReadiness]
4068
- summary: Get repo-sync eligibility gate (defaults + per-workspace overrides)
4069
- description: >
4070
- Returns the effective repo-sync eligibility gate (archived / fork / size / count) for the
4071
- workspace: the global `defaults`, any per-workspace `overrides`, the merged `effective`
4072
- values, and whether the caller can edit without platform-admin (`canEditUnrestricted`).
4073
- Member-level read access.
4074
- operationId: getWorkspaceRepoEligibility
4075
- parameters:
4076
- - $ref: "#/components/parameters/WorkspaceId"
4077
- responses:
4078
- "200":
4079
- description: Effective repo-eligibility configuration
4080
- content:
4081
- application/json:
4082
- schema:
4083
- $ref: "#/components/schemas/WorkspaceRepoEligibilityDto"
4084
- "401":
4085
- $ref: "#/components/responses/Unauthorized"
4086
- "403":
4087
- $ref: "#/components/responses/Forbidden"
4088
- put:
4089
- tags: [RepositoryReadiness]
4090
- summary: Set per-workspace repo-sync eligibility overrides
4091
- description: >
4092
- Set (or clear, with an empty `overrides`) the per-workspace repo-sync eligibility overrides.
4093
- **Platform admins** may set any value (raise caps, `0` = unlimited, include archived/forks).
4094
- **Workspace admins** may only make the gate *more restrictive* than the platform defaults
4095
- (lower caps, exclude archived/forks) — exceeding a platform limit returns `403`
4096
- (`repo_eligibility_bound_exceeded`). Requires workspace admin or platform admin.
4097
- operationId: putWorkspaceRepoEligibility
4098
- parameters:
4099
- - $ref: "#/components/parameters/WorkspaceId"
4100
- requestBody:
4101
- required: true
4102
- content:
4103
- application/json:
4104
- schema:
4105
- type: object
4106
- required: [overrides]
4107
- properties:
4108
- overrides:
4109
- $ref: "#/components/schemas/RepoEligibilityOverridesDto"
4110
- responses:
4111
- "200":
4112
- description: Overrides saved
4113
- content:
4114
- application/json:
4115
- schema:
4116
- type: object
4117
- required: [overrides, effective]
4118
- properties:
4119
- overrides:
4120
- $ref: "#/components/schemas/RepoEligibilityOverridesDto"
4121
- effective:
4122
- $ref: "#/components/schemas/RepoEligibilityConfigDto"
4123
- "400":
4124
- description: Invalid request body
4125
- content:
4126
- application/json:
4127
- schema:
4128
- $ref: "#/components/schemas/ErrorMessageDto"
4129
- "401":
4130
- $ref: "#/components/responses/Unauthorized"
4131
- "403":
4132
- description: Forbidden, or a workspace-admin value exceeds a platform limit (`repo_eligibility_bound_exceeded`)
4133
- content:
4134
- application/json:
4135
- schema:
4136
- $ref: "#/components/schemas/ErrorMessageDto"
4137
-
4138
4048
  /workspaces/{workspaceId}/readiness/cursor-key-usage:
4139
4049
  get:
4140
4050
  tags: [RepositoryReadiness]
@@ -4437,6 +4347,52 @@ paths:
4437
4347
  "401":
4438
4348
  $ref: "#/components/responses/Unauthorized"
4439
4349
 
4350
+ /me/consent:
4351
+ get:
4352
+ tags: [Consent]
4353
+ summary: Get cookie/storage consent for current user
4354
+ operationId: getMyConsent
4355
+ responses:
4356
+ "200":
4357
+ description: Consent record
4358
+ content:
4359
+ application/json:
4360
+ schema:
4361
+ $ref: "#/components/schemas/ConsentRecordDto"
4362
+ "401":
4363
+ $ref: "#/components/responses/Unauthorized"
4364
+ "404":
4365
+ description: No consent record stored yet
4366
+ content:
4367
+ application/json:
4368
+ schema:
4369
+ $ref: "#/components/schemas/ErrorMessageDto"
4370
+ put:
4371
+ tags: [Consent]
4372
+ summary: Upsert cookie/storage consent
4373
+ operationId: putMyConsent
4374
+ requestBody:
4375
+ required: true
4376
+ content:
4377
+ application/json:
4378
+ schema:
4379
+ $ref: "#/components/schemas/PutConsentBodyDto"
4380
+ responses:
4381
+ "200":
4382
+ description: Saved consent record
4383
+ content:
4384
+ application/json:
4385
+ schema:
4386
+ $ref: "#/components/schemas/ConsentRecordDto"
4387
+ "400":
4388
+ description: Validation failed
4389
+ content:
4390
+ application/json:
4391
+ schema:
4392
+ $ref: "#/components/schemas/ConsentValidationErrorDto"
4393
+ "401":
4394
+ $ref: "#/components/responses/Unauthorized"
4395
+
4440
4396
  /workspaces/{workspaceId}/org-chart/import:
4441
4397
  post:
4442
4398
  tags: [OrgChartImport]
@@ -6848,123 +6804,6 @@ components:
6848
6804
  format: date-time
6849
6805
  nullable: true
6850
6806
  description: Last push or metadata update from GitHub when available.
6851
- archived:
6852
- type: boolean
6853
- nullable: true
6854
- description: True when the repository is archived (read-only on GitHub).
6855
- fork:
6856
- type: boolean
6857
- nullable: true
6858
- description: True when the repository is a fork of another repository.
6859
- disabled:
6860
- type: boolean
6861
- nullable: true
6862
- description: True when the repository is disabled on GitHub.
6863
- size:
6864
- type: integer
6865
- nullable: true
6866
- description: Repository size in KB as reported by GitHub.
6867
- readOnly:
6868
- type: boolean
6869
- nullable: true
6870
- description: >
6871
- True when the GitHub App installation lacks push access to this repo
6872
- (read-only). Read-only repos are rejected during sync because readiness
6873
- fixes require write access.
6874
- ineligibleReason:
6875
- type: string
6876
- nullable: true
6877
- description: >
6878
- Set when this repo was skipped during sync due to an eligibility check.
6879
- The frontend should display this as an inline explanation (e.g. "This repo is archived").
6880
- eligibilityStatus:
6881
- type: string
6882
- enum: [eligible, ineligible]
6883
- nullable: true
6884
- description: >
6885
- Language-based eligibility for Agentic-Foundation readiness analysis (issue #44).
6886
- `ineligible` repos (no supported stack) render read-only/orange in the AF list with
6887
- no analyze/score/fix actions. Mixed monorepos with a supported secondary stack are
6888
- `eligible`. Distinct from `ineligibleReason`, which reflects the structural sync gate.
6889
- eligibilityReason:
6890
- type: string
6891
- nullable: true
6892
- description: >
6893
- Human-readable explanation when `eligibilityStatus` is `ineligible`
6894
- (e.g. "This repository's primary language (Python) is not supported in v1").
6895
- primaryStack:
6896
- type: string
6897
- nullable: true
6898
- description: >
6899
- Dominant supported stack (by GitHub language bytes), one of
6900
- backend_jvm | ios_app | web_spa | backend_go | backend_python. Null for ineligible repos.
6901
- secondaryStack:
6902
- type: string
6903
- nullable: true
6904
- description: Second supported stack for a multi-stack repo, or null.
6905
- supportedStacks:
6906
- type: array
6907
- nullable: true
6908
- items:
6909
- type: string
6910
- description: >
6911
- All supported stacks detected for the repo (ordered, primary first). Empty/null
6912
- when no supported stack is present. Drives multi-stack scanning and the orange
6913
- mixed-monorepo box in the AF UI.
6914
-
6915
- RepoEligibilityConfigDto:
6916
- type: object
6917
- description: Resolved repo-sync eligibility gate (defaults or effective). All fields present.
6918
- required: [excludeArchived, excludeForks, maxRepoSizeKb, maxReposPerWorkspace]
6919
- properties:
6920
- excludeArchived:
6921
- type: boolean
6922
- description: Skip archived repos during GitHub repo sync.
6923
- excludeForks:
6924
- type: boolean
6925
- description: Skip forked repos. Forks are included by default.
6926
- maxRepoSizeKb:
6927
- type: integer
6928
- description: Max repo size in KB (GitHub-reported). 0 = no limit.
6929
- maxReposPerWorkspace:
6930
- type: integer
6931
- description: Max repos materialized per workspace per sync. 0 = no limit.
6932
-
6933
- RepoEligibilityOverridesDto:
6934
- type: object
6935
- additionalProperties: false
6936
- description: >
6937
- Per-workspace overrides for the repo-sync eligibility gate. Any field present wins over the
6938
- global default; omit a field to inherit the default. An empty object clears all overrides.
6939
- properties:
6940
- excludeArchived:
6941
- type: boolean
6942
- nullable: true
6943
- excludeForks:
6944
- type: boolean
6945
- nullable: true
6946
- maxRepoSizeKb:
6947
- type: integer
6948
- minimum: 0
6949
- nullable: true
6950
- maxReposPerWorkspace:
6951
- type: integer
6952
- minimum: 0
6953
- nullable: true
6954
-
6955
- WorkspaceRepoEligibilityDto:
6956
- type: object
6957
- required: [defaults, overrides, effective, canEditUnrestricted]
6958
- properties:
6959
- defaults:
6960
- $ref: "#/components/schemas/RepoEligibilityConfigDto"
6961
- overrides:
6962
- $ref: "#/components/schemas/RepoEligibilityOverridesDto"
6963
- effective:
6964
- $ref: "#/components/schemas/RepoEligibilityConfigDto"
6965
- canEditUnrestricted:
6966
- type: boolean
6967
- description: True when the caller is a platform admin (may set any value, incl. raising caps).
6968
6807
 
6969
6808
  GithubMissingPermissionDto:
6970
6809
  type: object
@@ -7807,8 +7646,10 @@ components:
7807
7646
  type: array
7808
7647
  description: >
7809
7648
  Individual rubric criterion outcomes from the latest successful scan.
7810
- Always present on the single-repo detail endpoint; empty array when no
7811
- scan has completed yet for this dimension.
7649
+ Always present on the single-repo detail endpoint. When the repo has a
7650
+ succeeded scan but a dimension was not evaluated (e.g. Section I on older
7651
+ runs), the API returns full rubric placeholders with status `blocked`.
7652
+ Empty array only when the repo has no succeeded scan yet.
7812
7653
  items:
7813
7654
  $ref: "#/components/schemas/CriterionDetailDto"
7814
7655
  issues:
@@ -7993,33 +7834,6 @@ components:
7993
7834
  nullable: true
7994
7835
  enum: [github_removed, installation_disconnected, installation_replaced, superseded]
7995
7836
  description: Why the repo was archived. Only present when `archivedAt` is set.
7996
- eligibilityStatus:
7997
- type: string
7998
- enum: [eligible, ineligible]
7999
- nullable: true
8000
- description: >
8001
- Language-based eligibility for Agentic-Foundation analysis (#44). `ineligible` repos
8002
- (no v1-supported stack) render read-only/orange in the AF list with no analyze/score/fix
8003
- actions; the server also rejects analyze requests for them. Null until the first
8004
- sync/scan computes it.
8005
- eligibilityReason:
8006
- type: string
8007
- nullable: true
8008
- description: Human-readable explanation when `eligibilityStatus` is `ineligible`.
8009
- primaryStack:
8010
- type: string
8011
- nullable: true
8012
- description: Dominant supported stack — backend_jvm | ios_app | web_spa | backend_go | backend_python. Null when ineligible/uncomputed.
8013
- secondaryStack:
8014
- type: string
8015
- nullable: true
8016
- description: Second supported stack for a multi-stack repo, or null.
8017
- supportedStacks:
8018
- type: array
8019
- nullable: true
8020
- items:
8021
- type: string
8022
- description: All supported stacks detected (ordered, primary first). Empty/null when none.
8023
7837
 
8024
7838
  RepoReadinessScoreDetailDto:
8025
7839
  type: object
@@ -8820,6 +8634,62 @@ components:
8820
8634
  nullable: true
8821
8635
  description: Temporary backward-compatibility alias (e.g. "Invalid timezone").
8822
8636
 
8637
+ ConsentCategoriesDto:
8638
+ type: object
8639
+ additionalProperties: false
8640
+ required: [functional, analytics, marketing]
8641
+ properties:
8642
+ functional:
8643
+ type: boolean
8644
+ description: Functional storage (preferences, onboarding, UI state).
8645
+ analytics:
8646
+ type: boolean
8647
+ description: Analytics and product telemetry in the browser.
8648
+ marketing:
8649
+ type: boolean
8650
+ description: Advertising and remarketing tags.
8651
+
8652
+ PutConsentBodyDto:
8653
+ type: object
8654
+ additionalProperties: false
8655
+ required: [policyVersion, categories]
8656
+ properties:
8657
+ policyVersion:
8658
+ type: string
8659
+ description: Cookie policy version the user consented to.
8660
+ maxLength: 64
8661
+ categories:
8662
+ $ref: "#/components/schemas/ConsentCategoriesDto"
8663
+
8664
+ ConsentRecordDto:
8665
+ type: object
8666
+ additionalProperties: false
8667
+ required: [policyVersion, categories, recordedAt]
8668
+ properties:
8669
+ policyVersion:
8670
+ type: string
8671
+ categories:
8672
+ $ref: "#/components/schemas/ConsentCategoriesDto"
8673
+ recordedAt:
8674
+ type: string
8675
+ format: date-time
8676
+ description: When consent was last recorded (UTC).
8677
+
8678
+ ConsentValidationErrorDto:
8679
+ type: object
8680
+ required: [error, issues]
8681
+ properties:
8682
+ error:
8683
+ type: string
8684
+ enum: [ValidationError]
8685
+ issues:
8686
+ type: array
8687
+ items:
8688
+ $ref: "#/components/schemas/ValidationIssueDto"
8689
+ legacyError:
8690
+ type: string
8691
+ nullable: true
8692
+
8823
8693
  OrgChartImportBodyDto:
8824
8694
  type: object
8825
8695
  additionalProperties: false
@@ -9094,29 +8964,18 @@ components:
9094
8964
  - readiness.scan_completed
9095
8965
  - readiness.scan_failed
9096
8966
  - readiness.scan_partial
9097
- - integrations.agent_execution.provider_changed
9098
- - integrations.repo_eligibility.overrides_changed
9099
- - integrations.cursor.platform_key_enabled
9100
- - integrations.cursor.platform_key_disabled
8967
+ - config.cursor.added
8968
+ - config.cursor.updated
8969
+ - config.cursor.removed
8970
+ - config.cursor.platform_key_enabled
8971
+ - config.cursor.platform_key_disabled
8972
+ - config.claude.added
8973
+ - config.claude.updated
8974
+ - config.claude.removed
8975
+ - config.agent_execution.provider_changed
9101
8976
  - member.invited
9102
8977
  - member.role_changed
9103
8978
  - member.removed
9104
- - repo.sync_skipped
9105
- - integrations.cursor.execution_key.added
9106
- - integrations.cursor.execution_key.updated
9107
- - integrations.cursor.execution_key.removed
9108
- - integrations.cursor.execution_key.check_failed
9109
- - integrations.cursor.admin_key.added
9110
- - integrations.cursor.admin_key.updated
9111
- - integrations.cursor.admin_key.removed
9112
- - integrations.claude.execution_key.added
9113
- - integrations.claude.execution_key.updated
9114
- - integrations.claude.execution_key.removed
9115
- - integrations.claude.execution_key.check_failed
9116
- - integrations.claude.admin_key.added
9117
- - integrations.claude.admin_key.updated
9118
- - integrations.claude.admin_key.removed
9119
- - readiness.scan_precheck_failed
9120
8979
 
9121
8980
  ActivityLogActorDto:
9122
8981
  type: object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.32.1-pr.731.2",
3
+ "version": "2.33.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",