@thinkai/tai-api-contract 2.50.0-pr.877.6ff333f6 → 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 +257 -45
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +292 -86
- package/package.json +1 -1
- package/src/generated/openapi.ts +257 -45
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
|
|
@@ -2153,13 +2137,9 @@ paths:
|
|
|
2153
2137
|
operationId: getAiUsageSpendAiAssistedCodePercentage
|
|
2154
2138
|
parameters:
|
|
2155
2139
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2156
|
-
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
schema:
|
|
2160
|
-
type: string
|
|
2161
|
-
enum: [4w, 8w, q]
|
|
2162
|
-
default: 4w
|
|
2140
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2141
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2142
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2163
2143
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2164
2144
|
- name: team
|
|
2165
2145
|
in: query
|
|
@@ -2209,13 +2189,9 @@ paths:
|
|
|
2209
2189
|
operationId: getAiUsageSpendProviderEngagementInsights
|
|
2210
2190
|
parameters:
|
|
2211
2191
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2212
|
-
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
schema:
|
|
2216
|
-
type: string
|
|
2217
|
-
enum: [4w, 8w, q]
|
|
2218
|
-
default: 4w
|
|
2192
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2193
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2194
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2219
2195
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2220
2196
|
- name: team
|
|
2221
2197
|
in: query
|
|
@@ -2229,6 +2205,26 @@ paths:
|
|
|
2229
2205
|
schema:
|
|
2230
2206
|
type: string
|
|
2231
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]
|
|
2232
2228
|
responses:
|
|
2233
2229
|
"200":
|
|
2234
2230
|
description: Provider engagement insight cards
|
|
@@ -2266,13 +2262,9 @@ paths:
|
|
|
2266
2262
|
operationId: getAiUsageSpendAiToolUsageSpend
|
|
2267
2263
|
parameters:
|
|
2268
2264
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2269
|
-
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
schema:
|
|
2273
|
-
type: string
|
|
2274
|
-
enum: [4w, 8w, q]
|
|
2275
|
-
default: 4w
|
|
2265
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2266
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2267
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2276
2268
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2277
2269
|
- name: team
|
|
2278
2270
|
in: query
|
|
@@ -2321,13 +2313,9 @@ paths:
|
|
|
2321
2313
|
operationId: getAiUsageSpendTeamToolHeatmap
|
|
2322
2314
|
parameters:
|
|
2323
2315
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2324
|
-
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
schema:
|
|
2328
|
-
type: string
|
|
2329
|
-
enum: [4w, 8w, q]
|
|
2330
|
-
default: 4w
|
|
2316
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2317
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2318
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2331
2319
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2332
2320
|
- name: team
|
|
2333
2321
|
in: query
|
|
@@ -2376,13 +2364,9 @@ paths:
|
|
|
2376
2364
|
operationId: getAiUsageSpendRoiProductivitySignal
|
|
2377
2365
|
parameters:
|
|
2378
2366
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2379
|
-
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
schema:
|
|
2383
|
-
type: string
|
|
2384
|
-
enum: [4w, 8w, q]
|
|
2385
|
-
default: 4w
|
|
2367
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2368
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2369
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2386
2370
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2387
2371
|
- name: team
|
|
2388
2372
|
in: query
|
|
@@ -2432,13 +2416,9 @@ paths:
|
|
|
2432
2416
|
operationId: getAiUsageSpendUsageTrends
|
|
2433
2417
|
parameters:
|
|
2434
2418
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
2435
|
-
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
schema:
|
|
2439
|
-
type: string
|
|
2440
|
-
enum: [4w, 8w, q]
|
|
2441
|
-
default: 4w
|
|
2419
|
+
- $ref: "#/components/parameters/InsightsProductivityRangeId"
|
|
2420
|
+
- $ref: "#/components/parameters/InsightsProductivityFrom"
|
|
2421
|
+
- $ref: "#/components/parameters/InsightsProductivityTo"
|
|
2442
2422
|
- $ref: "#/components/parameters/InsightsDepartmentFilter"
|
|
2443
2423
|
- name: team
|
|
2444
2424
|
in: query
|
|
@@ -7824,6 +7804,41 @@ components:
|
|
|
7824
7804
|
items:
|
|
7825
7805
|
$ref: "#/components/schemas/ProductivityInsightsNeedsAttentionItemDto"
|
|
7826
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
|
+
|
|
7827
7842
|
AiUsageSpendAggregatedTeamWeekDto:
|
|
7828
7843
|
type: object
|
|
7829
7844
|
additionalProperties: false
|
|
@@ -7854,7 +7869,7 @@ components:
|
|
|
7854
7869
|
AiUsageSpendAggregatedTeamRowDto:
|
|
7855
7870
|
type: object
|
|
7856
7871
|
additionalProperties: false
|
|
7857
|
-
required: [teamId, teamName, headcount
|
|
7872
|
+
required: [teamId, teamName, headcount]
|
|
7858
7873
|
properties:
|
|
7859
7874
|
teamId:
|
|
7860
7875
|
type: string
|
|
@@ -7865,6 +7880,11 @@ components:
|
|
|
7865
7880
|
minimum: 0
|
|
7866
7881
|
managerLabel:
|
|
7867
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"
|
|
7868
7888
|
weeks:
|
|
7869
7889
|
type: array
|
|
7870
7890
|
items:
|
|
@@ -7904,8 +7924,17 @@ components:
|
|
|
7904
7924
|
type: string
|
|
7905
7925
|
format: uuid
|
|
7906
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:
|
|
7907
7935
|
type: string
|
|
7908
|
-
|
|
7936
|
+
format: date
|
|
7937
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
7909
7938
|
scope:
|
|
7910
7939
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
7911
7940
|
generatedAt:
|
|
@@ -7921,7 +7950,7 @@ components:
|
|
|
7921
7950
|
AiUsageSpendAggregatedContributorRowDto:
|
|
7922
7951
|
type: object
|
|
7923
7952
|
additionalProperties: false
|
|
7924
|
-
required: [contributorId, contributorName
|
|
7953
|
+
required: [contributorId, contributorName]
|
|
7925
7954
|
properties:
|
|
7926
7955
|
contributorId:
|
|
7927
7956
|
type: string
|
|
@@ -7934,6 +7963,11 @@ components:
|
|
|
7934
7963
|
type: string
|
|
7935
7964
|
department:
|
|
7936
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"
|
|
7937
7971
|
weeks:
|
|
7938
7972
|
type: array
|
|
7939
7973
|
items:
|
|
@@ -7948,8 +7982,17 @@ components:
|
|
|
7948
7982
|
type: string
|
|
7949
7983
|
format: uuid
|
|
7950
7984
|
range:
|
|
7985
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
7986
|
+
granularity:
|
|
7987
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
7988
|
+
from:
|
|
7989
|
+
type: string
|
|
7990
|
+
format: date
|
|
7991
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
7992
|
+
to:
|
|
7951
7993
|
type: string
|
|
7952
|
-
|
|
7994
|
+
format: date
|
|
7995
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
7953
7996
|
scope:
|
|
7954
7997
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
7955
7998
|
generatedAt:
|
|
@@ -7976,8 +8019,17 @@ components:
|
|
|
7976
8019
|
type: string
|
|
7977
8020
|
format: uuid
|
|
7978
8021
|
range:
|
|
8022
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8023
|
+
granularity:
|
|
8024
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8025
|
+
from:
|
|
7979
8026
|
type: string
|
|
7980
|
-
|
|
8027
|
+
format: date
|
|
8028
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8029
|
+
to:
|
|
8030
|
+
type: string
|
|
8031
|
+
format: date
|
|
8032
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
7981
8033
|
scope:
|
|
7982
8034
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
7983
8035
|
generatedAt:
|
|
@@ -8012,8 +8064,17 @@ components:
|
|
|
8012
8064
|
type: string
|
|
8013
8065
|
format: uuid
|
|
8014
8066
|
range:
|
|
8067
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8068
|
+
granularity:
|
|
8069
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8070
|
+
from:
|
|
8015
8071
|
type: string
|
|
8016
|
-
|
|
8072
|
+
format: date
|
|
8073
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8074
|
+
to:
|
|
8075
|
+
type: string
|
|
8076
|
+
format: date
|
|
8077
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
8017
8078
|
scope:
|
|
8018
8079
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8019
8080
|
generatedAt:
|
|
@@ -8041,6 +8102,33 @@ components:
|
|
|
8041
8102
|
to proxy tokens when usage rows omit counts; **adoption** — active AI-tool users vs org
|
|
8042
8103
|
headcount; **unavailable** — no usable signal for the selected scope.
|
|
8043
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
|
+
|
|
8044
8132
|
AiUsageSpendAiAssistedCodeWeekDto:
|
|
8045
8133
|
type: object
|
|
8046
8134
|
additionalProperties: false
|
|
@@ -8093,14 +8181,22 @@ components:
|
|
|
8093
8181
|
- aiLoc
|
|
8094
8182
|
- humanLoc
|
|
8095
8183
|
- dataQuality
|
|
8096
|
-
- weeks
|
|
8097
8184
|
properties:
|
|
8098
8185
|
workspaceId:
|
|
8099
8186
|
type: string
|
|
8100
8187
|
format: uuid
|
|
8101
8188
|
range:
|
|
8189
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8190
|
+
granularity:
|
|
8191
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8192
|
+
from:
|
|
8102
8193
|
type: string
|
|
8103
|
-
|
|
8194
|
+
format: date
|
|
8195
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8196
|
+
to:
|
|
8197
|
+
type: string
|
|
8198
|
+
format: date
|
|
8199
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
8104
8200
|
scope:
|
|
8105
8201
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8106
8202
|
generatedAt:
|
|
@@ -8145,6 +8241,11 @@ components:
|
|
|
8145
8241
|
type: integer
|
|
8146
8242
|
minimum: 0
|
|
8147
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"
|
|
8148
8249
|
weeks:
|
|
8149
8250
|
type: array
|
|
8150
8251
|
items:
|
|
@@ -8198,8 +8299,17 @@ components:
|
|
|
8198
8299
|
type: string
|
|
8199
8300
|
format: uuid
|
|
8200
8301
|
range:
|
|
8302
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8303
|
+
granularity:
|
|
8304
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8305
|
+
from:
|
|
8201
8306
|
type: string
|
|
8202
|
-
|
|
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`.
|
|
8203
8313
|
scope:
|
|
8204
8314
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8205
8315
|
generatedAt:
|
|
@@ -8263,8 +8373,17 @@ components:
|
|
|
8263
8373
|
type: string
|
|
8264
8374
|
format: uuid
|
|
8265
8375
|
range:
|
|
8376
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8377
|
+
granularity:
|
|
8378
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8379
|
+
from:
|
|
8266
8380
|
type: string
|
|
8267
|
-
|
|
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`.
|
|
8268
8387
|
scope:
|
|
8269
8388
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8270
8389
|
generatedAt:
|
|
@@ -8296,8 +8415,17 @@ components:
|
|
|
8296
8415
|
type: string
|
|
8297
8416
|
format: uuid
|
|
8298
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:
|
|
8299
8426
|
type: string
|
|
8300
|
-
|
|
8427
|
+
format: date
|
|
8428
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
8301
8429
|
scope:
|
|
8302
8430
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8303
8431
|
generatedAt:
|
|
@@ -8308,6 +8436,23 @@ components:
|
|
|
8308
8436
|
items:
|
|
8309
8437
|
$ref: "#/components/schemas/AiUsageSpendAggregatedTeamRowDto"
|
|
8310
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
|
+
|
|
8311
8456
|
AiUsageSpendRoiProductivitySignalWeekDto:
|
|
8312
8457
|
type: object
|
|
8313
8458
|
additionalProperties: false
|
|
@@ -8345,14 +8490,22 @@ components:
|
|
|
8345
8490
|
- aiAssistedPrRatio
|
|
8346
8491
|
- prThroughputDeltaPercent
|
|
8347
8492
|
- usageDeltaPercent
|
|
8348
|
-
- weeks
|
|
8349
8493
|
properties:
|
|
8350
8494
|
workspaceId:
|
|
8351
8495
|
type: string
|
|
8352
8496
|
format: uuid
|
|
8353
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:
|
|
8354
8506
|
type: string
|
|
8355
|
-
|
|
8507
|
+
format: date
|
|
8508
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
8356
8509
|
scope:
|
|
8357
8510
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8358
8511
|
generatedAt:
|
|
@@ -8381,11 +8534,35 @@ components:
|
|
|
8381
8534
|
usageDeltaPercent:
|
|
8382
8535
|
type: number
|
|
8383
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"
|
|
8384
8542
|
weeks:
|
|
8385
8543
|
type: array
|
|
8386
8544
|
items:
|
|
8387
8545
|
$ref: "#/components/schemas/AiUsageSpendRoiProductivitySignalWeekDto"
|
|
8388
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
|
+
|
|
8389
8566
|
AiUsageSpendUsageTrendsProviderWeekDto:
|
|
8390
8567
|
type: object
|
|
8391
8568
|
additionalProperties: false
|
|
@@ -8405,6 +8582,21 @@ components:
|
|
|
8405
8582
|
type: integer
|
|
8406
8583
|
minimum: 0
|
|
8407
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
|
+
|
|
8408
8600
|
AiUsageSpendUsageTrendsWeekDto:
|
|
8409
8601
|
type: object
|
|
8410
8602
|
additionalProperties: false
|
|
@@ -8426,19 +8618,33 @@ components:
|
|
|
8426
8618
|
AiUsageSpendUsageTrendsDto:
|
|
8427
8619
|
type: object
|
|
8428
8620
|
additionalProperties: false
|
|
8429
|
-
required: [workspaceId, range, scope, generatedAt
|
|
8621
|
+
required: [workspaceId, range, scope, generatedAt]
|
|
8430
8622
|
properties:
|
|
8431
8623
|
workspaceId:
|
|
8432
8624
|
type: string
|
|
8433
8625
|
format: uuid
|
|
8434
8626
|
range:
|
|
8627
|
+
$ref: "#/components/schemas/AiUsageSpendRangeId"
|
|
8628
|
+
granularity:
|
|
8629
|
+
$ref: "#/components/schemas/AiUsageSpendGranularity"
|
|
8630
|
+
from:
|
|
8435
8631
|
type: string
|
|
8436
|
-
|
|
8632
|
+
format: date
|
|
8633
|
+
description: Inclusive start day when `granularity` is `day`.
|
|
8634
|
+
to:
|
|
8635
|
+
type: string
|
|
8636
|
+
format: date
|
|
8637
|
+
description: Inclusive end day when `granularity` is `day`.
|
|
8437
8638
|
scope:
|
|
8438
8639
|
$ref: "#/components/schemas/ProductivityInsightsAggregatedTeamsScopeDto"
|
|
8439
8640
|
generatedAt:
|
|
8440
8641
|
type: string
|
|
8441
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"
|
|
8442
8648
|
weeks:
|
|
8443
8649
|
type: array
|
|
8444
8650
|
items:
|