@reclaimprotocol/client 0.1.40 → 0.1.41

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.
@@ -375,6 +375,10 @@ export declare const ROUTES: {
375
375
  readonly method: "get";
376
376
  readonly path: "/verifications/sessions/{sessionId}";
377
377
  };
378
+ readonly IdentifyAnalyticsClient: {
379
+ readonly method: "post";
380
+ readonly path: "/analytics/identify";
381
+ };
378
382
  readonly ImportDevtoolsProvider: {
379
383
  readonly method: "post";
380
384
  readonly path: "/providers/import/devtools";
@@ -643,6 +647,10 @@ export declare const ROUTES: {
643
647
  readonly method: "post";
644
648
  readonly path: "/verifications/sessions/{sessionId}/results";
645
649
  };
650
+ readonly TrackAnalyticsEvents: {
651
+ readonly method: "post";
652
+ readonly path: "/analytics/events";
653
+ };
646
654
  readonly TransferProvider: {
647
655
  readonly method: "post";
648
656
  readonly path: "/providers/{providerId}/transfer";
package/lib/routes.gen.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // AUTO-GENERATED by packages/app/scripts/mcp-tools-gen.ts
2
- // from packages/app/openapi.yaml (spec v0.1.0, source sha256:ecdb0ee6d82e).
2
+ // from packages/app/openapi.yaml (spec v0.1.0, source sha256:c3421d6bcf76).
3
3
  // The hash catches drift the version misses (a spec can change without a
4
4
  // version bump) — do not remove it as "redundant" with the version.
5
5
  // Run `npm run openapi:gen --workspace=packages/app` to regenerate. Do not edit by hand.
@@ -98,6 +98,7 @@ export const ROUTES = {
98
98
  "GetVerificationRecipe": { "method": "get", "path": "/verifications/sessions/{sessionId}/recipe" },
99
99
  "GetVerificationResult": { "method": "get", "path": "/verifications/sessions/{sessionId}/result" },
100
100
  "GetVerificationSession": { "method": "get", "path": "/verifications/sessions/{sessionId}" },
101
+ "IdentifyAnalyticsClient": { "method": "post", "path": "/analytics/identify" },
101
102
  "ImportDevtoolsProvider": { "method": "post", "path": "/providers/import/devtools" },
102
103
  "Index": { "method": "get", "path": "/" },
103
104
  "IssueOrgToken": { "method": "post", "path": "/orgs/{orgId}/token" },
@@ -165,6 +166,7 @@ export const ROUTES = {
165
166
  "SubmitProviderVersionForReview": { "method": "post", "path": "/providers/{providerId}/versions/{version}/review" },
166
167
  "SubmitPublicContributionFeedback": { "method": "post", "path": "/contribute/{publicId}/feedback" },
167
168
  "SubmitVerificationClientResult": { "method": "post", "path": "/verifications/sessions/{sessionId}/results" },
169
+ "TrackAnalyticsEvents": { "method": "post", "path": "/analytics/events" },
168
170
  "TransferProvider": { "method": "post", "path": "/providers/{providerId}/transfer" },
169
171
  "UpdateAnnouncementBar": { "method": "put", "path": "/admin/announcement-bar" },
170
172
  "UpdateBillingPlan": { "method": "put", "path": "/admin/billing/plans/{planId}" },
@@ -2644,6 +2644,46 @@ export interface paths {
2644
2644
  patch?: never;
2645
2645
  trace?: never;
2646
2646
  };
2647
+ "/analytics/events": {
2648
+ parameters: {
2649
+ query?: never;
2650
+ header?: never;
2651
+ path?: never;
2652
+ cookie?: never;
2653
+ };
2654
+ get?: never;
2655
+ put?: never;
2656
+ /**
2657
+ * Record product analytics events
2658
+ * @description Records up to 50 product events from the dashboard or the Reclaim MCP server. Anyone can call it, because the MCP server sends events before the developer signs in. A signed-in caller's events are attributed to them; anonymous events are linked when the client calls `POST /analytics/identify`. Send the same event `id` when you retry, and Builder stores the event once. Each client, user, and network address has a per-minute limit (429).
2659
+ */
2660
+ post: operations["TrackAnalyticsEvents"];
2661
+ delete?: never;
2662
+ options?: never;
2663
+ head?: never;
2664
+ patch?: never;
2665
+ trace?: never;
2666
+ };
2667
+ "/analytics/identify": {
2668
+ parameters: {
2669
+ query?: never;
2670
+ header?: never;
2671
+ path?: never;
2672
+ cookie?: never;
2673
+ };
2674
+ get?: never;
2675
+ put?: never;
2676
+ /**
2677
+ * Link an analytics client to the signed-in user
2678
+ * @description Links a client ID to the signed-in user and attributes that client's anonymous events from the last 30 days to them. Call it after sign-in. Requires a signed-in user (401). Rate limited like `POST /analytics/events` (429).
2679
+ */
2680
+ post: operations["IdentifyAnalyticsClient"];
2681
+ delete?: never;
2682
+ options?: never;
2683
+ head?: never;
2684
+ patch?: never;
2685
+ trace?: never;
2686
+ };
2647
2687
  "/orgs/{orgId}/callback-subscriptions": {
2648
2688
  parameters: {
2649
2689
  query?: never;
@@ -4447,6 +4487,56 @@ export interface components {
4447
4487
  includedLimit: number;
4448
4488
  }[];
4449
4489
  }[];
4490
+ /** @description What developers typed into the coding-agent quick start's goal field, from `quickstart_goal` events, most recent activity first. One row per distinct goal per user and organization. */
4491
+ goals: {
4492
+ goal: string;
4493
+ /** @description The developer copied the prompt with this goal. */
4494
+ copied: boolean;
4495
+ /**
4496
+ * Format: date-time
4497
+ * @description First typed in this period.
4498
+ */
4499
+ createdAt: string;
4500
+ /**
4501
+ * Format: date-time
4502
+ * @description Last typed or copied in this period.
4503
+ */
4504
+ updatedAt: string;
4505
+ userId: components["schemas"]["UserID"];
4506
+ userEmail: string;
4507
+ userName: string;
4508
+ orgId: components["schemas"]["OrgID"];
4509
+ orgName: string;
4510
+ }[];
4511
+ /** @description Coding-agent activity reported by the Reclaim MCP server in the window. `toolCalls` and `clients` come from a daily rollup that refreshes every 15 minutes. The `orgId` filter doesn't apply here. */
4512
+ agents: {
4513
+ /**
4514
+ * Format: date-time
4515
+ * @description When the rollup last refreshed. Absent before the first refresh.
4516
+ */
4517
+ refreshedAt?: string;
4518
+ toolCalls: {
4519
+ tool: string;
4520
+ calls: number;
4521
+ errors: number;
4522
+ avgDurationMs?: number;
4523
+ }[];
4524
+ clients: {
4525
+ /** @description `unknown` when the client did not name itself. */
4526
+ agentName: string;
4527
+ sessions: number;
4528
+ toolCalls: number;
4529
+ toolErrors: number;
4530
+ }[];
4531
+ /** @description Active developers: those whose MCP activity in the window is linked to a Builder account, whether they signed in during the window or linked earlier events on a later sign-in. Then how many of them also reached each later step. */
4532
+ funnel: {
4533
+ active: number;
4534
+ attachedBrowser: number;
4535
+ captured: number;
4536
+ proved: number;
4537
+ published: number;
4538
+ };
4539
+ };
4450
4540
  };
4451
4541
  /** @description The org's consumption this billing period against its plan's allowances, per pool. */
4452
4542
  OrgUsage: {
@@ -5254,6 +5344,119 @@ export interface components {
5254
5344
  CreateFixWithAiSessionRequest: {
5255
5345
  providerId: components["schemas"]["ProviderID"];
5256
5346
  };
5347
+ /**
5348
+ * Format: uuid
5349
+ * @description A random ID the client creates once and keeps: the MCP server stores it in `~/.reclaim/config.json`, the dashboard in local storage.
5350
+ */
5351
+ AnalyticsClientID: string;
5352
+ /**
5353
+ * Format: uuid
5354
+ * @description A random ID per event. Reuse it when you retry.
5355
+ */
5356
+ AnalyticsEventID: string;
5357
+ /**
5358
+ * Format: date-time
5359
+ * @description When the event happened, by the client's clock. Builder drops an event dated more than 72 hours before, or more than five minutes after, it receives the batch. The response's `stored` count leaves them out.
5360
+ */
5361
+ AnalyticsEventTimestamp: string;
5362
+ /** @description Applies to every event in the batch. */
5363
+ AnalyticsContext: {
5364
+ sessionId?: string;
5365
+ /** @description The MCP client, such as Claude Code, as it names itself. */
5366
+ agent?: {
5367
+ name: string;
5368
+ version?: string;
5369
+ };
5370
+ app?: {
5371
+ version?: string;
5372
+ };
5373
+ };
5374
+ /** @description Body for `POST /analytics/events`. */
5375
+ TrackAnalyticsEventsRequest: {
5376
+ clientId: components["schemas"]["AnalyticsClientID"];
5377
+ /** @enum {string} */
5378
+ source: "dashboard" | "mcp";
5379
+ context?: components["schemas"]["AnalyticsContext"];
5380
+ events: components["schemas"]["AnalyticsEvent"][];
5381
+ };
5382
+ TrackAnalyticsEventsResponse: {
5383
+ /** @description Events stored now. Retried events that were already stored don't count. */
5384
+ stored: number;
5385
+ };
5386
+ IdentifyAnalyticsClientRequest: {
5387
+ clientId: components["schemas"]["AnalyticsClientID"];
5388
+ };
5389
+ IdentifyAnalyticsClientResponse: {
5390
+ /** @description Earlier anonymous events now attributed to you. */
5391
+ linked: number;
5392
+ };
5393
+ /** @description One event. `name` selects the shape of `properties`. */
5394
+ AnalyticsEvent: {
5395
+ id: components["schemas"]["AnalyticsEventID"];
5396
+ /** @enum {string} */
5397
+ name: "session_start";
5398
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5399
+ properties: {
5400
+ /** @enum {string} */
5401
+ mode: "builder" | "devtools";
5402
+ agentTools?: boolean;
5403
+ /** @enum {string} */
5404
+ os?: "darwin" | "linux" | "win32" | "other";
5405
+ nodeVersion?: string;
5406
+ };
5407
+ } | {
5408
+ id: components["schemas"]["AnalyticsEventID"];
5409
+ /** @enum {string} */
5410
+ name: "tool_call";
5411
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5412
+ properties: {
5413
+ tool: string;
5414
+ ok: boolean;
5415
+ /** @description A category such as `http_401` or `invalid_input`. Never an error message. */
5416
+ errorCode?: string;
5417
+ durationMs: number;
5418
+ /** @enum {string} */
5419
+ mode: "builder" | "devtools";
5420
+ /** @description Allowlisted arguments only, from `start_integration`, `propose_provider`, and `discover_resolve`. Stored, never forwarded. */
5421
+ input?: {
5422
+ goal?: string;
5423
+ userRequest?: string;
5424
+ domain?: string;
5425
+ dataPoints?: string[];
5426
+ };
5427
+ };
5428
+ } | {
5429
+ id: components["schemas"]["AnalyticsEventID"];
5430
+ /** @enum {string} */
5431
+ name: "login";
5432
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5433
+ properties: {
5434
+ /** @enum {string} */
5435
+ method: "oauth" | "token";
5436
+ };
5437
+ } | {
5438
+ id: components["schemas"]["AnalyticsEventID"];
5439
+ /** @enum {string} */
5440
+ name: "quickstart_goal";
5441
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5442
+ properties: {
5443
+ goal: string;
5444
+ copied: boolean;
5445
+ orgId: components["schemas"]["OrgID"];
5446
+ };
5447
+ } | {
5448
+ id: components["schemas"]["AnalyticsEventID"];
5449
+ /** @enum {string} */
5450
+ name: "help_opened";
5451
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5452
+ properties?: Record<string, never>;
5453
+ } | {
5454
+ id: components["schemas"]["AnalyticsEventID"];
5455
+ /** @enum {string} */
5456
+ name: "help_message_sent";
5457
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5458
+ properties?: Record<string, never>;
5459
+ };
5257
5460
  /** @description A single data point selectable on the `/site/{domain}` page, with how many visible providers expose it, one example provider slug, and one `references` entry per provider describing how that provider proves it (what the site page's source picker offers as selectable options). */
5258
5461
  DataPointItem: {
5259
5462
  /** @description Data-point name (for example, `username`, `followers_count`). */
@@ -7489,7 +7692,7 @@ export interface operations {
7489
7692
  /** @description Set to `csv` to download one section as a spreadsheet instead of rendering the page. Pair it with `section`. A CSV export returns up to 1000 rows, where the page shows only the leading rows of each ranked section. */
7490
7693
  format?: "csv";
7491
7694
  /** @description Which section `format=csv` exports. Each section has its own columns, so one download holds one section. Defaults to `providers`. */
7492
- section?: "providers" | "revenue" | "usage";
7695
+ section?: "providers" | "revenue" | "usage" | "goals" | "tools" | "agents" | "funnel";
7493
7696
  };
7494
7697
  header?: never;
7495
7698
  path?: never;
@@ -11027,6 +11230,75 @@ export interface operations {
11027
11230
  default: components["responses"]["ProblemResponse"];
11028
11231
  };
11029
11232
  };
11233
+ TrackAnalyticsEvents: {
11234
+ parameters: {
11235
+ query?: never;
11236
+ header?: never;
11237
+ path?: never;
11238
+ cookie?: never;
11239
+ };
11240
+ requestBody: {
11241
+ content: {
11242
+ "application/json": components["schemas"]["TrackAnalyticsEventsRequest"];
11243
+ };
11244
+ };
11245
+ responses: {
11246
+ /** @description Accepted. */
11247
+ 202: {
11248
+ headers: {
11249
+ [name: string]: unknown;
11250
+ };
11251
+ content: {
11252
+ "application/json": components["schemas"]["TrackAnalyticsEventsResponse"];
11253
+ };
11254
+ };
11255
+ /** @description Too many events from this client, user, or network. */
11256
+ 429: {
11257
+ headers: {
11258
+ [name: string]: unknown;
11259
+ };
11260
+ content: {
11261
+ "application/problem+json": components["schemas"]["Problem"];
11262
+ };
11263
+ };
11264
+ default: components["responses"]["ProblemResponse"];
11265
+ };
11266
+ };
11267
+ IdentifyAnalyticsClient: {
11268
+ parameters: {
11269
+ query?: never;
11270
+ header?: never;
11271
+ path?: never;
11272
+ cookie?: never;
11273
+ };
11274
+ requestBody: {
11275
+ content: {
11276
+ "application/json": components["schemas"]["IdentifyAnalyticsClientRequest"];
11277
+ };
11278
+ };
11279
+ responses: {
11280
+ /** @description Linked. */
11281
+ 202: {
11282
+ headers: {
11283
+ [name: string]: unknown;
11284
+ };
11285
+ content: {
11286
+ "application/json": components["schemas"]["IdentifyAnalyticsClientResponse"];
11287
+ };
11288
+ };
11289
+ 401: components["responses"]["ProblemResponse"];
11290
+ /** @description Too many requests. */
11291
+ 429: {
11292
+ headers: {
11293
+ [name: string]: unknown;
11294
+ };
11295
+ content: {
11296
+ "application/problem+json": components["schemas"]["Problem"];
11297
+ };
11298
+ };
11299
+ default: components["responses"]["ProblemResponse"];
11300
+ };
11301
+ };
11030
11302
  ListOrgCallbackSubscriptions: {
11031
11303
  parameters: {
11032
11304
  query?: never;
@@ -1,5 +1,5 @@
1
1
  // AUTO-GENERATED by packages/app/scripts/openapi-typegen.ts
2
- // from packages/app/openapi.yaml (spec v0.1.0, source sha256:ecdb0ee6d82e).
2
+ // from packages/app/openapi.yaml (spec v0.1.0, source sha256:c3421d6bcf76).
3
3
  // The hash catches drift the version misses (a spec can change without a
4
4
  // version bump) — do not remove it as "redundant" with the version.
5
5
  // Run `npm run openapi:gen --workspace=packages/app` to regenerate. Do not edit by hand.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@reclaimprotocol/client",
3
3
  "title": "Reclaim Client",
4
- "version": "0.1.40",
4
+ "version": "0.1.41",
5
5
  "description": "Typed SDK/HTTP client SDK for the Reclaim Protocol — the programmatic way to use Reclaim Protocol to verify **data points** about your users (a follower count, an account balance, an order). Can be directly integrated by apps to request verification for their users using Reclaim Protocol and verify the results.",
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/src/routes.gen.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // AUTO-GENERATED by packages/app/scripts/mcp-tools-gen.ts
2
- // from packages/app/openapi.yaml (spec v0.1.0, source sha256:ecdb0ee6d82e).
2
+ // from packages/app/openapi.yaml (spec v0.1.0, source sha256:c3421d6bcf76).
3
3
  // The hash catches drift the version misses (a spec can change without a
4
4
  // version bump) — do not remove it as "redundant" with the version.
5
5
  // Run `npm run openapi:gen --workspace=packages/app` to regenerate. Do not edit by hand.
@@ -99,6 +99,7 @@ export const ROUTES = {
99
99
  "GetVerificationRecipe": {"method":"get","path":"/verifications/sessions/{sessionId}/recipe"},
100
100
  "GetVerificationResult": {"method":"get","path":"/verifications/sessions/{sessionId}/result"},
101
101
  "GetVerificationSession": {"method":"get","path":"/verifications/sessions/{sessionId}"},
102
+ "IdentifyAnalyticsClient": {"method":"post","path":"/analytics/identify"},
102
103
  "ImportDevtoolsProvider": {"method":"post","path":"/providers/import/devtools"},
103
104
  "Index": {"method":"get","path":"/"},
104
105
  "IssueOrgToken": {"method":"post","path":"/orgs/{orgId}/token"},
@@ -166,6 +167,7 @@ export const ROUTES = {
166
167
  "SubmitProviderVersionForReview": {"method":"post","path":"/providers/{providerId}/versions/{version}/review"},
167
168
  "SubmitPublicContributionFeedback": {"method":"post","path":"/contribute/{publicId}/feedback"},
168
169
  "SubmitVerificationClientResult": {"method":"post","path":"/verifications/sessions/{sessionId}/results"},
170
+ "TrackAnalyticsEvents": {"method":"post","path":"/analytics/events"},
169
171
  "TransferProvider": {"method":"post","path":"/providers/{providerId}/transfer"},
170
172
  "UpdateAnnouncementBar": {"method":"put","path":"/admin/announcement-bar"},
171
173
  "UpdateBillingPlan": {"method":"put","path":"/admin/billing/plans/{planId}"},
@@ -1,5 +1,5 @@
1
1
  // AUTO-GENERATED by packages/app/scripts/openapi-typegen.ts
2
- // from packages/app/openapi.yaml (spec v0.1.0, source sha256:ecdb0ee6d82e).
2
+ // from packages/app/openapi.yaml (spec v0.1.0, source sha256:c3421d6bcf76).
3
3
  // The hash catches drift the version misses (a spec can change without a
4
4
  // version bump) — do not remove it as "redundant" with the version.
5
5
  // Run `npm run openapi:gen --workspace=packages/app` to regenerate. Do not edit by hand.
@@ -2650,6 +2650,46 @@ export interface paths {
2650
2650
  patch?: never;
2651
2651
  trace?: never;
2652
2652
  };
2653
+ "/analytics/events": {
2654
+ parameters: {
2655
+ query?: never;
2656
+ header?: never;
2657
+ path?: never;
2658
+ cookie?: never;
2659
+ };
2660
+ get?: never;
2661
+ put?: never;
2662
+ /**
2663
+ * Record product analytics events
2664
+ * @description Records up to 50 product events from the dashboard or the Reclaim MCP server. Anyone can call it, because the MCP server sends events before the developer signs in. A signed-in caller's events are attributed to them; anonymous events are linked when the client calls `POST /analytics/identify`. Send the same event `id` when you retry, and Builder stores the event once. Each client, user, and network address has a per-minute limit (429).
2665
+ */
2666
+ post: operations["TrackAnalyticsEvents"];
2667
+ delete?: never;
2668
+ options?: never;
2669
+ head?: never;
2670
+ patch?: never;
2671
+ trace?: never;
2672
+ };
2673
+ "/analytics/identify": {
2674
+ parameters: {
2675
+ query?: never;
2676
+ header?: never;
2677
+ path?: never;
2678
+ cookie?: never;
2679
+ };
2680
+ get?: never;
2681
+ put?: never;
2682
+ /**
2683
+ * Link an analytics client to the signed-in user
2684
+ * @description Links a client ID to the signed-in user and attributes that client's anonymous events from the last 30 days to them. Call it after sign-in. Requires a signed-in user (401). Rate limited like `POST /analytics/events` (429).
2685
+ */
2686
+ post: operations["IdentifyAnalyticsClient"];
2687
+ delete?: never;
2688
+ options?: never;
2689
+ head?: never;
2690
+ patch?: never;
2691
+ trace?: never;
2692
+ };
2653
2693
  "/orgs/{orgId}/callback-subscriptions": {
2654
2694
  parameters: {
2655
2695
  query?: never;
@@ -4453,6 +4493,56 @@ export interface components {
4453
4493
  includedLimit: number;
4454
4494
  }[];
4455
4495
  }[];
4496
+ /** @description What developers typed into the coding-agent quick start's goal field, from `quickstart_goal` events, most recent activity first. One row per distinct goal per user and organization. */
4497
+ goals: {
4498
+ goal: string;
4499
+ /** @description The developer copied the prompt with this goal. */
4500
+ copied: boolean;
4501
+ /**
4502
+ * Format: date-time
4503
+ * @description First typed in this period.
4504
+ */
4505
+ createdAt: string;
4506
+ /**
4507
+ * Format: date-time
4508
+ * @description Last typed or copied in this period.
4509
+ */
4510
+ updatedAt: string;
4511
+ userId: components["schemas"]["UserID"];
4512
+ userEmail: string;
4513
+ userName: string;
4514
+ orgId: components["schemas"]["OrgID"];
4515
+ orgName: string;
4516
+ }[];
4517
+ /** @description Coding-agent activity reported by the Reclaim MCP server in the window. `toolCalls` and `clients` come from a daily rollup that refreshes every 15 minutes. The `orgId` filter doesn't apply here. */
4518
+ agents: {
4519
+ /**
4520
+ * Format: date-time
4521
+ * @description When the rollup last refreshed. Absent before the first refresh.
4522
+ */
4523
+ refreshedAt?: string;
4524
+ toolCalls: {
4525
+ tool: string;
4526
+ calls: number;
4527
+ errors: number;
4528
+ avgDurationMs?: number;
4529
+ }[];
4530
+ clients: {
4531
+ /** @description `unknown` when the client did not name itself. */
4532
+ agentName: string;
4533
+ sessions: number;
4534
+ toolCalls: number;
4535
+ toolErrors: number;
4536
+ }[];
4537
+ /** @description Active developers: those whose MCP activity in the window is linked to a Builder account, whether they signed in during the window or linked earlier events on a later sign-in. Then how many of them also reached each later step. */
4538
+ funnel: {
4539
+ active: number;
4540
+ attachedBrowser: number;
4541
+ captured: number;
4542
+ proved: number;
4543
+ published: number;
4544
+ };
4545
+ };
4456
4546
  };
4457
4547
  /** @description The org's consumption this billing period against its plan's allowances, per pool. */
4458
4548
  OrgUsage: {
@@ -5260,6 +5350,119 @@ export interface components {
5260
5350
  CreateFixWithAiSessionRequest: {
5261
5351
  providerId: components["schemas"]["ProviderID"];
5262
5352
  };
5353
+ /**
5354
+ * Format: uuid
5355
+ * @description A random ID the client creates once and keeps: the MCP server stores it in `~/.reclaim/config.json`, the dashboard in local storage.
5356
+ */
5357
+ AnalyticsClientID: string;
5358
+ /**
5359
+ * Format: uuid
5360
+ * @description A random ID per event. Reuse it when you retry.
5361
+ */
5362
+ AnalyticsEventID: string;
5363
+ /**
5364
+ * Format: date-time
5365
+ * @description When the event happened, by the client's clock. Builder drops an event dated more than 72 hours before, or more than five minutes after, it receives the batch. The response's `stored` count leaves them out.
5366
+ */
5367
+ AnalyticsEventTimestamp: string;
5368
+ /** @description Applies to every event in the batch. */
5369
+ AnalyticsContext: {
5370
+ sessionId?: string;
5371
+ /** @description The MCP client, such as Claude Code, as it names itself. */
5372
+ agent?: {
5373
+ name: string;
5374
+ version?: string;
5375
+ };
5376
+ app?: {
5377
+ version?: string;
5378
+ };
5379
+ };
5380
+ /** @description Body for `POST /analytics/events`. */
5381
+ TrackAnalyticsEventsRequest: {
5382
+ clientId: components["schemas"]["AnalyticsClientID"];
5383
+ /** @enum {string} */
5384
+ source: "dashboard" | "mcp";
5385
+ context?: components["schemas"]["AnalyticsContext"];
5386
+ events: components["schemas"]["AnalyticsEvent"][];
5387
+ };
5388
+ TrackAnalyticsEventsResponse: {
5389
+ /** @description Events stored now. Retried events that were already stored don't count. */
5390
+ stored: number;
5391
+ };
5392
+ IdentifyAnalyticsClientRequest: {
5393
+ clientId: components["schemas"]["AnalyticsClientID"];
5394
+ };
5395
+ IdentifyAnalyticsClientResponse: {
5396
+ /** @description Earlier anonymous events now attributed to you. */
5397
+ linked: number;
5398
+ };
5399
+ /** @description One event. `name` selects the shape of `properties`. */
5400
+ AnalyticsEvent: {
5401
+ id: components["schemas"]["AnalyticsEventID"];
5402
+ /** @enum {string} */
5403
+ name: "session_start";
5404
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5405
+ properties: {
5406
+ /** @enum {string} */
5407
+ mode: "builder" | "devtools";
5408
+ agentTools?: boolean;
5409
+ /** @enum {string} */
5410
+ os?: "darwin" | "linux" | "win32" | "other";
5411
+ nodeVersion?: string;
5412
+ };
5413
+ } | {
5414
+ id: components["schemas"]["AnalyticsEventID"];
5415
+ /** @enum {string} */
5416
+ name: "tool_call";
5417
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5418
+ properties: {
5419
+ tool: string;
5420
+ ok: boolean;
5421
+ /** @description A category such as `http_401` or `invalid_input`. Never an error message. */
5422
+ errorCode?: string;
5423
+ durationMs: number;
5424
+ /** @enum {string} */
5425
+ mode: "builder" | "devtools";
5426
+ /** @description Allowlisted arguments only, from `start_integration`, `propose_provider`, and `discover_resolve`. Stored, never forwarded. */
5427
+ input?: {
5428
+ goal?: string;
5429
+ userRequest?: string;
5430
+ domain?: string;
5431
+ dataPoints?: string[];
5432
+ };
5433
+ };
5434
+ } | {
5435
+ id: components["schemas"]["AnalyticsEventID"];
5436
+ /** @enum {string} */
5437
+ name: "login";
5438
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5439
+ properties: {
5440
+ /** @enum {string} */
5441
+ method: "oauth" | "token";
5442
+ };
5443
+ } | {
5444
+ id: components["schemas"]["AnalyticsEventID"];
5445
+ /** @enum {string} */
5446
+ name: "quickstart_goal";
5447
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5448
+ properties: {
5449
+ goal: string;
5450
+ copied: boolean;
5451
+ orgId: components["schemas"]["OrgID"];
5452
+ };
5453
+ } | {
5454
+ id: components["schemas"]["AnalyticsEventID"];
5455
+ /** @enum {string} */
5456
+ name: "help_opened";
5457
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5458
+ properties?: Record<string, never>;
5459
+ } | {
5460
+ id: components["schemas"]["AnalyticsEventID"];
5461
+ /** @enum {string} */
5462
+ name: "help_message_sent";
5463
+ timestamp: components["schemas"]["AnalyticsEventTimestamp"];
5464
+ properties?: Record<string, never>;
5465
+ };
5263
5466
  /** @description A single data point selectable on the `/site/{domain}` page, with how many visible providers expose it, one example provider slug, and one `references` entry per provider describing how that provider proves it (what the site page's source picker offers as selectable options). */
5264
5467
  DataPointItem: {
5265
5468
  /** @description Data-point name (for example, `username`, `followers_count`). */
@@ -7495,7 +7698,7 @@ export interface operations {
7495
7698
  /** @description Set to `csv` to download one section as a spreadsheet instead of rendering the page. Pair it with `section`. A CSV export returns up to 1000 rows, where the page shows only the leading rows of each ranked section. */
7496
7699
  format?: "csv";
7497
7700
  /** @description Which section `format=csv` exports. Each section has its own columns, so one download holds one section. Defaults to `providers`. */
7498
- section?: "providers" | "revenue" | "usage";
7701
+ section?: "providers" | "revenue" | "usage" | "goals" | "tools" | "agents" | "funnel";
7499
7702
  };
7500
7703
  header?: never;
7501
7704
  path?: never;
@@ -11033,6 +11236,75 @@ export interface operations {
11033
11236
  default: components["responses"]["ProblemResponse"];
11034
11237
  };
11035
11238
  };
11239
+ TrackAnalyticsEvents: {
11240
+ parameters: {
11241
+ query?: never;
11242
+ header?: never;
11243
+ path?: never;
11244
+ cookie?: never;
11245
+ };
11246
+ requestBody: {
11247
+ content: {
11248
+ "application/json": components["schemas"]["TrackAnalyticsEventsRequest"];
11249
+ };
11250
+ };
11251
+ responses: {
11252
+ /** @description Accepted. */
11253
+ 202: {
11254
+ headers: {
11255
+ [name: string]: unknown;
11256
+ };
11257
+ content: {
11258
+ "application/json": components["schemas"]["TrackAnalyticsEventsResponse"];
11259
+ };
11260
+ };
11261
+ /** @description Too many events from this client, user, or network. */
11262
+ 429: {
11263
+ headers: {
11264
+ [name: string]: unknown;
11265
+ };
11266
+ content: {
11267
+ "application/problem+json": components["schemas"]["Problem"];
11268
+ };
11269
+ };
11270
+ default: components["responses"]["ProblemResponse"];
11271
+ };
11272
+ };
11273
+ IdentifyAnalyticsClient: {
11274
+ parameters: {
11275
+ query?: never;
11276
+ header?: never;
11277
+ path?: never;
11278
+ cookie?: never;
11279
+ };
11280
+ requestBody: {
11281
+ content: {
11282
+ "application/json": components["schemas"]["IdentifyAnalyticsClientRequest"];
11283
+ };
11284
+ };
11285
+ responses: {
11286
+ /** @description Linked. */
11287
+ 202: {
11288
+ headers: {
11289
+ [name: string]: unknown;
11290
+ };
11291
+ content: {
11292
+ "application/json": components["schemas"]["IdentifyAnalyticsClientResponse"];
11293
+ };
11294
+ };
11295
+ 401: components["responses"]["ProblemResponse"];
11296
+ /** @description Too many requests. */
11297
+ 429: {
11298
+ headers: {
11299
+ [name: string]: unknown;
11300
+ };
11301
+ content: {
11302
+ "application/problem+json": components["schemas"]["Problem"];
11303
+ };
11304
+ };
11305
+ default: components["responses"]["ProblemResponse"];
11306
+ };
11307
+ };
11036
11308
  ListOrgCallbackSubscriptions: {
11037
11309
  parameters: {
11038
11310
  query?: never;