langwatch 1.11.0 → 1.12.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 (34) hide show
  1. package/dist/agent/index.d.mts +7 -1
  2. package/dist/agent/index.d.ts +7 -1
  3. package/dist/agent/index.js +26 -1
  4. package/dist/agent/index.js.map +1 -1
  5. package/dist/agent/index.mjs +26 -1
  6. package/dist/agent/index.mjs.map +1 -1
  7. package/dist/{chunk-2PD3YA5H.js → chunk-3WIN2UXZ.js} +2 -2
  8. package/dist/{chunk-2PD3YA5H.js.map → chunk-3WIN2UXZ.js.map} +1 -1
  9. package/dist/{chunk-VMNKKJVI.mjs → chunk-BAE4KYKJ.mjs} +2 -2
  10. package/dist/{chunk-BS5CNZ5S.mjs → chunk-F5UYCQT3.mjs} +2 -2
  11. package/dist/{chunk-BS5CNZ5S.mjs.map → chunk-F5UYCQT3.mjs.map} +1 -1
  12. package/dist/{chunk-AJDFFRSW.js → chunk-QLYKPPAW.js} +12 -12
  13. package/dist/{chunk-AJDFFRSW.js.map → chunk-QLYKPPAW.js.map} +1 -1
  14. package/dist/cli/bundle.js +295 -217
  15. package/dist/{implementation-aczLxVpV.d.mts → implementation-BA3xa5UR.d.mts} +1 -1
  16. package/dist/{implementation-D58yPTJW.d.ts → implementation-rpImK8WS.d.ts} +1 -1
  17. package/dist/index.d.mts +55 -2
  18. package/dist/index.d.ts +55 -2
  19. package/dist/index.js +89 -33
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +58 -2
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/observability-sdk/index.d.mts +3 -3
  24. package/dist/observability-sdk/index.d.ts +3 -3
  25. package/dist/observability-sdk/index.js +2 -2
  26. package/dist/observability-sdk/index.mjs +1 -1
  27. package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
  28. package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
  29. package/dist/observability-sdk/setup/node/index.js +3 -3
  30. package/dist/observability-sdk/setup/node/index.mjs +2 -2
  31. package/dist/{types-D_YNU-VL.d.ts → types-Cr25FO-i.d.ts} +395 -293
  32. package/dist/{types-BmMuUDrO.d.mts → types-DJyJypkv.d.mts} +395 -293
  33. package/package.json +1 -1
  34. /package/dist/{chunk-VMNKKJVI.mjs.map → chunk-BAE4KYKJ.mjs.map} +0 -0
@@ -1110,14 +1110,14 @@ interface paths {
1110
1110
  };
1111
1111
  /** @description Read one agent with its presence, its owner and the run parameters it declares. An id the project does not hold answers 404 agent_not_found. */
1112
1112
  get: operations["getAgent"];
1113
- /** @description Update an agent: any of name, type, configuration and workflow. The update is partial under PATCH and PUT alike. A connected agent takes only a new description; anything else answers 422 agent_register_only. */
1113
+ /** @description Update an agent: any of name, type, configuration and workflow. The update is partial under PATCH and PUT alike. A connected agent takes no edit and answers 422 agent_register_only. */
1114
1114
  put: operations["replaceAgent"];
1115
1115
  post?: never;
1116
1116
  /** @description Archive an agent. It leaves the list and its runs stay. A connected agent that registers again restores its row. */
1117
1117
  delete: operations["archiveAgent"];
1118
1118
  options?: never;
1119
1119
  head?: never;
1120
- /** @description Update an agent: any of name, type, configuration and workflow. The update is partial under PATCH and PUT alike. A connected agent takes only a new description; anything else answers 422 agent_register_only. */
1120
+ /** @description Update an agent: any of name, type, configuration and workflow. The update is partial under PATCH and PUT alike. A connected agent takes no edit and answers 422 agent_register_only. */
1121
1121
  patch: operations["updateAgent"];
1122
1122
  trace?: never;
1123
1123
  };
@@ -1224,46 +1224,6 @@ interface paths {
1224
1224
  patch?: never;
1225
1225
  trace?: never;
1226
1226
  };
1227
- "/api/v1/projects/{projectId}/analytics/query/clickhouse": {
1228
- parameters: {
1229
- query?: never;
1230
- header?: never;
1231
- path?: never;
1232
- cookie?: never;
1233
- };
1234
- get?: never;
1235
- put?: never;
1236
- /**
1237
- * Run LangWatchQL analytics SQL
1238
- * @description Executes one read-only ClickHouse SELECT over the LangWatchQL analytics datasets and returns typed columns, rows, execution statistics, truncation state and diagnostics. The query runs as a restricted database identity scoped to the authenticated project. Diagnostics are advisory and never reject a query. An empty diagnostics list means no known issue was detected. It is not proof that the answer is the one you meant.
1239
- */
1240
- post: operations["postApiV1ProjectsByProjectIdAnalyticsQueryClickhouse"];
1241
- delete?: never;
1242
- options?: never;
1243
- head?: never;
1244
- patch?: never;
1245
- trace?: never;
1246
- };
1247
- "/api/v1/projects/{projectId}/analytics/schema": {
1248
- parameters: {
1249
- query?: never;
1250
- header?: never;
1251
- path?: never;
1252
- cookie?: never;
1253
- };
1254
- /**
1255
- * Discover the LangWatchQL analytics schema
1256
- * @description Lists the LangWatchQL analytics datasets this key may query, with each column's type, description, the permissions that unlock it, and whether this caller holds them — plus each dataset's grain, join keys, partition-pruning time column, freshness and a runnable example query.
1257
- */
1258
- get: operations["getApiV1ProjectsByProjectIdAnalyticsSchema"];
1259
- put?: never;
1260
- post?: never;
1261
- delete?: never;
1262
- options?: never;
1263
- head?: never;
1264
- patch?: never;
1265
- trace?: never;
1266
- };
1267
1227
  "/api/v1/projects/{projectId}/analytics/charts": {
1268
1228
  parameters: {
1269
1229
  query?: never;
@@ -1340,6 +1300,54 @@ interface paths {
1340
1300
  patch?: never;
1341
1301
  trace?: never;
1342
1302
  };
1303
+ "/api/v1/query": {
1304
+ parameters: {
1305
+ query?: never;
1306
+ header?: never;
1307
+ path?: never;
1308
+ cookie?: never;
1309
+ };
1310
+ get?: never;
1311
+ put?: never;
1312
+ /**
1313
+ * Run a LangWatchQL query
1314
+ * @description Executes one read-only LangWatchQL SELECT over the analytics datasets and returns typed columns, rows, execution statistics, truncation state and diagnostics. The query runs as a restricted database identity scoped to the authenticated project.
1315
+ *
1316
+ * Diagnostics are advisory and never reject a query. An empty diagnostics list means no known issue was detected. It is not proof that the answer is the one you meant.
1317
+ *
1318
+ * The project is taken from the credential — no project id appears anywhere in the path or the body, and none can be sent to select another one.
1319
+ *
1320
+ * Failures answer with their real HTTP status (a refused query is 403, not 200) and this API's canonical error envelope — the same `code` and `meta` every other REST family publishes.
1321
+ */
1322
+ post: operations["postApiV1Query"];
1323
+ delete?: never;
1324
+ options?: never;
1325
+ head?: never;
1326
+ patch?: never;
1327
+ trace?: never;
1328
+ };
1329
+ "/api/v1/query/schema": {
1330
+ parameters: {
1331
+ query?: never;
1332
+ header?: never;
1333
+ path?: never;
1334
+ cookie?: never;
1335
+ };
1336
+ /**
1337
+ * Discover the queryable LangWatchQL schema
1338
+ * @description Lists the LangWatchQL analytics datasets this key may query, with each column's type, description, the permissions that unlock it, and whether this caller holds them — plus each dataset's grain, join keys, partition-pruning time column, freshness and a runnable example query.
1339
+ *
1340
+ * Scoped to the credential's own project and its permissions: a column this key cannot read is listed with `available: false` rather than hidden, so a caller can see what a wider key would unlock.
1341
+ */
1342
+ get: operations["getApiV1QuerySchema"];
1343
+ put?: never;
1344
+ post?: never;
1345
+ delete?: never;
1346
+ options?: never;
1347
+ head?: never;
1348
+ patch?: never;
1349
+ trace?: never;
1350
+ };
1343
1351
  "/api/coding-agent/sessions/{sessionId}/events": {
1344
1352
  parameters: {
1345
1353
  query?: never;
@@ -1369,7 +1377,7 @@ interface paths {
1369
1377
  };
1370
1378
  /**
1371
1379
  * Get pull request coding agent usage
1372
- * @description Assistant usage for one pull request: sessions, tokens and cost, grouped by contributor and agent, plus per-model totals, over the pull request's whole lifetime rather than a time window. Every row and the totals split cost three ways: the part priced per token, the part a bundled subscription already covers, and the list-price total of both. Per-model totals carry the list price only. Cost is calculated from the tokens the agent reported and LangWatch's model prices, so it estimates spend rather than restating a provider invoice. Requires a personal-project API key; rows appear only for projects the calling user may view, and cost only for those they may price.
1380
+ * @description Assistant usage for one pull request: sessions, tokens and cost, grouped by contributor and agent, plus per-model totals, over the pull request's whole lifetime rather than a time window. Every row and the totals split cost three ways: the part priced per token, the part a bundled subscription already covers, and the list-price total of both. Per-model totals carry the list price only. Cost is calculated from the tokens the agent reported and LangWatch's model prices, so it estimates spend rather than restating a provider invoice. Requires a personal-project API key; rows appear only for projects the calling user may view, and cost only for those they may price. Prefer `GET /api/v1/coding-agent/pull-request-usage`, which answers the same question with an organization API key alone and needs no X-Project-Id header.
1373
1381
  */
1374
1382
  get: operations["getApiCodingAgentPullRequestUsage"];
1375
1383
  put?: never;
@@ -1380,6 +1388,26 @@ interface paths {
1380
1388
  patch?: never;
1381
1389
  trace?: never;
1382
1390
  };
1391
+ "/api/v1/coding-agent/pull-request-usage": {
1392
+ parameters: {
1393
+ query?: never;
1394
+ header?: never;
1395
+ path?: never;
1396
+ cookie?: never;
1397
+ };
1398
+ /**
1399
+ * Get pull request usage
1400
+ * @description Assistant usage for one pull request: sessions, tokens and cost, grouped by contributor and agent, plus per-model totals, over the pull request's whole lifetime rather than a time window. Every row and the totals split cost three ways: the part priced per token, the part a bundled subscription already covers, and the list-price total of both. Per-model totals carry the list price only. Cost is calculated from the tokens the agent reported and LangWatch's model prices, so it estimates spend rather than restating a provider invoice. Authenticate with an organization API key and nothing else: no project id is sent anywhere. A key created for you reads with your own access; an organization service key, such as one a continuous integration job holds, reads with the access its bindings grant. Rows appear only for projects the key may view, and cost only for those it may price.
1401
+ */
1402
+ get: operations["getPullRequestUsage"];
1403
+ put?: never;
1404
+ post?: never;
1405
+ delete?: never;
1406
+ options?: never;
1407
+ head?: never;
1408
+ patch?: never;
1409
+ trace?: never;
1410
+ };
1383
1411
  "/api/dashboards": {
1384
1412
  parameters: {
1385
1413
  query?: never;
@@ -5389,7 +5417,6 @@ interface operations {
5389
5417
  agents: {
5390
5418
  name: string;
5391
5419
  environment: string;
5392
- description?: string;
5393
5420
  /** @default {} */
5394
5421
  parameters?: {
5395
5422
  [key: string]: unknown;
@@ -7146,7 +7173,7 @@ interface operations {
7146
7173
  };
7147
7174
  };
7148
7175
  };
7149
- postApiV1ProjectsByProjectIdAnalyticsQueryClickhouse: {
7176
+ getApiV1ProjectsByProjectIdAnalyticsCharts: {
7150
7177
  parameters: {
7151
7178
  query?: never;
7152
7179
  header?: never;
@@ -7155,54 +7182,36 @@ interface operations {
7155
7182
  };
7156
7183
  cookie?: never;
7157
7184
  };
7158
- requestBody: {
7159
- content: {
7160
- "application/json": {
7161
- sql: string;
7162
- parameters?: {
7163
- [key: string]: string | number | boolean | null;
7164
- };
7165
- timeWindow?: {
7166
- start: string | number;
7167
- end: string | number;
7168
- };
7169
- granularitySeconds?: 1 | 60 | 3600;
7170
- };
7171
- };
7172
- };
7185
+ requestBody?: never;
7173
7186
  responses: {
7174
- /** @description The query ran, and the result is scoped to the caller's project */
7187
+ /** @description The project's saved workbench charts */
7175
7188
  200: {
7176
7189
  headers: {
7177
7190
  [name: string]: unknown;
7178
7191
  };
7179
7192
  content: {
7180
7193
  "application/json": {
7181
- columns: {
7194
+ data: {
7195
+ id: string;
7182
7196
  name: string;
7183
- type: string;
7184
- }[];
7185
- rows: {
7186
- [key: string]: unknown;
7187
- }[];
7188
- statistics: {
7189
- elapsedMs: number;
7190
- rowsRead: number;
7191
- bytesRead: number;
7192
- rowsReturned: number;
7193
- };
7194
- truncated: boolean;
7195
- followsTimeWindow: boolean;
7196
- followsGranularity: boolean;
7197
- granularitySeconds?: number;
7198
- coarsenedFromSeconds?: number;
7199
- diagnostics: {
7200
- /** @enum {string} */
7201
- code: "RESULT_TRUNCATED" | "POSSIBLE_FANOUT" | "UNBOUNDED_TIME_RANGE" | "MISSING_TIME_BUCKETS" | "INCOMPLETE_COMPARISON_PERIOD";
7202
- message: string;
7203
- meta?: {
7204
- [key: string]: unknown;
7197
+ definition: {
7198
+ version: number;
7199
+ sql: string;
7200
+ parameters: {
7201
+ [key: string]: unknown;
7202
+ };
7203
+ vegaLiteSpec?: {
7204
+ [key: string]: unknown;
7205
+ };
7205
7206
  };
7207
+ createdAt: string;
7208
+ updatedAt: string;
7209
+ platformUrl: string;
7210
+ dashboardId: string | null;
7211
+ gridColumn: number;
7212
+ gridRow: number;
7213
+ colSpan: number;
7214
+ rowSpan: number;
7206
7215
  }[];
7207
7216
  };
7208
7217
  };
@@ -7267,26 +7276,6 @@ interface operations {
7267
7276
  };
7268
7277
  };
7269
7278
  };
7270
- /** @description Unprocessable Entity */
7271
- 422: {
7272
- headers: {
7273
- [name: string]: unknown;
7274
- };
7275
- content: {
7276
- "application/json": {
7277
- error: {
7278
- type: string;
7279
- code: string;
7280
- message: string;
7281
- meta?: {
7282
- [key: string]: unknown;
7283
- };
7284
- trace_id?: string;
7285
- span_id?: string;
7286
- };
7287
- };
7288
- };
7289
- };
7290
7279
  /** @description Internal Server Error */
7291
7280
  500: {
7292
7281
  headers: {
@@ -7309,7 +7298,7 @@ interface operations {
7309
7298
  };
7310
7299
  };
7311
7300
  };
7312
- getApiV1ProjectsByProjectIdAnalyticsSchema: {
7301
+ postApiV1ProjectsByProjectIdAnalyticsCharts: {
7313
7302
  parameters: {
7314
7303
  query?: never;
7315
7304
  header?: never;
@@ -7318,34 +7307,42 @@ interface operations {
7318
7307
  };
7319
7308
  cookie?: never;
7320
7309
  };
7321
- requestBody?: never;
7310
+ requestBody: {
7311
+ content: {
7312
+ "application/json": {
7313
+ name: string;
7314
+ definition?: unknown;
7315
+ };
7316
+ };
7317
+ };
7322
7318
  responses: {
7323
- /** @description The LangWatchQL schema, scoped to the caller's permissions */
7324
- 200: {
7319
+ /** @description The chart was saved */
7320
+ 201: {
7325
7321
  headers: {
7326
7322
  [name: string]: unknown;
7327
7323
  };
7328
7324
  content: {
7329
7325
  "application/json": {
7330
- database: string;
7331
- datasets: {
7332
- name: string;
7333
- description: string;
7334
- grain: string;
7335
- joinKeys: string[];
7336
- timeColumn: string;
7337
- freshness: string;
7338
- columns: {
7339
- name: string;
7340
- type: string;
7341
- description: string;
7342
- /** @enum {string|null} */
7343
- unit: "ms" | "USD" | "tokens" | "tokens/s" | null;
7344
- gates: ("input" | "output" | "costs")[];
7345
- available: boolean;
7346
- }[];
7347
- exampleSql: string;
7348
- }[];
7326
+ id: string;
7327
+ name: string;
7328
+ definition: {
7329
+ version: number;
7330
+ sql: string;
7331
+ parameters: {
7332
+ [key: string]: unknown;
7333
+ };
7334
+ vegaLiteSpec?: {
7335
+ [key: string]: unknown;
7336
+ };
7337
+ };
7338
+ createdAt: string;
7339
+ updatedAt: string;
7340
+ platformUrl: string;
7341
+ dashboardId: string | null;
7342
+ gridColumn: number;
7343
+ gridRow: number;
7344
+ colSpan: number;
7345
+ rowSpan: number;
7349
7346
  };
7350
7347
  };
7351
7348
  };
@@ -7431,54 +7428,53 @@ interface operations {
7431
7428
  };
7432
7429
  };
7433
7430
  };
7434
- getApiV1ProjectsByProjectIdAnalyticsCharts: {
7431
+ getApiV1ProjectsByProjectIdAnalyticsChartsByChartId: {
7435
7432
  parameters: {
7436
7433
  query?: never;
7437
7434
  header?: never;
7438
7435
  path: {
7439
7436
  projectId: string;
7437
+ chartId: string;
7440
7438
  };
7441
7439
  cookie?: never;
7442
7440
  };
7443
7441
  requestBody?: never;
7444
7442
  responses: {
7445
- /** @description The project's saved workbench charts */
7443
+ /** @description The saved chart */
7446
7444
  200: {
7447
7445
  headers: {
7448
7446
  [name: string]: unknown;
7449
7447
  };
7450
7448
  content: {
7451
7449
  "application/json": {
7452
- data: {
7453
- id: string;
7454
- name: string;
7455
- definition: {
7456
- version: number;
7457
- sql: string;
7458
- parameters: {
7459
- [key: string]: unknown;
7460
- };
7461
- vegaLiteSpec?: {
7462
- [key: string]: unknown;
7463
- };
7450
+ id: string;
7451
+ name: string;
7452
+ definition: {
7453
+ version: number;
7454
+ sql: string;
7455
+ parameters: {
7456
+ [key: string]: unknown;
7464
7457
  };
7465
- createdAt: string;
7466
- updatedAt: string;
7467
- platformUrl: string;
7468
- dashboardId: string | null;
7469
- gridColumn: number;
7470
- gridRow: number;
7471
- colSpan: number;
7472
- rowSpan: number;
7473
- }[];
7474
- };
7475
- };
7476
- };
7477
- /** @description Bad Request */
7478
- 400: {
7479
- headers: {
7480
- [name: string]: unknown;
7481
- };
7458
+ vegaLiteSpec?: {
7459
+ [key: string]: unknown;
7460
+ };
7461
+ };
7462
+ createdAt: string;
7463
+ updatedAt: string;
7464
+ platformUrl: string;
7465
+ dashboardId: string | null;
7466
+ gridColumn: number;
7467
+ gridRow: number;
7468
+ colSpan: number;
7469
+ rowSpan: number;
7470
+ };
7471
+ };
7472
+ };
7473
+ /** @description Bad Request */
7474
+ 400: {
7475
+ headers: {
7476
+ [name: string]: unknown;
7477
+ };
7482
7478
  content: {
7483
7479
  "application/json": {
7484
7480
  error: {
@@ -7534,6 +7530,26 @@ interface operations {
7534
7530
  };
7535
7531
  };
7536
7532
  };
7533
+ /** @description No chart with this id in this project */
7534
+ 404: {
7535
+ headers: {
7536
+ [name: string]: unknown;
7537
+ };
7538
+ content: {
7539
+ "application/json": {
7540
+ error: {
7541
+ type: string;
7542
+ code: string;
7543
+ message: string;
7544
+ meta?: {
7545
+ [key: string]: unknown;
7546
+ };
7547
+ trace_id?: string;
7548
+ span_id?: string;
7549
+ };
7550
+ };
7551
+ };
7552
+ };
7537
7553
  /** @description Internal Server Error */
7538
7554
  500: {
7539
7555
  headers: {
@@ -7556,56 +7572,47 @@ interface operations {
7556
7572
  };
7557
7573
  };
7558
7574
  };
7559
- postApiV1ProjectsByProjectIdAnalyticsCharts: {
7575
+ deleteApiV1ProjectsByProjectIdAnalyticsChartsByChartId: {
7560
7576
  parameters: {
7561
7577
  query?: never;
7562
7578
  header?: never;
7563
7579
  path: {
7564
7580
  projectId: string;
7581
+ chartId: string;
7565
7582
  };
7566
7583
  cookie?: never;
7567
7584
  };
7568
- requestBody: {
7569
- content: {
7570
- "application/json": {
7571
- name: string;
7572
- definition?: unknown;
7585
+ requestBody?: never;
7586
+ responses: {
7587
+ /** @description The chart was deleted */
7588
+ 204: {
7589
+ headers: {
7590
+ [name: string]: unknown;
7573
7591
  };
7592
+ content?: never;
7574
7593
  };
7575
- };
7576
- responses: {
7577
- /** @description The chart was saved */
7578
- 201: {
7594
+ /** @description Bad Request */
7595
+ 400: {
7579
7596
  headers: {
7580
7597
  [name: string]: unknown;
7581
7598
  };
7582
7599
  content: {
7583
7600
  "application/json": {
7584
- id: string;
7585
- name: string;
7586
- definition: {
7587
- version: number;
7588
- sql: string;
7589
- parameters: {
7590
- [key: string]: unknown;
7591
- };
7592
- vegaLiteSpec?: {
7601
+ error: {
7602
+ type: string;
7603
+ code: string;
7604
+ message: string;
7605
+ meta?: {
7593
7606
  [key: string]: unknown;
7594
7607
  };
7608
+ trace_id?: string;
7609
+ span_id?: string;
7595
7610
  };
7596
- createdAt: string;
7597
- updatedAt: string;
7598
- platformUrl: string;
7599
- dashboardId: string | null;
7600
- gridColumn: number;
7601
- gridRow: number;
7602
- colSpan: number;
7603
- rowSpan: number;
7604
7611
  };
7605
7612
  };
7606
7613
  };
7607
- /** @description Bad Request */
7608
- 400: {
7614
+ /** @description Unauthorized */
7615
+ 401: {
7609
7616
  headers: {
7610
7617
  [name: string]: unknown;
7611
7618
  };
@@ -7624,8 +7631,8 @@ interface operations {
7624
7631
  };
7625
7632
  };
7626
7633
  };
7627
- /** @description Unauthorized */
7628
- 401: {
7634
+ /** @description Forbidden */
7635
+ 403: {
7629
7636
  headers: {
7630
7637
  [name: string]: unknown;
7631
7638
  };
@@ -7644,8 +7651,8 @@ interface operations {
7644
7651
  };
7645
7652
  };
7646
7653
  };
7647
- /** @description Forbidden */
7648
- 403: {
7654
+ /** @description No chart with this id in this project */
7655
+ 404: {
7649
7656
  headers: {
7650
7657
  [name: string]: unknown;
7651
7658
  };
@@ -7686,7 +7693,7 @@ interface operations {
7686
7693
  };
7687
7694
  };
7688
7695
  };
7689
- getApiV1ProjectsByProjectIdAnalyticsChartsByChartId: {
7696
+ patchApiV1ProjectsByProjectIdAnalyticsChartsByChartId: {
7690
7697
  parameters: {
7691
7698
  query?: never;
7692
7699
  header?: never;
@@ -7696,9 +7703,16 @@ interface operations {
7696
7703
  };
7697
7704
  cookie?: never;
7698
7705
  };
7699
- requestBody?: never;
7706
+ requestBody: {
7707
+ content: {
7708
+ "application/json": {
7709
+ name?: string;
7710
+ definition?: unknown;
7711
+ };
7712
+ };
7713
+ };
7700
7714
  responses: {
7701
- /** @description The saved chart */
7715
+ /** @description The updated chart */
7702
7716
  200: {
7703
7717
  headers: {
7704
7718
  [name: string]: unknown;
@@ -7830,7 +7844,7 @@ interface operations {
7830
7844
  };
7831
7845
  };
7832
7846
  };
7833
- deleteApiV1ProjectsByProjectIdAnalyticsChartsByChartId: {
7847
+ putApiV1ProjectsByProjectIdAnalyticsChartsByChartIdPlacement: {
7834
7848
  parameters: {
7835
7849
  query?: never;
7836
7850
  header?: never;
@@ -7840,14 +7854,47 @@ interface operations {
7840
7854
  };
7841
7855
  cookie?: never;
7842
7856
  };
7843
- requestBody?: never;
7857
+ requestBody: {
7858
+ content: {
7859
+ "application/json": {
7860
+ dashboardId: string;
7861
+ gridColumn?: number;
7862
+ gridRow?: number;
7863
+ colSpan?: number;
7864
+ rowSpan?: number;
7865
+ };
7866
+ };
7867
+ };
7844
7868
  responses: {
7845
- /** @description The chart was deleted */
7846
- 204: {
7869
+ /** @description The chart, now placed */
7870
+ 200: {
7847
7871
  headers: {
7848
7872
  [name: string]: unknown;
7849
7873
  };
7850
- content?: never;
7874
+ content: {
7875
+ "application/json": {
7876
+ id: string;
7877
+ name: string;
7878
+ definition: {
7879
+ version: number;
7880
+ sql: string;
7881
+ parameters: {
7882
+ [key: string]: unknown;
7883
+ };
7884
+ vegaLiteSpec?: {
7885
+ [key: string]: unknown;
7886
+ };
7887
+ };
7888
+ createdAt: string;
7889
+ updatedAt: string;
7890
+ platformUrl: string;
7891
+ dashboardId: string | null;
7892
+ gridColumn: number;
7893
+ gridRow: number;
7894
+ colSpan: number;
7895
+ rowSpan: number;
7896
+ };
7897
+ };
7851
7898
  };
7852
7899
  /** @description Bad Request */
7853
7900
  400: {
@@ -7951,7 +7998,7 @@ interface operations {
7951
7998
  };
7952
7999
  };
7953
8000
  };
7954
- patchApiV1ProjectsByProjectIdAnalyticsChartsByChartId: {
8001
+ deleteApiV1ProjectsByProjectIdAnalyticsChartsByChartIdPlacement: {
7955
8002
  parameters: {
7956
8003
  query?: never;
7957
8004
  header?: never;
@@ -7961,44 +8008,14 @@ interface operations {
7961
8008
  };
7962
8009
  cookie?: never;
7963
8010
  };
7964
- requestBody: {
7965
- content: {
7966
- "application/json": {
7967
- name?: string;
7968
- definition?: unknown;
7969
- };
7970
- };
7971
- };
8011
+ requestBody?: never;
7972
8012
  responses: {
7973
- /** @description The updated chart */
7974
- 200: {
8013
+ /** @description The chart is no longer on any dashboard */
8014
+ 204: {
7975
8015
  headers: {
7976
8016
  [name: string]: unknown;
7977
8017
  };
7978
- content: {
7979
- "application/json": {
7980
- id: string;
7981
- name: string;
7982
- definition: {
7983
- version: number;
7984
- sql: string;
7985
- parameters: {
7986
- [key: string]: unknown;
7987
- };
7988
- vegaLiteSpec?: {
7989
- [key: string]: unknown;
7990
- };
7991
- };
7992
- createdAt: string;
7993
- updatedAt: string;
7994
- platformUrl: string;
7995
- dashboardId: string | null;
7996
- gridColumn: number;
7997
- gridRow: number;
7998
- colSpan: number;
7999
- rowSpan: number;
8000
- };
8001
- };
8018
+ content?: never;
8002
8019
  };
8003
8020
  /** @description Bad Request */
8004
8021
  400: {
@@ -8102,55 +8119,62 @@ interface operations {
8102
8119
  };
8103
8120
  };
8104
8121
  };
8105
- putApiV1ProjectsByProjectIdAnalyticsChartsByChartIdPlacement: {
8122
+ postApiV1Query: {
8106
8123
  parameters: {
8107
8124
  query?: never;
8108
8125
  header?: never;
8109
- path: {
8110
- projectId: string;
8111
- chartId: string;
8112
- };
8126
+ path?: never;
8113
8127
  cookie?: never;
8114
8128
  };
8115
8129
  requestBody: {
8116
8130
  content: {
8117
8131
  "application/json": {
8118
- dashboardId: string;
8119
- gridColumn?: number;
8120
- gridRow?: number;
8121
- colSpan?: number;
8122
- rowSpan?: number;
8132
+ sql: string;
8133
+ parameters?: {
8134
+ [key: string]: string | number | boolean | null;
8135
+ };
8136
+ timeWindow?: {
8137
+ start: string | number;
8138
+ end: string | number;
8139
+ };
8140
+ granularitySeconds?: 1 | 60 | 3600;
8123
8141
  };
8124
8142
  };
8125
8143
  };
8126
8144
  responses: {
8127
- /** @description The chart, now placed */
8145
+ /** @description The query ran. Columns, rows, execution statistics, truncation state and diagnostics, scoped to the caller's project. */
8128
8146
  200: {
8129
8147
  headers: {
8130
8148
  [name: string]: unknown;
8131
8149
  };
8132
8150
  content: {
8133
8151
  "application/json": {
8134
- id: string;
8135
- name: string;
8136
- definition: {
8137
- version: number;
8138
- sql: string;
8139
- parameters: {
8140
- [key: string]: unknown;
8141
- };
8142
- vegaLiteSpec?: {
8152
+ columns: {
8153
+ name: string;
8154
+ type: string;
8155
+ }[];
8156
+ rows: {
8157
+ [key: string]: unknown;
8158
+ }[];
8159
+ statistics: {
8160
+ elapsedMs: number;
8161
+ rowsRead: number;
8162
+ bytesRead: number;
8163
+ rowsReturned: number;
8164
+ };
8165
+ truncated: boolean;
8166
+ followsTimeWindow: boolean;
8167
+ followsGranularity: boolean;
8168
+ granularitySeconds?: number;
8169
+ coarsenedFromSeconds?: number;
8170
+ diagnostics: {
8171
+ /** @enum {string} */
8172
+ code: "RESULT_TRUNCATED" | "POSSIBLE_FANOUT" | "UNBOUNDED_TIME_RANGE" | "MISSING_TIME_BUCKETS" | "INCOMPLETE_COMPARISON_PERIOD";
8173
+ message: string;
8174
+ meta?: {
8143
8175
  [key: string]: unknown;
8144
8176
  };
8145
- };
8146
- createdAt: string;
8147
- updatedAt: string;
8148
- platformUrl: string;
8149
- dashboardId: string | null;
8150
- gridColumn: number;
8151
- gridRow: number;
8152
- colSpan: number;
8153
- rowSpan: number;
8177
+ }[];
8154
8178
  };
8155
8179
  };
8156
8180
  };
@@ -8214,8 +8238,8 @@ interface operations {
8214
8238
  };
8215
8239
  };
8216
8240
  };
8217
- /** @description No chart with this id in this project */
8218
- 404: {
8241
+ /** @description Unprocessable Entity */
8242
+ 422: {
8219
8243
  headers: {
8220
8244
  [name: string]: unknown;
8221
8245
  };
@@ -8256,24 +8280,43 @@ interface operations {
8256
8280
  };
8257
8281
  };
8258
8282
  };
8259
- deleteApiV1ProjectsByProjectIdAnalyticsChartsByChartIdPlacement: {
8283
+ getApiV1QuerySchema: {
8260
8284
  parameters: {
8261
8285
  query?: never;
8262
8286
  header?: never;
8263
- path: {
8264
- projectId: string;
8265
- chartId: string;
8266
- };
8287
+ path?: never;
8267
8288
  cookie?: never;
8268
8289
  };
8269
8290
  requestBody?: never;
8270
8291
  responses: {
8271
- /** @description The chart is no longer on any dashboard */
8272
- 204: {
8292
+ /** @description The datasets and columns this key may query, with the permissions that unlock each one. */
8293
+ 200: {
8273
8294
  headers: {
8274
8295
  [name: string]: unknown;
8275
8296
  };
8276
- content?: never;
8297
+ content: {
8298
+ "application/json": {
8299
+ database: string;
8300
+ datasets: {
8301
+ name: string;
8302
+ description: string;
8303
+ grain: string;
8304
+ joinKeys: string[];
8305
+ timeColumn: string;
8306
+ freshness: string;
8307
+ columns: {
8308
+ name: string;
8309
+ type: string;
8310
+ description: string;
8311
+ /** @enum {string|null} */
8312
+ unit: "ms" | "USD" | "tokens" | "tokens/s" | null;
8313
+ gates: ("input" | "output" | "costs")[];
8314
+ available: boolean;
8315
+ }[];
8316
+ exampleSql: string;
8317
+ }[];
8318
+ };
8319
+ };
8277
8320
  };
8278
8321
  /** @description Bad Request */
8279
8322
  400: {
@@ -8335,26 +8378,6 @@ interface operations {
8335
8378
  };
8336
8379
  };
8337
8380
  };
8338
- /** @description No chart with this id in this project */
8339
- 404: {
8340
- headers: {
8341
- [name: string]: unknown;
8342
- };
8343
- content: {
8344
- "application/json": {
8345
- error: {
8346
- type: string;
8347
- code: string;
8348
- message: string;
8349
- meta?: {
8350
- [key: string]: unknown;
8351
- };
8352
- trace_id?: string;
8353
- span_id?: string;
8354
- };
8355
- };
8356
- };
8357
- };
8358
8381
  /** @description Internal Server Error */
8359
8382
  500: {
8360
8383
  headers: {
@@ -8628,6 +8651,85 @@ interface operations {
8628
8651
  };
8629
8652
  };
8630
8653
  };
8654
+ getPullRequestUsage: {
8655
+ parameters: {
8656
+ query: {
8657
+ /** @description The repository as "owner/name". */
8658
+ repository: string;
8659
+ /** @description The pull request number. */
8660
+ pullRequest: number;
8661
+ /** @description The GitHub host. Defaults to this instance's configured GitHub host, which is github.com unless an operator named a GitHub Enterprise Server. */
8662
+ host?: string;
8663
+ };
8664
+ header?: never;
8665
+ path?: never;
8666
+ cookie?: never;
8667
+ };
8668
+ requestBody?: never;
8669
+ responses: {
8670
+ /** @description Success */
8671
+ 200: {
8672
+ headers: {
8673
+ [name: string]: unknown;
8674
+ };
8675
+ content: {
8676
+ "application/json": {
8677
+ pullRequest: {
8678
+ repositoryHost: string;
8679
+ repositoryFullName: string;
8680
+ prNumber: number;
8681
+ headBranch: string;
8682
+ htmlUrl: string;
8683
+ state: string;
8684
+ isDraft: boolean;
8685
+ authorLogin: string | null;
8686
+ prCreatedAtMs: number;
8687
+ prClosedAtMs: number | null;
8688
+ prMergedAtMs: number | null;
8689
+ };
8690
+ rows: {
8691
+ projectId: string;
8692
+ projectSlug: string;
8693
+ contributorLabel: string;
8694
+ contributorIsProject: boolean;
8695
+ agent: string;
8696
+ models: string[];
8697
+ sessionsCount: number;
8698
+ inputTokens: number;
8699
+ outputTokens: number;
8700
+ cacheReadTokens: number;
8701
+ cacheCreationTokens: number;
8702
+ totalTokens: number;
8703
+ costUsd: number | null;
8704
+ billedCostUsd: number | null;
8705
+ nonBilledCostUsd: number | null;
8706
+ }[];
8707
+ totals: {
8708
+ sessionsCount: number;
8709
+ inputTokens: number;
8710
+ outputTokens: number;
8711
+ cacheReadTokens: number;
8712
+ cacheCreationTokens: number;
8713
+ totalTokens: number;
8714
+ costUsd: number | null;
8715
+ billedCostUsd: number | null;
8716
+ nonBilledCostUsd: number | null;
8717
+ };
8718
+ modelBreakdown: {
8719
+ model: string;
8720
+ inputTokens: number;
8721
+ outputTokens: number;
8722
+ cacheReadTokens: number;
8723
+ cacheCreationTokens: number;
8724
+ totalTokens: number;
8725
+ costUsd: number | null;
8726
+ tokensKnown: boolean;
8727
+ }[];
8728
+ };
8729
+ };
8730
+ };
8731
+ };
8732
+ };
8631
8733
  getApiDashboards: {
8632
8734
  parameters: {
8633
8735
  query?: never;