@thinkai/tai-api-contract 2.49.0 → 2.51.0-pr.877.bf4a3821
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/dist/generated/openapi.d.ts +356 -42
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/openapi/openapi.yaml +404 -82
- package/package.json +1 -1
- package/src/generated/openapi.ts +356 -42
- package/src/index.ts +30 -0
package/openapi/openapi.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.0.3
|
|
2
2
|
info:
|
|
3
3
|
title: ThinkAI API
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.51.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}/...`.
|
|
@@ -1933,13 +1933,9 @@ paths:
|
|
|
1933
1933
|
operationId: getAiUsageSpendAggregatedTeams
|
|
1934
1934
|
parameters:
|
|
1935
1935
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
1936
|
-
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
schema:
|
|
1940
|
-
type: string
|
|
1941
|
-
enum: [4w, 8w, q]
|
|
1942
|
-
default: 4w
|
|
1936
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
1937
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
1938
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
1943
1939
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
1944
1940
|
- name: team
|
|
1945
1941
|
in: query
|
|
@@ -1988,13 +1984,9 @@ paths:
|
|
|
1988
1984
|
operationId: getAiUsageSpendAggregatedContributors
|
|
1989
1985
|
parameters:
|
|
1990
1986
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
1991
|
-
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
schema:
|
|
1995
|
-
type: string
|
|
1996
|
-
enum: [4w, 8w, q]
|
|
1997
|
-
default: 4w
|
|
1987
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
1988
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
1989
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
1998
1990
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
1999
1991
|
- name: team
|
|
2000
1992
|
in: query
|
|
@@ -2042,13 +2034,9 @@ paths:
|
|
|
2042
2034
|
operationId: getAiUsageSpendContributorToolHeatmap
|
|
2043
2035
|
parameters:
|
|
2044
2036
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2045
|
-
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
schema:
|
|
2049
|
-
type: string
|
|
2050
|
-
enum: [4w, 8w, q]
|
|
2051
|
-
default: 4w
|
|
2037
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2038
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2039
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2052
2040
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2053
2041
|
- name: team
|
|
2054
2042
|
in: query
|
|
@@ -2096,13 +2084,9 @@ paths:
|
|
|
2096
2084
|
operationId: getAiUsageSpendKeyInsights
|
|
2097
2085
|
parameters:
|
|
2098
2086
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2099
|
-
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
schema:
|
|
2103
|
-
type: string
|
|
2104
|
-
enum: [4w, 8w, q]
|
|
2105
|
-
default: 4w
|
|
2087
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2088
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2089
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2106
2090
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2107
2091
|
- name: team
|
|
2108
2092
|
in: query
|
|
@@ -2145,21 +2129,69 @@ paths:
|
|
|
2145
2129
|
summary: AI usage & spend insights — AI-assisted code percentage
|
|
2146
2130
|
description: >
|
|
2147
2131
|
Period and weekly AI-assisted code percentage for the Measure **AI-assisted code**
|
|
2148
|
-
card on `/phase-c/c7` and the **AI impact** curve on `/phase-c/c4`. When
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
sets `dataQuality` to **estimated**. Clients should not present
|
|
2152
|
-
|
|
2132
|
+
card on `/phase-c/c7` and the **AI impact** curve on `/phase-c/c4`. When engagement
|
|
2133
|
+
daily rows exist for the scope, values are **measured** from Σ `ai_lines_added` ÷
|
|
2134
|
+
merged-PR lines (`dashboard_metrics`); otherwise the API falls back to token→LOC
|
|
2135
|
+
heuristics and sets `dataQuality` to **estimated**. Clients should not present
|
|
2136
|
+
estimated series as editor-measured signal.
|
|
2153
2137
|
operationId: getAiUsageSpendAiAssistedCodePercentage
|
|
2154
2138
|
parameters:
|
|
2155
2139
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2156
|
-
-
|
|
2140
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2141
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2142
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2143
|
+
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2144
|
+
- name: team
|
|
2157
2145
|
in: query
|
|
2158
|
-
description:
|
|
2146
|
+
description: Team name filter; send `All teams` to include every team.
|
|
2159
2147
|
schema:
|
|
2160
2148
|
type: string
|
|
2161
|
-
|
|
2162
|
-
|
|
2149
|
+
default: All teams
|
|
2150
|
+
- name: windowEnd
|
|
2151
|
+
in: query
|
|
2152
|
+
description: ISO timestamp for the end of the last weekly bucket; omit for current week.
|
|
2153
|
+
schema:
|
|
2154
|
+
type: string
|
|
2155
|
+
format: date-time
|
|
2156
|
+
responses:
|
|
2157
|
+
"200":
|
|
2158
|
+
description: AI-assisted code percentage series
|
|
2159
|
+
content:
|
|
2160
|
+
application/json:
|
|
2161
|
+
schema:
|
|
2162
|
+
$ref: "#/components/schemas/AiUsageSpendAiAssistedCodePercentageDto"
|
|
2163
|
+
"400":
|
|
2164
|
+
description: Invalid query parameters
|
|
2165
|
+
content:
|
|
2166
|
+
application/json:
|
|
2167
|
+
schema:
|
|
2168
|
+
type: object
|
|
2169
|
+
required: [error]
|
|
2170
|
+
properties:
|
|
2171
|
+
error: { type: string, example: invalid_query }
|
|
2172
|
+
"401":
|
|
2173
|
+
$ref: "#/components/responses/Unauthorized"
|
|
2174
|
+
"403":
|
|
2175
|
+
$ref: "#/components/responses/Forbidden"
|
|
2176
|
+
"404":
|
|
2177
|
+
description: Workspace does not exist or malformed workspaceId
|
|
2178
|
+
|
|
2179
|
+
/workspaces/{workspaceId}/insights/ai-usage-spend/provider-engagement-insights:
|
|
2180
|
+
get:
|
|
2181
|
+
tags: [Workspace]
|
|
2182
|
+
summary: AI usage & spend insights — provider engagement cards
|
|
2183
|
+
description: >
|
|
2184
|
+
Provider-specific engagement insight metrics derived from
|
|
2185
|
+
`tai_workspace_ai_tool_engagement_daily` (accepted AI lines, tab completions,
|
|
2186
|
+
suggestion accept rates, Claude Code sessions, etc.). Metrics are
|
|
2187
|
+
**provider- and data-gated**: structurally absent signals render as N/A, not zero.
|
|
2188
|
+
Claude per-user cards require Enterprise Analytics (`insightsPlan` ≠ team).
|
|
2189
|
+
operationId: getAiUsageSpendProviderEngagementInsights
|
|
2190
|
+
parameters:
|
|
2191
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
2192
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2193
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2194
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2163
2195
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2164
2196
|
- name: team
|
|
2165
2197
|
in: query
|
|
@@ -2173,13 +2205,33 @@ paths:
|
|
|
2173
2205
|
schema:
|
|
2174
2206
|
type: string
|
|
2175
2207
|
format: date-time
|
|
2208
|
+
- name: memberExternalId
|
|
2209
|
+
in: query
|
|
2210
|
+
description: >
|
|
2211
|
+
When set, aggregate engagement metrics for a single AI-tool member
|
|
2212
|
+
(user detail pages). Mutually exclusive with `scopeTeamId`.
|
|
2213
|
+
schema:
|
|
2214
|
+
type: string
|
|
2215
|
+
- name: scopeTeamId
|
|
2216
|
+
in: query
|
|
2217
|
+
description: >
|
|
2218
|
+
Org-chart team id — aggregate engagement for members mapped to that team
|
|
2219
|
+
(team detail pages). Mutually exclusive with `memberExternalId`.
|
|
2220
|
+
schema:
|
|
2221
|
+
type: string
|
|
2222
|
+
- name: provider
|
|
2223
|
+
in: query
|
|
2224
|
+
description: Optional provider id filter (`cursor`, `claude`) for detail pages.
|
|
2225
|
+
schema:
|
|
2226
|
+
type: string
|
|
2227
|
+
enum: [cursor, claude]
|
|
2176
2228
|
responses:
|
|
2177
2229
|
"200":
|
|
2178
|
-
description:
|
|
2230
|
+
description: Provider engagement insight cards
|
|
2179
2231
|
content:
|
|
2180
2232
|
application/json:
|
|
2181
2233
|
schema:
|
|
2182
|
-
$ref: "#/components/schemas/
|
|
2234
|
+
$ref: "#/components/schemas/AiUsageSpendProviderEngagementInsightsDto"
|
|
2183
2235
|
"400":
|
|
2184
2236
|
description: Invalid query parameters
|
|
2185
2237
|
content:
|
|
@@ -2210,13 +2262,9 @@ paths:
|
|
|
2210
2262
|
operationId: getAiUsageSpendAiToolUsageSpend
|
|
2211
2263
|
parameters:
|
|
2212
2264
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2213
|
-
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
schema:
|
|
2217
|
-
type: string
|
|
2218
|
-
enum: [4w, 8w, q]
|
|
2219
|
-
default: 4w
|
|
2265
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2266
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2267
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2220
2268
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2221
2269
|
- name: team
|
|
2222
2270
|
in: query
|
|
@@ -2265,13 +2313,9 @@ paths:
|
|
|
2265
2313
|
operationId: getAiUsageSpendTeamToolHeatmap
|
|
2266
2314
|
parameters:
|
|
2267
2315
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2268
|
-
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
schema:
|
|
2272
|
-
type: string
|
|
2273
|
-
enum: [4w, 8w, q]
|
|
2274
|
-
default: 4w
|
|
2316
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2317
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2318
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2275
2319
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2276
2320
|
- name: team
|
|
2277
2321
|
in: query
|
|
@@ -2320,13 +2364,9 @@ paths:
|
|
|
2320
2364
|
operationId: getAiUsageSpendRoiProductivitySignal
|
|
2321
2365
|
parameters:
|
|
2322
2366
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2323
|
-
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
schema:
|
|
2327
|
-
type: string
|
|
2328
|
-
enum: [4w, 8w, q]
|
|
2329
|
-
default: 4w
|
|
2367
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2368
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2369
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2330
2370
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2331
2371
|
- name: team
|
|
2332
2372
|
in: query
|
|
@@ -2376,13 +2416,9 @@ paths:
|
|
|
2376
2416
|
operationId: getAiUsageSpendUsageTrends
|
|
2377
2417
|
parameters:
|
|
2378
2418
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2379
|
-
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
schema:
|
|
2383
|
-
type: string
|
|
2384
|
-
enum: [4w, 8w, q]
|
|
2385
|
-
default: 4w
|
|
2419
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2420
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2421
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2386
2422
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2387
2423
|
- name: team
|
|
2388
2424
|
in: query
|
|
@@ -7768,6 +7804,41 @@ components:
|
|
|
7768
7804
|
items:
|
|
7769
7805
|
$ref: "#/components/schemas/ProductivityInsightsNeedsAttentionItemDto"
|
|
7770
7806
|
|
|
7807
|
+
AiUsageSpendGranularity:
|
|
7808
|
+
type: string
|
|
7809
|
+
enum: [day, week]
|
|
7810
|
+
description: >
|
|
7811
|
+
Echo of the resolved time bucket for this response. `day` when the request used an
|
|
7812
|
+
`Nd`/`cr:`/`from`+`to` window; `week` for legacy weekly rangeIds.
|
|
7813
|
+
|
|
7814
|
+
AiUsageSpendRangeId:
|
|
7815
|
+
type: string
|
|
7816
|
+
description: >
|
|
7817
|
+
Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`.
|
|
7818
|
+
Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`.
|
|
7819
|
+
|
|
7820
|
+
AiUsageSpendDailyBucketDto:
|
|
7821
|
+
type: object
|
|
7822
|
+
additionalProperties: false
|
|
7823
|
+
required: [date, tokenCount, spendCents, activeUsers]
|
|
7824
|
+
properties:
|
|
7825
|
+
date:
|
|
7826
|
+
type: string
|
|
7827
|
+
format: date
|
|
7828
|
+
description: UTC calendar day (`YYYY-MM-DD`).
|
|
7829
|
+
dayLabel:
|
|
7830
|
+
type: string
|
|
7831
|
+
description: Short label for table headers (e.g. MM/DD).
|
|
7832
|
+
tokenCount:
|
|
7833
|
+
type: integer
|
|
7834
|
+
minimum: 0
|
|
7835
|
+
spendCents:
|
|
7836
|
+
type: integer
|
|
7837
|
+
minimum: 0
|
|
7838
|
+
activeUsers:
|
|
7839
|
+
type: integer
|
|
7840
|
+
minimum: 0
|
|
7841
|
+
|
|
7771
7842
|
AiUsageSpendAggregatedTeamWeekDto:
|
|
7772
7843
|
type: object
|
|
7773
7844
|
additionalProperties: false
|
|
@@ -7798,7 +7869,7 @@ components:
|
|
|
7798
7869
|
AiUsageSpendAggregatedTeamRowDto:
|
|
7799
7870
|
type: object
|
|
7800
7871
|
additionalProperties: false
|
|
7801
|
-
required: [teamId, teamName, headcount
|
|
7872
|
+
required: [teamId, teamName, headcount]
|
|
7802
7873
|
properties:
|
|
7803
7874
|
teamId:
|
|
7804
7875
|
type: string
|
|
@@ -7809,6 +7880,11 @@ components:
|
|
|
7809
7880
|
minimum: 0
|
|
7810
7881
|
managerLabel:
|
|
7811
7882
|
type: string
|
|
7883
|
+
days:
|
|
7884
|
+
type: array
|
|
7885
|
+
description: Present in day-mode responses — daily token, spend, and active-user counts.
|
|
7886
|
+
items:
|
|
7887
|
+
$ref: "#/components/schemas/AiUsageSpendDailyBucketDto"
|
|
7812
7888
|
weeks:
|
|
7813
7889
|
type: array
|
|
7814
7890
|
items:
|
|
@@ -7848,8 +7924,17 @@ components:
|
|
|
7848
7924
|
type: string
|
|
7849
7925
|
format: uuid
|
|
7850
7926
|
range:
|
|
7927
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
7928
|
+
granularity:
|
|
7929
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
7930
|
+
from:
|
|
7931
|
+
type: string
|
|
7932
|
+
format: date
|
|
7933
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
7934
|
+
to:
|
|
7851
7935
|
type: string
|
|
7852
|
-
|
|
7936
|
+
format: date
|
|
7937
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
7853
7938
|
scope:
|
|
7854
7939
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
7855
7940
|
generatedAt:
|
|
@@ -7865,7 +7950,7 @@ components:
|
|
|
7865
7950
|
AiUsageSpendAggregatedContributorRowDto:
|
|
7866
7951
|
type: object
|
|
7867
7952
|
additionalProperties: false
|
|
7868
|
-
required: [contributorId, contributorName
|
|
7953
|
+
required: [contributorId, contributorName]
|
|
7869
7954
|
properties:
|
|
7870
7955
|
contributorId:
|
|
7871
7956
|
type: string
|
|
@@ -7878,6 +7963,11 @@ components:
|
|
|
7878
7963
|
type: string
|
|
7879
7964
|
department:
|
|
7880
7965
|
type: string
|
|
7966
|
+
days:
|
|
7967
|
+
type: array
|
|
7968
|
+
description: Present in day-mode responses — daily token, spend, and active-user counts.
|
|
7969
|
+
items:
|
|
7970
|
+
$ref: "#/components/schemas/AiUsageSpendDailyBucketDto"
|
|
7881
7971
|
weeks:
|
|
7882
7972
|
type: array
|
|
7883
7973
|
items:
|
|
@@ -7892,8 +7982,17 @@ components:
|
|
|
7892
7982
|
type: string
|
|
7893
7983
|
format: uuid
|
|
7894
7984
|
range:
|
|
7985
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
7986
|
+
granularity:
|
|
7987
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
7988
|
+
from:
|
|
7895
7989
|
type: string
|
|
7896
|
-
|
|
7990
|
+
format: date
|
|
7991
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
7992
|
+
to:
|
|
7993
|
+
type: string
|
|
7994
|
+
format: date
|
|
7995
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
7897
7996
|
scope:
|
|
7898
7997
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
7899
7998
|
generatedAt:
|
|
@@ -7920,8 +8019,17 @@ components:
|
|
|
7920
8019
|
type: string
|
|
7921
8020
|
format: uuid
|
|
7922
8021
|
range:
|
|
8022
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8023
|
+
granularity:
|
|
8024
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8025
|
+
from:
|
|
8026
|
+
type: string
|
|
8027
|
+
format: date
|
|
8028
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8029
|
+
to:
|
|
7923
8030
|
type: string
|
|
7924
|
-
|
|
8031
|
+
format: date
|
|
8032
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
7925
8033
|
scope:
|
|
7926
8034
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
7927
8035
|
generatedAt:
|
|
@@ -7956,8 +8064,17 @@ components:
|
|
|
7956
8064
|
type: string
|
|
7957
8065
|
format: uuid
|
|
7958
8066
|
range:
|
|
8067
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8068
|
+
granularity:
|
|
8069
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8070
|
+
from:
|
|
8071
|
+
type: string
|
|
8072
|
+
format: date
|
|
8073
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8074
|
+
to:
|
|
7959
8075
|
type: string
|
|
7960
|
-
|
|
8076
|
+
format: date
|
|
8077
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
7961
8078
|
scope:
|
|
7962
8079
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
7963
8080
|
generatedAt:
|
|
@@ -7985,6 +8102,33 @@ components:
|
|
|
7985
8102
|
to proxy tokens when usage rows omit counts; **adoption** — active AI-tool users vs org
|
|
7986
8103
|
headcount; **unavailable** — no usable signal for the selected scope.
|
|
7987
8104
|
|
|
8105
|
+
AiUsageSpendAiAssistedCodeDayDto:
|
|
8106
|
+
type: object
|
|
8107
|
+
additionalProperties: false
|
|
8108
|
+
required:
|
|
8109
|
+
[date, aiAssistedCodePercent, totalLoc, aiLoc, humanLoc, dataQuality]
|
|
8110
|
+
properties:
|
|
8111
|
+
date:
|
|
8112
|
+
type: string
|
|
8113
|
+
format: date
|
|
8114
|
+
dayLabel:
|
|
8115
|
+
type: string
|
|
8116
|
+
aiAssistedCodePercent:
|
|
8117
|
+
type: number
|
|
8118
|
+
minimum: 0
|
|
8119
|
+
maximum: 100
|
|
8120
|
+
totalLoc:
|
|
8121
|
+
type: integer
|
|
8122
|
+
minimum: 0
|
|
8123
|
+
aiLoc:
|
|
8124
|
+
type: integer
|
|
8125
|
+
minimum: 0
|
|
8126
|
+
humanLoc:
|
|
8127
|
+
type: integer
|
|
8128
|
+
minimum: 0
|
|
8129
|
+
dataQuality:
|
|
8130
|
+
$ref: "#/components/schemas/AiAssistedCodeDataQuality"
|
|
8131
|
+
|
|
7988
8132
|
AiUsageSpendAiAssistedCodeWeekDto:
|
|
7989
8133
|
type: object
|
|
7990
8134
|
additionalProperties: false
|
|
@@ -8037,14 +8181,22 @@ components:
|
|
|
8037
8181
|
- aiLoc
|
|
8038
8182
|
- humanLoc
|
|
8039
8183
|
- dataQuality
|
|
8040
|
-
- weeks
|
|
8041
8184
|
properties:
|
|
8042
8185
|
workspaceId:
|
|
8043
8186
|
type: string
|
|
8044
8187
|
format: uuid
|
|
8045
8188
|
range:
|
|
8189
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8190
|
+
granularity:
|
|
8191
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8192
|
+
from:
|
|
8193
|
+
type: string
|
|
8194
|
+
format: date
|
|
8195
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8196
|
+
to:
|
|
8046
8197
|
type: string
|
|
8047
|
-
|
|
8198
|
+
format: date
|
|
8199
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
8048
8200
|
scope:
|
|
8049
8201
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8050
8202
|
generatedAt:
|
|
@@ -8089,11 +8241,85 @@ components:
|
|
|
8089
8241
|
type: integer
|
|
8090
8242
|
minimum: 0
|
|
8091
8243
|
description: Scoped AI-tool spend in cents for the selected period.
|
|
8244
|
+
days:
|
|
8245
|
+
type: array
|
|
8246
|
+
description: Present in day-mode responses — daily AI-assisted code share series.
|
|
8247
|
+
items:
|
|
8248
|
+
$ref: "#/components/schemas/AiUsageSpendAiAssistedCodeDayDto"
|
|
8092
8249
|
weeks:
|
|
8093
8250
|
type: array
|
|
8094
8251
|
items:
|
|
8095
8252
|
$ref: "#/components/schemas/AiUsageSpendAiAssistedCodeWeekDto"
|
|
8096
8253
|
|
|
8254
|
+
ProviderEngagementInsightAvailability:
|
|
8255
|
+
type: string
|
|
8256
|
+
enum: [measured, not_applicable]
|
|
8257
|
+
|
|
8258
|
+
AiUsageSpendProviderEngagementMetricDto:
|
|
8259
|
+
type: object
|
|
8260
|
+
additionalProperties: false
|
|
8261
|
+
required: [id, label, value, displayValue, availability]
|
|
8262
|
+
properties:
|
|
8263
|
+
id:
|
|
8264
|
+
type: string
|
|
8265
|
+
label:
|
|
8266
|
+
type: string
|
|
8267
|
+
value:
|
|
8268
|
+
type: number
|
|
8269
|
+
nullable: true
|
|
8270
|
+
displayValue:
|
|
8271
|
+
type: string
|
|
8272
|
+
availability:
|
|
8273
|
+
$ref: "#/components/schemas/ProviderEngagementInsightAvailability"
|
|
8274
|
+
unit:
|
|
8275
|
+
type: string
|
|
8276
|
+
methodologyNote:
|
|
8277
|
+
type: string
|
|
8278
|
+
|
|
8279
|
+
AiUsageSpendProviderEngagementCardDto:
|
|
8280
|
+
type: object
|
|
8281
|
+
additionalProperties: false
|
|
8282
|
+
required: [providerId, providerName, metrics]
|
|
8283
|
+
properties:
|
|
8284
|
+
providerId:
|
|
8285
|
+
type: string
|
|
8286
|
+
providerName:
|
|
8287
|
+
type: string
|
|
8288
|
+
metrics:
|
|
8289
|
+
type: array
|
|
8290
|
+
items:
|
|
8291
|
+
$ref: "#/components/schemas/AiUsageSpendProviderEngagementMetricDto"
|
|
8292
|
+
|
|
8293
|
+
AiUsageSpendProviderEngagementInsightsDto:
|
|
8294
|
+
type: object
|
|
8295
|
+
additionalProperties: false
|
|
8296
|
+
required: [workspaceId, range, scope, generatedAt, providers]
|
|
8297
|
+
properties:
|
|
8298
|
+
workspaceId:
|
|
8299
|
+
type: string
|
|
8300
|
+
format: uuid
|
|
8301
|
+
range:
|
|
8302
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8303
|
+
granularity:
|
|
8304
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8305
|
+
from:
|
|
8306
|
+
type: string
|
|
8307
|
+
format: date
|
|
8308
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8309
|
+
to:
|
|
8310
|
+
type: string
|
|
8311
|
+
format: date
|
|
8312
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
8313
|
+
scope:
|
|
8314
|
+
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8315
|
+
generatedAt:
|
|
8316
|
+
type: string
|
|
8317
|
+
format: date-time
|
|
8318
|
+
providers:
|
|
8319
|
+
type: array
|
|
8320
|
+
items:
|
|
8321
|
+
$ref: "#/components/schemas/AiUsageSpendProviderEngagementCardDto"
|
|
8322
|
+
|
|
8097
8323
|
AiUsageSpendAiToolUsageSpendProviderItemDto:
|
|
8098
8324
|
type: object
|
|
8099
8325
|
additionalProperties: false
|
|
@@ -8147,8 +8373,17 @@ components:
|
|
|
8147
8373
|
type: string
|
|
8148
8374
|
format: uuid
|
|
8149
8375
|
range:
|
|
8376
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8377
|
+
granularity:
|
|
8378
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8379
|
+
from:
|
|
8150
8380
|
type: string
|
|
8151
|
-
|
|
8381
|
+
format: date
|
|
8382
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8383
|
+
to:
|
|
8384
|
+
type: string
|
|
8385
|
+
format: date
|
|
8386
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
8152
8387
|
scope:
|
|
8153
8388
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8154
8389
|
generatedAt:
|
|
@@ -8180,8 +8415,17 @@ components:
|
|
|
8180
8415
|
type: string
|
|
8181
8416
|
format: uuid
|
|
8182
8417
|
range:
|
|
8418
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8419
|
+
granularity:
|
|
8420
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8421
|
+
from:
|
|
8422
|
+
type: string
|
|
8423
|
+
format: date
|
|
8424
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8425
|
+
to:
|
|
8183
8426
|
type: string
|
|
8184
|
-
|
|
8427
|
+
format: date
|
|
8428
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
8185
8429
|
scope:
|
|
8186
8430
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8187
8431
|
generatedAt:
|
|
@@ -8192,6 +8436,23 @@ components:
|
|
|
8192
8436
|
items:
|
|
8193
8437
|
$ref: "#/components/schemas/AiUsageSpendAggregatedTeamRowDto"
|
|
8194
8438
|
|
|
8439
|
+
AiUsageSpendRoiProductivitySignalDayDto:
|
|
8440
|
+
type: object
|
|
8441
|
+
additionalProperties: false
|
|
8442
|
+
required: [date, mergedPrCount, tokenCount]
|
|
8443
|
+
properties:
|
|
8444
|
+
date:
|
|
8445
|
+
type: string
|
|
8446
|
+
format: date
|
|
8447
|
+
dayLabel:
|
|
8448
|
+
type: string
|
|
8449
|
+
mergedPrCount:
|
|
8450
|
+
type: integer
|
|
8451
|
+
minimum: 0
|
|
8452
|
+
tokenCount:
|
|
8453
|
+
type: integer
|
|
8454
|
+
minimum: 0
|
|
8455
|
+
|
|
8195
8456
|
AiUsageSpendRoiProductivitySignalWeekDto:
|
|
8196
8457
|
type: object
|
|
8197
8458
|
additionalProperties: false
|
|
@@ -8229,14 +8490,22 @@ components:
|
|
|
8229
8490
|
- aiAssistedPrRatio
|
|
8230
8491
|
- prThroughputDeltaPercent
|
|
8231
8492
|
- usageDeltaPercent
|
|
8232
|
-
- weeks
|
|
8233
8493
|
properties:
|
|
8234
8494
|
workspaceId:
|
|
8235
8495
|
type: string
|
|
8236
8496
|
format: uuid
|
|
8237
8497
|
range:
|
|
8498
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8499
|
+
granularity:
|
|
8500
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8501
|
+
from:
|
|
8502
|
+
type: string
|
|
8503
|
+
format: date
|
|
8504
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8505
|
+
to:
|
|
8238
8506
|
type: string
|
|
8239
|
-
|
|
8507
|
+
format: date
|
|
8508
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
8240
8509
|
scope:
|
|
8241
8510
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8242
8511
|
generatedAt:
|
|
@@ -8265,11 +8534,35 @@ components:
|
|
|
8265
8534
|
usageDeltaPercent:
|
|
8266
8535
|
type: number
|
|
8267
8536
|
description: Percent change in token usage (recent half vs prior half of range).
|
|
8537
|
+
days:
|
|
8538
|
+
type: array
|
|
8539
|
+
description: Present in day-mode responses — daily merged PR and token counts.
|
|
8540
|
+
items:
|
|
8541
|
+
$ref: "#/components/schemas/AiUsageSpendRoiProductivitySignalDayDto"
|
|
8268
8542
|
weeks:
|
|
8269
8543
|
type: array
|
|
8270
8544
|
items:
|
|
8271
8545
|
$ref: "#/components/schemas/AiUsageSpendRoiProductivitySignalWeekDto"
|
|
8272
8546
|
|
|
8547
|
+
AiUsageSpendUsageTrendsProviderDayDto:
|
|
8548
|
+
type: object
|
|
8549
|
+
additionalProperties: false
|
|
8550
|
+
required: [providerId, providerName, spendCents, tokenCount, activeUsers]
|
|
8551
|
+
properties:
|
|
8552
|
+
providerId:
|
|
8553
|
+
type: string
|
|
8554
|
+
providerName:
|
|
8555
|
+
type: string
|
|
8556
|
+
spendCents:
|
|
8557
|
+
type: integer
|
|
8558
|
+
minimum: 0
|
|
8559
|
+
tokenCount:
|
|
8560
|
+
type: integer
|
|
8561
|
+
minimum: 0
|
|
8562
|
+
activeUsers:
|
|
8563
|
+
type: integer
|
|
8564
|
+
minimum: 0
|
|
8565
|
+
|
|
8273
8566
|
AiUsageSpendUsageTrendsProviderWeekDto:
|
|
8274
8567
|
type: object
|
|
8275
8568
|
additionalProperties: false
|
|
@@ -8289,6 +8582,21 @@ components:
|
|
|
8289
8582
|
type: integer
|
|
8290
8583
|
minimum: 0
|
|
8291
8584
|
|
|
8585
|
+
AiUsageSpendUsageTrendsDayDto:
|
|
8586
|
+
type: object
|
|
8587
|
+
additionalProperties: false
|
|
8588
|
+
required: [date, providers]
|
|
8589
|
+
properties:
|
|
8590
|
+
date:
|
|
8591
|
+
type: string
|
|
8592
|
+
format: date
|
|
8593
|
+
dayLabel:
|
|
8594
|
+
type: string
|
|
8595
|
+
providers:
|
|
8596
|
+
type: array
|
|
8597
|
+
items:
|
|
8598
|
+
$ref: "#/components/schemas/AiUsageSpendUsageTrendsProviderDayDto"
|
|
8599
|
+
|
|
8292
8600
|
AiUsageSpendUsageTrendsWeekDto:
|
|
8293
8601
|
type: object
|
|
8294
8602
|
additionalProperties: false
|
|
@@ -8310,19 +8618,33 @@ components:
|
|
|
8310
8618
|
AiUsageSpendUsageTrendsDto:
|
|
8311
8619
|
type: object
|
|
8312
8620
|
additionalProperties: false
|
|
8313
|
-
required: [workspaceId, range, scope, generatedAt
|
|
8621
|
+
required: [workspaceId, range, scope, generatedAt]
|
|
8314
8622
|
properties:
|
|
8315
8623
|
workspaceId:
|
|
8316
8624
|
type: string
|
|
8317
8625
|
format: uuid
|
|
8318
8626
|
range:
|
|
8627
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8628
|
+
granularity:
|
|
8629
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8630
|
+
from:
|
|
8631
|
+
type: string
|
|
8632
|
+
format: date
|
|
8633
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8634
|
+
to:
|
|
8319
8635
|
type: string
|
|
8320
|
-
|
|
8636
|
+
format: date
|
|
8637
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
8321
8638
|
scope:
|
|
8322
8639
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8323
8640
|
generatedAt:
|
|
8324
8641
|
type: string
|
|
8325
8642
|
format: date-time
|
|
8643
|
+
days:
|
|
8644
|
+
type: array
|
|
8645
|
+
description: Present in day-mode responses — per-provider spend and usage by day.
|
|
8646
|
+
items:
|
|
8647
|
+
$ref: "#/components/schemas/AiUsageSpendUsageTrendsDayDto"
|
|
8326
8648
|
weeks:
|
|
8327
8649
|
type: array
|
|
8328
8650
|
items:
|